Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(calendar): let organizers set guest permissions (#8578)
gbirman9e99a9a575f4
diff --git a/apps/docs/AI/mcp/tools/create-calendar-event.mdx b/apps/docs/AI/mcp/tools/create-calendar-event.mdxindex f53d8f7848..6d64fb8ba0 100644--- a/apps/docs/AI/mcp/tools/create-calendar-event.mdx+++ b/apps/docs/AI/mcp/tools/create-calendar-event.mdx@@ -31,3 +31,4 @@ Set `eventType` to "out_of_office" to mark the user as out of office (e.g. "mark| `addConference` | boolean | No | Attach a conference supported by this calendar: Google Meet or Microsoft Teams. Check ListCalendars capabilities first. || `eventType` | `"default"` \| `"out_of_office"` | No | The kind of event a create tool call makes. || `outOfOffice` | OutOfOfficeInput | No | Out-of-office decline behavior, used only when eventType is "out_of_office". Omit to just block the time; set `autoDeclineMode` to "decline_all" or "decline_new_only" to have the calendar integration decline conflicting meetings, optionally with a `declineMessage`. |+| `guestPolicy` | GuestPolicy | No | What guests may do: `canModify` (change the event; implies `canInviteOthers`), `canInviteOthers` and `canSeeOtherGuests`. Omit for the defaults: guests may invite others and see the guest list but not modify the event. Google calendars only; an Outlook calendar refuses it. |diff --git a/apps/docs/AI/mcp/tools/update-calendar-event.mdx b/apps/docs/AI/mcp/tools/update-calendar-event.mdxindex 1af4456d3b..e0ba8c756b 100644--- a/apps/docs/AI/mcp/tools/update-calendar-event.mdx+++ b/apps/docs/AI/mcp/tools/update-calendar-event.mdx@@ -34,3 +34,4 @@ A guest without modify rights (`viewerCan.editDetails` false while `viewerCan.rs| `reminders` | EventRemindersInput | No | Replacement notification reminders. `useDefault: true` follows the calendar's own defaults; otherwise `overrides` replaces the whole list with entries of `method` "popup" (a Macro notification) or "email" and `minutes` before the start — an empty list silences the event. Omit to keep the current reminders. || `rsvp` | `"accepted"` \| `"declined"` \| `"tentative"` | No | Set the user's own response to the invitation: "accepted", "declined", or "tentative". Omit to leave their response alone. || `outOfOffice` | OutOfOfficeInput | No | Adjust out-of-office decline behavior; only valid on an event that is already out of office (its event type cannot be changed). Replaces the whole block: set `autoDeclineMode` ("decline_none", "decline_all", or "decline_new_only") and optionally `declineMessage`. Omit to leave it untouched. |+| `guestPolicy` | GuestPolicy | No | Replace what guests may do: `canModify` (change the event; implies `canInviteOthers`), `canInviteOthers` and `canSeeOtherGuests`, all three required. Only the organizer of a Google event may set it (`viewerCan.setGuestPolicy`), and only with scope "all": it belongs to the whole series. Outlook events have none. Omit to leave it untouched. |diff --git a/apps/web/src/features/block-calendar/components/EventComposerSplit.tsx b/apps/web/src/features/block-calendar/components/EventComposerSplit.tsxindex 92fe38e19b..94502c7abd 100644--- a/apps/web/src/features/block-calendar/components/EventComposerSplit.tsx+++ b/apps/web/src/features/block-calendar/components/EventComposerSplit.tsx@@ -94,6 +94,7 @@ function EventComposerContent(disabledFields={editor.disabledFields()}addOnlyGuests={editor.addOnlyGuests()}guestsReadOnlyReason={editor.guestsReadOnlyReason()}+ guestPolicyEditable={editor.guestPolicyEditable()}detailsReadOnlyReason={editor.detailsReadOnlyReason()}showRecurringEditNotice={editor.showRecurringEditNotice()}pending={editor.pending()}diff --git a/apps/web/src/features/calendar-view/components/EventGuests.test.tsx b/apps/web/src/features/calendar-view/components/EventGuests.test.tsxindex 27f046bceb..f5db19c391 100644--- a/apps/web/src/features/calendar-view/components/EventGuests.test.tsx+++ b/apps/web/src/features/calendar-view/components/EventGuests.test.tsx@@ -7,6 +7,7 @@ import type { CalendarEvent } from '@app/features/calendar/types';import type { CalendarAttendee } from '@service-storage/generated/schemas/calendarAttendee';import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';import userEvent from '@testing-library/user-event';+import { createSignal } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { EventGuests } from './EventGuests';@@ -120,6 +121,7 @@ const MAY_INVITE = {removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,};function event(overrides: Partial<CalendarEvent> = {}): CalendarEvent {@@ -306,6 +308,39 @@ describe('adding guests from event details', () => {).toBeTruthy();});+ it('switches to the explanation once the organizer turns inviting off', () => {+ const [current, setCurrent] = createSignal(event());+ render(() => {+ const invites = createGuestInviteController(current, () => true);+ return (+ <EventGuests+ event={current()}+ invites={invites}+ closeDetails={vi.fn()}+ />+ );+ });+ expect(screen.getByRole('button', { name: 'Add guests' })).toBeTruthy();++ // The refetched event after the organizer's save echoes the new policy,+ // and the server resolves the guest's capabilities from it.+ setCurrent(+ event({+ guestPolicy: {+ canModify: false,+ canInviteOthers: false,+ canSeeOtherGuests: true,+ },+ viewerCan: { ...MAY_INVITE, inviteGuests: false },+ })+ );++ expect(screen.queryByRole('button', { name: 'Add guests' })).toBeNull();+ expect(+ screen.getByText('Only the organizer can invite guests.')+ ).toBeTruthy();+ });+it('switches to the explanation when the organizer refuses the invitation', async () => {mocks.invite.mockRejectedValue({ code: 'guests_cannot_invite' });const user = userEvent.setup();diff --git a/apps/web/src/features/calendar-view/components/SharedEventActions.test.tsx b/apps/web/src/features/calendar-view/components/SharedEventActions.test.tsxindex 8431e237d2..501de746f5 100644--- a/apps/web/src/features/calendar-view/components/SharedEventActions.test.tsx+++ b/apps/web/src/features/calendar-view/components/SharedEventActions.test.tsx@@ -62,6 +62,7 @@ function calendar(overrides: Partial<VisibleCalendar>): VisibleCalendar {autoDecline: true,customRecurrence: true,emailReminders: true,+ guestPolicy: true,removeConference: true,resetRsvp: true,},diff --git a/apps/web/src/features/calendar/components/composer/EventForm.test.tsx b/apps/web/src/features/calendar/components/composer/EventForm.test.tsxindex a30c832fe2..61a1ec4ef6 100644--- a/apps/web/src/features/calendar/components/composer/EventForm.test.tsx+++ b/apps/web/src/features/calendar/components/composer/EventForm.test.tsx@@ -41,6 +41,7 @@ const WORK_CALENDAR: EventEditorCalendarOption = {customRecurrence: false,removeConference: false,resetRsvp: false,+ guestPolicy: true,conferenceProvider: 'google_meet',},label: 'Work',@@ -159,3 +160,49 @@ it('keeps a guest the organizer does not let modify to their own reminders', asyawait user.click(screen.getByRole('button', { name: /Notifications/ }));expect(screen.getAllByRole('option').length).toBeGreaterThan(0);});++it('lets the organizer set guest permissions, with modifying implying inviting', async () => {+ const user = userEvent.setup();+ showForm({ guestPolicyEditable: true });++ const permissions = screen.getByRole('group', { name: 'Guest permissions' });+ const modify = screen.getByRole('checkbox', { name: 'Modify event' });+ const invite = screen.getByRole('checkbox', { name: 'Invite others' });+ const seeGuests = screen.getByRole('checkbox', { name: 'See guest list' });+ expect(permissions).toBeTruthy();+ expect([+ (modify as HTMLInputElement).checked,+ (invite as HTMLInputElement).checked,+ (seeGuests as HTMLInputElement).checked,+ ]).toEqual([false, true, true]);++ await user.click(invite);+ expect((invite as HTMLInputElement).checked).toBe(false);+ await user.click(modify);+ expect((modify as HTMLInputElement).checked).toBe(true);+ expect((invite as HTMLInputElement).checked).toBe(true);+ expect((invite as HTMLInputElement).disabled).toBe(true);+});++it('offers no guest permissions without the organizer’s rights', () => {+ showForm();++ expect(screen.queryByRole('group', { name: 'Guest permissions' })).toBeNull();+});++it('returns guest permissions to the stored ones when an edit targets one occurrence', async () => {+ const user = userEvent.setup();+ showForm({+ isEdit: true,+ guestPolicyEditable: true,+ showRecurringEditNotice: true,+ });+ const seeGuests = screen.getByRole('checkbox', { name: 'See guest list' });++ await user.click(seeGuests);+ expect((seeGuests as HTMLInputElement).checked).toBe(false);+ await user.click(screen.getByRole('radio', { name: 'This event' }));++ expect((seeGuests as HTMLInputElement).checked).toBe(true);+ expect((seeGuests as HTMLInputElement).disabled).toBe(true);+});diff --git a/apps/web/src/features/calendar/components/composer/EventForm.tsx b/apps/web/src/features/calendar/components/composer/EventForm.tsxindex a6f5d3b82f..f8c30c01f6 100644--- a/apps/web/src/features/calendar/components/composer/EventForm.tsx+++ b/apps/web/src/features/calendar/components/composer/EventForm.tsx@@ -17,6 +17,7 @@ import {} from '../../utils/calendar-description';import type { CalendarEventFormController } from './create-calendar-event-form-controller';import { EventDateTimeRangeFields } from './EventDateTimeRangeFields';+import { EventGuestPolicyRow } from './EventGuestPolicyRow';import {EventComposerCalendarPill,EventComposerConferencePill,@@ -45,6 +46,8 @@ export interface EventFormProps {addOnlyGuests?: boolean;/** Why a read-only guest list cannot change. */guestsReadOnlyReason?: string;+ /** Whether the viewer may set what guests may do, as the organizer. */+ guestPolicyEditable?: boolean;/*** Why the event's title, time, description, location, recurrence and* conferencing cannot change.@@ -103,6 +106,12 @@ export function EventForm(props: EventFormProps) {// Recurring edits default to the whole series, matching the long-standing// behavior; "this event" writes a single-occurrence exception.const [editScope, setEditScope] = createSignal<CalendarUpdateScope>('all');+ // Guest permissions belong to the whole series, so an occurrence edit+ // returns them to what is stored rather than keep an edit it cannot save.+ const changeEditScope = (scope: CalendarUpdateScope) => {+ setEditScope(scope);+ if (scope === 'this_event') controller.resetGuestPolicy();+ };// An invalid range already speaks for itself; only one line shows at a time.const pastEventWarning = () =>@@ -384,6 +393,22 @@ export function EventForm(props: EventFormProps) {/></div>+ {/* Outlook has no guest permissions, and an out-of-office event+ no guests. */}+ <Show+ when={+ props.guestPolicyEditable &&+ capabilities()?.guestPolicy !== false &&+ !isOutOfOffice()+ }+ >+ {/* The policy belongs to the whole series, like its recurrence. */}+ <EventGuestPolicyRow+ value={controller.guestPolicy()}+ onChange={controller.setGuestPolicy}+ disabled={formIsDisabled() || editScope() === 'this_event'}+ />+ </Show><Show when={props.detailsReadOnlyReason}>{(reason) => <p class="text-xs text-ink-muted">{reason()}</p>}</Show>@@ -461,7 +486,7 @@ export function EventForm(props: EventFormProps) {<Show when={props.showRecurringEditNotice}><RadioGroupvalue={editScope()}- onChange={(value) => setEditScope(value as CalendarUpdateScope)}+ onChange={(value) => changeEditScope(value as CalendarUpdateScope)}disabled={formIsDisabled()}aria-label="Apply changes to"class="mr-auto flex-row items-center gap-3 text-xs text-ink-muted"diff --git a/apps/web/src/features/calendar/components/composer/EventGuestPolicyRow.tsx b/apps/web/src/features/calendar/components/composer/EventGuestPolicyRow.tsxnew file mode 100644index 0000000000..b21cd3f22c--- /dev/null+++ b/apps/web/src/features/calendar/components/composer/EventGuestPolicyRow.tsx@@ -0,0 +1,57 @@+import type { GuestPolicy } from '@service-storage/generated/schemas/guestPolicy';+import { Checkbox } from '@ui';+import { createUniqueId, For } from 'solid-js';++/** Google Calendar's wording and order. */+const GUEST_PERMISSIONS = [+ { key: 'canModify', label: 'Modify event' },+ { key: 'canInviteOthers', label: 'Invite others' },+ { key: 'canSeeOtherGuests', label: 'See guest list' },+] as const satisfies readonly { key: keyof GuestPolicy; label: string }[];++export interface EventGuestPolicyRowProps {+ value: GuestPolicy;+ onChange: (value: GuestPolicy) => void;+ disabled?: boolean;+}++/**+ * What guests may do with the event. As in Google Calendar, guests who may+ * modify the event may also invite others.+ */+export function EventGuestPolicyRow(props: EventGuestPolicyRowProps) {+ const labelId = `event-guest-permissions-${createUniqueId()}`;+ const change = (key: keyof GuestPolicy, checked: boolean) => {+ const next = { ...props.value, [key]: checked };+ if (next.canModify) next.canInviteOthers = true;+ props.onChange(next);+ };++ return (+ <div+ role="group"+ aria-labelledby={labelId}+ class="flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1 text-xs text-ink-muted"+ >+ <span id={labelId} class="font-medium">+ Guest permissions+ </span>+ <For each={GUEST_PERMISSIONS}>+ {(permission) => (+ <Checkbox+ checked={props.value[permission.key]}+ onChange={(checked) => change(permission.key, checked)}+ disabled={+ props.disabled ||+ (permission.key === 'canInviteOthers' && props.value.canModify)+ }+ class="touch:min-h-[44px]"+ >+ <Checkbox.Control />+ <Checkbox.Label>{permission.label}</Checkbox.Label>+ </Checkbox>+ )}+ </For>+ </div>+ );+}diff --git a/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.test.ts b/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.test.tsindex 10a4927846..4c814dccb9 100644--- a/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.test.ts+++ b/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.test.ts@@ -468,6 +468,81 @@ describe('out of office', () => {});});+it('submits guest permissions only when they change', () => {+ const controller = controllerFor(+ {+ ...timedRange(3),+ title: 'Planning',+ guestPolicy: {+ canModify: false,+ canInviteOthers: false,+ canSeeOtherGuests: true,+ },+ },+ { isEdit: true }+ );+ expect(controller.isDirty()).toBe(false);+ expect(controller.submitValues()?.guestPolicy).toBeUndefined();++ controller.setGuestPolicy({+ canModify: false,+ canInviteOthers: true,+ canSeeOtherGuests: true,+ });+ expect(controller.isDirty()).toBe(true);+ expect(controller.submitValues()?.guestPolicy).toEqual({+ canModify: false,+ canInviteOthers: true,+ canSeeOtherGuests: true,+ });++ controller.setGuestPolicy({+ canModify: false,+ canInviteOthers: false,+ canSeeOtherGuests: true,+ });+ expect(controller.isDirty()).toBe(false);+ expect(controller.submitValues()?.guestPolicy).toBeUndefined();+});++it('drops guest permissions picked before switching to a calendar without them', () => {+ const google = {+ id: 'work',+ label: 'Work',+ color: '#123456',+ provider: 'google' as const,+ isPrimary: true,+ capabilities: {+ autoDecline: true,+ emailReminders: true,+ customRecurrence: true,+ removeConference: true,+ resetRsvp: true,+ guestPolicy: true,+ },+ };+ const outlook = {+ ...google,+ id: 'personal',+ label: 'Personal Outlook',+ provider: 'outlook' as const,+ capabilities: { ...google.capabilities, guestPolicy: false },+ };+ const controller = controllerFor(+ { ...timedRange(3), title: 'Planning', calendarId: 'work' },+ { calendarOptions: () => [google, outlook] }+ );+ controller.setGuestPolicy({+ canModify: true,+ canInviteOthers: true,+ canSeeOtherGuests: true,+ });+ expect(controller.submitValues()?.guestPolicy).toBeDefined();++ controller.setField('calendarId', 'personal');+ expect(controller.submitValues()?.guestPolicy).toBeUndefined();+});+it('preserves a requested conference on an unsupported calendar until the user resolves it', () => {const controller = controllerFor({ ...timedRange(3), title: 'Meeting', conference: 'google_meet' },@@ -485,6 +560,7 @@ it('preserves a requested conference on an unsupported calendar until the user rcustomRecurrence: false,removeConference: false,resetRsvp: false,+ guestPolicy: false,},},],@@ -523,6 +599,7 @@ it('allows unrelated edits to an existing Teams meeting on a calendar without cocustomRecurrence: false,removeConference: false,resetRsvp: false,+ guestPolicy: false,},},],diff --git a/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.ts b/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.tsindex df2661d60c..d6d6e3aa7d 100644--- a/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.ts+++ b/apps/web/src/features/calendar/components/composer/create-calendar-event-form-controller.ts@@ -1,5 +1,7 @@import type { OutOfOfficeProperties } from '@service-calendar/generated/schemas/outOfOfficeProperties';+import type { GuestPolicy } from '@service-storage/generated/schemas/guestPolicy';import { type Accessor, batch, createMemo, createSignal } from 'solid-js';+import { DEFAULT_GUEST_POLICY } from '../../types';import {buildReminderOverrides,popupMinutes,@@ -47,6 +49,19 @@ interface EventComposerFormSnapshot {eventKind: EventEditorEventKind;autoDeclineMode?: EventEditorOutOfOffice['autoDeclineMode'];declineMessage: string;+ guestPolicy: GuestPolicy;+}++function guestPolicyOf(values: EventEditorInitialValues): GuestPolicy {+ return values.guestPolicy ?? DEFAULT_GUEST_POLICY;+}++function guestPoliciesEqual(first: GuestPolicy, second: GuestPolicy) {+ return (+ first.canModify === second.canModify &&+ first.canInviteOthers === second.canInviteOthers &&+ first.canSeeOtherGuests === second.canSeeOtherGuests+ );}function normalizedGuestEmails(emails: readonly string[]) {@@ -91,6 +106,7 @@ function isEventComposerFormDirty(initial.eventKind !== current.eventKind ||initial.autoDeclineMode !== current.autoDeclineMode ||initial.declineMessage !== current.declineMessage ||+ !guestPoliciesEqual(initial.guestPolicy, current.guestPolicy) ||!arraysEqual(normalizedGuestEmails(initial.guestEmails),normalizedGuestEmails(current.guestEmails)@@ -125,6 +141,7 @@ function cloneValue(value: EventEditorInitialValues): EventEditorInitialValues {}: undefined,outOfOffice: value.outOfOffice ? { ...value.outOfOffice } : undefined,+ guestPolicy: value.guestPolicy ? { ...value.guestPolicy } : undefined,};}@@ -305,6 +322,7 @@ export function createCalendarEventFormController(: state().conference,reminderMinutes: normalizedReminderMinutes(reminderMinutes()),...outOfOfficeSnapshotFields(state()),+ guestPolicy: guestPolicyOf(state()),});const initialSnapshot = (): EventComposerFormSnapshot => {@@ -324,6 +342,7 @@ export function createCalendarEventFormController(conference: blanks ? 'none' : initialValue().conference,reminderMinutes: normalizedReminderMinutes(initialReminderMinutes()),...outOfOfficeSnapshotFields(initialValue()),+ guestPolicy: guestPolicyOf(initialValue()),};};@@ -520,6 +539,13 @@ export function createCalendarEventFormController(const current = state();const reminders = reminderUpdate();const outOfOffice = submittedOutOfOffice();+ const guestPolicy = guestPolicyOf(current);+ // Outlook calendars have no guest permissions, so a policy picked before+ // switching to one is not sent.+ const guestPolicyChanged =+ !isOutOfOffice() &&+ selectedCalendarOption()?.capabilities?.guestPolicy !== false &&+ !guestPoliciesEqual(guestPolicy, guestPolicyOf(initialValue()));const providerConference =current.conference === 'macro' ? 'none' : current.conference;const initialProviderConference =@@ -550,6 +576,7 @@ export function createCalendarEventFormController(...(conference ? { conference } : {}),...(reminders ? { reminders } : {}),...(outOfOffice ? { outOfOffice } : {}),+ ...(guestPolicyChanged ? { guestPolicy } : {}),};};@@ -587,6 +614,10 @@ export function createCalendarEventFormController(isOutOfOffice,setEventKind,setOutOfOffice,+ guestPolicy: () => guestPolicyOf(state()),+ setGuestPolicy: (guestPolicy: GuestPolicy) =>+ setField('guestPolicy', guestPolicy),+ resetGuestPolicy: () => setField('guestPolicy', initialValue().guestPolicy),setSelectedGuests,startForRecurrence: recurrence.startForRecurrence,recurrenceChoice: recurrence.recurrenceChoice,diff --git a/apps/web/src/features/calendar/components/composer/event-form-model.ts b/apps/web/src/features/calendar/components/composer/event-form-model.tsindex 56e460a52e..6731eefc17 100644--- a/apps/web/src/features/calendar/components/composer/event-form-model.ts+++ b/apps/web/src/features/calendar/components/composer/event-form-model.ts@@ -12,6 +12,7 @@ import type { OutOfOfficeProperties } from '@service-calendar/generated/schemas/import type { EventReminderOverride } from '@service-storage/generated/schemas/eventReminderOverride';import type { EventReminders } from '@service-storage/generated/schemas/eventReminders';import type { EventType } from '@service-storage/generated/schemas/eventType';+import type { GuestPolicy } from '@service-storage/generated/schemas/guestPolicy';import {addDays,addHours,@@ -104,6 +105,8 @@ export interface EventEditorInitialValues {outOfOffice?: EventEditorOutOfOffice;/** Event type of the copy `reminders` belong to. Absent for new events. */reminderEventType?: EventType;+ /** What guests may do; absent means Google's defaults. */+ guestPolicy?: GuestPolicy;}/** Calendar option displayed by the event editor. */@@ -161,6 +164,8 @@ export interface EventEditorSubmitValues {* event that already is.*/outOfOffice?: OutOfOfficeProperties;+ /** Present only when the user changed what guests may do. */+ guestPolicy?: GuestPolicy;}export function defaultEditorInitialValues(@@ -265,6 +270,7 @@ export function calendarEventToEditorInitialValues(reminders: event.reminders,eventType: event.eventType,reminderEventType: event.reminderEventType,+ guestPolicy: event.guestPolicy,};}@@ -290,6 +296,7 @@ export function calendarEventToEditorInitialValues(reminders: event.reminders,eventType: event.eventType,reminderEventType: event.reminderEventType,+ guestPolicy: event.guestPolicy,};}diff --git a/apps/web/src/features/calendar/hooks/use-calendar-occurrence-data.test.tsx b/apps/web/src/features/calendar/hooks/use-calendar-occurrence-data.test.tsxindex 437b753fd8..c0b873b619 100644--- a/apps/web/src/features/calendar/hooks/use-calendar-occurrence-data.test.tsx+++ b/apps/web/src/features/calendar/hooks/use-calendar-occurrence-data.test.tsx@@ -87,6 +87,7 @@ const calendar: VisibleCalendar = {emailReminders: true,removeConference: true,resetRsvp: true,+ guestPolicy: true,},id: 'primary',name: 'My calendar',diff --git a/apps/web/src/features/calendar/hooks/use-event-editor.test.ts b/apps/web/src/features/calendar/hooks/use-event-editor.test.tsindex d49020401f..b6ce20d9fc 100644--- a/apps/web/src/features/calendar/hooks/use-event-editor.test.ts+++ b/apps/web/src/features/calendar/hooks/use-event-editor.test.ts@@ -84,6 +84,7 @@ const savedEvent: CalendarEvent = {removeGuests: true,setGuestPolicy: true,rsvp: false,+ organize: true,},attendees: [],recurrenceLines: [],@@ -815,6 +816,7 @@ describe('scheduling a Macro call', () => {removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,},attendees: [{@@ -1044,6 +1046,7 @@ describe('guests of an event the viewer was invited to', () => {removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,};const mayNotInvite = { ...mayInvite, inviteGuests: false };const mayModify = { ...mayInvite, editDetails: true, removeGuests: true };@@ -1271,3 +1274,114 @@ describe('guests of an event the viewer was invited to', () => {}});});++describe('guest permissions', () => {+ const noInvites = {+ canModify: false,+ canInviteOthers: false,+ canSeeOtherGuests: true,+ };++ function editorFor(event: CalendarEvent | undefined, invitesEnabled = true) {+ return createRoot((dispose) => ({+ editor: useEventEditor({+ event: () => event,+ onSaved: vi.fn(),+ macroCallsEnabled: () => false,+ guestInvitesEnabled: () => invitesEnabled,+ }),+ dispose,+ }));+ }++ it('offers guest permissions only with the guest-invites rollout', () => {+ const { editor, dispose } = editorFor(undefined, false);+ try {+ expect(editor.guestPolicyEditable()).toBe(false);+ } finally {+ dispose();+ }+ });++ it('creates an event with the guest permissions the organizer chose', async () => {+ const { editor, dispose } = editorFor(undefined);+ try {+ expect(editor.guestPolicyEditable()).toBe(true);+ await editor.save({+ ...values,+ conferenceChoice: 'none',+ guestPolicy: noInvites,+ });+ expect(mocks.createEvent.mock.lastCall?.[0].guestPolicy).toEqual(+ noInvites+ );+ } finally {+ dispose();+ }+ });++ it('sends the organizer’s changed guest permissions with the update', async () => {+ const { editor, dispose } = editorFor({ ...savedEvent, location: '' });+ try {+ expect(editor.guestPolicyEditable()).toBe(true);+ await editor.save({+ ...values,+ location: '',+ description: '',+ conferenceChoice: 'none',+ guestEmails: [],+ guestPolicy: noInvites,+ });+ expect(mocks.updateEvent.mock.lastCall?.[0].patch).toEqual({+ guestPolicy: noInvites,+ });+ } finally {+ dispose();+ }+ });++ it('keeps guest permissions out of a change to one occurrence', async () => {+ const { editor, dispose } = editorFor({+ ...savedEvent,+ location: '',+ recurrenceLines: ['RRULE:FREQ=WEEKLY'],+ recurrenceId: '2026-09-22T14:00:00Z',+ });+ try {+ await editor.save(+ {+ ...values,+ location: '',+ description: '',+ conferenceChoice: 'none',+ guestEmails: [],+ recurrenceLines: ['RRULE:FREQ=WEEKLY'],+ guestPolicy: noInvites,+ },+ 'this_event'+ );+ expect(mocks.updateEvent).not.toHaveBeenCalled();+ } finally {+ dispose();+ }+ });++ it('leaves guest permissions to the organizer', () => {+ const { editor, dispose } = editorFor({+ ...savedEvent,+ viewerCan: {+ editDetails: true,+ inviteGuests: true,+ removeGuests: true,+ setGuestPolicy: false,+ rsvp: true,+ organize: false,+ },+ });+ try {+ expect(editor.guestPolicyEditable()).toBe(false);+ } finally {+ dispose();+ }+ });+});diff --git a/apps/web/src/features/calendar/hooks/use-event-editor.ts b/apps/web/src/features/calendar/hooks/use-event-editor.tsindex b15790f8be..32c2615da5 100644--- a/apps/web/src/features/calendar/hooks/use-event-editor.ts+++ b/apps/web/src/features/calendar/hooks/use-event-editor.ts@@ -104,7 +104,11 @@ interface UseEventEditorProps {event: Accessor<CalendarEvent | undefined>;onSaved: () => void;macroCallsEnabled: Accessor<boolean>;- /** Whether a guest the organizer lets invite may add guests; off when omitted. */+ /**+ * Whether the guest-invites rollout is on: a guest the organizer lets+ * invite may add guests, and the organizer may set guest permissions. Off+ * when omitted.+ */guestInvitesEnabled?: Accessor<boolean>;}@@ -312,6 +316,7 @@ export function useEventEditor(props: UseEventEditorProps) {...(needsCall() ? { macroCall: true } : {}),...(values.reminders ? { reminders: values.reminders } : {}),...(values.outOfOffice ? { outOfOffice: values.outOfOffice } : {}),+ ...(values.guestPolicy ? { guestPolicy: values.guestPolicy } : {}),});props.onSaved();return;@@ -388,6 +393,11 @@ export function useEventEditor(props: UseEventEditorProps) {}: {}),...(values.reminders ? { reminders: values.reminders } : {}),+ ...(values.guestPolicy &&+ event.viewerCan.setGuestPolicy &&+ !targetsOneOccurrence+ ? { guestPolicy: values.guestPolicy }+ : {}),},};if (Object.keys(updateArgs.patch).length > 0) {@@ -470,6 +480,10 @@ export function useEventEditor(props: UseEventEditorProps) {disabledFields,addOnlyGuests: () => guestEditing() === 'add',guestsReadOnlyReason,+ /** The organizer sets what guests may do; a new event is the viewer's own. */+ guestPolicyEditable: () =>+ (props.guestInvitesEnabled?.() ?? false) &&+ (props.event()?.viewerCan.setGuestPolicy ?? true),detailsReadOnlyReason: () =>detailsLocked() ? GUEST_EDITS_RESTRICTED : undefined,calendarOptions,diff --git a/apps/web/src/features/calendar/types.test.ts b/apps/web/src/features/calendar/types.test.tsindex 3f9bcd8065..38193ba939 100644--- a/apps/web/src/features/calendar/types.test.ts+++ b/apps/web/src/features/calendar/types.test.ts@@ -165,6 +165,7 @@ describe('mapCalendarOccurrence', () => {removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,};const primary = mapCalendarOccurrence(occurrence, {@@ -320,6 +321,7 @@ describe('mapCalendarEventToFullCalendar', () => {removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,};const source = item([copy('primary')]);source.event.viewerCan = guest;diff --git a/apps/web/src/features/calendar/types.ts b/apps/web/src/features/calendar/types.tsindex ea80ccfbbe..5966b82a3a 100644--- a/apps/web/src/features/calendar/types.ts+++ b/apps/web/src/features/calendar/types.ts@@ -168,6 +168,7 @@ export const NO_VIEWER_CAPABILITIES: ViewerCapabilities = {removeGuests: false,setGuestPolicy: false,rsvp: false,+ organize: false,};/** Shared presentation source until calendar/account metadata is exposed. */diff --git a/apps/web/src/features/calendar/utils/event-guest-editing.test.ts b/apps/web/src/features/calendar/utils/event-guest-editing.test.tsindex 478551d026..584b8bd9bf 100644--- a/apps/web/src/features/calendar/utils/event-guest-editing.test.ts+++ b/apps/web/src/features/calendar/utils/event-guest-editing.test.ts@@ -25,6 +25,7 @@ const ORGANIZER = {removeGuests: true,setGuestPolicy: true,rsvp: true,+ organize: true,};const MODIFYING_GUEST = {editDetails: true,@@ -32,6 +33,7 @@ const MODIFYING_GUEST = {removeGuests: true,setGuestPolicy: false,rsvp: true,+ organize: false,};const INVITING_GUEST = {editDetails: false,@@ -39,6 +41,7 @@ const INVITING_GUEST = {removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,};const GUEST = {editDetails: false,@@ -46,6 +49,7 @@ const GUEST = {removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,};function event(overrides: Partial<CalendarEvent>): CalendarEvent {@@ -93,6 +97,15 @@ describe('eventGuestEditing', () => {);});+ it('lets an Outlook organizer replace the guest list without a guest policy to set', () => {+ expect(+ eventGuestEditing(+ event({ viewerCan: { ...ORGANIZER, setGuestPolicy: false } }),+ true+ )+ ).toBe('replace');+ });+it('lets a guest who may invite add guests only while invites are enabled', () => {expect(eventGuestEditing(invited(INVITING_GUEST), true)).toBe('add');expect(eventGuestEditing(invited(INVITING_GUEST), false)).toBe('none');diff --git a/apps/web/src/features/calendar/utils/event-guest-editing.ts b/apps/web/src/features/calendar/utils/event-guest-editing.tsindex 95961a684a..6683f409be 100644--- a/apps/web/src/features/calendar/utils/event-guest-editing.ts+++ b/apps/web/src/features/calendar/utils/event-guest-editing.ts@@ -46,18 +46,12 @@ function emailListsEqual(first: readonly string[], second: readonly string[]) {export type EventGuestEditing = 'replace' | 'add' | 'none';/**- * Whether the viewer may replace the event's guest list. Only the organizer,- * the one viewer who may also set the guest policy, does: the editor's list- * omits a guest's own entry, so a guest's replacement would drop them, and- * guests add but never remove.+ * Whether the viewer may replace the event's guest list. Only the organizer+ * does: the editor's list omits a guest's own entry, so a guest's+ * replacement would drop them, and guests add but never remove.*/export function viewerReplacesGuests(event: CalendarEvent): boolean {- return (- !event.isReadOnly &&- !event.teamProjection &&- event.viewerCan.removeGuests &&- event.viewerCan.setGuestPolicy- );+ return !event.isReadOnly && !event.teamProjection && event.viewerCan.organize;}/**diff --git a/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.test.tsx b/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.test.tsxindex ee885bf750..98e0a7a133 100644--- a/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.test.tsx+++ b/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.test.tsx@@ -16,10 +16,14 @@ const mocks = vi.hoisted(() => ({startAddInbox: vi.fn(),execute: vi.fn(),quickCalls: () => ({ loading: false, enabled: true }),+ guestInvites: (): boolean => true,}));vi.mock('@app/features/meetings/use-quick-calls-flag', () => ({useQuickCallsFlag: () => () => mocks.quickCalls(),}));+vi.mock('@app/features/calendar/hooks/use-calendar-ui-flag', () => ({+ useCalendarGuestInvitesFlag: () => () => mocks.guestInvites(),+}));vi.mock('@queries/calendar/calendars', () => ({useVisibleCalendarsQuery: () => ({isSuccess: !mocks.calendarError,@@ -124,6 +128,7 @@ const calendar = (id: string): VisibleCalendar => ({customRecurrence: false,removeConference: false,resetRsvp: false,+ guestPolicy: true,},defaultReminders: [],});@@ -164,6 +169,7 @@ beforeEach(() => {mocks.execute.mockResolvedValue(true);mocks.startAddInbox.mockResolvedValue(undefined);mocks.quickCalls = () => ({ loading: false, enabled: true });+ mocks.guestInvites = () => true;mocks.calendarError = false;mocks.linksError = false;mocks.links = [link('personal'), link('work')];@@ -319,6 +325,30 @@ describe('AI calendar draft Macro calls', () => {});});+describe('AI calendar draft guest permissions', () => {+ const agentPolicy = {+ canModify: false,+ canInviteOthers: false,+ canSeeOtherGuests: true,+ };++ it('creates the event with the guest permissions the agent drafted', async () => {+ showDraft(undefined, { guestPolicy: agentPolicy });+ await fireEvent.click(screen.getByRole('button', { name: 'Create event' }));+ expect(mocks.execute).toHaveBeenCalledWith(+ expect.objectContaining({ guestPolicy: agentPolicy })+ );+ });++ it('leaves the drafted guest permissions out while the rollout is off', async () => {+ mocks.guestInvites = () => false;+ showDraft(undefined, { guestPolicy: agentPolicy });+ await fireEvent.click(screen.getByRole('button', { name: 'Create event' }));+ expect(mocks.execute).toHaveBeenCalledOnce();+ expect(mocks.execute.mock.calls[0][0].guestPolicy).toBeUndefined();+ });+});+describe('calendar batch preparation', () => {it('captures the same validated snapshot without creating an event', async () => {let read: (() => Promise<CreateCalendarEvent | undefined>) | undefined;diff --git a/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsx b/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsxindex 240d07dbf0..3ef08d8695 100644--- a/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsx+++ b/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsx@@ -11,6 +11,7 @@import { createCalendarEventFormController } from '@app/features/calendar/components/composer/create-calendar-event-form-controller';import { EventForm } from '@app/features/calendar/components/composer/EventForm';import type { EventEditorSubmitValues } from '@app/features/calendar/components/composer/event-form-model';+import { useCalendarGuestInvitesFlag } from '@app/features/calendar/hooks/use-calendar-ui-flag';import { DEFAULT_CALENDAR_SOURCE } from '@app/features/calendar/types';import {calendarDisplayLabel,@@ -131,6 +132,8 @@ function CalendarDraftComposerContent(props: CalendarDraftComposerProps) {// choice under the same flag as the calendar's own event composer.const quickCalls = useQuickCallsFlag();const macroCallsEnabled = () => quickCalls().enabled && !quickCalls().loading;+ // Guest permissions roll out with guest invites.+ const guestInvitesEnabled = useCalendarGuestInvitesFlag();const [operation, setOperation] = createSignal<'create' | 'reject'>();let finalized = false;@@ -207,7 +210,13 @@ function CalendarDraftComposerContent(props: CalendarDraftComposerProps) {function currentArgs(values = controller.submitValues()) {return values- ? editorSubmitValuesToCreateCalendarEvent(values, props.initialData)+ ? editorSubmitValuesToCreateCalendarEvent(+ values,+ props.initialData,+ guestInvitesEnabled() &&+ controller.selectedCalendarOption()?.capabilities?.guestPolicy !==+ false+ ): undefined;}@@ -316,6 +325,7 @@ function CalendarDraftComposerContent(props: CalendarDraftComposerProps) {<EventFormcontroller={controller}macroCallsEnabled={macroCallsEnabled()}+ guestPolicyEditable={guestInvitesEnabled()}class="min-w-0"disabled={finalized || !props.sink.canAct() || operation() === 'reject'diff --git a/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.test.ts b/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.test.tsindex 205f670f5a..752a5b1b6e 100644--- a/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.test.ts+++ b/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.test.ts@@ -102,7 +102,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {declineMessage: 'On vacation',},}),- event({ addConference: true })+ event({ addConference: true }),+ true);expect(merged.eventType).toBe('out_of_office');expect(merged.outOfOffice).toEqual({@@ -117,7 +118,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {submitValues({outOfOffice: { autoDeclineMode: 'decline_all_conflicting_invitations' },}),- event({})+ event({}),+ true);expect(merged.outOfOffice).toEqual({ autoDeclineMode: 'decline_all' });});@@ -128,7 +130,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {event({eventType: 'out_of_office',outOfOffice: { autoDeclineMode: 'decline_all' },- })+ }),+ true);expect(merged.eventType).toBe('default');expect(merged.outOfOffice).toBeUndefined();@@ -137,7 +140,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {it('keeps a regular event regular', () => {const merged = editorSubmitValuesToCreateCalendarEvent(submitValues({}),- event({})+ event({}),+ true);expect(merged.eventType).toBeUndefined();expect(merged.outOfOffice).toBeUndefined();@@ -146,7 +150,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {it('turns the conferencing choice into exactly one tool flag', () => {const macro = editorSubmitValuesToCreateCalendarEvent(submitValues({ conferenceChoice: 'macro' }),- event({ addConference: true })+ event({ addConference: true }),+ true);expect(macro.addMacroCall).toBe(true);expect(macro.addConference).toBe(false);@@ -156,7 +161,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {conferenceChoice: 'google_meet',conference: 'google_meet',}),- event({ addMacroCall: true })+ event({ addMacroCall: true }),+ true);expect(meet.addMacroCall).toBe(false);expect(meet.addConference).toBe(true);@@ -166,7 +172,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {conferenceChoice: 'microsoft_teams',conference: 'microsoft_teams',}),- event({ addMacroCall: true })+ event({ addMacroCall: true }),+ true);expect(teams.addMacroCall).toBe(false);expect(teams.addConference).toBe(true);@@ -174,7 +181,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {const none = editorSubmitValuesToCreateCalendarEvent(submitValues({ conferenceChoice: 'none' }),- event({ addMacroCall: true })+ event({ addMacroCall: true }),+ true);expect(none.addMacroCall).toBe(false);expect(none.addConference).toBe(false);@@ -186,7 +194,8 @@ describe('editorSubmitValuesToCreateCalendarEvent', () => {conferenceChoice: 'macro',outOfOffice: { autoDeclineMode: 'decline_none' },}),- event({ addMacroCall: true })+ event({ addMacroCall: true }),+ true);expect(merged.addMacroCall).toBe(false);expect(merged.addConference).toBe(false);@@ -200,8 +209,27 @@ it('preserves a pending legacy conference request and emits only the generic fie);const updated = editorSubmitValuesToCreateCalendarEvent(submitValues({ conferenceChoice: 'google_meet' }),- legacy+ legacy,+ true);expect(updated.addConference).toBe(true);expect(updated).not.toHaveProperty('addGoogleMeet');});++it('keeps the proposed guest permissions only on a calendar that has them', () => {+ const policy = {+ canModify: false,+ canInviteOthers: false,+ canSeeOtherGuests: true,+ };+ const proposed = event({ guestPolicy: policy });++ expect(+ editorSubmitValuesToCreateCalendarEvent(submitValues({}), proposed, true)+ .guestPolicy+ ).toEqual(policy);+ expect(+ editorSubmitValuesToCreateCalendarEvent(submitValues({}), proposed, false)+ .guestPolicy+ ).toBeUndefined();+});diff --git a/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.ts b/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.tsindex 3fc99f410f..3d769da216 100644--- a/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.ts+++ b/apps/web/src/lib/core/component/AI/component/tool/calendar/event-form-adapter.ts@@ -86,6 +86,7 @@ export function createCalendarEventToEditorInitialValues(declineMessage: event.outOfOffice?.declineMessage ?? '',}: undefined,+ guestPolicy: event.guestPolicy ?? undefined,};if (event.time.kind === 'allDay') {@@ -147,10 +148,15 @@ function attendees(});}-/** Merge editable EventForm values back into the deferred tool arguments. */+/**+ * Merge editable EventForm values back into the deferred tool arguments.+ * `sendGuestPolicy` is whether guest permissions may be sent: the rollout+ * is on and the chosen calendar has them (Outlook calendars do not).+ */export function editorSubmitValuesToCreateCalendarEvent(values: EventEditorSubmitValues,- original: CompatibleCalendarEvent+ original: CompatibleCalendarEvent,+ sendGuestPolicy: boolean): CreateCalendarEvent {// A create's submit values carry `outOfOffice` exactly while the editor kind// is out of office, so its presence decides the tool's event type.@@ -190,5 +196,9 @@ export function editorSubmitValuesToCreateCalendarEvent(: {}),}: undefined,+ guestPolicy:+ outOfOffice || !sendGuestPolicy+ ? undefined+ : (values.guestPolicy ?? original.guestPolicy),};}diff --git a/apps/web/src/lib/queries/calendar/graphql/map.ts b/apps/web/src/lib/queries/calendar/graphql/map.tsindex ea29259cdf..b2a63b74ff 100644--- a/apps/web/src/lib/queries/calendar/graphql/map.ts+++ b/apps/web/src/lib/queries/calendar/graphql/map.ts@@ -126,6 +126,7 @@ export function mapCalendarEvent(removeGuests: event.viewerCan.removeGuests,setGuestPolicy: event.viewerCan.setGuestPolicy,rsvp: event.viewerCan.rsvp,+ organize: event.viewerCan.organize,},createdAt: restInstant(event.createdAt),updatedAt: restInstant(event.updatedAt),@@ -188,6 +189,7 @@ export function mapVisibleCalendar(emailReminders: calendar.capabilities.emailReminders,removeConference: calendar.capabilities.removeConference,resetRsvp: calendar.capabilities.resetRsvp,+ guestPolicy: calendar.capabilities.guestPolicy,conferenceProvider:calendar.capabilities.conferenceProvider === null? nulldiff --git a/apps/web/src/lib/queries/calendar/graphql/mutations.ts b/apps/web/src/lib/queries/calendar/graphql/mutations.tsindex 2c3e45b190..f891f4bdb0 100644--- a/apps/web/src/lib/queries/calendar/graphql/mutations.ts+++ b/apps/web/src/lib/queries/calendar/graphql/mutations.ts@@ -467,6 +467,7 @@ export async function executeGraphqlUpdate(...(patch.reminders? { reminders: graphqlReminders(patch.reminders) }: {}),+ ...(patch.guestPolicy ? { guestPolicy: patch.guestPolicy } : {}),...(patch.conference? {conference: graphqlEnum<GraphqlCalendarConferenceChange>(@@ -633,7 +634,7 @@ export async function executeGraphqlCreate(comment: null,})),reminders,- guestPolicy: {+ guestPolicy: args.guestPolicy ?? {canModify: false,canInviteOthers: true,canSeeOtherGuests: true,@@ -645,8 +646,9 @@ export async function executeGraphqlCreate(editDetails: true,inviteGuests: true,removeGuests: true,- setGuestPolicy: true,+ setGuestPolicy: calendar?.capabilities.guestPolicy ?? false,rsvp: false,+ organize: true,},createdAt: now,updatedAt: now,@@ -702,6 +704,7 @@ export async function executeGraphqlCreate(}: {}),...(args.macroCall ? { macroCall: true } : {}),+ ...(args.guestPolicy ? { guestPolicy: args.guestPolicy } : {}),...(args.outOfOffice? {outOfOffice: {diff --git a/apps/web/src/lib/queries/calendar/graphql/optimistic.ts b/apps/web/src/lib/queries/calendar/graphql/optimistic.tsindex c7ddfc1271..3a190eb849 100644--- a/apps/web/src/lib/queries/calendar/graphql/optimistic.ts+++ b/apps/web/src/lib/queries/calendar/graphql/optimistic.ts@@ -1,6 +1,7 @@import type { CalendarGuestInputBody } from '@service-calendar/generated/schemas/calendarGuestInputBody';import type { EventReminders } from '@service-storage/generated/schemas/eventReminders';import type { EventTime } from '@service-storage/generated/schemas/eventTime';+import type { GuestPolicy } from '@service-storage/generated/schemas/guestPolicy';import type {CalendarAttendeeFieldsFragment,CalendarEventFieldsFragment,@@ -133,6 +134,7 @@ export interface EventFieldPatch {location?: string | null;reminders?: EventReminders | null;time?: EventTime | null;+ guestPolicy?: GuestPolicy | null;}type CopyContent = Pick<@@ -173,6 +175,9 @@ export function patchedEvent(copy.calendarId === target ? patchCopy(copy, patch) : copy);if (patch.time) next.time = graphqlTimeRecord(patch.time);+ if (patch.guestPolicy && patchesCanonical) {+ next.guestPolicy = { ...next.guestPolicy, ...patch.guestPolicy };+ }return next;}diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/fixtures.ts b/apps/web/src/lib/queries/calendar/graphql/tests/fixtures.tsindex 3f40d78a8c..f761681c6a 100644--- a/apps/web/src/lib/queries/calendar/graphql/tests/fixtures.ts+++ b/apps/web/src/lib/queries/calendar/graphql/tests/fixtures.ts@@ -95,6 +95,7 @@ export function graphqlEvent(removeGuests: false,setGuestPolicy: false,rsvp: true,+ organize: false,},createdAt: '2026-09-01T12:00:00+00:00',updatedAt: '2026-09-02T12:00:00.250+00:00',diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/map.test.ts b/apps/web/src/lib/queries/calendar/graphql/tests/map.test.tsindex 04b64798ef..be5e268b78 100644--- a/apps/web/src/lib/queries/calendar/graphql/tests/map.test.ts+++ b/apps/web/src/lib/queries/calendar/graphql/tests/map.test.ts@@ -151,6 +151,7 @@ describe('mapVisibleCalendar', () => {emailReminders: supported,removeConference: supported,resetRsvp: supported,+ guestPolicy: supported,},id: 'calendar-1',linkId: 'link-1',@@ -174,6 +175,7 @@ describe('mapVisibleCalendar', () => {emailReminders: supported,removeConference: supported,resetRsvp: supported,+ guestPolicy: supported,},emailAddress: '[email protected]',name: 'Me',diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/mutations.test.ts b/apps/web/src/lib/queries/calendar/graphql/tests/mutations.test.tsindex 700d2ce011..a3397c15ab 100644--- a/apps/web/src/lib/queries/calendar/graphql/tests/mutations.test.ts+++ b/apps/web/src/lib/queries/calendar/graphql/tests/mutations.test.ts@@ -154,6 +154,16 @@ function fakeClient(isSubscription: false,syncError: null,defaultReminders: [],+ provider: 'GOOGLE',+ capabilities: {+ autoDecline: true,+ conferenceProvider: 'GOOGLE_MEET',+ customRecurrence: true,+ emailReminders: true,+ removeConference: true,+ resetRsvp: true,+ guestPolicy: true,+ },},],},diff --git a/apps/web/src/lib/queries/calendar/mutations.ts b/apps/web/src/lib/queries/calendar/mutations.tsindex d2316e735b..aa2a49ca63 100644--- a/apps/web/src/lib/queries/calendar/mutations.ts+++ b/apps/web/src/lib/queries/calendar/mutations.ts@@ -706,6 +706,9 @@ function applyEventPatch(const event = patchesCanonical? applyCopyPatch(item.event, patch): { ...item.event };+ if (patch.guestPolicy && patchesCanonical) {+ event.guestPolicy = patch.guestPolicy;+ }if (sources.length > 0) {event.sources = sources.map((copy) =>copy.calendarId === targetCalendarId ? applyCopyPatch(copy, patch) : copydiff --git a/apps/web/src/lib/queries/calendar/tests/handoff.test.tsx b/apps/web/src/lib/queries/calendar/tests/handoff.test.tsxindex 6c09c25fa2..af4f16f0e2 100644--- a/apps/web/src/lib/queries/calendar/tests/handoff.test.tsx+++ b/apps/web/src/lib/queries/calendar/tests/handoff.test.tsx@@ -78,6 +78,7 @@ const calendar: CalendarFieldsFragment = {emailReminders: true,removeConference: true,resetRsvp: true,+ guestPolicy: true,},id: 'calendar-1',linkId: 'link-1',diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarCapabilities.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarCapabilities.tsindex 0368ccf1f0..cb5893c301 100644--- a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarCapabilities.ts+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarCapabilities.ts@@ -17,6 +17,8 @@ export interface CalendarCapabilities {customRecurrence: boolean;/** Whether email reminders are delivered by the provider or Macro. */emailReminders: boolean;+ /** Whether the organizer can set what guests may do. */+ guestPolicy: boolean;/** Whether an existing conference can be detached. */removeConference: boolean;/** Whether an attendee can reset their RSVP to unanswered. */diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarMutationErrorCode.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarMutationErrorCode.tsindex 2856082d20..22f75af292 100644--- a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarMutationErrorCode.ts+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/calendarMutationErrorCode.ts@@ -18,6 +18,7 @@ export const CalendarMutationErrorCode = {read_only: 'read_only',no_writable_calendar: 'no_writable_calendar',not_attendee: 'not_attendee',+ not_organizer: 'not_organizer',guests_cannot_invite: 'guests_cannot_invite',guest_list_hidden: 'guest_list_hidden',guests_cannot_modify: 'guests_cannot_modify',diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/createCalendarEventRequest.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/createCalendarEventRequest.tsindex 01309f76c4..1993d9d1cf 100644--- a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/createCalendarEventRequest.ts+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/createCalendarEventRequest.ts@@ -9,6 +9,7 @@ import type { CreateCalendarEventRequestCalendarId } from './createCalendarEventimport type { CreateCalendarEventRequestConference } from './createCalendarEventRequestConference';import type { CreateCalendarEventRequestDescription } from './createCalendarEventRequestDescription';import type { CreateCalendarEventRequestEmailLinkId } from './createCalendarEventRequestEmailLinkId';+import type { CreateCalendarEventRequestGuestPolicy } from './createCalendarEventRequestGuestPolicy';import type { CreateCalendarEventRequestIdempotencyKey } from './createCalendarEventRequestIdempotencyKey';import type { CreateCalendarEventRequestLocation } from './createCalendarEventRequestLocation';import type { CreateCalendarEventRequestOutOfOffice } from './createCalendarEventRequestOutOfOffice';@@ -32,6 +33,7 @@ inbox default. *//** Connected inbox whose primary calendar receives the event; defaultsto the requester's primary inbox. */emailLinkId?: CreateCalendarEventRequestEmailLinkId;+ guestPolicy?: CreateCalendarEventRequestGuestPolicy;/** Stable retry identity, scoped to the authenticated organizer. */idempotencyKey?: CreateCalendarEventRequestIdempotencyKey;/** Optional location label. */diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/createCalendarEventRequestGuestPolicy.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/createCalendarEventRequestGuestPolicy.tsnew file mode 100644index 0000000000..923e3b7067--- /dev/null+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/createCalendarEventRequestGuestPolicy.ts@@ -0,0 +1,9 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * calendar_service+ * OpenAPI spec version: 0.1.0+ */+import type { GuestPolicy } from './guestPolicy';++export type CreateCalendarEventRequestGuestPolicy = null | GuestPolicy;diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/index.tsindex b9d21dbe6d..65c00a2c98 100644--- a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/index.ts+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/index.ts@@ -53,6 +53,7 @@ export * from './createCalendarEventRequestCalendarId';export * from './createCalendarEventRequestConference';export * from './createCalendarEventRequestDescription';export * from './createCalendarEventRequestEmailLinkId';+export * from './createCalendarEventRequestGuestPolicy';export * from './createCalendarEventRequestIdempotencyKey';export * from './createCalendarEventRequestLocation';export * from './createCalendarEventRequestOutOfOffice';@@ -102,6 +103,7 @@ export * from './updateCalendarEventRequestAttendees';export * from './updateCalendarEventRequestCalendarId';export * from './updateCalendarEventRequestConference';export * from './updateCalendarEventRequestDescription';+export * from './updateCalendarEventRequestGuestPolicy';export * from './updateCalendarEventRequestLocation';export * from './updateCalendarEventRequestOutOfOffice';export * from './updateCalendarEventRequestRecurrenceId';diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/updateCalendarEventRequest.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/updateCalendarEventRequest.tsindex c03e1e911b..40dc071c77 100644--- a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/updateCalendarEventRequest.ts+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/updateCalendarEventRequest.ts@@ -8,6 +8,7 @@ import type { UpdateCalendarEventRequestAttendees } from './updateCalendarEventRimport type { UpdateCalendarEventRequestCalendarId } from './updateCalendarEventRequestCalendarId';import type { UpdateCalendarEventRequestConference } from './updateCalendarEventRequestConference';import type { UpdateCalendarEventRequestDescription } from './updateCalendarEventRequestDescription';+import type { UpdateCalendarEventRequestGuestPolicy } from './updateCalendarEventRequestGuestPolicy';import type { UpdateCalendarEventRequestLocation } from './updateCalendarEventRequestLocation';import type { UpdateCalendarEventRequestOutOfOffice } from './updateCalendarEventRequestOutOfOffice';import type { UpdateCalendarEventRequestRecurrenceId } from './updateCalendarEventRequestRecurrenceId';@@ -31,6 +32,7 @@ more than one calendar. Omit to patch the canonical copy. */conference?: UpdateCalendarEventRequestConference;/** Replacement description; an empty string clears it. */description?: UpdateCalendarEventRequestDescription;+ guestPolicy?: UpdateCalendarEventRequestGuestPolicy;/** Replacement location; an empty string clears it. */location?: UpdateCalendarEventRequestLocation;outOfOffice?: UpdateCalendarEventRequestOutOfOffice;diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/updateCalendarEventRequestGuestPolicy.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/updateCalendarEventRequestGuestPolicy.tsnew file mode 100644index 0000000000..4a01e062cb--- /dev/null+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/updateCalendarEventRequestGuestPolicy.ts@@ -0,0 +1,9 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * calendar_service+ * OpenAPI spec version: 0.1.0+ */+import type { GuestPolicy } from './guestPolicy';++export type UpdateCalendarEventRequestGuestPolicy = null | GuestPolicy;diff --git a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/viewerCapabilities.ts b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/viewerCapabilities.tsindex d62f4fcf67..e0338f64e8 100644--- a/apps/web/src/lib/service-clients/service-calendar/generated/schemas/viewerCapabilities.ts+++ b/apps/web/src/lib/service-clients/service-calendar/generated/schemas/viewerCapabilities.ts@@ -13,10 +13,13 @@ export interface ViewerCapabilities {editDetails: boolean;/** Add guests. */inviteGuests: boolean;+ /** Act as the event's organizer: replace its whole guest list and manage+its conferencing. */+ organize: boolean;/** Remove guests. */removeGuests: boolean;/** Answer the invitation. */rsvp: boolean;- /** Change the event's guest policy. */+ /** Change the event's guest policy, which only Google calendars have. */setGuestPolicy: boolean;}diff --git a/apps/web/src/lib/service-clients/service-calendar/openapi.json b/apps/web/src/lib/service-clients/service-calendar/openapi.jsonindex 8c7aed8da3..f1796165e5 100644--- a/apps/web/src/lib/service-clients/service-calendar/openapi.json+++ b/apps/web/src/lib/service-clients/service-calendar/openapi.json@@ -1035,7 +1035,8 @@"autoDecline","emailReminders","customRecurrence",- "resetRsvp"+ "resetRsvp",+ "guestPolicy"],"properties": {"autoDecline": {@@ -1061,6 +1062,10 @@"type": "boolean","description": "Whether email reminders are delivered by the provider or Macro."},+ "guestPolicy": {+ "type": "boolean",+ "description": "Whether the organizer can set what guests may do."+ },"removeConference": {"type": "boolean","description": "Whether an existing conference can be detached."@@ -1348,6 +1353,7 @@"read_only","no_writable_calendar","not_attendee",+ "not_organizer","guests_cannot_invite","guest_list_hidden","guests_cannot_modify",@@ -1511,6 +1517,17 @@"format": "uuid","description": "Connected inbox whose primary calendar receives the event; defaults\nto the requester's primary inbox."},+ "guestPolicy": {+ "oneOf": [+ {+ "type": "null"+ },+ {+ "$ref": "#/components/schemas/GuestPolicy",+ "description": "What guests may do; omit for Google's defaults (guests may invite\nothers and see the guest list, not modify the event). Google\ncalendars only."+ }+ ]+ },"idempotencyKey": {"type": ["string", "null"],"format": "uuid",@@ -1935,6 +1952,17 @@"type": ["string", "null"],"description": "Replacement description; an empty string clears it."},+ "guestPolicy": {+ "oneOf": [+ {+ "type": "null"+ },+ {+ "$ref": "#/components/schemas/GuestPolicy",+ "description": "Replacement guest policy; only the organizer of a Google event may\nchange it, for the whole event or series. Omit to leave it untouched."+ }+ ]+ },"location": {"type": ["string", "null"],"description": "Replacement location; an empty string clears it."@@ -2030,7 +2058,8 @@"inviteGuests","removeGuests","setGuestPolicy",- "rsvp"+ "rsvp",+ "organize"],"properties": {"editDetails": {@@ -2041,6 +2070,10 @@"type": "boolean","description": "Add guests."},+ "organize": {+ "type": "boolean",+ "description": "Act as the event's organizer: replace its whole guest list and manage\nits conferencing."+ },"removeGuests": {"type": "boolean","description": "Remove guests."@@ -2051,7 +2084,7 @@},"setGuestPolicy": {"type": "boolean",- "description": "Change the event's guest policy."+ "description": "Change the event's guest policy, which only Google calendars have."}}},diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.tsindex 70df29afc5..88404aef4b 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts@@ -2228,6 +2228,16 @@ export const CreateCalendarEvent = z.object({z.null(),]).optional(),+ guestPolicy: z+ .union([+ z.object({+ canModify: z.boolean(),+ canInviteOthers: z.boolean(),+ canSeeOtherGuests: z.boolean(),+ }),+ z.null(),+ ])+ .optional(),});export const UserToolResponseForToolCalendarEvent = z@@ -2452,6 +2462,16 @@ export const CreateConfirmedCalendarEvent = z.object({z.null(),]).optional(),+ guestPolicy: z+ .union([+ z.object({+ canModify: z.boolean(),+ canInviteOthers: z.boolean(),+ canSeeOtherGuests: z.boolean(),+ }),+ z.null(),+ ])+ .optional(),userConfirmation: z.string(),});@@ -9491,6 +9511,7 @@ export const ListCalendarEventsResponse = z.object({removeGuests: z.boolean(),setGuestPolicy: z.boolean(),rsvp: z.boolean(),+ organize: z.boolean(),}),calendarId: z.union([z.string().uuid(), z.null()]).optional(),copies: z@@ -9566,6 +9587,7 @@ export const ListCalendarsToolResponse = z.object({emailReminders: z.boolean(),customRecurrence: z.boolean(),resetRsvp: z.boolean(),+ guestPolicy: z.boolean(),}),calendarId: z.string().uuid(),name: z.string(),@@ -15755,6 +15777,16 @@ export const UpdateCalendarEvent = z.object({z.null(),]).optional(),+ guestPolicy: z+ .union([+ z.object({+ canModify: z.boolean(),+ canInviteOthers: z.boolean(),+ canSeeOtherGuests: z.boolean(),+ }),+ z.null(),+ ])+ .optional(),});export const UpdateCallRecord = z.object({diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.tsindex 07edbd622f..590bb8523f 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts@@ -6849,6 +6849,10 @@ export interface CreateCalendarEvent {* Out-of-office decline behavior, used only when eventType is "out_of_office". Omit to just block the time; set `autoDeclineMode` to "decline_all" or "decline_new_only" to have the calendar integration decline conflicting meetings, optionally with a `declineMessage`.*/outOfOffice?: OutOfOfficeInput | null;+ /**+ * What guests may do: `canModify` (change the event; implies `canInviteOthers`), `canInviteOthers` and `canSeeOtherGuests`. Omit for the defaults: guests may invite others and see the guest list but not modify the event. Google calendars only; an Outlook calendar refuses it.+ */+ guestPolicy?: GuestPolicy | null;}/*** An attendee supplied to a calendar tool.@@ -6903,6 +6907,24 @@ export interface OutOfOfficeInput {*/declineMessage?: string | null;}+/**+ * The switches an organizer sets on an event to bound what its guests may+ * do. Google omits a switch from the payload while it holds its default.+ */+export interface GuestPolicy {+ /**+ * Whether guests may change the event, including its guest list.+ */+ canModify: boolean;+ /**+ * Whether guests may invite others.+ */+ canInviteOthers: boolean;+ /**+ * Whether guests may see the guest list.+ */+ canSeeOtherGuests: boolean;+}/*** A calendar event as returned by the create and update tools.*/@@ -7117,6 +7139,10 @@ export interface CreateConfirmedCalendarEvent {* Out-of-office decline behavior, used only when eventType is "out_of_office". Omit to just block the time; set `autoDeclineMode` to "decline_all" or "decline_new_only" to have the calendar integration decline conflicting meetings, optionally with a `declineMessage`.*/outOfOffice?: OutOfOfficeInput | null;+ /**+ * What guests may do: `canModify` (change the event; implies `canInviteOthers`), `canInviteOthers` and `canSeeOtherGuests`. Omit for the defaults: guests may invite others and see the guest list but not modify the event. Google calendars only; an Outlook calendar refuses it.+ */+ guestPolicy?: GuestPolicy | null;/*** The user's own message approving this specific event, quoted verbatim - for example their "yes, go ahead" in reply to the event you wrote out for them. It is a reply to your draft, never the earlier request that asked you to schedule something: if the user has not yet seen this event, there is nothing to quote here and the tool must not be called. Required: do not paraphrase it, and never supply it yourself.*/@@ -10890,13 +10916,18 @@ export interface ViewerCapabilities {*/removeGuests: boolean;/**- * Change the event's guest policy.+ * Change the event's guest policy, which only Google calendars have.*/setGuestPolicy: boolean;/*** Answer the invitation.*/rsvp: boolean;+ /**+ * Act as the event's organizer: replace its whole guest list and manage+ * its conferencing.+ */+ organize: boolean;}/*** One calendar's copy of an event synced from several calendars.@@ -10992,6 +11023,10 @@ export interface CalendarCapabilities {* Whether an attendee can reset their RSVP to unanswered.*/resetRsvp: boolean;+ /**+ * Whether the organizer can set what guests may do.+ */+ guestPolicy: boolean;}/*** Find the coding agents available to the current user. Call this before delegating coding work. Choose an agent using its name, description, instructions, runtime, and model, preferring the user's requested agent or the persona best suited to the repository and task. Returns only available coding agents. If none are available, explain that the user needs to connect or configure a coding agent.@@ -14877,6 +14912,10 @@ export interface UpdateCalendarEvent {* Adjust out-of-office decline behavior; only valid on an event that is already out of office (its event type cannot be changed). Replaces the whole block: set `autoDeclineMode` ("decline_none", "decline_all", or "decline_new_only") and optionally `declineMessage`. Omit to leave it untouched.*/outOfOffice?: OutOfOfficeInput | null;+ /**+ * Replace what guests may do: `canModify` (change the event; implies `canInviteOthers`), `canInviteOthers` and `canSeeOtherGuests`, all three required. Only the organizer of a Google event may set it (`viewerCan.setGuestPolicy`), and only with scope "all": it belongs to the whole series. Outlook events have none. Omit to leave it untouched.+ */+ guestPolicy?: GuestPolicy | null;}/*** Rename a recorded call or change whether it is shared with the team, as the call's header menu does. Requires edit access to the call; only the call's creator can change team sharing on a finished call. Find calls with ListEntities or NameSearch.diff --git a/apps/web/src/lib/service-clients/service-email/generated/schemas/viewerCapabilities.ts b/apps/web/src/lib/service-clients/service-email/generated/schemas/viewerCapabilities.tsindex a0a530a494..5eb09229ac 100644--- a/apps/web/src/lib/service-clients/service-email/generated/schemas/viewerCapabilities.ts+++ b/apps/web/src/lib/service-clients/service-email/generated/schemas/viewerCapabilities.ts@@ -13,10 +13,13 @@ export interface ViewerCapabilities {editDetails: boolean;/** Add guests. */inviteGuests: boolean;+ /** Act as the event's organizer: replace its whole guest list and manage+its conferencing. */+ organize: boolean;/** Remove guests. */removeGuests: boolean;/** Answer the invitation. */rsvp: boolean;- /** Change the event's guest policy. */+ /** Change the event's guest policy, which only Google calendars have. */setGuestPolicy: boolean;}diff --git a/apps/web/src/lib/service-clients/service-email/openapi.json b/apps/web/src/lib/service-clients/service-email/openapi.jsonindex f4a93fb134..e68f73aaa3 100644--- a/apps/web/src/lib/service-clients/service-email/openapi.json+++ b/apps/web/src/lib/service-clients/service-email/openapi.json@@ -7230,7 +7230,8 @@"inviteGuests","removeGuests","setGuestPolicy",- "rsvp"+ "rsvp",+ "organize"],"properties": {"editDetails": {@@ -7241,6 +7242,10 @@"type": "boolean","description": "Add guests."},+ "organize": {+ "type": "boolean",+ "description": "Act as the event's organizer: replace its whole guest list and manage\nits conferencing."+ },"removeGuests": {"type": "boolean","description": "Remove guests."@@ -7251,7 +7256,7 @@},"setGuestPolicy": {"type": "boolean",- "description": "Change the event's guest policy."+ "description": "Change the event's guest policy, which only Google calendars have."}}}diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/viewerCapabilities.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/viewerCapabilities.tsindex 63c9c69dff..21423f8f34 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/viewerCapabilities.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/viewerCapabilities.ts@@ -13,10 +13,13 @@ export interface ViewerCapabilities {editDetails: boolean;/** Add guests. */inviteGuests: boolean;+ /** Act as the event's organizer: replace its whole guest list and manage+its conferencing. */+ organize: boolean;/** Remove guests. */removeGuests: boolean;/** Answer the invitation. */rsvp: boolean;- /** Change the event's guest policy. */+ /** Change the event's guest policy, which only Google calendars have. */setGuestPolicy: boolean;}diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.tsindex eb59dd49e6..4eadd1c363 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts@@ -1255,11 +1255,18 @@ export const listOccurrencesResponse = zod"Change the event's details (title, time, description, conference)."),inviteGuests: zod.boolean().describe('Add guests.'),+ organize: zod+ .boolean()+ .describe(+ "Act as the event's organizer: replace its whole guest list and manage\nits conferencing."+ ),removeGuests: zod.boolean().describe('Remove guests.'),rsvp: zod.boolean().describe('Answer the invitation.'),setGuestPolicy: zod.boolean()- .describe("Change the event's guest policy."),+ .describe(+ "Change the event's guest policy, which only Google calendars have."+ ),}).describe('What the viewing requester may do with an event.'),visibility: zoddiff --git a/apps/web/src/lib/service-clients/service-storage/graphql/calendar.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/calendar.graphqlindex 92666739f9..65b4b1f625 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql/calendar.graphql+++ b/apps/web/src/lib/service-clients/service-storage/graphql/calendar.graphql@@ -88,6 +88,7 @@ fragment CalendarEventFields on GraphqlCalendarEvent {removeGuestssetGuestPolicyrsvp+ organize}createdAtupdatedAt@@ -129,6 +130,7 @@ fragment CalendarFields on GraphqlCalendar {emailRemindersremoveConferenceresetRsvp+ guestPolicy}namecolordiff --git a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.tsindex 4ab8ff8fe5..ece0a3c10f 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts+++ b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts@@ -60,6 +60,16 @@ export type CalendarGuestInput = {optional?: boolean;};+/** What guests may do with an event; Google calendars only. */+export type CalendarGuestPolicyInput = {+ /** Whether guests may invite others. */+ canInviteOthers: boolean;+ /** Whether guests may change the event; implies inviting others. */+ canModify: boolean;+ /** Whether guests may see the guest list. */+ canSeeOtherGuests: boolean;+};+/** How far the client has applied one connected inbox's change log. */export type CalendarLinkWatermarkInput = {/** Connected inbox identifier. */@@ -152,6 +162,8 @@ export type CreateCalendarEventInput = {* to the viewer's primary inbox.*/emailLinkId?: string | number | null | undefined;+ /** What guests may do; omit for Google's defaults. */+ guestPolicy?: CalendarGuestPolicyInput | null | undefined;/** Stable retry identity, scoped to the authenticated organizer. */idempotencyKey?: string | number | null | undefined;/** Optional location label. */@@ -2094,6 +2106,11 @@ export type UpdateCalendarEventInput = {description?: string | null | undefined;/** Event to patch. */eventId: string | number;+ /**+ * Replacement guest policy; only the organizer of a Google event may+ * change it, for the whole event or series.+ */+ guestPolicy?: CalendarGuestPolicyInput | null | undefined;/** Replacement location; an empty string clears it. */location?: string | null | undefined;/**@@ -2941,7 +2958,7 @@ export type CalendarEventTimeFieldsFragment =export type CalendarEventFieldsFragment = { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } };export type CalendarOccurrenceItemFieldsFragment = { __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }@@ -2949,9 +2966,9 @@ export type CalendarOccurrenceItemFieldsFragment = { __typename: 'GraphqlCalenda, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } };-export type CalendarFieldsFragment = { __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, provider: GraphqlCalendarProvider, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, capabilities: { autoDecline: boolean, conferenceProvider: GraphqlCalendarConferenceProvider | null, customRecurrence: boolean, emailReminders: boolean, removeConference: boolean, resetRsvp: boolean }, defaultReminders: Array<{ method: string, minutes: number }> };+export type CalendarFieldsFragment = { __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, provider: GraphqlCalendarProvider, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, capabilities: { autoDecline: boolean, conferenceProvider: GraphqlCalendarConferenceProvider | null, customRecurrence: boolean, emailReminders: boolean, removeConference: boolean, resetRsvp: boolean, guestPolicy: boolean }, defaultReminders: Array<{ method: string, minutes: number }> };export type CalendarOccurrencesQueryVariables = Exact<{input: CalendarRangeInput;@@ -2964,12 +2981,12 @@ export type CalendarOccurrencesQuery = { user: { id: string, calendarOccurrences, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }>, watermark: Array<{ linkId: string, seq: string }> } } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }>, watermark: Array<{ linkId: string, seq: string }> } } };export type CalendarsQueryVariables = Exact<{ [key: string]: never; }>;-export type CalendarsQuery = { user: { id: string, calendars: Array<{ __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, provider: GraphqlCalendarProvider, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, capabilities: { autoDecline: boolean, conferenceProvider: GraphqlCalendarConferenceProvider | null, customRecurrence: boolean, emailReminders: boolean, removeConference: boolean, resetRsvp: boolean }, defaultReminders: Array<{ method: string, minutes: number }> }> } };+export type CalendarsQuery = { user: { id: string, calendars: Array<{ __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, provider: GraphqlCalendarProvider, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, capabilities: { autoDecline: boolean, conferenceProvider: GraphqlCalendarConferenceProvider | null, customRecurrence: boolean, emailReminders: boolean, removeConference: boolean, resetRsvp: boolean, guestPolicy: boolean }, defaultReminders: Array<{ method: string, minutes: number }> }> } };export type CalendarChangesQueryVariables = Exact<{input: CalendarChangesInput;@@ -2979,24 +2996,24 @@ export type CalendarChangesQueryVariables = Exact<{export type CalendarChangesQuery = { user: { id: string, calendarChanges: { deletedEventIds: Array<string>, deletedCalendarIds: Array<string>, hasMore: boolean, resetRequired: boolean, events: Array<{ event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } }, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } }, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }> }>, calendars: Array<{ __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, provider: GraphqlCalendarProvider, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, capabilities: { autoDecline: boolean, conferenceProvider: GraphqlCalendarConferenceProvider | null, customRecurrence: boolean, emailReminders: boolean, removeConference: boolean, resetRsvp: boolean }, defaultReminders: Array<{ method: string, minutes: number }> }>, newWatermark: Array<{ linkId: string, seq: string }> } } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }> }>, calendars: Array<{ __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, provider: GraphqlCalendarProvider, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, capabilities: { autoDecline: boolean, conferenceProvider: GraphqlCalendarConferenceProvider | null, customRecurrence: boolean, emailReminders: boolean, removeConference: boolean, resetRsvp: boolean, guestPolicy: boolean }, defaultReminders: Array<{ method: string, minutes: number }> }>, newWatermark: Array<{ linkId: string, seq: string }> } } };export type CalendarMutationPayloadFieldsFragment = { __typename: 'GraphqlCalendarMutationPayload', deletedEventId: string | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }> };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }> };export type CreateCalendarEventMutationVariables = Exact<{input: CreateCalendarEventInput;@@ -3006,13 +3023,13 @@ export type CreateCalendarEventMutationVariables = Exact<{export type CreateCalendarEventMutation = { createCalendarEvent: { __typename: 'GraphqlCalendarMutationPayload', deletedEventId: string | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }> } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }> } };export type UpdateCalendarEventMutationVariables = Exact<{input: UpdateCalendarEventInput;@@ -3022,13 +3039,13 @@ export type UpdateCalendarEventMutationVariables = Exact<{export type UpdateCalendarEventMutation = { updateCalendarEvent: { __typename: 'GraphqlCalendarMutationPayload', deletedEventId: string | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }> } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }> } };export type DeleteCalendarEventMutationVariables = Exact<{input: DeleteCalendarEventInput;@@ -3038,13 +3055,13 @@ export type DeleteCalendarEventMutationVariables = Exact<{export type DeleteCalendarEventMutation = { deleteCalendarEvent: { __typename: 'GraphqlCalendarMutationPayload', deletedEventId: string | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }> } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }> } };export type RespondToCalendarEventMutationVariables = Exact<{input: RespondToCalendarEventInput;@@ -3054,13 +3071,13 @@ export type RespondToCalendarEventMutationVariables = Exact<{export type RespondToCalendarEventMutation = { respondToCalendarEvent: { __typename: 'GraphqlCalendarMutationPayload', deletedEventId: string | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }> } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }> } };export type InviteCalendarEventGuestsMutationVariables = Exact<{input: InviteCalendarEventGuestsInput;@@ -3070,13 +3087,13 @@ export type InviteCalendarEventGuestsMutationVariables = Exact<{export type InviteCalendarEventGuestsMutation = { inviteCalendarEventGuests: { __typename: 'GraphqlCalendarMutationPayload', deletedEventId: string | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } | null, occurrences: Array<{ __typename: 'GraphqlCalendarOccurrence', id: string, eventId: string, linkId: string, occurrenceKey: string, recurrenceId: string | null, isCancelled: boolean, overrideTitle: string | null, overrideDescription: string | null, overrideLocation: string | null, overrideStatus: GraphqlCalendarEventStatus | null, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }, overrideAttendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }> | null, event: { __typename: 'GraphqlCalendarEvent', id: string, ownerId: string, linkId: string, icalUid: string, calendarId: string | null, title: string, description: string | null, location: string | null, status: GraphqlCalendarEventStatus, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, eventType: GraphqlCalendarEventType, recurrenceLines: Array<string>, organizerEmail: string | null, organizerName: string | null, creatorEmail: string | null, creatorName: string | null, conferenceUrl: string | null, conferenceProvider: GraphqlCalendarConferenceProvider | null, sequence: number, isReadOnly: boolean, isSnapshot: boolean, createdAt: string, updatedAt: string, sources: Array<{ calendarId: string, title: string, description: string | null, location: string | null, eventType: GraphqlCalendarEventType, visibility: GraphqlCalendarEventVisibility, transparency: GraphqlCalendarEventTransparency, isReadOnly: boolean, creatorEmail: string | null, creatorName: string | null, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> } }>, time:| { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string }| { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null }- , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean } } }> } };+ , attendees: Array<{ email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null }>, reminders: { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> }, guestPolicy: { canModify: boolean, canInviteOthers: boolean, canSeeOtherGuests: boolean }, viewerCan: { editDetails: boolean, inviteGuests: boolean, removeGuests: boolean, setGuestPolicy: boolean, rsvp: boolean, organize: boolean } } }> } };export type RecordChannelActivityMutationVariables = Exact<{input: RecordChannelActivityInput;@@ -19456,13 +19473,13 @@ export type WorkFeedUpdatesSubscription = { workFeedUpdates: Array<export const ActivityEventFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]} as unknown as DocumentNode<ActivityEventFieldsFragment, unknown>;export const EntityActivityFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EntityActivityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActivityEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]} as unknown as DocumentNode<EntityActivityFieldsFragment, unknown>;-export const CalendarFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"provider"}},{"kind":"Field","name":{"kind":"Name","value":"capabilities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoDecline"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"customRecurrence"}},{"kind":"Field","name":{"kind":"Name","value":"emailReminders"}},{"kind":"Field","name":{"kind":"Name","value":"removeConference"}},{"kind":"Field","name":{"kind":"Name","value":"resetRsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"isWritable"}},{"kind":"Field","name":{"kind":"Name","value":"isSubscription"}},{"kind":"Field","name":{"kind":"Name","value":"syncError"}},{"kind":"Field","name":{"kind":"Name","value":"defaultReminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarFieldsFragment, unknown>;+export const CalendarFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"provider"}},{"kind":"Field","name":{"kind":"Name","value":"capabilities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoDecline"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"customRecurrence"}},{"kind":"Field","name":{"kind":"Name","value":"emailReminders"}},{"kind":"Field","name":{"kind":"Name","value":"removeConference"}},{"kind":"Field","name":{"kind":"Name","value":"resetRsvp"}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"isWritable"}},{"kind":"Field","name":{"kind":"Name","value":"isSubscription"}},{"kind":"Field","name":{"kind":"Name","value":"syncError"}},{"kind":"Field","name":{"kind":"Name","value":"defaultReminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarFieldsFragment, unknown>;export const CalendarReminderFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarReminderFieldsFragment, unknown>;export const CalendarEventTimeFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}}]} as unknown as DocumentNode<CalendarEventTimeFieldsFragment, unknown>;export const CalendarAttendeeFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}}]} as unknown as DocumentNode<CalendarAttendeeFieldsFragment, unknown>;-export const CalendarEventFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}}]} as unknown as DocumentNode<CalendarEventFieldsFragment, unknown>;-export const CalendarOccurrenceItemFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<CalendarOccurrenceItemFieldsFragment, unknown>;-export const CalendarMutationPayloadFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}}]} as unknown as DocumentNode<CalendarMutationPayloadFieldsFragment, unknown>;+export const CalendarEventFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}}]} as unknown as DocumentNode<CalendarEventFieldsFragment, unknown>;+export const CalendarOccurrenceItemFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<CalendarOccurrenceItemFieldsFragment, unknown>;+export const CalendarMutationPayloadFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}}]} as unknown as DocumentNode<CalendarMutationPayloadFieldsFragment, unknown>;export const SoupEntityIdentityFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}}]} as unknown as DocumentNode<SoupEntityIdentityFieldsFragment, unknown>;export const SoupPropertyValueFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]} as unknown as DocumentNode<SoupPropertyValueFieldsFragment, unknown>;export const SoupPropertyFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyValueFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]} as unknown as DocumentNode<SoupPropertyFieldsFragment, unknown>;@@ -19521,14 +19538,14 @@ export const DatabaseActivityDocument = {"kind":"Document","definitions":[{"kindexport const AgentSessionLogAppendedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"AgentSessionLogAppended"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"agentSessionLogAppended"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"sessionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"content"}}]}}]}}]} as unknown as DocumentNode<AgentSessionLogAppendedSubscription, AgentSessionLogAppendedSubscriptionVariables>;export const AgentSessionLogDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AgentSessionLog"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"agentSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"sessionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"log"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"handle"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"entries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"content"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<AgentSessionLogQuery, AgentSessionLogQueryVariables>;export const AgentSessionMentionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AgentSessionMentions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SoupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"soup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<AgentSessionMentionsQuery, AgentSessionMentionsQueryVariables>;-export const CalendarOccurrencesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CalendarOccurrences"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarRangeInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"calendarOccurrences"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}},{"kind":"Field","name":{"kind":"Name","value":"syncStatus"}},{"kind":"Field","name":{"kind":"Name","value":"watermark"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"seq"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}}]} as unknown as DocumentNode<CalendarOccurrencesQuery, CalendarOccurrencesQueryVariables>;-export const CalendarsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Calendars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"calendars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"provider"}},{"kind":"Field","name":{"kind":"Name","value":"capabilities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoDecline"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"customRecurrence"}},{"kind":"Field","name":{"kind":"Name","value":"emailReminders"}},{"kind":"Field","name":{"kind":"Name","value":"removeConference"}},{"kind":"Field","name":{"kind":"Name","value":"resetRsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"isWritable"}},{"kind":"Field","name":{"kind":"Name","value":"isSubscription"}},{"kind":"Field","name":{"kind":"Name","value":"syncError"}},{"kind":"Field","name":{"kind":"Name","value":"defaultReminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarsQuery, CalendarsQueryVariables>;-export const CalendarChangesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CalendarChanges"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarChangesInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"calendarChanges"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"events"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventIds"}},{"kind":"Field","name":{"kind":"Name","value":"calendars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedCalendarIds"}},{"kind":"Field","name":{"kind":"Name","value":"newWatermark"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"seq"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasMore"}},{"kind":"Field","name":{"kind":"Name","value":"resetRequired"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"provider"}},{"kind":"Field","name":{"kind":"Name","value":"capabilities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoDecline"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"customRecurrence"}},{"kind":"Field","name":{"kind":"Name","value":"emailReminders"}},{"kind":"Field","name":{"kind":"Name","value":"removeConference"}},{"kind":"Field","name":{"kind":"Name","value":"resetRsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"isWritable"}},{"kind":"Field","name":{"kind":"Name","value":"isSubscription"}},{"kind":"Field","name":{"kind":"Name","value":"syncError"}},{"kind":"Field","name":{"kind":"Name","value":"defaultReminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarChangesQuery, CalendarChangesQueryVariables>;-export const CreateCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<CreateCalendarEventMutation, CreateCalendarEventMutationVariables>;-export const UpdateCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<UpdateCalendarEventMutation, UpdateCalendarEventMutationVariables>;-export const DeleteCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<DeleteCalendarEventMutation, DeleteCalendarEventMutationVariables>;-export const RespondToCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RespondToCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"RespondToCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"respondToCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<RespondToCalendarEventMutation, RespondToCalendarEventMutationVariables>;-export const InviteCalendarEventGuestsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InviteCalendarEventGuests"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"InviteCalendarEventGuestsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inviteCalendarEventGuests"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<InviteCalendarEventGuestsMutation, InviteCalendarEventGuestsMutationVariables>;+export const CalendarOccurrencesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CalendarOccurrences"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarRangeInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"calendarOccurrences"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}},{"kind":"Field","name":{"kind":"Name","value":"syncStatus"}},{"kind":"Field","name":{"kind":"Name","value":"watermark"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"seq"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}}]} as unknown as DocumentNode<CalendarOccurrencesQuery, CalendarOccurrencesQueryVariables>;+export const CalendarsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Calendars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"calendars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"provider"}},{"kind":"Field","name":{"kind":"Name","value":"capabilities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoDecline"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"customRecurrence"}},{"kind":"Field","name":{"kind":"Name","value":"emailReminders"}},{"kind":"Field","name":{"kind":"Name","value":"removeConference"}},{"kind":"Field","name":{"kind":"Name","value":"resetRsvp"}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"isWritable"}},{"kind":"Field","name":{"kind":"Name","value":"isSubscription"}},{"kind":"Field","name":{"kind":"Name","value":"syncError"}},{"kind":"Field","name":{"kind":"Name","value":"defaultReminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarsQuery, CalendarsQueryVariables>;+export const CalendarChangesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CalendarChanges"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarChangesInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"calendarChanges"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"events"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventIds"}},{"kind":"Field","name":{"kind":"Name","value":"calendars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedCalendarIds"}},{"kind":"Field","name":{"kind":"Name","value":"newWatermark"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"seq"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasMore"}},{"kind":"Field","name":{"kind":"Name","value":"resetRequired"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"provider"}},{"kind":"Field","name":{"kind":"Name","value":"capabilities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoDecline"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"customRecurrence"}},{"kind":"Field","name":{"kind":"Name","value":"emailReminders"}},{"kind":"Field","name":{"kind":"Name","value":"removeConference"}},{"kind":"Field","name":{"kind":"Name","value":"resetRsvp"}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"isWritable"}},{"kind":"Field","name":{"kind":"Name","value":"isSubscription"}},{"kind":"Field","name":{"kind":"Name","value":"syncError"}},{"kind":"Field","name":{"kind":"Name","value":"defaultReminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarChangesQuery, CalendarChangesQueryVariables>;+export const CreateCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<CreateCalendarEventMutation, CreateCalendarEventMutationVariables>;+export const UpdateCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<UpdateCalendarEventMutation, UpdateCalendarEventMutationVariables>;+export const DeleteCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<DeleteCalendarEventMutation, DeleteCalendarEventMutationVariables>;+export const RespondToCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RespondToCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"RespondToCalendarEventInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"respondToCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<RespondToCalendarEventMutation, RespondToCalendarEventMutationVariables>;+export const InviteCalendarEventGuestsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InviteCalendarEventGuests"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"InviteCalendarEventGuestsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inviteCalendarEventGuests"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarReminderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarReminders"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"useDefault"}},{"kind":"Field","name":{"kind":"Name","value":"overrides"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventTimeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTimedEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAllDayEventTime"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarAttendeeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarAttendee"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"responseStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isOrganizer"}},{"kind":"Field","name":{"kind":"Name","value":"isOptional"}},{"kind":"Field","name":{"kind":"Name","value":"isSelf"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"icalUid"}},{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"sources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"transparency"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceLines"}},{"kind":"Field","name":{"kind":"Name","value":"organizerEmail"}},{"kind":"Field","name":{"kind":"Name","value":"organizerName"}},{"kind":"Field","name":{"kind":"Name","value":"creatorEmail"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceProvider"}},{"kind":"Field","name":{"kind":"Name","value":"sequence"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"attendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarReminderFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestPolicy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canModify"}},{"kind":"Field","name":{"kind":"Name","value":"canInviteOthers"}},{"kind":"Field","name":{"kind":"Name","value":"canSeeOtherGuests"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isSnapshot"}},{"kind":"Field","name":{"kind":"Name","value":"viewerCan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editDetails"}},{"kind":"Field","name":{"kind":"Name","value":"inviteGuests"}},{"kind":"Field","name":{"kind":"Name","value":"removeGuests"}},{"kind":"Field","name":{"kind":"Name","value":"setGuestPolicy"}},{"kind":"Field","name":{"kind":"Name","value":"rsvp"}},{"kind":"Field","name":{"kind":"Name","value":"organize"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarOccurrence"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventId"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","name":{"kind":"Name","value":"recurrenceId"}},{"kind":"Field","name":{"kind":"Name","value":"isCancelled"}},{"kind":"Field","name":{"kind":"Name","value":"time"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventTimeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overrideTitle"}},{"kind":"Field","name":{"kind":"Name","value":"overrideDescription"}},{"kind":"Field","name":{"kind":"Name","value":"overrideLocation"}},{"kind":"Field","name":{"kind":"Name","value":"overrideStatus"}},{"kind":"Field","name":{"kind":"Name","value":"overrideAttendees"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarAttendeeFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"event"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"occurrences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CalendarOccurrenceItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedEventId"}}]}}]} as unknown as DocumentNode<InviteCalendarEventGuestsMutation, InviteCalendarEventGuestsMutationVariables>;export const RecordChannelActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RecordChannelActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"RecordChannelActivityInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"recordChannelActivity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}}]}}]}}]} as unknown as DocumentNode<RecordChannelActivityMutation, RecordChannelActivityMutationVariables>;export const UpdateNotificationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateNotifications"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateNotificationsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateNotifications"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityAccessRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedRequestId"},"name":{"kind":"Name","value":"requestId"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedRevision"},"name":{"kind":"Name","value":"revision"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedEntityName"},"name":{"kind":"Name","value":"entityName"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedAccessLevel"},"name":{"kind":"Name","value":"accessLevel"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityAccessGrantedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedRequestId"},"name":{"kind":"Name","value":"requestId"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedRevision"},"name":{"kind":"Name","value":"revision"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedEntityName"},"name":{"kind":"Name","value":"entityName"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedAccessLevel"},"name":{"kind":"Name","value":"accessLevel"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}}]} as unknown as DocumentNode<UpdateNotificationsMutation, UpdateNotificationsMutationVariables>;export const UpdateNotificationsForEntityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateNotificationsForEntity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateNotificationsForEntityInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateNotificationsForEntity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityAccessRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedRequestId"},"name":{"kind":"Name","value":"requestId"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedRevision"},"name":{"kind":"Name","value":"revision"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedEntityName"},"name":{"kind":"Name","value":"entityName"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessRequestedAccessLevel"},"name":{"kind":"Name","value":"accessLevel"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityAccessGrantedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedRequestId"},"name":{"kind":"Name","value":"requestId"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedRevision"},"name":{"kind":"Name","value":"revision"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedEntityName"},"name":{"kind":"Name","value":"entityName"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"entityAccessGrantedAccessLevel"},"name":{"kind":"Name","value":"accessLevel"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}}]} as unknown as DocumentNode<UpdateNotificationsForEntityMutation, UpdateNotificationsForEntityMutationVariables>;diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.jsonindex 7cd03cffdb..41fdc11a5e 100644--- a/apps/web/src/lib/service-clients/service-storage/openapi.json+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json@@ -42468,7 +42468,8 @@"inviteGuests","removeGuests","setGuestPolicy",- "rsvp"+ "rsvp",+ "organize"],"properties": {"editDetails": {@@ -42479,6 +42480,10 @@"type": "boolean","description": "Add guests."},+ "organize": {+ "type": "boolean",+ "description": "Act as the event's organizer: replace its whole guest list and manage\nits conferencing."+ },"removeGuests": {"type": "boolean","description": "Remove guests."@@ -42489,7 +42494,7 @@},"setGuestPolicy": {"type": "boolean",- "description": "Change the event's guest policy."+ "description": "Change the event's guest policy, which only Google calendars have."}}},diff --git a/crates/agent_code_mode/src/domain/documentation.json b/crates/agent_code_mode/src/domain/documentation.jsonindex 0240342091..90357b30b1 100644--- a/crates/agent_code_mode/src/domain/documentation.json+++ b/crates/agent_code_mode/src/domain/documentation.json@@ -68,8 +68,8 @@{"name": "calendar","description": "Find and manage calendar events.",- "overview": "<!-- src/entities/calendar/namespace/classes/CalendarNamespace.md -->\n# Class: CalendarNamespace\n\nThe calendar surface: the caller's visible calendars, event creation, and\nhandles to individual events and calendars. Backed by calendar_service (the\nSDK reaches it on the gateway's `/calendar` route).\n\n## Constructors\n\n### Constructor\n\n> **new CalendarNamespace**(`client`): `CalendarNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CalendarNamespace`\n\n## Methods\n\n### availabilityCalendars()\n\n> **availabilityCalendars**(): `Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\nCalendar availability settings, each referring to a typed calendar.\n\n#### Returns\n\n`Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\n***\n\n### calendar()\n\n> **calendar**(`id`): [`Calendar`](../../calendar/classes/Calendar.md)\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Calendar`](../../calendar/classes/Calendar.md)\n\n***\n\n### calendars()\n\n> **calendars**(): `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Returns\n\n`Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\n***\n\n### createEvent()\n\n> **createEvent**(`options`): `Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\nCreate a calendar event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreateEventOptions`](../interfaces/CreateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\n***\n\n### event()\n\n> **event**(`id`): [`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\nA handle to a calendar event by id, for driving mutations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\n***\n\n### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\nCalendar occurrences in a viewport, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`ListOccurrencesData`](../../../../../generated/storage/types.gen/type-aliases/ListOccurrencesData.md)\\[`\"query\"`\\], `\"cursor\"`\\> |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\n***\n\n### replacement()\n\n> **replacement**(`operationId`): [`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\nRecover a saved replacement, including after its original event was retired.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\n***\n\n### setTeamSharing()\n\n> **setTeamSharing**(`sharing`): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nReplace the team calendar sharing preference.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | [`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md) |\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n***\n\n### teamOutOfOffice()\n\n> **teamOutOfOffice**(`options`): `Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\nTeammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `options.end` | `string` | Exclusive UTC viewport end. |\n| `options.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `options.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `options.start` | `string` | Inclusive UTC viewport start. |\n| `options.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n\n#### Returns\n\n`Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\n***\n\n### teamPage()\n\n> **teamPage**(`options`): `Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\nA page of team availability, including its roster and continuation cursor.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `cursor?`: `string` \\| `null`; `end`: `string`; `limit?`: `number` \\| `null`; `start`: `string`; \\} | - |\n| `options.cursor?` | `string` \\| `null` | Continuation returned by the preceding page. |\n| `options.end` | `string` | Exclusive instant. |\n| `options.limit?` | `number` \\| `null` | Maximum source occurrences, at most 2,000. Zero returns the roster only. |\n| `options.start` | `string` | Inclusive instant. |\n\n#### Returns\n\n`Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\n***\n\n### teamSharing()\n\n> **teamSharing**(): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nCurrent sharing preference for the team calendar.\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n\n<!-- src/entities/calendar/namespace/interfaces/CreateEventOptions.md -->\n# Interface: CreateEventOptions\n\nFields for a new calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Invited attendees. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Exact calendar to create the event on; takes precedence over the inbox default. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Conference to attach; omit to create the event without one. |\n| <a id=\"property-description\"></a> `description?` | `string` | Optional event body. |\n| <a id=\"property-emaillink\"></a> `emailLink?` | [`Link`](../../../email/link/classes/Link.md) | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |\n| <a id=\"property-location\"></a> `location?` | `string` | Optional location label. |\n| <a id=\"property-macrocall\"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Out-of-office properties; present to create an out-of-office event. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Reminder configuration; omit to keep the calendar defaults. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Event visibility. |\n",- "documentation": "# Macro SDK: calendar\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/calendar/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md -->\n# Type Alias: CalendarAttendeeInputBody\n\n> **CalendarAttendeeInputBody** = \\{ `email`: `string`; `isOptional?`: `boolean`; \\}\n\nAn attendee supplied to a calendar mutation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Attendee email address. |\n| <a id=\"property-isoptional\"></a> `isOptional?` | `boolean` | Whether attendance is optional. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarCapabilities.md -->\n# Type Alias: CalendarCapabilities\n\n> **CalendarCapabilities** = \\{ `autoDecline`: `boolean`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `customRecurrence`: `boolean`; `emailReminders`: `boolean`; `removeConference`: `boolean`; `resetRsvp`: `boolean`; \\}\n\nActual provider capabilities used by calendar editors.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodecline\"></a> `autoDecline` | `boolean` | Whether event-level automatic invitation declines are supported. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-customrecurrence\"></a> `customRecurrence` | `boolean` | Whether arbitrary RFC 5545 recurrence properties can be written. |\n| <a id=\"property-emailreminders\"></a> `emailReminders` | `boolean` | Whether email reminders are delivered by the provider or Macro. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | Whether an existing conference can be detached. |\n| <a id=\"property-resetrsvp\"></a> `resetRsvp` | `boolean` | Whether an attendee can reset their RSVP to unanswered. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarDeletionScopeParam.md -->\n# Type Alias: CalendarDeletionScopeParam\n\n> **CalendarDeletionScopeParam** = `\"all\"` \\| `\"this_event\"` \\| `\"this_and_following\"`\n\nHow much of a recurring series a deletion removes.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarEvent.md -->\n# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: [`EventType`](EventType.md); `guestPolicy`: [`GuestPolicy`](GuestPolicy.md); `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: [`EventReminders`](EventReminders.md); `sequence`: `number`; `sources?`: [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[]; `status`: [`EventStatus`](EventStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `updatedAt`: `string`; `viewerCan`: [`ViewerCapabilities`](ViewerCapabilities.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | [`EventType`](EventType.md) | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | [`GuestPolicy`](GuestPolicy.md) | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](EventReminders.md) | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | [`EventStatus`](EventStatus.md) | Event status. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | [`ViewerCapabilities`](ViewerCapabilities.md) | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarEventSourceContent.md -->\n# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: [`EventType`](EventType.md); `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: [`EventReminders`](EventReminders.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | [`EventType`](EventType.md) | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | [`EventReminders`](EventReminders.md) | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarGuestInputBody.md -->\n# Type Alias: CalendarGuestInputBody\n\n> **CalendarGuestInputBody** = \\{ `email`: `string`; `optional?`: `boolean`; \\}\n\nA guest added to an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Guest email address. |\n| <a id=\"property-optional\"></a> `optional?` | `boolean` | Whether attendance is optional. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarProvider.md -->\n# Type Alias: CalendarProvider\n\n> **CalendarProvider** = `\"google\"` \\| `\"outlook\"`\n\nProvider selected from the persisted calendar account and email binding.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarReplacementView.md -->\n# Type Alias: CalendarReplacementView\n\n> **CalendarReplacementView** = \\{ `attendeeCount`: `number`; `completedSteps`: `number`; `event?`: `null` \\| [`CalendarEvent`](CalendarEvent.md); `isSeries`: `boolean`; `operationId`: `string`; `providerUrl?`: `string` \\| `null`; `removeConference`: `boolean`; `replacementUrl?`: `string` \\| `null`; `status`: [`ReplacementStatus`](ReplacementStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `totalSteps`: `number`; \\}\n\nSafe preview and recovery response; never exposes the opaque provider snapshot.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendeecount\"></a> `attendeeCount` | `number` | Guest count for cancellation and reinvitation confirmation. |\n| <a id=\"property-completedsteps\"></a> `completedSteps` | `number` | Number of completed provider steps. |\n| <a id=\"property-event\"></a> `event?` | `null` \\| [`CalendarEvent`](CalendarEvent.md) | - |\n| <a id=\"property-isseries\"></a> `isSeries` | `boolean` | Entire recurring series, including exceptions, is replaced. |\n| <a id=\"property-operationid\"></a> `operationId` | `string` | Use this identity when confirming or checking progress. |\n| <a id=\"property-providerurl\"></a> `providerUrl?` | `string` \\| `null` | Original event for manual review. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | The provider conference is removed. |\n| <a id=\"property-replacementurl\"></a> `replacementUrl?` | `string` \\| `null` | New provider event, when creation was confirmed. |\n| <a id=\"property-status\"></a> `status` | [`ReplacementStatus`](ReplacementStatus.md) | Current durable state. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Frozen time. |\n| <a id=\"property-title\"></a> `title` | `string` | Frozen title. |\n| <a id=\"property-totalsteps\"></a> `totalSteps` | `number` | Number of provider steps in this operation. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarRsvpScopeParam.md -->\n# Type Alias: CalendarRsvpScopeParam\n\n> **CalendarRsvpScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an RSVP applies to.\n\nUnlike deletion there is no this-and-following variant: the provider\ncannot express a forward-scoped response, so offering one would be a\npromise sync could not keep.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md -->\n# Type Alias: CalendarUpdateScopeParam\n\n> **CalendarUpdateScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an update applies to.\n\nLike RSVPs there is no this-and-following variant: the provider cannot\nexpress a forward-scoped edit as one write, and emulating it (truncate\nthe series, insert an edited clone) is non-atomic and re-invites the\nattendees of the clone. Compose it from a this-and-following deletion\nand a create when that shape is wanted.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ConferenceChange.md -->\n# Type Alias: ConferenceChange\n\n> **ConferenceChange** = `\"provider_default\"` \\| `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"none\"`\n\nA requested change to an event's conferencing. Omitting the field leaves\nthe existing conference untouched; only these values change it.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ConferenceProvider.md -->\n# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventReminderOverride.md -->\n# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventReminders.md -->\n# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: [`EventReminderOverride`](EventReminderOverride.md)[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | [`EventReminderOverride`](EventReminderOverride.md)[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventStatus.md -->\n# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventTransparency.md -->\n# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventType.md -->\n# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventVisibility.md -->\n# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.\n\n\n<!-- generated/calendar/types.gen/type-aliases/GuestPolicy.md -->\n# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/OutOfOfficeAutoDeclineMode.md -->\n# Type Alias: OutOfOfficeAutoDeclineMode\n\n> **OutOfOfficeAutoDeclineMode** = `\"decline_none\"` \\| `\"decline_all_conflicting_invitations\"` \\| `\"decline_only_new_conflicting_invitations\"`\n\nHow an out-of-office event responds to conflicting invitations, mirroring\nGoogle's `autoDeclineMode`.\n\n\n<!-- generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md -->\n# Type Alias: OutOfOfficeProperties\n\n> **OutOfOfficeProperties** = \\{ `autoDeclineMode?`: [`OutOfOfficeAutoDeclineMode`](OutOfOfficeAutoDeclineMode.md); `declineMessage?`: `string` \\| `null`; \\}\n\nThe extra properties Google requires on an out-of-office event, mirroring\nits `outOfOfficeProperties` block. Their presence on a draft or patch is\nwhat marks the mutation as out-of-office.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodeclinemode\"></a> `autoDeclineMode?` | [`OutOfOfficeAutoDeclineMode`](OutOfOfficeAutoDeclineMode.md) | How conflicting invitations are handled while the user is out. |\n| <a id=\"property-declinemessage\"></a> `declineMessage?` | `string` \\| `null` | Message returned to organizers whose invitations are auto-declined. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/ReplacementStatus.md -->\n# Type Alias: ReplacementStatus\n\n> **ReplacementStatus** = `\"needs_confirmation\"` \\| `\"in_progress\"` \\| `\"complete\"`\n\nUser-visible workflow state.\n\n\n<!-- generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md -->\n# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ViewerCapabilities.md -->\n# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/VisibleCalendar.md -->\n# Type Alias: VisibleCalendar\n\n> **VisibleCalendar** = \\{ `capabilities`: [`CalendarCapabilities`](CalendarCapabilities.md); `color?`: `string` \\| `null`; `defaultReminders`: [`EventReminderOverride`](EventReminderOverride.md)[]; `emailAddress`: `string`; `emailLinkId`: `string`; `id`: `string`; `isPrimary`: `boolean`; `isSubscription`: `boolean`; `isWritable`: `boolean`; `name`: `string`; `provider`: [`CalendarProvider`](CalendarProvider.md); `syncError?`: `string` \\| `null`; \\}\n\nA calendar visible to a requester, listed for pickers and filters.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-capabilities\"></a> `capabilities` | [`CalendarCapabilities`](CalendarCapabilities.md) | Provider features available on this actual calendar. |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | Provider color. |\n| <a id=\"property-defaultreminders\"></a> `defaultReminders` | [`EventReminderOverride`](EventReminderOverride.md)[] | Default reminders applied to events that keep `useDefault`. |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `string` | Connected inbox address, for grouping in multi-inbox pickers. |\n| <a id=\"property-emaillinkid\"></a> `emailLinkId` | `string` | Connected inbox that syncs this calendar. |\n| <a id=\"property-id\"></a> `id` | `string` | Persisted Macro calendar identifier. |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `boolean` | Whether this is its account's primary calendar. |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `boolean` | Whether this is one of Google's shared system calendars (holidays, birthdays) the account subscribes to rather than one a person maintains. |\n| <a id=\"property-iswritable\"></a> `isWritable` | `boolean` | Whether the grant can create and modify events on this calendar. |\n| <a id=\"property-name\"></a> `name` | `string` | Provider display name. |\n| <a id=\"property-provider\"></a> `provider` | [`CalendarProvider`](CalendarProvider.md) | Calendar provider, for display and reconnect routing. |\n| <a id=\"property-syncerror\"></a> `syncError?` | `string` \\| `null` | A persistent sync failure isolated to this calendar, surfaced so the settings row can badge it. `None` while the calendar is syncing normally or a failure has not yet crossed the persistence threshold. |\n\n\n<!-- generated/storage/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/storage/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CalendarOccurrence.md -->\n# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: [`EventTime`](EventTime.md); \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Instance time. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ListOccurrencesData.md -->\n# Type Alias: ListOccurrencesData\n\n> **ListOccurrencesData** = \\{ `body?`: `never`; `path?`: `never`; `query`: \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\}; `url`: `\"/calendar-events\"`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-body\"></a> `body?` | `never` | - |\n| <a id=\"property-path\"></a> `path?` | `never` | - |\n| <a id=\"property-query\"></a> `query` | \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `query.cursor?` | `string` | Opaque continuation cursor returned by the previous page. |\n| `query.end` | `string` | Exclusive UTC viewport end. |\n| `query.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `query.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `query.start` | `string` | Inclusive UTC viewport start. |\n| `query.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n| <a id=\"property-url\"></a> `url` | `\"/calendar-events\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md -->\n# Type Alias: TeamCalendarCoverage\n\n> **TeamCalendarCoverage** = `\"ready\"` \\| `\"unavailable\"` \\| `\"hidden\"`\n\nWhether a member's calendar projection can establish availability.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarDetails.md -->\n# Type Alias: TeamCalendarDetails\n\n> **TeamCalendarDetails** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarName`: `string`; `conferenceUrl?`: `string` \\| `null`; `description?`: `string` \\| `null`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `title`: `string`; \\}\n\nSafe details from a single authorized source.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees; self flags are relative to the requesting viewer. |\n| <a id=\"property-calendarname\"></a> `calendarName` | `string` | Source calendar name, shown only with details. |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Join URL, if supplied by this source. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Body, if supplied by this source. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location, if supplied by this source. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer address from this source. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer name from this source. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarSharing.md -->\n# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.\n\n\n<!-- src/entities/calendar/calendar/classes/Calendar.md -->\n# Class: Calendar\n\nA calendar visible to the requester across their connected inboxes: a\nfree-to-construct handle whose detail resolves from the caller's calendar\nlist. There is no fetch-by-id endpoint, so a bare [Calendar.byId](#byid)\nhandle loads its detail by listing the caller's calendars and matching on id.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Provider color, when set. | - |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | Connected inbox address that syncs this calendar. | - |\n| <a id=\"property-emaillink\"></a> `emailLink` | `readonly` | () => `Promise`\\<[`Link`](../../../email/link/classes/Link.md)\\> | The connected inbox (email link) that syncs this calendar. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is its account's primary calendar. | - |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is a subscribed system calendar (holidays, birthdays). | - |\n| <a id=\"property-iswritable\"></a> `isWritable` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the grant can create and modify events on this calendar. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Provider display name. | - |\n| <a id=\"property-syncerror\"></a> `syncError` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A persistent per-calendar sync failure, surfaced for settings badges. | - |\n\n## Methods\n\n### setContributesToAvailability()\n\n> **setContributesToAvailability**(`contributesToAvailability`): `Promise`\\<`void`\\>\n\nSet whether this calendar contributes to the caller's availability.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `contributesToAvailability` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Calendar`\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Calendar`\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Calendar`[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Calendar`[]\\>\n\n\n<!-- src/entities/calendar/event/classes/CalendarEvent.md -->\n# Class: CalendarEvent\n\nA Macro calendar event: a handle exposing the event's synced fields and the\nmutations that act on it ([CalendarEvent.update](#update),\n[CalendarEvent.delete](#delete), [CalendarEvent.rsvp](#rsvp)).\n\nThe calendar service has no fetch-by-id endpoint, so a handle reads its\nfields only when seeded with a record — as returned by\n[CalendarEvent.update](#update), [CalendarEvent.rsvp](#rsvp), or\n`calendar.createEvent`. A bare [CalendarEvent.byId](#byid) handle can drive\nmutations, but reading a field on it throws.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `readonly` | () => `Promise`\\<[`CalendarAttendee`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendee.md)[]\\> | Attendees on the canonical copy. | - |\n| <a id=\"property-calendar\"></a> `calendar` | `readonly` | () => `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md) \\| `undefined`\\> | The calendar the canonical source belongs to, when known. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional event body. | - |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `readonly` | () => `Promise`\\<[`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md)\\> | What the organizer lets guests do: modify, invite others, see the guest list. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the canonical source's calendar prohibits editing. | - |\n| <a id=\"property-location\"></a> `location` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional physical or virtual location label. | - |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `readonly` | () => `Promise`\\<`string`[]\\> | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`EventStatus`](../../../../../generated/calendar/types.gen/type-aliases/EventStatus.md)\\> | Event status. | - |\n| <a id=\"property-time\"></a> `time` | `readonly` | () => `Promise`\\<[`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md)\\> | Timed or all-day shape. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | Display title. | - |\n| <a id=\"property-transparency\"></a> `transparency` | `readonly` | () => `Promise`\\<[`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md)\\> | Availability behavior. | - |\n| <a id=\"property-viewercan\"></a> `viewerCan` | `readonly` | () => `Promise`\\<[`ViewerCapabilities`](../../../../../generated/calendar/types.gen/type-aliases/ViewerCapabilities.md)\\> | What the connected account may do with this event under its guest policy. | - |\n\n## Methods\n\n### addToCalendar()\n\n> **addToCalendar**(`options?`): `Promise`\\<`CalendarEvent`\\>\n\nAdd a snapshot of an event shared with one of the requester's\nchannels to one of their Google calendars, and return a handle to the\nsynced snapshot. The snapshot keeps the meeting's iCalendar UID and\norganizer, lists only the requester as a guest, and carries no join link;\nnobody is notified, and answers or guests on it never reach the meeting.\nRefused with `already_on_calendar` when the meeting is already on one of\ntheir calendars, and with `copy_refused` when Google will not import it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### delete()\n\n> **delete**(`options?`): `Promise`\\<`void`\\>\n\nDelete the event (or a scoped part of a recurring series) at its provider.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | [`DeleteEventOptions`](../interfaces/DeleteEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### ics()\n\n> **ics**(): `Promise`\\<`string`\\>\n\nThe event as an iCalendar (`.ics`) document: its series, title,\ndescription, location and organizer, never its guests or join link.\nAvailable for the requester's own events and ones shared with a channel\nthey belong to.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### inviteGuests()\n\n> **inviteGuests**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nAdd guests without touching anyone already invited, and return a handle\nto the synced record. The organizer may, and so may a guest the organizer\nlets invite others (see [CalendarEvent.viewerCan](#property-viewercan)); Google emails\nthe new guests.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`InviteGuestsOptions`](../interfaces/InviteGuestsOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### prepareReplacement()\n\n> **prepareReplacement**(`options`): `Promise`\\<[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\\>\n\nPreview an organizer replacement without cancelling or sending invitations.\nReview replacement.status() before explicitly calling replacement.confirm().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); `recurrenceId?`: `string`; `removeConference`: `boolean`; \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n| `options.recurrenceId?` | `string` |\n| `options.removeConference` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\\>\n\n***\n\n### providerUrl()\n\n> **providerUrl**(`options?`): `Promise`\\<`string` \\| `undefined`\\>\n\nOpen this calendar copy in its provider for actions unavailable through its API.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); `recurrenceId?`: `string`; \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n| `options.recurrenceId?` | `string` |\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### record()\n\n> **record**(): `Promise`\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\nThe full synced event record. Available on a seeded handle (from create /\nupdate / rsvp); a bare `byId` handle throws (no fetch-by-id endpoint).\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\n***\n\n### rsvp()\n\n> **rsvp**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nRecord the requester's RSVP and return a handle to the synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`RsvpEventOptions`](../interfaces/RsvpEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nUpdate the event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`UpdateEventOptions`](../interfaces/UpdateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `CalendarEvent`\n\nA handle to a calendar event by id, for driving mutations. Reading a\nfield on it throws (there is no fetch-by-id endpoint).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarEvent`\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `CalendarEvent`\n\nA handle seeded with a synced event record; reads resolve without a fetch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md) |\n\n#### Returns\n\n`CalendarEvent`\n\n\n<!-- src/entities/calendar/event/interfaces/DeleteEventOptions.md -->\n# Interface: DeleteEventOptions\n\nHow a deletion is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is deleted, for a multi-calendar event. Omit to delete the canonical copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence a scoped deletion targets. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarDeletionScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarDeletionScopeParam.md) | Deletion scope; defaults to the entire event or series. |\n\n\n<!-- src/entities/calendar/event/interfaces/InviteGuestsOptions.md -->\n# Interface: InviteGuestsOptions\n\nGuests to add and how much of a recurring series gains them.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is written, for a multi-calendar event. Omit to write the canonical copy. |\n| <a id=\"property-guests\"></a> `guests` | [`CalendarGuestInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarGuestInputBody.md)[] | Guests to add; anyone already on the event is skipped. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the guests are added to. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarUpdateScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md) | How much of a recurring series gains the guests. Omit to let `recurrenceId` decide. |\n\n\n<!-- src/entities/calendar/event/interfaces/RsvpEventOptions.md -->\n# Interface: RsvpEventOptions\n\nThe RSVP to record and how it is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is answered, for a multi-calendar event. Omit to answer on the canonical copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the response targets. |\n| <a id=\"property-response\"></a> `response` | [`AttendeeResponseStatus`](../../../../../generated/calendar/types.gen/type-aliases/AttendeeResponseStatus.md) | The response to record for the connected account. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarRsvpScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarRsvpScopeParam.md) | How much of a recurring series the response covers. Omit to let `recurrenceId` decide. |\n\n\n<!-- src/entities/calendar/event/interfaces/UpdateEventOptions.md -->\n# Interface: UpdateEventOptions\n\nFields to change on an event; omitted fields are left untouched.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Replacement attendee list. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is patched, for a multi-calendar event. Omit to patch the canonical copy. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Provider conference change; omit to retain it. Outlook removal requires a separately confirmed replacement via prepareReplacement(). |\n| <a id=\"property-description\"></a> `description?` | `string` | Replacement description; an empty string clears it. |\n| <a id=\"property-location\"></a> `location?` | `string` | Replacement location; an empty string clears it. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Replacement out-of-office properties, applied only to an event that is already out-of-office. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the update targets. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Replacement recurrence properties; an empty list clears them. |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Replacement reminder configuration. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarUpdateScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md) | How much of a recurring series the update covers. Omit to let `recurrenceId` decide. |\n| <a id=\"property-time\"></a> `time?` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Replacement time. |\n| <a id=\"property-title\"></a> `title?` | `string` | Replacement title; an empty string clears it. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Replacement availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Replacement visibility. |\n\n\n<!-- src/entities/calendar/namespace/classes/CalendarNamespace.md -->\n# Class: CalendarNamespace\n\nThe calendar surface: the caller's visible calendars, event creation, and\nhandles to individual events and calendars. Backed by calendar_service (the\nSDK reaches it on the gateway's `/calendar` route).\n\n## Constructors\n\n### Constructor\n\n> **new CalendarNamespace**(`client`): `CalendarNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CalendarNamespace`\n\n## Methods\n\n### availabilityCalendars()\n\n> **availabilityCalendars**(): `Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\nCalendar availability settings, each referring to a typed calendar.\n\n#### Returns\n\n`Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\n***\n\n### calendar()\n\n> **calendar**(`id`): [`Calendar`](../../calendar/classes/Calendar.md)\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Calendar`](../../calendar/classes/Calendar.md)\n\n***\n\n### calendars()\n\n> **calendars**(): `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Returns\n\n`Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\n***\n\n### createEvent()\n\n> **createEvent**(`options`): `Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\nCreate a calendar event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreateEventOptions`](../interfaces/CreateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\n***\n\n### event()\n\n> **event**(`id`): [`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\nA handle to a calendar event by id, for driving mutations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\n***\n\n### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\nCalendar occurrences in a viewport, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`ListOccurrencesData`](../../../../../generated/storage/types.gen/type-aliases/ListOccurrencesData.md)\\[`\"query\"`\\], `\"cursor\"`\\> |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\n***\n\n### replacement()\n\n> **replacement**(`operationId`): [`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\nRecover a saved replacement, including after its original event was retired.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\n***\n\n### setTeamSharing()\n\n> **setTeamSharing**(`sharing`): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nReplace the team calendar sharing preference.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | [`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md) |\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n***\n\n### teamOutOfOffice()\n\n> **teamOutOfOffice**(`options`): `Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\nTeammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `options.end` | `string` | Exclusive UTC viewport end. |\n| `options.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `options.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `options.start` | `string` | Inclusive UTC viewport start. |\n| `options.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n\n#### Returns\n\n`Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\n***\n\n### teamPage()\n\n> **teamPage**(`options`): `Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\nA page of team availability, including its roster and continuation cursor.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `cursor?`: `string` \\| `null`; `end`: `string`; `limit?`: `number` \\| `null`; `start`: `string`; \\} | - |\n| `options.cursor?` | `string` \\| `null` | Continuation returned by the preceding page. |\n| `options.end` | `string` | Exclusive instant. |\n| `options.limit?` | `number` \\| `null` | Maximum source occurrences, at most 2,000. Zero returns the roster only. |\n| `options.start` | `string` | Inclusive instant. |\n\n#### Returns\n\n`Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\n***\n\n### teamSharing()\n\n> **teamSharing**(): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nCurrent sharing preference for the team calendar.\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n\n<!-- src/entities/calendar/namespace/interfaces/CreateEventOptions.md -->\n# Interface: CreateEventOptions\n\nFields for a new calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Invited attendees. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Exact calendar to create the event on; takes precedence over the inbox default. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Conference to attach; omit to create the event without one. |\n| <a id=\"property-description\"></a> `description?` | `string` | Optional event body. |\n| <a id=\"property-emaillink\"></a> `emailLink?` | [`Link`](../../../email/link/classes/Link.md) | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |\n| <a id=\"property-location\"></a> `location?` | `string` | Optional location label. |\n| <a id=\"property-macrocall\"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Out-of-office properties; present to create an out-of-office event. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Reminder configuration; omit to keep the calendar defaults. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Event visibility. |\n\n\n<!-- src/entities/calendar/replacement/classes/CalendarReplacement.md -->\n# Class: CalendarReplacement\n\nDurable organizer replacement, recoverable even after the original event is retired.\n\n## Constructors\n\n### Constructor\n\n> **new CalendarReplacement**(`client`, `id`): `CalendarReplacement`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarReplacement`\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |\n\n## Methods\n\n### confirm()\n\n> **confirm**(): `Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\nConfirm the reviewed cancellation and reinvitation, or resume that same operation.\nPresent the preview and obtain the organizer's confirmation before the first call.\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\n***\n\n### discard()\n\n> **discard**(): `Promise`\\<`void`\\>\n\nDiscard an unconfirmed preview. Confirmed operations must be recovered, not discarded.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### status()\n\n> **status**(): `Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\nRead progress without initiating provider writes.\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n"+ "overview": "<!-- src/entities/calendar/namespace/classes/CalendarNamespace.md -->\n# Class: CalendarNamespace\n\nThe calendar surface: the caller's visible calendars, event creation, and\nhandles to individual events and calendars. Backed by calendar_service (the\nSDK reaches it on the gateway's `/calendar` route).\n\n## Constructors\n\n### Constructor\n\n> **new CalendarNamespace**(`client`): `CalendarNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CalendarNamespace`\n\n## Methods\n\n### availabilityCalendars()\n\n> **availabilityCalendars**(): `Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\nCalendar availability settings, each referring to a typed calendar.\n\n#### Returns\n\n`Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\n***\n\n### calendar()\n\n> **calendar**(`id`): [`Calendar`](../../calendar/classes/Calendar.md)\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Calendar`](../../calendar/classes/Calendar.md)\n\n***\n\n### calendars()\n\n> **calendars**(): `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Returns\n\n`Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\n***\n\n### createEvent()\n\n> **createEvent**(`options`): `Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\nCreate a calendar event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreateEventOptions`](../interfaces/CreateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\n***\n\n### event()\n\n> **event**(`id`): [`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\nA handle to a calendar event by id, for driving mutations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\n***\n\n### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\nCalendar occurrences in a viewport, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`ListOccurrencesData`](../../../../../generated/storage/types.gen/type-aliases/ListOccurrencesData.md)\\[`\"query\"`\\], `\"cursor\"`\\> |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\n***\n\n### replacement()\n\n> **replacement**(`operationId`): [`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\nRecover a saved replacement, including after its original event was retired.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\n***\n\n### setTeamSharing()\n\n> **setTeamSharing**(`sharing`): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nReplace the team calendar sharing preference.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | [`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md) |\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n***\n\n### teamOutOfOffice()\n\n> **teamOutOfOffice**(`options`): `Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\nTeammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `options.end` | `string` | Exclusive UTC viewport end. |\n| `options.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `options.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `options.start` | `string` | Inclusive UTC viewport start. |\n| `options.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n\n#### Returns\n\n`Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\n***\n\n### teamPage()\n\n> **teamPage**(`options`): `Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\nA page of team availability, including its roster and continuation cursor.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `cursor?`: `string` \\| `null`; `end`: `string`; `limit?`: `number` \\| `null`; `start`: `string`; \\} | - |\n| `options.cursor?` | `string` \\| `null` | Continuation returned by the preceding page. |\n| `options.end` | `string` | Exclusive instant. |\n| `options.limit?` | `number` \\| `null` | Maximum source occurrences, at most 2,000. Zero returns the roster only. |\n| `options.start` | `string` | Inclusive instant. |\n\n#### Returns\n\n`Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\n***\n\n### teamSharing()\n\n> **teamSharing**(): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nCurrent sharing preference for the team calendar.\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n\n<!-- src/entities/calendar/namespace/interfaces/CreateEventOptions.md -->\n# Interface: CreateEventOptions\n\nFields for a new calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Invited attendees. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Exact calendar to create the event on; takes precedence over the inbox default. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Conference to attach; omit to create the event without one. |\n| <a id=\"property-description\"></a> `description?` | `string` | Optional event body. |\n| <a id=\"property-emaillink\"></a> `emailLink?` | [`Link`](../../../email/link/classes/Link.md) | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | What guests may do; omit for Google's defaults. Google calendars only. |\n| <a id=\"property-location\"></a> `location?` | `string` | Optional location label. |\n| <a id=\"property-macrocall\"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Out-of-office properties; present to create an out-of-office event. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Reminder configuration; omit to keep the calendar defaults. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Event visibility. |\n",+ "documentation": "# Macro SDK: calendar\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/calendar/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md -->\n# Type Alias: CalendarAttendeeInputBody\n\n> **CalendarAttendeeInputBody** = \\{ `email`: `string`; `isOptional?`: `boolean`; \\}\n\nAn attendee supplied to a calendar mutation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Attendee email address. |\n| <a id=\"property-isoptional\"></a> `isOptional?` | `boolean` | Whether attendance is optional. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarCapabilities.md -->\n# Type Alias: CalendarCapabilities\n\n> **CalendarCapabilities** = \\{ `autoDecline`: `boolean`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `customRecurrence`: `boolean`; `emailReminders`: `boolean`; `guestPolicy`: `boolean`; `removeConference`: `boolean`; `resetRsvp`: `boolean`; \\}\n\nActual provider capabilities used by calendar editors.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodecline\"></a> `autoDecline` | `boolean` | Whether event-level automatic invitation declines are supported. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-customrecurrence\"></a> `customRecurrence` | `boolean` | Whether arbitrary RFC 5545 recurrence properties can be written. |\n| <a id=\"property-emailreminders\"></a> `emailReminders` | `boolean` | Whether email reminders are delivered by the provider or Macro. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `boolean` | Whether the organizer can set what guests may do. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | Whether an existing conference can be detached. |\n| <a id=\"property-resetrsvp\"></a> `resetRsvp` | `boolean` | Whether an attendee can reset their RSVP to unanswered. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarDeletionScopeParam.md -->\n# Type Alias: CalendarDeletionScopeParam\n\n> **CalendarDeletionScopeParam** = `\"all\"` \\| `\"this_event\"` \\| `\"this_and_following\"`\n\nHow much of a recurring series a deletion removes.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarEvent.md -->\n# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: [`EventType`](EventType.md); `guestPolicy`: [`GuestPolicy`](GuestPolicy.md); `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: [`EventReminders`](EventReminders.md); `sequence`: `number`; `sources?`: [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[]; `status`: [`EventStatus`](EventStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `updatedAt`: `string`; `viewerCan`: [`ViewerCapabilities`](ViewerCapabilities.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | [`EventType`](EventType.md) | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | [`GuestPolicy`](GuestPolicy.md) | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](EventReminders.md) | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | [`EventStatus`](EventStatus.md) | Event status. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | [`ViewerCapabilities`](ViewerCapabilities.md) | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarEventSourceContent.md -->\n# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: [`EventType`](EventType.md); `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: [`EventReminders`](EventReminders.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | [`EventType`](EventType.md) | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | [`EventReminders`](EventReminders.md) | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarGuestInputBody.md -->\n# Type Alias: CalendarGuestInputBody\n\n> **CalendarGuestInputBody** = \\{ `email`: `string`; `optional?`: `boolean`; \\}\n\nA guest added to an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Guest email address. |\n| <a id=\"property-optional\"></a> `optional?` | `boolean` | Whether attendance is optional. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarProvider.md -->\n# Type Alias: CalendarProvider\n\n> **CalendarProvider** = `\"google\"` \\| `\"outlook\"`\n\nProvider selected from the persisted calendar account and email binding.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarReplacementView.md -->\n# Type Alias: CalendarReplacementView\n\n> **CalendarReplacementView** = \\{ `attendeeCount`: `number`; `completedSteps`: `number`; `event?`: `null` \\| [`CalendarEvent`](CalendarEvent.md); `isSeries`: `boolean`; `operationId`: `string`; `providerUrl?`: `string` \\| `null`; `removeConference`: `boolean`; `replacementUrl?`: `string` \\| `null`; `status`: [`ReplacementStatus`](ReplacementStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `totalSteps`: `number`; \\}\n\nSafe preview and recovery response; never exposes the opaque provider snapshot.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendeecount\"></a> `attendeeCount` | `number` | Guest count for cancellation and reinvitation confirmation. |\n| <a id=\"property-completedsteps\"></a> `completedSteps` | `number` | Number of completed provider steps. |\n| <a id=\"property-event\"></a> `event?` | `null` \\| [`CalendarEvent`](CalendarEvent.md) | - |\n| <a id=\"property-isseries\"></a> `isSeries` | `boolean` | Entire recurring series, including exceptions, is replaced. |\n| <a id=\"property-operationid\"></a> `operationId` | `string` | Use this identity when confirming or checking progress. |\n| <a id=\"property-providerurl\"></a> `providerUrl?` | `string` \\| `null` | Original event for manual review. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | The provider conference is removed. |\n| <a id=\"property-replacementurl\"></a> `replacementUrl?` | `string` \\| `null` | New provider event, when creation was confirmed. |\n| <a id=\"property-status\"></a> `status` | [`ReplacementStatus`](ReplacementStatus.md) | Current durable state. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Frozen time. |\n| <a id=\"property-title\"></a> `title` | `string` | Frozen title. |\n| <a id=\"property-totalsteps\"></a> `totalSteps` | `number` | Number of provider steps in this operation. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarRsvpScopeParam.md -->\n# Type Alias: CalendarRsvpScopeParam\n\n> **CalendarRsvpScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an RSVP applies to.\n\nUnlike deletion there is no this-and-following variant: the provider\ncannot express a forward-scoped response, so offering one would be a\npromise sync could not keep.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md -->\n# Type Alias: CalendarUpdateScopeParam\n\n> **CalendarUpdateScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an update applies to.\n\nLike RSVPs there is no this-and-following variant: the provider cannot\nexpress a forward-scoped edit as one write, and emulating it (truncate\nthe series, insert an edited clone) is non-atomic and re-invites the\nattendees of the clone. Compose it from a this-and-following deletion\nand a create when that shape is wanted.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ConferenceChange.md -->\n# Type Alias: ConferenceChange\n\n> **ConferenceChange** = `\"provider_default\"` \\| `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"none\"`\n\nA requested change to an event's conferencing. Omitting the field leaves\nthe existing conference untouched; only these values change it.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ConferenceProvider.md -->\n# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventReminderOverride.md -->\n# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventReminders.md -->\n# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: [`EventReminderOverride`](EventReminderOverride.md)[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | [`EventReminderOverride`](EventReminderOverride.md)[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventStatus.md -->\n# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventTransparency.md -->\n# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventType.md -->\n# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventVisibility.md -->\n# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.\n\n\n<!-- generated/calendar/types.gen/type-aliases/GuestPolicy.md -->\n# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/OutOfOfficeAutoDeclineMode.md -->\n# Type Alias: OutOfOfficeAutoDeclineMode\n\n> **OutOfOfficeAutoDeclineMode** = `\"decline_none\"` \\| `\"decline_all_conflicting_invitations\"` \\| `\"decline_only_new_conflicting_invitations\"`\n\nHow an out-of-office event responds to conflicting invitations, mirroring\nGoogle's `autoDeclineMode`.\n\n\n<!-- generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md -->\n# Type Alias: OutOfOfficeProperties\n\n> **OutOfOfficeProperties** = \\{ `autoDeclineMode?`: [`OutOfOfficeAutoDeclineMode`](OutOfOfficeAutoDeclineMode.md); `declineMessage?`: `string` \\| `null`; \\}\n\nThe extra properties Google requires on an out-of-office event, mirroring\nits `outOfOfficeProperties` block. Their presence on a draft or patch is\nwhat marks the mutation as out-of-office.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodeclinemode\"></a> `autoDeclineMode?` | [`OutOfOfficeAutoDeclineMode`](OutOfOfficeAutoDeclineMode.md) | How conflicting invitations are handled while the user is out. |\n| <a id=\"property-declinemessage\"></a> `declineMessage?` | `string` \\| `null` | Message returned to organizers whose invitations are auto-declined. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/ReplacementStatus.md -->\n# Type Alias: ReplacementStatus\n\n> **ReplacementStatus** = `\"needs_confirmation\"` \\| `\"in_progress\"` \\| `\"complete\"`\n\nUser-visible workflow state.\n\n\n<!-- generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md -->\n# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ViewerCapabilities.md -->\n# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-organize\"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/VisibleCalendar.md -->\n# Type Alias: VisibleCalendar\n\n> **VisibleCalendar** = \\{ `capabilities`: [`CalendarCapabilities`](CalendarCapabilities.md); `color?`: `string` \\| `null`; `defaultReminders`: [`EventReminderOverride`](EventReminderOverride.md)[]; `emailAddress`: `string`; `emailLinkId`: `string`; `id`: `string`; `isPrimary`: `boolean`; `isSubscription`: `boolean`; `isWritable`: `boolean`; `name`: `string`; `provider`: [`CalendarProvider`](CalendarProvider.md); `syncError?`: `string` \\| `null`; \\}\n\nA calendar visible to a requester, listed for pickers and filters.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-capabilities\"></a> `capabilities` | [`CalendarCapabilities`](CalendarCapabilities.md) | Provider features available on this actual calendar. |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | Provider color. |\n| <a id=\"property-defaultreminders\"></a> `defaultReminders` | [`EventReminderOverride`](EventReminderOverride.md)[] | Default reminders applied to events that keep `useDefault`. |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `string` | Connected inbox address, for grouping in multi-inbox pickers. |\n| <a id=\"property-emaillinkid\"></a> `emailLinkId` | `string` | Connected inbox that syncs this calendar. |\n| <a id=\"property-id\"></a> `id` | `string` | Persisted Macro calendar identifier. |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `boolean` | Whether this is its account's primary calendar. |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `boolean` | Whether this is one of Google's shared system calendars (holidays, birthdays) the account subscribes to rather than one a person maintains. |\n| <a id=\"property-iswritable\"></a> `isWritable` | `boolean` | Whether the grant can create and modify events on this calendar. |\n| <a id=\"property-name\"></a> `name` | `string` | Provider display name. |\n| <a id=\"property-provider\"></a> `provider` | [`CalendarProvider`](CalendarProvider.md) | Calendar provider, for display and reconnect routing. |\n| <a id=\"property-syncerror\"></a> `syncError?` | `string` \\| `null` | A persistent sync failure isolated to this calendar, surfaced so the settings row can badge it. `None` while the calendar is syncing normally or a failure has not yet crossed the persistence threshold. |\n\n\n<!-- generated/storage/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/storage/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CalendarOccurrence.md -->\n# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: [`EventTime`](EventTime.md); \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Instance time. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ListOccurrencesData.md -->\n# Type Alias: ListOccurrencesData\n\n> **ListOccurrencesData** = \\{ `body?`: `never`; `path?`: `never`; `query`: \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\}; `url`: `\"/calendar-events\"`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-body\"></a> `body?` | `never` | - |\n| <a id=\"property-path\"></a> `path?` | `never` | - |\n| <a id=\"property-query\"></a> `query` | \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `query.cursor?` | `string` | Opaque continuation cursor returned by the previous page. |\n| `query.end` | `string` | Exclusive UTC viewport end. |\n| `query.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `query.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `query.start` | `string` | Inclusive UTC viewport start. |\n| `query.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n| <a id=\"property-url\"></a> `url` | `\"/calendar-events\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md -->\n# Type Alias: TeamCalendarCoverage\n\n> **TeamCalendarCoverage** = `\"ready\"` \\| `\"unavailable\"` \\| `\"hidden\"`\n\nWhether a member's calendar projection can establish availability.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarDetails.md -->\n# Type Alias: TeamCalendarDetails\n\n> **TeamCalendarDetails** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarName`: `string`; `conferenceUrl?`: `string` \\| `null`; `description?`: `string` \\| `null`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `title`: `string`; \\}\n\nSafe details from a single authorized source.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees; self flags are relative to the requesting viewer. |\n| <a id=\"property-calendarname\"></a> `calendarName` | `string` | Source calendar name, shown only with details. |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Join URL, if supplied by this source. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Body, if supplied by this source. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location, if supplied by this source. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer address from this source. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer name from this source. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarSharing.md -->\n# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.\n\n\n<!-- src/entities/calendar/calendar/classes/Calendar.md -->\n# Class: Calendar\n\nA calendar visible to the requester across their connected inboxes: a\nfree-to-construct handle whose detail resolves from the caller's calendar\nlist. There is no fetch-by-id endpoint, so a bare [Calendar.byId](#byid)\nhandle loads its detail by listing the caller's calendars and matching on id.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Provider color, when set. | - |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | Connected inbox address that syncs this calendar. | - |\n| <a id=\"property-emaillink\"></a> `emailLink` | `readonly` | () => `Promise`\\<[`Link`](../../../email/link/classes/Link.md)\\> | The connected inbox (email link) that syncs this calendar. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is its account's primary calendar. | - |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is a subscribed system calendar (holidays, birthdays). | - |\n| <a id=\"property-iswritable\"></a> `isWritable` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the grant can create and modify events on this calendar. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Provider display name. | - |\n| <a id=\"property-syncerror\"></a> `syncError` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A persistent per-calendar sync failure, surfaced for settings badges. | - |\n\n## Methods\n\n### setContributesToAvailability()\n\n> **setContributesToAvailability**(`contributesToAvailability`): `Promise`\\<`void`\\>\n\nSet whether this calendar contributes to the caller's availability.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `contributesToAvailability` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Calendar`\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Calendar`\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Calendar`[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Calendar`[]\\>\n\n\n<!-- src/entities/calendar/event/classes/CalendarEvent.md -->\n# Class: CalendarEvent\n\nA Macro calendar event: a handle exposing the event's synced fields and the\nmutations that act on it ([CalendarEvent.update](#update),\n[CalendarEvent.delete](#delete), [CalendarEvent.rsvp](#rsvp)).\n\nThe calendar service has no fetch-by-id endpoint, so a handle reads its\nfields only when seeded with a record — as returned by\n[CalendarEvent.update](#update), [CalendarEvent.rsvp](#rsvp), or\n`calendar.createEvent`. A bare [CalendarEvent.byId](#byid) handle can drive\nmutations, but reading a field on it throws.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `readonly` | () => `Promise`\\<[`CalendarAttendee`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendee.md)[]\\> | Attendees on the canonical copy. | - |\n| <a id=\"property-calendar\"></a> `calendar` | `readonly` | () => `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md) \\| `undefined`\\> | The calendar the canonical source belongs to, when known. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional event body. | - |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `readonly` | () => `Promise`\\<[`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md)\\> | What the organizer lets guests do: modify, invite others, see the guest list. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the canonical source's calendar prohibits editing. | - |\n| <a id=\"property-location\"></a> `location` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional physical or virtual location label. | - |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `readonly` | () => `Promise`\\<`string`[]\\> | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`EventStatus`](../../../../../generated/calendar/types.gen/type-aliases/EventStatus.md)\\> | Event status. | - |\n| <a id=\"property-time\"></a> `time` | `readonly` | () => `Promise`\\<[`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md)\\> | Timed or all-day shape. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | Display title. | - |\n| <a id=\"property-transparency\"></a> `transparency` | `readonly` | () => `Promise`\\<[`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md)\\> | Availability behavior. | - |\n| <a id=\"property-viewercan\"></a> `viewerCan` | `readonly` | () => `Promise`\\<[`ViewerCapabilities`](../../../../../generated/calendar/types.gen/type-aliases/ViewerCapabilities.md)\\> | What the connected account may do with this event under its guest policy. | - |\n\n## Methods\n\n### addToCalendar()\n\n> **addToCalendar**(`options?`): `Promise`\\<`CalendarEvent`\\>\n\nAdd a snapshot of an event shared with one of the requester's\nchannels to one of their Google calendars, and return a handle to the\nsynced snapshot. The snapshot keeps the meeting's iCalendar UID and\norganizer, lists only the requester as a guest, and carries no join link;\nnobody is notified, and answers or guests on it never reach the meeting.\nRefused with `already_on_calendar` when the meeting is already on one of\ntheir calendars, and with `copy_refused` when Google will not import it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### delete()\n\n> **delete**(`options?`): `Promise`\\<`void`\\>\n\nDelete the event (or a scoped part of a recurring series) at its provider.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | [`DeleteEventOptions`](../interfaces/DeleteEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### ics()\n\n> **ics**(): `Promise`\\<`string`\\>\n\nThe event as an iCalendar (`.ics`) document: its series, title,\ndescription, location and organizer, never its guests or join link.\nAvailable for the requester's own events and ones shared with a channel\nthey belong to.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### inviteGuests()\n\n> **inviteGuests**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nAdd guests without touching anyone already invited, and return a handle\nto the synced record. The organizer may, and so may a guest the organizer\nlets invite others (see [CalendarEvent.viewerCan](#property-viewercan)); Google emails\nthe new guests.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`InviteGuestsOptions`](../interfaces/InviteGuestsOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### prepareReplacement()\n\n> **prepareReplacement**(`options`): `Promise`\\<[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\\>\n\nPreview an organizer replacement without cancelling or sending invitations.\nReview replacement.status() before explicitly calling replacement.confirm().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); `recurrenceId?`: `string`; `removeConference`: `boolean`; \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n| `options.recurrenceId?` | `string` |\n| `options.removeConference` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\\>\n\n***\n\n### providerUrl()\n\n> **providerUrl**(`options?`): `Promise`\\<`string` \\| `undefined`\\>\n\nOpen this calendar copy in its provider for actions unavailable through its API.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); `recurrenceId?`: `string`; \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n| `options.recurrenceId?` | `string` |\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### record()\n\n> **record**(): `Promise`\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\nThe full synced event record. Available on a seeded handle (from create /\nupdate / rsvp); a bare `byId` handle throws (no fetch-by-id endpoint).\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\n***\n\n### rsvp()\n\n> **rsvp**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nRecord the requester's RSVP and return a handle to the synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`RsvpEventOptions`](../interfaces/RsvpEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nUpdate the event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`UpdateEventOptions`](../interfaces/UpdateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `CalendarEvent`\n\nA handle to a calendar event by id, for driving mutations. Reading a\nfield on it throws (there is no fetch-by-id endpoint).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarEvent`\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `CalendarEvent`\n\nA handle seeded with a synced event record; reads resolve without a fetch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md) |\n\n#### Returns\n\n`CalendarEvent`\n\n\n<!-- src/entities/calendar/event/interfaces/DeleteEventOptions.md -->\n# Interface: DeleteEventOptions\n\nHow a deletion is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is deleted, for a multi-calendar event. Omit to delete the canonical copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence a scoped deletion targets. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarDeletionScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarDeletionScopeParam.md) | Deletion scope; defaults to the entire event or series. |\n\n\n<!-- src/entities/calendar/event/interfaces/InviteGuestsOptions.md -->\n# Interface: InviteGuestsOptions\n\nGuests to add and how much of a recurring series gains them.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is written, for a multi-calendar event. Omit to write the canonical copy. |\n| <a id=\"property-guests\"></a> `guests` | [`CalendarGuestInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarGuestInputBody.md)[] | Guests to add; anyone already on the event is skipped. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the guests are added to. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarUpdateScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md) | How much of a recurring series gains the guests. Omit to let `recurrenceId` decide. |\n\n\n<!-- src/entities/calendar/event/interfaces/RsvpEventOptions.md -->\n# Interface: RsvpEventOptions\n\nThe RSVP to record and how it is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is answered, for a multi-calendar event. Omit to answer on the canonical copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the response targets. |\n| <a id=\"property-response\"></a> `response` | [`AttendeeResponseStatus`](../../../../../generated/calendar/types.gen/type-aliases/AttendeeResponseStatus.md) | The response to record for the connected account. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarRsvpScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarRsvpScopeParam.md) | How much of a recurring series the response covers. Omit to let `recurrenceId` decide. |\n\n\n<!-- src/entities/calendar/event/interfaces/UpdateEventOptions.md -->\n# Interface: UpdateEventOptions\n\nFields to change on an event; omitted fields are left untouched.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Replacement attendee list. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is patched, for a multi-calendar event. Omit to patch the canonical copy. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Provider conference change; omit to retain it. Outlook removal requires a separately confirmed replacement via prepareReplacement(). |\n| <a id=\"property-description\"></a> `description?` | `string` | Replacement description; an empty string clears it. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | Replacement guest policy; only the organizer of a Google event may change it (`viewerCan.setGuestPolicy`). It applies to the whole series, so an update scoped to one occurrence (`scope: 'this_event'`, or a `recurrenceId`) that changes it is rejected; use scope `'all'`. |\n| <a id=\"property-location\"></a> `location?` | `string` | Replacement location; an empty string clears it. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Replacement out-of-office properties, applied only to an event that is already out-of-office. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the update targets. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Replacement recurrence properties; an empty list clears them. |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Replacement reminder configuration. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarUpdateScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md) | How much of a recurring series the update covers. Omit to let `recurrenceId` decide. |\n| <a id=\"property-time\"></a> `time?` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Replacement time. |\n| <a id=\"property-title\"></a> `title?` | `string` | Replacement title; an empty string clears it. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Replacement availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Replacement visibility. |\n\n\n<!-- src/entities/calendar/namespace/classes/CalendarNamespace.md -->\n# Class: CalendarNamespace\n\nThe calendar surface: the caller's visible calendars, event creation, and\nhandles to individual events and calendars. Backed by calendar_service (the\nSDK reaches it on the gateway's `/calendar` route).\n\n## Constructors\n\n### Constructor\n\n> **new CalendarNamespace**(`client`): `CalendarNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CalendarNamespace`\n\n## Methods\n\n### availabilityCalendars()\n\n> **availabilityCalendars**(): `Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\nCalendar availability settings, each referring to a typed calendar.\n\n#### Returns\n\n`Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\n***\n\n### calendar()\n\n> **calendar**(`id`): [`Calendar`](../../calendar/classes/Calendar.md)\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Calendar`](../../calendar/classes/Calendar.md)\n\n***\n\n### calendars()\n\n> **calendars**(): `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Returns\n\n`Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\n***\n\n### createEvent()\n\n> **createEvent**(`options`): `Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\nCreate a calendar event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreateEventOptions`](../interfaces/CreateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\n***\n\n### event()\n\n> **event**(`id`): [`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\nA handle to a calendar event by id, for driving mutations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\n***\n\n### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\nCalendar occurrences in a viewport, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`ListOccurrencesData`](../../../../../generated/storage/types.gen/type-aliases/ListOccurrencesData.md)\\[`\"query\"`\\], `\"cursor\"`\\> |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); \\}, `any`, `any`\\>\n\n***\n\n### replacement()\n\n> **replacement**(`operationId`): [`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\nRecover a saved replacement, including after its original event was retired.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\n***\n\n### setTeamSharing()\n\n> **setTeamSharing**(`sharing`): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nReplace the team calendar sharing preference.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | [`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md) |\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n***\n\n### teamOutOfOffice()\n\n> **teamOutOfOffice**(`options`): `Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\nTeammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `options.end` | `string` | Exclusive UTC viewport end. |\n| `options.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `options.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `options.start` | `string` | Inclusive UTC viewport start. |\n| `options.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n\n#### Returns\n\n`Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\n***\n\n### teamPage()\n\n> **teamPage**(`options`): `Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\nA page of team availability, including its roster and continuation cursor.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `cursor?`: `string` \\| `null`; `end`: `string`; `limit?`: `number` \\| `null`; `start`: `string`; \\} | - |\n| `options.cursor?` | `string` \\| `null` | Continuation returned by the preceding page. |\n| `options.end` | `string` | Exclusive instant. |\n| `options.limit?` | `number` \\| `null` | Maximum source occurrences, at most 2,000. Zero returns the roster only. |\n| `options.start` | `string` | Inclusive instant. |\n\n#### Returns\n\n`Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\n***\n\n### teamSharing()\n\n> **teamSharing**(): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nCurrent sharing preference for the team calendar.\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n\n<!-- src/entities/calendar/namespace/interfaces/CreateEventOptions.md -->\n# Interface: CreateEventOptions\n\nFields for a new calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Invited attendees. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Exact calendar to create the event on; takes precedence over the inbox default. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Conference to attach; omit to create the event without one. |\n| <a id=\"property-description\"></a> `description?` | `string` | Optional event body. |\n| <a id=\"property-emaillink\"></a> `emailLink?` | [`Link`](../../../email/link/classes/Link.md) | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | What guests may do; omit for Google's defaults. Google calendars only. |\n| <a id=\"property-location\"></a> `location?` | `string` | Optional location label. |\n| <a id=\"property-macrocall\"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Out-of-office properties; present to create an out-of-office event. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Reminder configuration; omit to keep the calendar defaults. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Event visibility. |\n\n\n<!-- src/entities/calendar/replacement/classes/CalendarReplacement.md -->\n# Class: CalendarReplacement\n\nDurable organizer replacement, recoverable even after the original event is retired.\n\n## Constructors\n\n### Constructor\n\n> **new CalendarReplacement**(`client`, `id`): `CalendarReplacement`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarReplacement`\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |\n\n## Methods\n\n### confirm()\n\n> **confirm**(): `Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\nConfirm the reviewed cancellation and reinvitation, or resume that same operation.\nPresent the preview and obtain the organizer's confirmation before the first call.\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\n***\n\n### discard()\n\n> **discard**(): `Promise`\\<`void`\\>\n\nDiscard an unconfirmed preview. Confirmed operations must be recovered, not discarded.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### status()\n\n> **status**(): `Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\nRead progress without initiating provider writes.\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n"},{"name": "calls",@@ -105,7 +105,7 @@"name": "email","description": "Search, read, draft, and send email.","overview": "<!-- src/entities/email/draft/type-aliases/DraftOptions.md -->\n# Type Alias: DraftOptions\n\n> **DraftOptions** = `Omit`\\<[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md), `\"db_id\"` \\| `\"provider_id\"` \\| `\"provider_thread_id\"` \\| `\"replying_to_id\"` \\| `\"thread_db_id\"` \\| `\"body_text\"` \\| `\"body_html\"` \\| `\"body_macro\"` \\| `\"headers_json\"` \\| `\"include_signature\"` \\| `\"draft_generation\"`\\> & \\{ `bodyHtml?`: `string`; `bodyMacro?`: `string`; `bodyText?`: `string`; `draftGeneration?`: `number`; `headers?`: [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\]; `includeSignature?`: `boolean`; `replyingTo?`: [`EmailMessage`](../../message/classes/EmailMessage.md); `thread?`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}\n\nDraft content; relationships use message and thread handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `bodyHtml?` | `string` | HTML body. |\n| `bodyMacro?` | `string` | Macro body. |\n| `bodyText?` | `string` | Plain text body. |\n| `draftGeneration?` | `number` | Generation captured when editing began; defaults to the loaded draft. |\n| `headers?` | [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\] | Extra headers. |\n| `includeSignature?` | `boolean` | Include the inbox signature. |\n| `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | Message being replied to. |\n| `thread?` | [`EmailThread`](../../thread/classes/EmailThread.md) | Thread receiving this draft. |\n\n\n<!-- src/entities/email/filter/interfaces/EmailFilterOptions.md -->\n# Interface: EmailFilterOptions\n\nSender importance rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress?` | `string` | Match an address. |\n| <a id=\"property-emaildomain\"></a> `emailDomain?` | `string` | Match a domain. |\n| <a id=\"property-isimportant\"></a> `isImportant` | `boolean` | Whether matches are important. |\n\n\n<!-- src/entities/email/message/interfaces/SendEmailOptions.md -->\n# Interface: SendEmailOptions\n\nOptions for sending a fresh email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n\n\n<!-- src/entities/email/namespace/classes/EmailNamespace.md -->\n# Class: EmailNamespace\n\n## Constructors\n\n### Constructor\n\n> **new EmailNamespace**(`client`): `EmailNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`EmailNamespace`\n\n## Methods\n\n### attachment()\n\n> **attachment**(`id`): [`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\nA handle to an email attachment by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\n***\n\n### blockedSenders()\n\n> **blockedSenders**(): `Promise`\\<`string`[]\\>\n\nThe email addresses currently blocked.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### blockSender()\n\n> **blockSender**(`email`): `Promise`\\<`void`\\>\n\nBlock an email sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`EmailThread`](../../thread/classes/EmailThread.md)\n\nA handle to an email thread by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailThread`](../../thread/classes/EmailThread.md)\n\n***\n\n### connectionProviders()\n\n> **connectionProviders**(): `Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\nProviders the server currently permits this caller to connect.\n\n#### Returns\n\n`Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\n***\n\n### contacts()\n\n> **contacts**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\nAddress book contacts grouped by the service's interaction buckets.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\n***\n\n### createDraft()\n\n> **createDraft**(`options`, `inbox?`): `Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nCreate a draft without sending it; the inbox defaults to the caller's primary.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../../draft/type-aliases/DraftOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### createLabel()\n\n> **createLabel**(`name`): `Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\nCreate a user label. Returns the created label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\n***\n\n### deleteLabel()\n\n> **deleteLabel**(`label`): `Promise`\\<`void`\\>\n\nDelete a label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### draftById()\n\n> **draftById**(`id`): [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n***\n\n### filters()\n\n> **filters**(`inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\nImportance filters.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\n***\n\n### inbox()\n\n> **inbox**(`opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe threads in the inbox, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`InboxOptions`](../interfaces/InboxOptions.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### label()\n\n> **label**(`id`): [`Label`](../../label/classes/Label.md)\n\nA handle to a label by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Label`](../../label/classes/Label.md)\n\n***\n\n### labels()\n\n> **labels**(): `Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\nAll labels across the user's inboxes.\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\n***\n\n### link()\n\n> **link**(`id`): [`Link`](../../link/classes/Link.md)\n\nA handle to a connected inbox (email link) by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Link`](../../link/classes/Link.md)\n\n***\n\n### links()\n\n> **links**(): `Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\nThe caller's connected inboxes (email links).\n\n#### Returns\n\n`Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\n***\n\n### message()\n\n> **message**(`id`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nA handle to an email message by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n***\n\n### recoverDraftTransfer()\n\n> **recoverDraftTransfer**(`operationId`): `Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\nRecover a draft move using its original operation UUID; never starts a new move.\nAn empty committed result fences the old move so it cannot commit later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n`Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\n***\n\n### reminders()\n\n> **reminders**(`options?`): `AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\nFollow-up reminders with thread handles, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<\\{ `attachments?`: `string`[] \\| `null`; `calendar?`: `boolean` \\| `null`; `cursor?`: `string` \\| `null`; `done?`: `boolean` \\| `null`; `inboxIds?`: `string`[] \\| `null`; `limit?`: `number` \\| `null`; `noInboxes?`: `boolean` \\| `null`; `read?`: `boolean` \\| `null`; `tags?`: `string`[] \\| `null`; \\}, `\"cursor\"` \\| `\"inboxIds\"`\\> & \\{ `inboxes?`: [`Link`](../../link/classes/Link.md)[]; \\} |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\n***\n\n### scheduled()\n\n> **scheduled**(`options?`): `AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nScheduled drafts, fetched lazily in bounded pages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `inbox?`: [`Link`](../../link/classes/Link.md); `pageSize?`: `number`; \\} |\n| `options.inbox?` | [`Link`](../../link/classes/Link.md) |\n| `options.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nSearch email threads by subject and content.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### send()\n\n> **send**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### unblockSender()\n\n> **unblockSender**(`email`): `Promise`\\<`void`\\>\n\nUnblock a previously blocked sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### upsertFilter()\n\n> **upsertFilter**(`options`, `inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\nCreate or replace a filter matching an address or domain.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`EmailFilterOptions`](../../filter/interfaces/EmailFilterOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\n\n<!-- src/entities/email/namespace/interfaces/InboxOptions.md -->\n# Interface: InboxOptions\n\nOptions for listing inbox threads.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` | Page size (default 20, max 500). |\n| <a id=\"property-sort\"></a> `sort?` | [`ApiSortMethod`](../../../../../generated/email/types.gen/type-aliases/ApiSortMethod.md) | Sort order. Defaults to `viewed_updated`. |\n",- "documentation": "# Macro SDK: email\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/auth/types.gen/type-aliases/EmailConnectionProviders.md -->\n# Type Alias: EmailConnectionProviders\n\n> **EmailConnectionProviders** = \\{ `gmail`: `boolean`; `outlook`: `boolean`; `outlook_admin_consent_url?`: `string` \\| `null`; \\}\n\nActual deployment availability for the provider selector.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-gmail\"></a> `gmail` | `boolean` | - |\n| <a id=\"property-outlook\"></a> `outlook` | `boolean` | - |\n| <a id=\"property-outlook_admin_consent_url\"></a> `outlook_admin_consent_url?` | `string` \\| `null` | Where a Microsoft 365 administrator approves Macro for their whole directory. Present when Outlook is configured and the request named an `original_url` for the administrator's browser to return to. |\n\n\n<!-- generated/email/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/email/types.gen/type-aliases/ApiAttachmentDraft.md -->\n# Type Alias: ApiAttachmentDraft\n\n> **ApiAttachmentDraft** = \\{ `content_id?`: `string` \\| `null`; `content_type`: `string`; `draft_id`: `string`; `file_name`: `string`; `id`: `string`; `is_inline`: `boolean`; `s3_key`: `string`; `sha`: `string`; `size`: `number`; `upload_pending`: `boolean`; \\}\n\nAPI representation of a draft attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-content_type\"></a> `content_type` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-file_name\"></a> `file_name` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_inline\"></a> `is_inline` | `boolean` |\n| <a id=\"property-s3_key\"></a> `s3_key` | `string` |\n| <a id=\"property-sha\"></a> `sha` | `string` |\n| <a id=\"property-size\"></a> `size` | `number` |\n| <a id=\"property-upload_pending\"></a> `upload_pending` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiAttachmentForwarded.md -->\n# Type Alias: ApiAttachmentForwarded\n\n> **ApiAttachmentForwarded** = \\{ `attachment_id`: `string`; `draft_id`: `string`; `filename?`: `string` \\| `null`; `message_provider_id`: `string`; `mime_type?`: `string` \\| `null`; `provider_attachment_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a forwarded attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment_id\"></a> `attachment_id` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-message_provider_id\"></a> `message_provider_id` | `string` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_attachment_id\"></a> `provider_attachment_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiContactInfo.md -->\n# Type Alias: ApiContactInfo\n\n> **ApiContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nAPI representation of a contact (sender or recipient).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiDraftContactInfo.md -->\n# Type Alias: ApiDraftContactInfo\n\n> **ApiDraftContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nContact info for draft request/response (backward-compatible with MessageToSend shape).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Email address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | Profile photo URL. |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiDraftInput.md -->\n# Type Alias: ApiDraftInput\n\n> **ApiDraftInput** = \\{ `bcc?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; `body_html?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `cc?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; `db_id?`: `string` \\| `null`; `draft_generation?`: `number`; `headers_json?`: `null` \\| [`Value`](Value.md); `include_signature?`: `boolean` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `subject`: `string`; `thread_db_id?`: `string` \\| `null`; `to?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; \\}\n\nThe draft input matching the current `MessageToSend` JSON shape for backward compat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | Bcc recipients. |\n| <a id=\"property-body_html\"></a> `body_html?` | `string` \\| `null` | HTML body (base64 URL_SAFE_NO_PAD encoded). Sanitized before storage. |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | Macro body format. |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | Plain text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | Cc recipients. |\n| <a id=\"property-db_id\"></a> `db_id?` | `string` \\| `null` | Existing message DB ID (for updating an existing draft). |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation from the last loaded draft; legacy clients begin at zero. |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `null` \\| [`Value`](Value.md) | - |\n| <a id=\"property-include_signature\"></a> `include_signature?` | `boolean` \\| `null` | Per-message override for whether to include the signature on send: `Some(false)` to exclude (user dismissed it). Omit to use the inbox's default policy. Ignored for drafts. |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | Provider message ID. |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | Provider thread ID. |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | ID of the message this draft is replying to. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id?` | `string` \\| `null` | Thread DB ID. |\n| <a id=\"property-to\"></a> `to?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | To recipients. |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiEmailFilter.md -->\n# Type Alias: ApiEmailFilter\n\n> **ApiEmailFilter** = \\{ `created_at`: `string`; `email_address?`: `string` \\| `null`; `email_domain?`: `string` \\| `null`; `id`: `string`; `is_important`: `boolean`; \\}\n\nA single email filter in API responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-email_address\"></a> `email_address?` | `string` \\| `null` |\n| <a id=\"property-email_domain\"></a> `email_domain?` | `string` \\| `null` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_important\"></a> `is_important` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabel.md -->\n# Type Alias: ApiLabel\n\n> **ApiLabel** = \\{ `createdAt`: `string`; `id`: `string`; `labelListVisibility`: [`ApiLabelListVisibility`](ApiLabelListVisibility.md); `linkId`: `string`; `messageListVisibility`: [`ApiMessageListVisibility`](ApiMessageListVisibility.md); `name`: `string`; `providerLabelId`: `string`; `type`: [`ApiLabelType`](ApiLabelType.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-labellistvisibility\"></a> `labelListVisibility` | [`ApiLabelListVisibility`](ApiLabelListVisibility.md) |\n| <a id=\"property-linkid\"></a> `linkId` | `string` |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | [`ApiMessageListVisibility`](ApiMessageListVisibility.md) |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-providerlabelid\"></a> `providerLabelId` | `string` |\n| <a id=\"property-type\"></a> `type` | [`ApiLabelType`](ApiLabelType.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabelListVisibility.md -->\n# Type Alias: ApiLabelListVisibility\n\n> **ApiLabelListVisibility** = `\"LabelShow\"` \\| `\"LabelShowIfUnread\"` \\| `\"LabelHide\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabelType.md -->\n# Type Alias: ApiLabelType\n\n> **ApiLabelType** = `\"System\"` \\| `\"User\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessage.md -->\n# Type Alias: ApiMessage\n\n> **ApiMessage** = \\{ `attachments`: [`ApiMessageAttachment`](ApiMessageAttachment.md)[]; `attachments_draft`: [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[]; `attachments_forwarded`: [`ApiAttachmentForwarded`](ApiAttachmentForwarded.md)[]; `bcc`: [`ApiContactInfo`](ApiContactInfo.md)[]; `body_html_sanitized?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_replyless?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `calendar_invitations?`: [`CalendarInvitation`](CalendarInvitation.md)[]; `cc`: [`ApiContactInfo`](ApiContactInfo.md)[]; `created_at`: `string`; `db_id`: `string`; `draft_generation`: `number`; `from?`: `null` \\| [`ApiContactInfo`](ApiContactInfo.md); `global_id?`: `string` \\| `null`; `has_attachments`: `boolean`; `headers_json?`: `unknown`; `internal_date_ts?`: `string` \\| `null`; `is_draft`: `boolean`; `is_read`: `boolean`; `is_sent`: `boolean`; `is_starred`: `boolean`; `labels`: [`ApiMessageLabel`](ApiMessageLabel.md)[]; `link_id`: `string`; `operation_status?`: `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md); `provider_history_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `scheduled_send_status?`: `null` \\| [`ScheduledSendStatus`](ScheduledSendStatus.md); `scheduled_send_time?`: `string` \\| `null`; `sent_at?`: `string` \\| `null`; `size_estimate?`: `number` \\| `null`; `snippet?`: `string` \\| `null`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: [`ApiContactInfo`](ApiContactInfo.md)[]; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`ApiMessageAttachment`](ApiMessageAttachment.md)[] | - |\n| <a id=\"property-attachments_draft\"></a> `attachments_draft` | [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[] | - |\n| <a id=\"property-attachments_forwarded\"></a> `attachments_forwarded` | [`ApiAttachmentForwarded`](ApiAttachmentForwarded.md)[] | - |\n| <a id=\"property-bcc\"></a> `bcc` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-body_html_sanitized\"></a> `body_html_sanitized?` | `string` \\| `null` | - |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | - |\n| <a id=\"property-body_replyless\"></a> `body_replyless?` | `string` \\| `null` | - |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | - |\n| <a id=\"property-calendar_invitations\"></a> `calendar_invitations?` | [`CalendarInvitation`](CalendarInvitation.md)[] | - |\n| <a id=\"property-cc\"></a> `cc` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation` | `number` | Draft edit generation; changes at send and cancellation boundaries. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| [`ApiContactInfo`](ApiContactInfo.md) | - |\n| <a id=\"property-global_id\"></a> `global_id?` | `string` \\| `null` | - |\n| <a id=\"property-has_attachments\"></a> `has_attachments` | `boolean` | - |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `unknown` | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-is_draft\"></a> `is_draft` | `boolean` | - |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` | - |\n| <a id=\"property-is_sent\"></a> `is_sent` | `boolean` | - |\n| <a id=\"property-is_starred\"></a> `is_starred` | `boolean` | - |\n| <a id=\"property-labels\"></a> `labels` | [`ApiMessageLabel`](ApiMessageLabel.md)[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-operation_status\"></a> `operation_status?` | `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md) | - |\n| <a id=\"property-provider_history_id\"></a> `provider_history_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | - |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | - |\n| <a id=\"property-scheduled_send_status\"></a> `scheduled_send_status?` | `null` \\| [`ScheduledSendStatus`](ScheduledSendStatus.md) | - |\n| <a id=\"property-scheduled_send_time\"></a> `scheduled_send_time?` | `string` \\| `null` | - |\n| <a id=\"property-sent_at\"></a> `sent_at?` | `string` \\| `null` | - |\n| <a id=\"property-size_estimate\"></a> `size_estimate?` | `number` \\| `null` | - |\n| <a id=\"property-snippet\"></a> `snippet?` | `string` \\| `null` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageAttachment.md -->\n# Type Alias: ApiMessageAttachment\n\n> **ApiMessageAttachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a provider attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageLabel.md -->\n# Type Alias: ApiMessageLabel\n\n> **ApiMessageLabel** = \\{ `created_at`: `string`; `id?`: `string` \\| `null`; `label_list_visibility?`: `null` \\| [`ApiLabelListVisibility`](ApiLabelListVisibility.md); `link_id`: `string`; `message_list_visibility?`: `null` \\| [`ApiMessageListVisibility`](ApiMessageListVisibility.md); `name?`: `string` \\| `null`; `provider_label_id`: `string`; `type_?`: `null` \\| [`ApiLabelType`](ApiLabelType.md); \\}\n\nAPI representation of a label on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` |\n| <a id=\"property-label_list_visibility\"></a> `label_list_visibility?` | `null` \\| [`ApiLabelListVisibility`](ApiLabelListVisibility.md) |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-message_list_visibility\"></a> `message_list_visibility?` | `null` \\| [`ApiMessageListVisibility`](ApiMessageListVisibility.md) |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-provider_label_id\"></a> `provider_label_id` | `string` |\n| <a id=\"property-type_\"></a> `type_?` | `null` \\| [`ApiLabelType`](ApiLabelType.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageListVisibility.md -->\n# Type Alias: ApiMessageListVisibility\n\n> **ApiMessageListVisibility** = `\"Show\"` \\| `\"Hide\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperation.md -->\n# Type Alias: ApiMessageOperation\n\n> **ApiMessageOperation** = \\{ `issue?`: `null` \\| [`ApiMessageOperationIssue`](ApiMessageOperationIssue.md); `remote_version?`: `string` \\| `null`; `revision`: `string`; `state`: [`ApiMessageOperationState`](ApiMessageOperationState.md); \\}\n\nVersions are opaque decimal strings so clients never truncate an i64.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-issue\"></a> `issue?` | `null` \\| [`ApiMessageOperationIssue`](ApiMessageOperationIssue.md) |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |\n| <a id=\"property-state\"></a> `state` | [`ApiMessageOperationState`](ApiMessageOperationState.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperationIssue.md -->\n# Type Alias: ApiMessageOperationIssue\n\n> **ApiMessageOperationIssue** = `\"ACCEPTING_REMOTE\"` \\| `\"DRAFT_CONFLICT\"` \\| `\"CREATION_UNKNOWN\"` \\| `\"ATTACHMENT_UNKNOWN\"` \\| `\"SEND_UNKNOWN\"` \\| `\"SEND_REJECTED\"` \\| `\"ACCESS_REVOKED\"` \\| `\"INVALID_CONTENT\"` \\| `\"MOVE_PENDING\"` \\| `\"MOVE_CONFLICT\"` \\| `\"MOVE_SOURCE_SENT\"` \\| `\"MOVE_REAUTHORIZATION\"` \\| `\"MOVE_ORIGINAL_REMAINS\"`\n\nProvider-neutral state exposed to clients.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperationState.md -->\n# Type Alias: ApiMessageOperationState\n\n> **ApiMessageOperationState** = `\"PENDING\"` \\| `\"SYNCHRONIZED\"` \\| `\"CONFLICT\"` \\| `\"UNCERTAIN\"` \\| `\"SUBMITTING\"` \\| `\"CONFIRMING\"` \\| `\"SENT\"` \\| `\"DELETED\"` \\| `\"CANCELLED\"` \\| `\"FAILED\"`\n\nProvider-neutral state exposed to clients.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageResolutionAction.md -->\n# Type Alias: ApiMessageResolutionAction\n\n> **ApiMessageResolutionAction** = `\"keep_local\"` \\| `\"use_provider\"` \\| `\"recheck\"` \\| `\"retry_send\"` \\| `\"keep_original\"`\n\nA deliberate resolution of a particular observed operation version.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiSortMethod.md -->\n# Type Alias: ApiSortMethod\n\n> **ApiSortMethod** = `\"viewed_at\"` \\| `\"updated_at\"` \\| `\"created_at\"` \\| `\"viewed_updated\"`\n\ncommon types of sorts based on timestamps\n\n\n<!-- generated/email/types.gen/type-aliases/ApiThread.md -->\n# Type Alias: ApiThread\n\n> **ApiThread** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `created_at`: `string`; `db_id`: `string`; `inbox_visible`: `boolean`; `is_read`: `boolean`; `latest_inbound_message_ts?`: `string` \\| `null`; `latest_non_spam_message_ts?`: `string` \\| `null`; `latest_outbound_message_ts?`: `string` \\| `null`; `link_id`: `string`; `messages`: [`ApiMessage`](ApiMessage.md)[]; `project_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-inbox_visible\"></a> `inbox_visible` | `boolean` |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` |\n| <a id=\"property-latest_inbound_message_ts\"></a> `latest_inbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_non_spam_message_ts\"></a> `latest_non_spam_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_outbound_message_ts\"></a> `latest_outbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-messages\"></a> `messages` | [`ApiMessage`](ApiMessage.md)[] |\n| <a id=\"property-project_id\"></a> `project_id?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/Attachment.md -->\n# Type Alias: Attachment\n\n> **Attachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAttachments of a message, as sent to us by the provider.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` | - |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` | - |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` | Cloud reference: open this provider page instead of downloading bytes. |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` | - |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarEvent.md -->\n# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: [`EventType`](EventType.md); `guestPolicy`: [`GuestPolicy`](GuestPolicy.md); `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: [`EventReminders`](EventReminders.md); `sequence`: `number`; `sources?`: [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[]; `status`: [`EventStatus`](EventStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `updatedAt`: `string`; `viewerCan`: [`ViewerCapabilities`](ViewerCapabilities.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | [`EventType`](EventType.md) | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | [`GuestPolicy`](GuestPolicy.md) | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](EventReminders.md) | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | [`EventStatus`](EventStatus.md) | Event status. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | [`ViewerCapabilities`](ViewerCapabilities.md) | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarEventSourceContent.md -->\n# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: [`EventType`](EventType.md); `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: [`EventReminders`](EventReminders.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | [`EventType`](EventType.md) | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | [`EventReminders`](EventReminders.md) | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarInvitation.md -->\n# Type Alias: CalendarInvitation\n\n> **CalendarInvitation** = \\{ `attendees`: [`InvitationParticipant`](InvitationParticipant.md)[]; `comment?`: `string` \\| `null`; `conference_url?`: `string` \\| `null`; `description?`: `string` \\| `null`; `dtstamp?`: `string` \\| `null`; `end?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `id`: `string`; `last_modified?`: `string` \\| `null`; `location?`: `string` \\| `null`; `method`: [`InvitationMethod`](InvitationMethod.md); `organizer?`: `null` \\| [`InvitationParticipant`](InvitationParticipant.md); `recurrence_id?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `recurrence_id_raw?`: `string` \\| `null`; `sequence`: `number`; `start?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `status?`: `string` \\| `null`; `title?`: `string` \\| `null`; `uid`: `string`; \\}\n\nDisplay snapshot of one meaningful VEVENT, owned by the email domain.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`InvitationParticipant`](InvitationParticipant.md)[] | Historical attendee identities and participation metadata. |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Reply or counter-proposal comment. |\n| <a id=\"property-conference_url\"></a> `conference_url?` | `string` \\| `null` | Validated HTTP(S) conferencing URL; never fetched during rendering. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Plaintext description, retaining passwords and dial-in instructions. |\n| <a id=\"property-dtstamp\"></a> `dtstamp?` | `string` \\| `null` | Scheduling timestamp in its original spelling. |\n| <a id=\"property-end\"></a> `end?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-id\"></a> `id` | `string` | Content-derived component identity, stable across repeated extraction. |\n| <a id=\"property-last_modified\"></a> `last_modified?` | `string` \\| `null` | Last modification timestamp in its original spelling. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Plaintext event location. |\n| <a id=\"property-method\"></a> `method` | [`InvitationMethod`](InvitationMethod.md) | Original scheduling method. |\n| <a id=\"property-organizer\"></a> `organizer?` | `null` \\| [`InvitationParticipant`](InvitationParticipant.md) | - |\n| <a id=\"property-recurrence_id\"></a> `recurrence_id?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-recurrence_id_raw\"></a> `recurrence_id_raw?` | `string` \\| `null` | Original recurrence identifier spelling and parameters. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Scheduling revision, distinct from delivery order. |\n| <a id=\"property-start\"></a> `start?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-status\"></a> `status?` | `string` \\| `null` | Original event status. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Event summary. |\n| <a id=\"property-uid\"></a> `uid` | `string` | iCalendar UID; never a Google provider event ID. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarOccurrence.md -->\n# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: [`EventTime`](EventTime.md); \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Instance time. |\n\n\n<!-- generated/email/types.gen/type-aliases/ConferenceProvider.md -->\n# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfo.md -->\n# Type Alias: ContactInfo\n\n> **ContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfoLegacy.md -->\n# Type Alias: ContactInfoLegacy\n\n> **ContactInfoLegacy** = \\{ `email`: `string`; `email_address`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-email_address\"></a> `email_address` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md -->\n# Type Alias: ContactInfoWithInteraction\n\n> **ContactInfoWithInteraction** = [`ContactInfoLegacy`](ContactInfoLegacy.md) & \\{ `last_interaction`: `string`; \\}\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `last_interaction` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/EventReminderOverride.md -->\n# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventReminders.md -->\n# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: [`EventReminderOverride`](EventReminderOverride.md)[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | [`EventReminderOverride`](EventReminderOverride.md)[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventStatus.md -->\n# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.\n\n\n<!-- generated/email/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventTransparency.md -->\n# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.\n\n\n<!-- generated/email/types.gen/type-aliases/EventType.md -->\n# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.\n\n\n<!-- generated/email/types.gen/type-aliases/EventVisibility.md -->\n# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.\n\n\n<!-- generated/email/types.gen/type-aliases/GetAttachmentResponse.md -->\n# Type Alias: GetAttachmentResponse\n\n> **GetAttachmentResponse** = \\{ `attachment`: [`Attachment`](Attachment.md); \\}\n\nThe response returned from the get attachment endpoint\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment\"></a> `attachment` | [`Attachment`](Attachment.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GetAttachmentResponses.md -->\n# Type Alias: GetAttachmentResponses\n\n> **GetAttachmentResponses** = \\{ `200`: [`GetAttachmentResponse`](GetAttachmentResponse.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`GetAttachmentResponse`](GetAttachmentResponse.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GetMessageResponses.md -->\n# Type Alias: GetMessageResponses\n\n> **GetMessageResponses** = \\{ `200`: [`ParsedMessage`](ParsedMessage.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`ParsedMessage`](ParsedMessage.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GuestPolicy.md -->\n# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationDateTime.md -->\n# Type Alias: InvitationDateTime\n\n> **InvitationDateTime** = \\{ `kind`: `\"date\"`; `value`: `string`; \\} \\| \\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\} \\| \\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\nPreserve date-only and unresolved times without manufacturing UTC instants.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `value` | `string` | ISO calendar date. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"zoned\"` | - |\n| `time_zone` | `string` | IANA zone of the original TZID, or UTC. |\n| `value` | `string` | RFC3339 instant. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"unresolved\"` | - |\n| `time_zone?` | `string` \\| `null` | Original TZID if present. |\n| `value` | `string` | ISO local wall time, without an offset. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationMethod.md -->\n# Type Alias: InvitationMethod\n\n> **InvitationMethod** = `\"request\"` \\| `\"reply\"` \\| `\"cancel\"` \\| `\"counter\"` \\| `\"publish\"` \\| `\"unknown\"`\n\nOriginal scheduling method, including methods unsupported for actions.\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationParticipant.md -->\n# Type Alias: InvitationParticipant\n\n> **InvitationParticipant** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `participation_status?`: `string` \\| `null`; \\}\n\nScheduling participant; saved responses are historical, not current RSVP.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Participant calendar address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Sender-supplied display name. |\n| <a id=\"property-participation_status\"></a> `participation_status?` | `string` \\| `null` | Original PARTSTAT, retaining extensions. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationResolution.md -->\n# Type Alias: InvitationResolution\n\n> **InvitationResolution** = \\{ `kind`: `\"disconnected\"`; \\} \\| \\{ `kind`: `\"still_syncing\"`; \\} \\| \\{ `kind`: `\"cancelled\"`; \\} \\| \\{ `kind`: `\"unavailable\"`; \\} \\| \\{ `kind`: `\"no_match\"`; \\} \\| \\{ `kind`: `\"ambiguous\"`; \\} \\| \\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: [`CalendarEvent`](CalendarEvent.md); `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: [`CalendarOccurrence`](CalendarOccurrence.md); `responding_email`: `string`; \\}\n\nRefreshable result, distinct from the immutable email contents.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"disconnected\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"still_syncing\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"cancelled\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unavailable\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"no_match\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"ambiguous\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: [`CalendarEvent`](CalendarEvent.md); `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: [`CalendarOccurrence`](CalendarOccurrence.md); `responding_email`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `can_join` | `boolean` | Whether the conference link belongs to the reconciled scheduling target. |\n| `can_respond` | `boolean` | Whether a response is currently allowed. |\n| `event` | [`CalendarEvent`](CalendarEvent.md) | Current occurrence-specific content. |\n| `is_stale` | `boolean` | Whether the provider projection trails the email revision. |\n| `kind` | `\"resolved\"` | - |\n| `occurrence` | [`CalendarOccurrence`](CalendarOccurrence.md) | Original occurrence identity and current time. |\n| `responding_email` | `string` | Connected address that would respond. |\n\n\n<!-- generated/email/types.gen/type-aliases/LabelInfo.md -->\n# Type Alias: LabelInfo\n\n> **LabelInfo** = \\{ `name`: `string`; `provider_id`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-provider_id\"></a> `provider_id` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/Link.md -->\n# Type Alias: Link\n\n> **Link** = \\{ `calendar_disabled`: `boolean`; `created_at`: `string`; `email_address`: `string`; `fusionauth_user_id`: `string`; `has_calendar_data`: `boolean`; `id`: `string`; `is_primary`: `boolean`; `is_sync_active`: `boolean`; `macro_id`: `string`; `needs_calendar_permission`: `boolean`; `needs_reauth`: `boolean`; `photo_url?`: `string` \\| `null`; `provider`: [`UserProvider`](UserProvider.md); `settings`: [`Settings`](Settings.md); `sync_status`: [`SyncStatus`](SyncStatus.md); `updated_at`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar_disabled\"></a> `calendar_disabled` | `boolean` | Whether the user turned calendar off for this inbox, which also removed its calendar data. `needs_calendar_permission` is true either way, so this is what separates \"never granted\" from \"deliberately off\" — unprompted calendar nags must stay quiet for the latter. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-email_address\"></a> `email_address` | `string` | - |\n| <a id=\"property-fusionauth_user_id\"></a> `fusionauth_user_id` | `string` | - |\n| <a id=\"property-has_calendar_data\"></a> `has_calendar_data` | `boolean` | Whether Macro holds calendar data for this inbox. Drives the turn-off control on its own, so removing that data never depends on the recorded scopes still matching the set Macro requests today — a set that changes as the integration narrows, stranding data behind a capability check that no longer recognizes an older grant. |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_primary\"></a> `is_primary` | `boolean` | - |\n| <a id=\"property-is_sync_active\"></a> `is_sync_active` | `boolean` | - |\n| <a id=\"property-macro_id\"></a> `macro_id` | `string` | - |\n| <a id=\"property-needs_calendar_permission\"></a> `needs_calendar_permission` | `boolean` | Whether the link's Google grant is missing the calendar scope. True for inboxes connected before the calendar capability existed (and for grants where the user declined it); drives the per-inbox calendar upgrade prompt. Re-running the connect flow records the new grant. |\n| <a id=\"property-needs_reauth\"></a> `needs_reauth` | `boolean` | Whether the link's Google grant needs to be reconnected. Drives the per-inbox reconnect prompt independently of the sync-status badge. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | The inbox's own profile photo (its self-contact's SFS photo), if synced. |\n| <a id=\"property-provider\"></a> `provider` | [`UserProvider`](UserProvider.md) | - |\n| <a id=\"property-settings\"></a> `settings` | [`Settings`](Settings.md) | - |\n| <a id=\"property-sync_status\"></a> `sync_status` | [`SyncStatus`](SyncStatus.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxAction.md -->\n# Type Alias: MailboxAction\n\n> **MailboxAction** = \\{ `kind`: `\"read\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"archived\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"junk\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\nDesired organization state. Categories never stand in for folders or flags.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"read\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"read\"` | - |\n| `value` | `boolean` | Mark correspondence read or unread. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"flagged\"` | - |\n| `value` | `boolean` | Set the follow-up star. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"archived\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"archived\"` | - |\n| `value` | `boolean` | Archive inbox messages, or restore received correspondence to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"trashed\"` | - |\n| `value` | `boolean` | Move to recoverable trash, or restore correspondence to Inbox (drafts to Drafts). |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"junk\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"junk\"` | - |\n| `value` | `boolean` | Move to junk, or restore to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"category\"` | - |\n| `value` | \\{ `name`: `string`; `present`: `boolean`; \\} | Add/remove a category while preserving other provider assignments. |\n| `value.name` | `string` | - |\n| `value.present` | `boolean` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxOperation.md -->\n# Type Alias: MailboxOperation\n\n> **MailboxOperation** = \\{ `action`: [`MailboxAction`](MailboxAction.md); `id`: `string`; `state`: [`MailboxOperationState`](MailboxOperationState.md); `updated_at`: `string`; \\}\n\nDurable outcome of an accepted organization action.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-action\"></a> `action` | [`MailboxAction`](MailboxAction.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-state\"></a> `state` | [`MailboxOperationState`](MailboxOperationState.md) |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxOperationState.md -->\n# Type Alias: MailboxOperationState\n\n> **MailboxOperationState** = `\"pending\"` \\| `\"applied\"` \\| `\"failed\"` \\| `\"cancelled\"`\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxSettingsChange.md -->\n# Type Alias: MailboxSettingsChange\n\n> **MailboxSettingsChange** = `\"create_label\"` \\| `\"delete_label\"` \\| `\"sender_block\"`\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxSettingsOperation.md -->\n# Type Alias: MailboxSettingsOperation\n\n> **MailboxSettingsOperation** = \\{ `enabled`: `boolean`; `id`: `string`; `kind`: [`MailboxSettingsChange`](MailboxSettingsChange.md); `needs_attention`: `boolean`; `resource`: `string`; \\}\n\nAn accepted inbox configuration change awaiting provider confirmation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-enabled\"></a> `enabled` | `boolean` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-kind\"></a> `kind` | [`MailboxSettingsChange`](MailboxSettingsChange.md) |\n| <a id=\"property-needs_attention\"></a> `needs_attention` | `boolean` |\n| <a id=\"property-resource\"></a> `resource` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/MessageOperationResponse.md -->\n# Type Alias: MessageOperationResponse\n\n> **MessageOperationResponse** = \\{ `operation?`: `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md); \\}\n\nAuthorized polling response. Gmail has no asynchronous draft operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-operation\"></a> `operation?` | `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ParsedMessage.md -->\n# Type Alias: ParsedMessage\n\n> **ParsedMessage** = \\{ `bcc`: [`ContactInfo`](ContactInfo.md)[]; `body_parsed?`: `string` \\| `null`; `cc`: [`ContactInfo`](ContactInfo.md)[]; `db_id`: `string`; `draft_generation?`: `number`; `from?`: `null` \\| [`ContactInfo`](ContactInfo.md); `internal_date_ts?`: `string` \\| `null`; `labels`: [`LabelInfo`](LabelInfo.md)[]; `link_id`: `string`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: [`ContactInfo`](ContactInfo.md)[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | [`ContactInfo`](ContactInfo.md)[] | - |\n| <a id=\"property-body_parsed\"></a> `body_parsed?` | `string` \\| `null` | - |\n| <a id=\"property-cc\"></a> `cc` | [`ContactInfo`](ContactInfo.md)[] | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Draft edit generation captured with this message snapshot. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| [`ContactInfo`](ContactInfo.md) | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-labels\"></a> `labels` | [`LabelInfo`](LabelInfo.md)[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | [`ContactInfo`](ContactInfo.md)[] | - |\n\n\n<!-- generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md -->\n# Type Alias: ResolveMessageOperationRequest\n\n> **ResolveMessageOperationRequest** = \\{ `accept_duplicate_risk?`: `boolean`; `action`: [`ApiMessageResolutionAction`](ApiMessageResolutionAction.md); `remote_version?`: `string` \\| `null`; `revision`: `string`; \\}\n\nStale versions fail without altering the current operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-accept_duplicate_risk\"></a> `accept_duplicate_risk?` | `boolean` |\n| <a id=\"property-action\"></a> `action` | [`ApiMessageResolutionAction`](ApiMessageResolutionAction.md) |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/ScheduledSendStatus.md -->\n# Type Alias: ScheduledSendStatus\n\n> **ScheduledSendStatus** = `\"pending\"` \\| `\"sending\"` \\| `\"failed\"` \\| `\"unconfirmed\"`\n\nThe user-visible delivery state of an unsent scheduled message.\n\n\n<!-- generated/email/types.gen/type-aliases/Settings.md -->\n# Type Alias: Settings\n\n> **Settings** = \\{ `signature?`: `string` \\| `null`; `signature_on_replies_forwards?`: `boolean` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-signature\"></a> `signature?` | `string` \\| `null` | The user's email signature content (HTML). On a patch, omit or send `null` to leave unchanged (both deserialize to `None`); pass an empty string to clear it. The column cannot be set to SQL NULL via patch. |\n| <a id=\"property-signature_on_replies_forwards\"></a> `signature_on_replies_forwards?` | `boolean` \\| `null` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/SyncStatus.md -->\n# Type Alias: SyncStatus\n\n> **SyncStatus** = `\"SYNCING\"` \\| `\"UP_TO_DATE\"` \\| `\"ERROR\"` \\| `\"NEEDS_REAUTH\"` \\| `\"INACTIVE\"`\n\nCoarse sync state for an inbox, used to render a one-line hint in the\nmulti-inbox settings list. Derived from the link's `is_sync_active` flag, its\nreauth health, and its most recent backfill job.\n\n\n<!-- generated/email/types.gen/type-aliases/ThreadStateField.md -->\n# Type Alias: ThreadStateField\n\n> **ThreadStateField** = `\"read\"` \\| `\"starred\"` \\| `\"trashed\"` \\| `\"junk\"`\n\nSemantic mailbox facts, independent of folder/category names.\n\n\n<!-- generated/email/types.gen/type-aliases/TransferDraftRequest.md -->\n# Type Alias: TransferDraftRequest\n\n> **TransferDraftRequest** = \\{ `destination_link_id`: `string`; `draft_generation?`: `number`; `operation_id`: `string`; \\}\n\nReuse the same operation ID when retrying after a lost response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-destination_link_id\"></a> `destination_link_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation captured with the source draft. |\n| <a id=\"property-operation_id\"></a> `operation_id` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/TransferDraftResponse.md -->\n# Type Alias: TransferDraftResponse\n\n> **TransferDraftResponse** = \\{ `attachments`: [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[]; `message_id`: `string`; `source_id`: `string`; `source_thread_id`: `string`; `thread_id`: `string`; \\}\n\nA new identity prevents delayed writes from mutating the moved copy.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[] |\n| <a id=\"property-message_id\"></a> `message_id` | `string` |\n| <a id=\"property-source_id\"></a> `source_id` | `string` |\n| <a id=\"property-source_thread_id\"></a> `source_thread_id` | `string` |\n| <a id=\"property-thread_id\"></a> `thread_id` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/TransferRecoveryResponse.md -->\n# Type Alias: TransferRecoveryResponse\n\n> **TransferRecoveryResponse** = \\{ `committed?`: `null` \\| [`TransferDraftResponse`](TransferDraftResponse.md); \\}\n\nA null result confirms that the move cannot commit, even if its request was delayed.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-committed\"></a> `committed?` | `null` \\| [`TransferDraftResponse`](TransferDraftResponse.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/UpdateThreadStateRequest.md -->\n# Type Alias: UpdateThreadStateRequest\n\n> **UpdateThreadStateRequest** = \\{ `field`: [`ThreadStateField`](ThreadStateField.md); `value`: `boolean`; \\}\n\nDesired state for every applicable message in an authorized thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-field\"></a> `field` | [`ThreadStateField`](ThreadStateField.md) |\n| <a id=\"property-value\"></a> `value` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/UserProvider.md -->\n# Type Alias: UserProvider\n\n> **UserProvider** = `\"GMAIL\"` \\| `\"OUTLOOK\"`\n\n\n<!-- generated/email/types.gen/type-aliases/Value.md -->\n# Type Alias: Value\n\n> **Value** = `unknown`\n\n\n<!-- generated/email/types.gen/type-aliases/ViewerCapabilities.md -->\n# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy. |\n\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowup.md -->\n# Type Alias: EmailFollowup\n\n> **EmailFollowup** = \\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `linkId`: `string`; `remindAt`: `string`; `reminderId`: `string`; `revision`: `string`; `state`: [`FollowupState`](FollowupState.md); `threadId`: `string`; \\}\n\nPublic status shown on email and in the Reminders editor.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-condition\"></a> `condition` | [`EmailReminderCondition`](EmailReminderCondition.md) | Condition, defaulting to no reply for new follow-ups. |\n| <a id=\"property-linkid\"></a> `linkId` | `string` | Canonical owned/delegated inbox. |\n| <a id=\"property-remindat\"></a> `remindAt` | `string` | Confirmed schedule. |\n| <a id=\"property-reminderid\"></a> `reminderId` | `string` | Identity of the snooze and its delivery records. |\n| <a id=\"property-revision\"></a> `revision` | `string` | Last accepted operation; edits/removal compare this to prevent stale undo. |\n| <a id=\"property-state\"></a> `state` | [`FollowupState`](FollowupState.md) | Durable lifecycle progress. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Conversation identity. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowupCommand.md -->\n# Type Alias: EmailFollowupCommand\n\n> **EmailFollowupCommand** = \\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\} \\| \\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\nIdempotent email command. Reusing an operation ID with different data fails.\n\n## Union Members\n\n### Type Literal\n\n\\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `condition` | [`EmailReminderCondition`](EmailReminderCondition.md) | Reply condition. |\n| `expectedRevision?` | `string` \\| `null` | None for creation, the current revision for edits. |\n| `operationId` | `string` | Unique request identity retained across network retries. |\n| `remindAt` | `string` | One future instant; conditional recurrence is deliberately absent. |\n| `type` | `\"set\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `expectedRevision` | `string` | Reject removal if a newer edit has replaced this operation. |\n| `operationId` | `string` | Unique request identity. |\n| `type` | `\"remove\"` | - |\n| `undo?` | `boolean` | Undo restores original visibility; ordinary Remove returns to inbox. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowupResponse.md -->\n# Type Alias: EmailFollowupResponse\n\n> **EmailFollowupResponse** = \\{ `followup?`: `null` \\| [`EmailFollowup`](EmailFollowup.md); \\}\n\nLookup response, including an email with no follow-up yet.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-followup\"></a> `followup?` | `null` \\| [`EmailFollowup`](EmailFollowup.md) |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailReminderCondition.md -->\n# Type Alias: EmailReminderCondition\n\n> **EmailReminderCondition** = `\"if_no_reply\"` \\| `\"regardless\"`\n\nWhen an email follow-up should return the conversation.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/FollowupState.md -->\n# Type Alias: FollowupState\n\n> **FollowupState** = `\"archiving\"` \\| `\"pending\"` \\| `\"returning\"` \\| `\"returned\"` \\| `\"cancelled\"` \\| `\"removed\"`\n\nDurable progress of an email operation.\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- src/entities/email/attachment/classes/EmailAttachment.md -->\n# Class: EmailAttachment\n\nA file attached to an email message. A thin handle keyed by attachment id;\nthe record loads lazily on first field access.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`EmailAttachmentData`](../type-aliases/EmailAttachmentData.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-contentid\"></a> `contentId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's Content-ID header value (for inline attachments). | - |\n| <a id=\"property-dataurl\"></a> `dataUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A URL to the attachment's raw data, when available. | - |\n| <a id=\"property-filename\"></a> `filename` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's original filename. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-mimetype\"></a> `mimeType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's MIME type. | - |\n| <a id=\"property-sfsid\"></a> `sfsId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's static-file-service id, when it has been stored there. | - |\n| <a id=\"property-size\"></a> `size` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | The attachment's size in bytes. | - |\n\n## Methods\n\n### toDocument()\n\n> **toDocument**(): `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\n\nThe Macro document holding this attachment's content. Get-or-create: the\nserver returns the existing document's id, or downloads the attachment\nfrom the provider and uploads it as a new document first (deduplicated\nbehind a server-side lock).\n\n#### Returns\n\n`Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailAttachment`\n\nA handle to an attachment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailAttachment`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `EmailAttachment`\n\nBuild an attachment from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md) |\n\n#### Returns\n\n`EmailAttachment`\n\n\n<!-- src/entities/email/attachment/type-aliases/EmailAttachmentData.md -->\n# Type Alias: EmailAttachmentData\n\n> **EmailAttachmentData** = [`GetAttachmentResponses`](../../../../../generated/email/types.gen/type-aliases/GetAttachmentResponses.md)\\[`200`\\]\\[`\"attachment\"`\\]\n\nThe API's representation of an email attachment (`Attachment`).\n\n\n<!-- src/entities/email/draft/classes/DraftAttachment.md -->\n# Class: DraftAttachment\n\nAn uploaded or forwarded attachment belonging to a draft.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-draft\"></a> `draft` | `readonly` | [`EmailDraft`](EmailDraft.md) | Parent draft. |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | `number` | Draft generation captured when the attachment was reserved. |\n| <a id=\"property-forwarded\"></a> `forwarded` | `readonly` | `boolean` | Whether this attachment was forwarded. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Attachment identity. |\n\n## Methods\n\n### complete()\n\n> **complete**(): `Promise`\\<`void`\\>\n\nComplete verification after uploading the file.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### remove()\n\n> **remove**(): `Promise`\\<`void`\\>\n\nRemove this attachment from its draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\nSerialize identity without credentials.\n\n#### Returns\n\n\\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `draftGeneration` | `number` |\n| `draftId` | `string` |\n| `forwarded` | `boolean` |\n| `id` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`_client`, `draft`, `id`, `forwarded?`, `draftGeneration?`): `DraftAttachment`\n\nConstruct a draft scoped attachment handle.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `_client` | `MacroClient` | `undefined` |\n| `draft` | [`EmailDraft`](EmailDraft.md) | `undefined` |\n| `id` | `string` | `undefined` |\n| `forwarded?` | `boolean` | `false` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`DraftAttachment`\n\n\n<!-- src/entities/email/draft/classes/EmailDraft.md -->\n# Class: EmailDraft\n\nA draft email. Sending remains an explicit separate operation.\n\n## Extends\n\n- [`EmailMessage`](../../message/classes/EmailMessage.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Bcc recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`bcc`](../../message/classes/EmailMessage.md#property-bcc) |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`body`](../../message/classes/EmailMessage.md#property-body) |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Cc recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`cc`](../../message/classes/EmailMessage.md#property-cc) |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | Edit generation to capture with content before saving or transferring it. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md) \\| `undefined`\\> | The sender. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`from`](../../message/classes/EmailMessage.md#property-from) |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`EmailMessage`](../../message/classes/EmailMessage.md).[`id`](../../message/classes/EmailMessage.md#property-id) |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | () => `Promise`\\<[`LabelInfo`](../../../../../generated/email/types.gen/type-aliases/LabelInfo.md)[]\\> | Labels on this message. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`labels`](../../message/classes/EmailMessage.md#property-labels) |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | The inbox (email link) this message belongs to. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`link`](../../message/classes/EmailMessage.md#property-link) |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`sentAt`](../../message/classes/EmailMessage.md#property-sentat) |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`subject`](../../message/classes/EmailMessage.md#property-subject) |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The To recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`to`](../../message/classes/EmailMessage.md#property-to) |\n\n## Methods\n\n### addAttachment()\n\n> **addAttachment**(`options`): `Promise`\\<\\{ `attachment`: [`DraftAttachment`](DraftAttachment.md); `contentType`: `string`; `uploadUrl`: `string`; \\}\\>\n\nReserve an attachment upload. Upload to the returned URL, then call complete().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `fileName`: `string`; `sha`: `string`; `size`: `number`; `uploadId?`: `string`; \\} |\n| `options.fileName` | `string` |\n| `options.sha` | `string` |\n| `options.size` | `number` |\n| `options.uploadId?` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `attachment`: [`DraftAttachment`](DraftAttachment.md); `contentType`: `string`; `uploadUrl`: `string`; \\}\\>\n\n***\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`addLabel`](../../message/classes/EmailMessage.md#addlabel)\n\n***\n\n### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`completeDraftAttachment`](../../message/classes/EmailMessage.md#completedraftattachment)\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### forwardAttachment()\n\n> **forwardAttachment**(`attachment`): `Promise`\\<[`DraftAttachment`](DraftAttachment.md)\\>\n\nForward an existing attachment into this draft.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`EmailAttachment`](../../attachment/classes/EmailAttachment.md) |\n\n#### Returns\n\n`Promise`\\<[`DraftAttachment`](DraftAttachment.md)\\>\n\n***\n\n### operationStatus()\n\n> **operationStatus**(): `Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`operationStatus`](../../message/classes/EmailMessage.md#operationstatus)\n\n***\n\n### removeAttachment()\n\n> **removeAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nRemove a draft attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`DraftAttachment`](DraftAttachment.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`removeLabel`](../../message/classes/EmailMessage.md#removelabel)\n\n***\n\n### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`ResolveMessageOperationRequest`](../../../../../generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`resolveOperation`](../../message/classes/EmailMessage.md#resolveoperation)\n\n***\n\n### schedule()\n\n> **schedule**(`sendTime`, `options?`): `Promise`\\<`void`\\>\n\nSchedule this draft for sending.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sendTime` | `string` |\n| `options?` | \\{ `includeSignature?`: `boolean`; \\} |\n| `options.includeSignature?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### thread()\n\n> **thread**(): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`thread`](../../message/classes/EmailMessage.md#thread)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`toJSON`](../../message/classes/EmailMessage.md#tojson)\n\n***\n\n### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`TransferDraftRequest`](../../../../../generated/email/types.gen/type-aliases/TransferDraftRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`transferDraft`](../../message/classes/EmailMessage.md#transferdraft)\n\n***\n\n### unschedule()\n\n> **unschedule**(): `Promise`\\<`void`\\>\n\nRemove a scheduled send.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace draft content without changing its identity or sending it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../type-aliases/DraftOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### verifyAttachment()\n\n> **verifyAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nComplete verification of an uploaded attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`DraftAttachment`](DraftAttachment.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailDraft`\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailDraft`\n\n#### Overrides\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`byId`](../../message/classes/EmailMessage.md#byid)\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`from`](../../message/classes/EmailMessage.md#from)\n\n***\n\n### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`send`](../../message/classes/EmailMessage.md#send)\n\n\n<!-- src/entities/email/draft/functions/draftBody.md -->\n# Function: draftBody()\n\n> **draftBody**(`options`): [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\n\nTranslate draft content to the generated contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../type-aliases/DraftOptions.md) |\n\n## Returns\n\n[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\n\n\n<!-- src/entities/email/draft/type-aliases/DraftOptions.md -->\n# Type Alias: DraftOptions\n\n> **DraftOptions** = `Omit`\\<[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md), `\"db_id\"` \\| `\"provider_id\"` \\| `\"provider_thread_id\"` \\| `\"replying_to_id\"` \\| `\"thread_db_id\"` \\| `\"body_text\"` \\| `\"body_html\"` \\| `\"body_macro\"` \\| `\"headers_json\"` \\| `\"include_signature\"` \\| `\"draft_generation\"`\\> & \\{ `bodyHtml?`: `string`; `bodyMacro?`: `string`; `bodyText?`: `string`; `draftGeneration?`: `number`; `headers?`: [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\]; `includeSignature?`: `boolean`; `replyingTo?`: [`EmailMessage`](../../message/classes/EmailMessage.md); `thread?`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}\n\nDraft content; relationships use message and thread handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `bodyHtml?` | `string` | HTML body. |\n| `bodyMacro?` | `string` | Macro body. |\n| `bodyText?` | `string` | Plain text body. |\n| `draftGeneration?` | `number` | Generation captured when editing began; defaults to the loaded draft. |\n| `headers?` | [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\] | Extra headers. |\n| `includeSignature?` | `boolean` | Include the inbox signature. |\n| `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | Message being replied to. |\n| `thread?` | [`EmailThread`](../../thread/classes/EmailThread.md) | Thread receiving this draft. |\n\n\n<!-- src/entities/email/filter/classes/EmailFilter.md -->\n# Class: EmailFilter\n\nAn importance filter matched by sender address or domain.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched address. | - |\n| <a id=\"property-emaildomain\"></a> `emailDomain` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched domain. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isimportant\"></a> `isImportant` | `readonly` | () => `Promise`\\<`boolean`\\> | Importance assigned by this filter. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this filter.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setImportant()\n\n> **setImportant**(`isImportant`): `Promise`\\<`void`\\>\n\nChange the importance for the same sender selector.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `isImportant` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`, `inbox?`): `EmailFilter`\n\nConstruct a lazy filter handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`EmailFilter`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`, `inbox?`): `EmailFilter`\n\nSeed from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`EmailFilter`\n\n\n<!-- src/entities/email/filter/interfaces/EmailFilterOptions.md -->\n# Interface: EmailFilterOptions\n\nSender importance rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress?` | `string` | Match an address. |\n| <a id=\"property-emaildomain\"></a> `emailDomain?` | `string` | Match a domain. |\n| <a id=\"property-isimportant\"></a> `isImportant` | `boolean` | Whether matches are important. |\n\n\n<!-- src/entities/email/label/classes/Label.md -->\n# Class: Label\n\nAn email label. A free-to-construct handle: there is no single-label GET,\nso the detail record loads lazily on first field access by listing all\nlabels and finding this one (mirroring Link).\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the label was created. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-labellistvisibility\"></a> `labelListVisibility` | `readonly` | () => `Promise`\\<[`ApiLabelListVisibility`](../../../../../generated/email/types.gen/type-aliases/ApiLabelListVisibility.md)\\> | Whether the label is shown in the label list. | - |\n| <a id=\"property-linkid\"></a> `linkId` | `readonly` | () => `Promise`\\<`string`\\> | The inbox (email link) this label belongs to. | - |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | `readonly` | () => `Promise`\\<[`ApiMessageListVisibility`](../../../../../generated/email/types.gen/type-aliases/ApiMessageListVisibility.md)\\> | Whether the label is shown in the message list. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The label's display name. | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<[`ApiLabelType`](../../../../../generated/email/types.gen/type-aliases/ApiLabelType.md)\\> | Whether this is a system label or a user-created one. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this label.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Label`\n\nA handle to a label by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Label`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `name`): `Promise`\\<`Label`\\>\n\nCreate a user label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Label`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Label`[]\\>\n\nAll labels across the user's inboxes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Label`[]\\>\n\n\n<!-- src/entities/email/link/classes/Link.md -->\n# Class: Link\n\nAn email link: a connected inbox (e.g. Gmail or Outlook) that threads and\nmessages sync through. A free-to-construct handle, resolved from the\ncaller's connected links.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | The inbox's email address. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is the user's primary inbox. | - |\n| <a id=\"property-issyncactive\"></a> `isSyncActive` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether syncing is currently active for this inbox. | - |\n| <a id=\"property-needsreauth\"></a> `needsReauth` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the inbox needs to be re-authenticated. | - |\n| <a id=\"property-photourl\"></a> `photoUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The inbox's avatar URL, if any. | - |\n| <a id=\"property-provider\"></a> `provider` | `readonly` | () => `Promise`\\<[`UserProvider`](../../../../../generated/email/types.gen/type-aliases/UserProvider.md)\\> | The email provider (e.g. `GMAIL` or `OUTLOOK`). | - |\n| <a id=\"property-syncstatus\"></a> `syncStatus` | `readonly` | () => `Promise`\\<[`SyncStatus`](../../../../../generated/email/types.gen/type-aliases/SyncStatus.md)\\> | The inbox's sync status. | - |\n\n## Methods\n\n### settingsOperations()\n\n> **settingsOperations**(): `Promise`\\<[`MailboxSettingsOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxSettingsOperation.md)[]\\>\n\nRead category and sender-policy changes for this inbox.\n\n#### Returns\n\n`Promise`\\<[`MailboxSettingsOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxSettingsOperation.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Link`\n\nA handle to an email link by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Link`\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Link`[]\\>\n\nThe caller's connected email links.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Link`[]\\>\n\n\n<!-- src/entities/email/message/classes/EmailMessage.md -->\n# Class: EmailMessage\n\nA message in an email thread. A thin handle keyed by message id; the\nrecord loads lazily on first field access.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`EmailMessageData`](../type-aliases/EmailMessageData.md)\\>\n\n## Extended by\n\n- [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Bcc recipients. | - |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | - |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Cc recipients. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md) \\| `undefined`\\> | The sender. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | () => `Promise`\\<[`LabelInfo`](../../../../../generated/email/types.gen/type-aliases/LabelInfo.md)[]\\> | Labels on this message. | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | The inbox (email link) this message belongs to. | - |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | - |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | - |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The To recipients. | - |\n\n## Methods\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### operationStatus()\n\n> **operationStatus**(): `Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`ResolveMessageOperationRequest`](../../../../../generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### thread()\n\n> **thread**(): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`TransferDraftRequest`](../../../../../generated/email/types.gen/type-aliases/TransferDraftRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailMessage`\n\nA handle to a message by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailMessage`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `EmailMessage`\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n\n#### Returns\n\n`EmailMessage`\n\n***\n\n### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<`EmailMessage` \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | [`SendEmailOptions`](../interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<`EmailMessage` \\| `undefined`\\>\n\n\n<!-- src/entities/email/message/interfaces/SendEmailOptions.md -->\n# Interface: SendEmailOptions\n\nOptions for sending a fresh email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n\n\n<!-- src/entities/email/message/type-aliases/EmailMessageData.md -->\n# Type Alias: EmailMessageData\n\n> **EmailMessageData** = [`GetMessageResponses`](../../../../../generated/email/types.gen/type-aliases/GetMessageResponses.md)\\[`200`\\]\n\nThe API's representation of an email message (`ParsedMessage`).\n\n\n<!-- src/entities/email/namespace/classes/EmailNamespace.md -->\n# Class: EmailNamespace\n\n## Constructors\n\n### Constructor\n\n> **new EmailNamespace**(`client`): `EmailNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`EmailNamespace`\n\n## Methods\n\n### attachment()\n\n> **attachment**(`id`): [`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\nA handle to an email attachment by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\n***\n\n### blockedSenders()\n\n> **blockedSenders**(): `Promise`\\<`string`[]\\>\n\nThe email addresses currently blocked.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### blockSender()\n\n> **blockSender**(`email`): `Promise`\\<`void`\\>\n\nBlock an email sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`EmailThread`](../../thread/classes/EmailThread.md)\n\nA handle to an email thread by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailThread`](../../thread/classes/EmailThread.md)\n\n***\n\n### connectionProviders()\n\n> **connectionProviders**(): `Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\nProviders the server currently permits this caller to connect.\n\n#### Returns\n\n`Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\n***\n\n### contacts()\n\n> **contacts**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\nAddress book contacts grouped by the service's interaction buckets.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\n***\n\n### createDraft()\n\n> **createDraft**(`options`, `inbox?`): `Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nCreate a draft without sending it; the inbox defaults to the caller's primary.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../../draft/type-aliases/DraftOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### createLabel()\n\n> **createLabel**(`name`): `Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\nCreate a user label. Returns the created label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\n***\n\n### deleteLabel()\n\n> **deleteLabel**(`label`): `Promise`\\<`void`\\>\n\nDelete a label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### draftById()\n\n> **draftById**(`id`): [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n***\n\n### filters()\n\n> **filters**(`inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\nImportance filters.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\n***\n\n### inbox()\n\n> **inbox**(`opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe threads in the inbox, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`InboxOptions`](../interfaces/InboxOptions.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### label()\n\n> **label**(`id`): [`Label`](../../label/classes/Label.md)\n\nA handle to a label by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Label`](../../label/classes/Label.md)\n\n***\n\n### labels()\n\n> **labels**(): `Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\nAll labels across the user's inboxes.\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\n***\n\n### link()\n\n> **link**(`id`): [`Link`](../../link/classes/Link.md)\n\nA handle to a connected inbox (email link) by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Link`](../../link/classes/Link.md)\n\n***\n\n### links()\n\n> **links**(): `Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\nThe caller's connected inboxes (email links).\n\n#### Returns\n\n`Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\n***\n\n### message()\n\n> **message**(`id`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nA handle to an email message by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n***\n\n### recoverDraftTransfer()\n\n> **recoverDraftTransfer**(`operationId`): `Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\nRecover a draft move using its original operation UUID; never starts a new move.\nAn empty committed result fences the old move so it cannot commit later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n`Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\n***\n\n### reminders()\n\n> **reminders**(`options?`): `AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\nFollow-up reminders with thread handles, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<\\{ `attachments?`: `string`[] \\| `null`; `calendar?`: `boolean` \\| `null`; `cursor?`: `string` \\| `null`; `done?`: `boolean` \\| `null`; `inboxIds?`: `string`[] \\| `null`; `limit?`: `number` \\| `null`; `noInboxes?`: `boolean` \\| `null`; `read?`: `boolean` \\| `null`; `tags?`: `string`[] \\| `null`; \\}, `\"cursor\"` \\| `\"inboxIds\"`\\> & \\{ `inboxes?`: [`Link`](../../link/classes/Link.md)[]; \\} |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\n***\n\n### scheduled()\n\n> **scheduled**(`options?`): `AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nScheduled drafts, fetched lazily in bounded pages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `inbox?`: [`Link`](../../link/classes/Link.md); `pageSize?`: `number`; \\} |\n| `options.inbox?` | [`Link`](../../link/classes/Link.md) |\n| `options.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nSearch email threads by subject and content.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### send()\n\n> **send**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### unblockSender()\n\n> **unblockSender**(`email`): `Promise`\\<`void`\\>\n\nUnblock a previously blocked sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### upsertFilter()\n\n> **upsertFilter**(`options`, `inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\nCreate or replace a filter matching an address or domain.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`EmailFilterOptions`](../../filter/interfaces/EmailFilterOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\n\n<!-- src/entities/email/namespace/interfaces/InboxOptions.md -->\n# Interface: InboxOptions\n\nOptions for listing inbox threads.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` | Page size (default 20, max 500). |\n| <a id=\"property-sort\"></a> `sort?` | [`ApiSortMethod`](../../../../../generated/email/types.gen/type-aliases/ApiSortMethod.md) | Sort order. Defaults to `viewed_updated`. |\n\n\n<!-- src/entities/email/thread/classes/EmailThread.md -->\n# Class: EmailThread\n\nAn email thread. A free-to-construct handle: the detail record (including\nup to the first 100 messages) loads lazily on first field access.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`ThreadDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | `...` | Access requests and direct user grants. | - | - |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<[`AccessLevel`](../../../../../generated/email/types.gen/type-aliases/AccessLevel.md)\\> | `...` | The viewer's access level to this thread. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was created. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"email_thread\"` | `'email_thread'` | Favorites identify email threads as `email_thread`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-inboxvisible\"></a> `inboxVisible` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread is visible in the inbox (i.e. not archived). | - | - |\n| <a id=\"property-isread\"></a> `isRead` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread has been read. | - | - |\n| <a id=\"property-latestinboundat\"></a> `latestInboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest inbound message, if any. | - | - |\n| <a id=\"property-latestnonspamat\"></a> `latestNonSpamAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest non-spam message, if any. | - | - |\n| <a id=\"property-latestoutboundat\"></a> `latestOutboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest outbound message, if any. | - | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | `...` | The inbox (email link) that owns this thread. | - | - |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<[`Project`](../../../projects/project/classes/Project.md) \\| `undefined`\\> | `...` | The project this thread is attached to, if any. | - | - |\n| <a id=\"property-providerid\"></a> `providerId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The provider-internal thread id (e.g. Gmail/Outlook), if any. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`EmailThread`\\> | `...` | Search email threads by subject and content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### archive()\n\n> **archive**(`archived?`): `Promise`\\<`void`\\>\n\nArchive the thread (or unarchive with `false`).\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### attachments()\n\n> **attachments**(): `Promise`\\<[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)[]\\>\n\nThe attachments across this thread's first 100 messages, pre-seeded from the thread detail.\n\n#### Returns\n\n`Promise`\\<[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)[]\\>\n\n***\n\n### calendarInvitations()\n\n> **calendarInvitations**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`InvitationResolution`](../../../../../generated/email/types.gen/type-aliases/InvitationResolution.md); \\}\\>\n\nCalendar invitations resolved from this thread's messages.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`InvitationResolution`](../../../../../generated/email/types.gen/type-aliases/InvitationResolution.md); \\}\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`EmailThread`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### followup()\n\n> **followup**(): `Promise`\\<[`EmailFollowupResponse`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupResponse.md)\\>\n\nRead follow-up state for this thread.\n\n#### Returns\n\n`Promise`\\<[`EmailFollowupResponse`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupResponse.md)\\>\n\n***\n\n### markSeen()\n\n> **markSeen**(): `Promise`\\<`void`\\>\n\nMark the thread as seen.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### messages()\n\n> **messages**(`opts?`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md)[]\\>\n\nThe messages in this thread, pre-seeded from the list endpoint.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `limit?`: `number`; `since?`: `string`; \\} |\n| `opts.limit?` | `number` |\n| `opts.since?` | `string` |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md)[]\\>\n\n***\n\n### moveToProject()\n\n> **moveToProject**(`project`): `Promise`\\<`void`\\>\n\nAttach the thread to a project, or clear the project with `null`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `project` | [`Project`](../../../projects/project/classes/Project.md) \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### operations()\n\n> **operations**(): `Promise`\\<[`MailboxOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxOperation.md)[]\\>\n\nRead pending or failed mailbox changes without initiating a retry.\n\n#### Returns\n\n`Promise`\\<[`MailboxOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxOperation.md)[]\\>\n\n***\n\n### participants()\n\n> **participants**(): `Promise`\\<[`ApiContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiContactInfo.md)[]\\>\n\nEveryone on the thread (senders and recipients), deduped by email.\nDerived from the thread's first 100 messages.\n\n#### Returns\n\n`Promise`\\<[`ApiContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiContactInfo.md)[]\\>\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### reply()\n\n> **reply**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a reply within this thread. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`ReplyEmailOptions`](../interfaces/ReplyEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### setFollowup()\n\n> **setFollowup**(`command`): `Promise`\\<[`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md)\\>\n\nSet or remove a follow-up using a persisted operation id and revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `command` | [`EmailFollowupCommand`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupCommand.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md)\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### subject()\n\n> **subject**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe thread's subject, from its first message with one.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`EmailThread`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nChange project membership or share permissions for this thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `project?`: [`Project`](../../../projects/project/classes/Project.md) \\| `null`; `sharePermission?`: [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md); \\} |\n| `options.project?` | [`Project`](../../../projects/project/classes/Project.md) \\| `null` |\n| `options.sharePermission?` | [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### updateState()\n\n> **updateState**(`request`): `Promise`\\<`void`\\>\n\nUpdate provider-neutral read, trash, spam, or star state.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`UpdateThreadStateRequest`](../../../../../generated/email/types.gen/type-aliases/UpdateThreadStateRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailThread`\n\nA handle to a thread by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailThread`\n\n\n<!-- src/entities/email/thread/interfaces/ReplyEmailOptions.md -->\n# Interface: ReplyEmailOptions\n\nOptions for replying within an email thread.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-replyingto\"></a> `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | The message being replied to. |\n| <a id=\"property-subject\"></a> `subject?` | `string` | Subject line. Defaults to the subject of the thread's first message. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n"+ "documentation": "# Macro SDK: email\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/auth/types.gen/type-aliases/EmailConnectionProviders.md -->\n# Type Alias: EmailConnectionProviders\n\n> **EmailConnectionProviders** = \\{ `gmail`: `boolean`; `outlook`: `boolean`; `outlook_admin_consent_url?`: `string` \\| `null`; \\}\n\nActual deployment availability for the provider selector.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-gmail\"></a> `gmail` | `boolean` | - |\n| <a id=\"property-outlook\"></a> `outlook` | `boolean` | - |\n| <a id=\"property-outlook_admin_consent_url\"></a> `outlook_admin_consent_url?` | `string` \\| `null` | Where a Microsoft 365 administrator approves Macro for their whole directory. Present when Outlook is configured and the request named an `original_url` for the administrator's browser to return to. |\n\n\n<!-- generated/email/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/email/types.gen/type-aliases/ApiAttachmentDraft.md -->\n# Type Alias: ApiAttachmentDraft\n\n> **ApiAttachmentDraft** = \\{ `content_id?`: `string` \\| `null`; `content_type`: `string`; `draft_id`: `string`; `file_name`: `string`; `id`: `string`; `is_inline`: `boolean`; `s3_key`: `string`; `sha`: `string`; `size`: `number`; `upload_pending`: `boolean`; \\}\n\nAPI representation of a draft attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-content_type\"></a> `content_type` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-file_name\"></a> `file_name` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_inline\"></a> `is_inline` | `boolean` |\n| <a id=\"property-s3_key\"></a> `s3_key` | `string` |\n| <a id=\"property-sha\"></a> `sha` | `string` |\n| <a id=\"property-size\"></a> `size` | `number` |\n| <a id=\"property-upload_pending\"></a> `upload_pending` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiAttachmentForwarded.md -->\n# Type Alias: ApiAttachmentForwarded\n\n> **ApiAttachmentForwarded** = \\{ `attachment_id`: `string`; `draft_id`: `string`; `filename?`: `string` \\| `null`; `message_provider_id`: `string`; `mime_type?`: `string` \\| `null`; `provider_attachment_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a forwarded attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment_id\"></a> `attachment_id` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-message_provider_id\"></a> `message_provider_id` | `string` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_attachment_id\"></a> `provider_attachment_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiContactInfo.md -->\n# Type Alias: ApiContactInfo\n\n> **ApiContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nAPI representation of a contact (sender or recipient).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiDraftContactInfo.md -->\n# Type Alias: ApiDraftContactInfo\n\n> **ApiDraftContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nContact info for draft request/response (backward-compatible with MessageToSend shape).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Email address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | Profile photo URL. |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiDraftInput.md -->\n# Type Alias: ApiDraftInput\n\n> **ApiDraftInput** = \\{ `bcc?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; `body_html?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `cc?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; `db_id?`: `string` \\| `null`; `draft_generation?`: `number`; `headers_json?`: `null` \\| [`Value`](Value.md); `include_signature?`: `boolean` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `subject`: `string`; `thread_db_id?`: `string` \\| `null`; `to?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; \\}\n\nThe draft input matching the current `MessageToSend` JSON shape for backward compat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | Bcc recipients. |\n| <a id=\"property-body_html\"></a> `body_html?` | `string` \\| `null` | HTML body (base64 URL_SAFE_NO_PAD encoded). Sanitized before storage. |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | Macro body format. |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | Plain text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | Cc recipients. |\n| <a id=\"property-db_id\"></a> `db_id?` | `string` \\| `null` | Existing message DB ID (for updating an existing draft). |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation from the last loaded draft; legacy clients begin at zero. |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `null` \\| [`Value`](Value.md) | - |\n| <a id=\"property-include_signature\"></a> `include_signature?` | `boolean` \\| `null` | Per-message override for whether to include the signature on send: `Some(false)` to exclude (user dismissed it). Omit to use the inbox's default policy. Ignored for drafts. |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | Provider message ID. |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | Provider thread ID. |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | ID of the message this draft is replying to. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id?` | `string` \\| `null` | Thread DB ID. |\n| <a id=\"property-to\"></a> `to?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | To recipients. |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiEmailFilter.md -->\n# Type Alias: ApiEmailFilter\n\n> **ApiEmailFilter** = \\{ `created_at`: `string`; `email_address?`: `string` \\| `null`; `email_domain?`: `string` \\| `null`; `id`: `string`; `is_important`: `boolean`; \\}\n\nA single email filter in API responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-email_address\"></a> `email_address?` | `string` \\| `null` |\n| <a id=\"property-email_domain\"></a> `email_domain?` | `string` \\| `null` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_important\"></a> `is_important` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabel.md -->\n# Type Alias: ApiLabel\n\n> **ApiLabel** = \\{ `createdAt`: `string`; `id`: `string`; `labelListVisibility`: [`ApiLabelListVisibility`](ApiLabelListVisibility.md); `linkId`: `string`; `messageListVisibility`: [`ApiMessageListVisibility`](ApiMessageListVisibility.md); `name`: `string`; `providerLabelId`: `string`; `type`: [`ApiLabelType`](ApiLabelType.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-labellistvisibility\"></a> `labelListVisibility` | [`ApiLabelListVisibility`](ApiLabelListVisibility.md) |\n| <a id=\"property-linkid\"></a> `linkId` | `string` |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | [`ApiMessageListVisibility`](ApiMessageListVisibility.md) |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-providerlabelid\"></a> `providerLabelId` | `string` |\n| <a id=\"property-type\"></a> `type` | [`ApiLabelType`](ApiLabelType.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabelListVisibility.md -->\n# Type Alias: ApiLabelListVisibility\n\n> **ApiLabelListVisibility** = `\"LabelShow\"` \\| `\"LabelShowIfUnread\"` \\| `\"LabelHide\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabelType.md -->\n# Type Alias: ApiLabelType\n\n> **ApiLabelType** = `\"System\"` \\| `\"User\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessage.md -->\n# Type Alias: ApiMessage\n\n> **ApiMessage** = \\{ `attachments`: [`ApiMessageAttachment`](ApiMessageAttachment.md)[]; `attachments_draft`: [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[]; `attachments_forwarded`: [`ApiAttachmentForwarded`](ApiAttachmentForwarded.md)[]; `bcc`: [`ApiContactInfo`](ApiContactInfo.md)[]; `body_html_sanitized?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_replyless?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `calendar_invitations?`: [`CalendarInvitation`](CalendarInvitation.md)[]; `cc`: [`ApiContactInfo`](ApiContactInfo.md)[]; `created_at`: `string`; `db_id`: `string`; `draft_generation`: `number`; `from?`: `null` \\| [`ApiContactInfo`](ApiContactInfo.md); `global_id?`: `string` \\| `null`; `has_attachments`: `boolean`; `headers_json?`: `unknown`; `internal_date_ts?`: `string` \\| `null`; `is_draft`: `boolean`; `is_read`: `boolean`; `is_sent`: `boolean`; `is_starred`: `boolean`; `labels`: [`ApiMessageLabel`](ApiMessageLabel.md)[]; `link_id`: `string`; `operation_status?`: `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md); `provider_history_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `scheduled_send_status?`: `null` \\| [`ScheduledSendStatus`](ScheduledSendStatus.md); `scheduled_send_time?`: `string` \\| `null`; `sent_at?`: `string` \\| `null`; `size_estimate?`: `number` \\| `null`; `snippet?`: `string` \\| `null`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: [`ApiContactInfo`](ApiContactInfo.md)[]; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`ApiMessageAttachment`](ApiMessageAttachment.md)[] | - |\n| <a id=\"property-attachments_draft\"></a> `attachments_draft` | [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[] | - |\n| <a id=\"property-attachments_forwarded\"></a> `attachments_forwarded` | [`ApiAttachmentForwarded`](ApiAttachmentForwarded.md)[] | - |\n| <a id=\"property-bcc\"></a> `bcc` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-body_html_sanitized\"></a> `body_html_sanitized?` | `string` \\| `null` | - |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | - |\n| <a id=\"property-body_replyless\"></a> `body_replyless?` | `string` \\| `null` | - |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | - |\n| <a id=\"property-calendar_invitations\"></a> `calendar_invitations?` | [`CalendarInvitation`](CalendarInvitation.md)[] | - |\n| <a id=\"property-cc\"></a> `cc` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation` | `number` | Draft edit generation; changes at send and cancellation boundaries. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| [`ApiContactInfo`](ApiContactInfo.md) | - |\n| <a id=\"property-global_id\"></a> `global_id?` | `string` \\| `null` | - |\n| <a id=\"property-has_attachments\"></a> `has_attachments` | `boolean` | - |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `unknown` | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-is_draft\"></a> `is_draft` | `boolean` | - |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` | - |\n| <a id=\"property-is_sent\"></a> `is_sent` | `boolean` | - |\n| <a id=\"property-is_starred\"></a> `is_starred` | `boolean` | - |\n| <a id=\"property-labels\"></a> `labels` | [`ApiMessageLabel`](ApiMessageLabel.md)[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-operation_status\"></a> `operation_status?` | `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md) | - |\n| <a id=\"property-provider_history_id\"></a> `provider_history_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | - |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | - |\n| <a id=\"property-scheduled_send_status\"></a> `scheduled_send_status?` | `null` \\| [`ScheduledSendStatus`](ScheduledSendStatus.md) | - |\n| <a id=\"property-scheduled_send_time\"></a> `scheduled_send_time?` | `string` \\| `null` | - |\n| <a id=\"property-sent_at\"></a> `sent_at?` | `string` \\| `null` | - |\n| <a id=\"property-size_estimate\"></a> `size_estimate?` | `number` \\| `null` | - |\n| <a id=\"property-snippet\"></a> `snippet?` | `string` \\| `null` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageAttachment.md -->\n# Type Alias: ApiMessageAttachment\n\n> **ApiMessageAttachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a provider attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageLabel.md -->\n# Type Alias: ApiMessageLabel\n\n> **ApiMessageLabel** = \\{ `created_at`: `string`; `id?`: `string` \\| `null`; `label_list_visibility?`: `null` \\| [`ApiLabelListVisibility`](ApiLabelListVisibility.md); `link_id`: `string`; `message_list_visibility?`: `null` \\| [`ApiMessageListVisibility`](ApiMessageListVisibility.md); `name?`: `string` \\| `null`; `provider_label_id`: `string`; `type_?`: `null` \\| [`ApiLabelType`](ApiLabelType.md); \\}\n\nAPI representation of a label on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` |\n| <a id=\"property-label_list_visibility\"></a> `label_list_visibility?` | `null` \\| [`ApiLabelListVisibility`](ApiLabelListVisibility.md) |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-message_list_visibility\"></a> `message_list_visibility?` | `null` \\| [`ApiMessageListVisibility`](ApiMessageListVisibility.md) |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-provider_label_id\"></a> `provider_label_id` | `string` |\n| <a id=\"property-type_\"></a> `type_?` | `null` \\| [`ApiLabelType`](ApiLabelType.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageListVisibility.md -->\n# Type Alias: ApiMessageListVisibility\n\n> **ApiMessageListVisibility** = `\"Show\"` \\| `\"Hide\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperation.md -->\n# Type Alias: ApiMessageOperation\n\n> **ApiMessageOperation** = \\{ `issue?`: `null` \\| [`ApiMessageOperationIssue`](ApiMessageOperationIssue.md); `remote_version?`: `string` \\| `null`; `revision`: `string`; `state`: [`ApiMessageOperationState`](ApiMessageOperationState.md); \\}\n\nVersions are opaque decimal strings so clients never truncate an i64.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-issue\"></a> `issue?` | `null` \\| [`ApiMessageOperationIssue`](ApiMessageOperationIssue.md) |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |\n| <a id=\"property-state\"></a> `state` | [`ApiMessageOperationState`](ApiMessageOperationState.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperationIssue.md -->\n# Type Alias: ApiMessageOperationIssue\n\n> **ApiMessageOperationIssue** = `\"ACCEPTING_REMOTE\"` \\| `\"DRAFT_CONFLICT\"` \\| `\"CREATION_UNKNOWN\"` \\| `\"ATTACHMENT_UNKNOWN\"` \\| `\"SEND_UNKNOWN\"` \\| `\"SEND_REJECTED\"` \\| `\"ACCESS_REVOKED\"` \\| `\"INVALID_CONTENT\"` \\| `\"MOVE_PENDING\"` \\| `\"MOVE_CONFLICT\"` \\| `\"MOVE_SOURCE_SENT\"` \\| `\"MOVE_REAUTHORIZATION\"` \\| `\"MOVE_ORIGINAL_REMAINS\"`\n\nProvider-neutral state exposed to clients.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperationState.md -->\n# Type Alias: ApiMessageOperationState\n\n> **ApiMessageOperationState** = `\"PENDING\"` \\| `\"SYNCHRONIZED\"` \\| `\"CONFLICT\"` \\| `\"UNCERTAIN\"` \\| `\"SUBMITTING\"` \\| `\"CONFIRMING\"` \\| `\"SENT\"` \\| `\"DELETED\"` \\| `\"CANCELLED\"` \\| `\"FAILED\"`\n\nProvider-neutral state exposed to clients.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageResolutionAction.md -->\n# Type Alias: ApiMessageResolutionAction\n\n> **ApiMessageResolutionAction** = `\"keep_local\"` \\| `\"use_provider\"` \\| `\"recheck\"` \\| `\"retry_send\"` \\| `\"keep_original\"`\n\nA deliberate resolution of a particular observed operation version.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiSortMethod.md -->\n# Type Alias: ApiSortMethod\n\n> **ApiSortMethod** = `\"viewed_at\"` \\| `\"updated_at\"` \\| `\"created_at\"` \\| `\"viewed_updated\"`\n\ncommon types of sorts based on timestamps\n\n\n<!-- generated/email/types.gen/type-aliases/ApiThread.md -->\n# Type Alias: ApiThread\n\n> **ApiThread** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `created_at`: `string`; `db_id`: `string`; `inbox_visible`: `boolean`; `is_read`: `boolean`; `latest_inbound_message_ts?`: `string` \\| `null`; `latest_non_spam_message_ts?`: `string` \\| `null`; `latest_outbound_message_ts?`: `string` \\| `null`; `link_id`: `string`; `messages`: [`ApiMessage`](ApiMessage.md)[]; `project_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-inbox_visible\"></a> `inbox_visible` | `boolean` |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` |\n| <a id=\"property-latest_inbound_message_ts\"></a> `latest_inbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_non_spam_message_ts\"></a> `latest_non_spam_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_outbound_message_ts\"></a> `latest_outbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-messages\"></a> `messages` | [`ApiMessage`](ApiMessage.md)[] |\n| <a id=\"property-project_id\"></a> `project_id?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/Attachment.md -->\n# Type Alias: Attachment\n\n> **Attachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAttachments of a message, as sent to us by the provider.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` | - |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` | - |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` | Cloud reference: open this provider page instead of downloading bytes. |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` | - |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarEvent.md -->\n# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: [`EventType`](EventType.md); `guestPolicy`: [`GuestPolicy`](GuestPolicy.md); `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: [`EventReminders`](EventReminders.md); `sequence`: `number`; `sources?`: [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[]; `status`: [`EventStatus`](EventStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `updatedAt`: `string`; `viewerCan`: [`ViewerCapabilities`](ViewerCapabilities.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | [`EventType`](EventType.md) | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | [`GuestPolicy`](GuestPolicy.md) | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](EventReminders.md) | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | [`EventStatus`](EventStatus.md) | Event status. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | [`ViewerCapabilities`](ViewerCapabilities.md) | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarEventSourceContent.md -->\n# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: [`EventType`](EventType.md); `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: [`EventReminders`](EventReminders.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | [`EventType`](EventType.md) | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | [`EventReminders`](EventReminders.md) | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarInvitation.md -->\n# Type Alias: CalendarInvitation\n\n> **CalendarInvitation** = \\{ `attendees`: [`InvitationParticipant`](InvitationParticipant.md)[]; `comment?`: `string` \\| `null`; `conference_url?`: `string` \\| `null`; `description?`: `string` \\| `null`; `dtstamp?`: `string` \\| `null`; `end?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `id`: `string`; `last_modified?`: `string` \\| `null`; `location?`: `string` \\| `null`; `method`: [`InvitationMethod`](InvitationMethod.md); `organizer?`: `null` \\| [`InvitationParticipant`](InvitationParticipant.md); `recurrence_id?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `recurrence_id_raw?`: `string` \\| `null`; `sequence`: `number`; `start?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `status?`: `string` \\| `null`; `title?`: `string` \\| `null`; `uid`: `string`; \\}\n\nDisplay snapshot of one meaningful VEVENT, owned by the email domain.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`InvitationParticipant`](InvitationParticipant.md)[] | Historical attendee identities and participation metadata. |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Reply or counter-proposal comment. |\n| <a id=\"property-conference_url\"></a> `conference_url?` | `string` \\| `null` | Validated HTTP(S) conferencing URL; never fetched during rendering. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Plaintext description, retaining passwords and dial-in instructions. |\n| <a id=\"property-dtstamp\"></a> `dtstamp?` | `string` \\| `null` | Scheduling timestamp in its original spelling. |\n| <a id=\"property-end\"></a> `end?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-id\"></a> `id` | `string` | Content-derived component identity, stable across repeated extraction. |\n| <a id=\"property-last_modified\"></a> `last_modified?` | `string` \\| `null` | Last modification timestamp in its original spelling. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Plaintext event location. |\n| <a id=\"property-method\"></a> `method` | [`InvitationMethod`](InvitationMethod.md) | Original scheduling method. |\n| <a id=\"property-organizer\"></a> `organizer?` | `null` \\| [`InvitationParticipant`](InvitationParticipant.md) | - |\n| <a id=\"property-recurrence_id\"></a> `recurrence_id?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-recurrence_id_raw\"></a> `recurrence_id_raw?` | `string` \\| `null` | Original recurrence identifier spelling and parameters. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Scheduling revision, distinct from delivery order. |\n| <a id=\"property-start\"></a> `start?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-status\"></a> `status?` | `string` \\| `null` | Original event status. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Event summary. |\n| <a id=\"property-uid\"></a> `uid` | `string` | iCalendar UID; never a Google provider event ID. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarOccurrence.md -->\n# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: [`EventTime`](EventTime.md); \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Instance time. |\n\n\n<!-- generated/email/types.gen/type-aliases/ConferenceProvider.md -->\n# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfo.md -->\n# Type Alias: ContactInfo\n\n> **ContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfoLegacy.md -->\n# Type Alias: ContactInfoLegacy\n\n> **ContactInfoLegacy** = \\{ `email`: `string`; `email_address`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-email_address\"></a> `email_address` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md -->\n# Type Alias: ContactInfoWithInteraction\n\n> **ContactInfoWithInteraction** = [`ContactInfoLegacy`](ContactInfoLegacy.md) & \\{ `last_interaction`: `string`; \\}\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `last_interaction` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/EventReminderOverride.md -->\n# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventReminders.md -->\n# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: [`EventReminderOverride`](EventReminderOverride.md)[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | [`EventReminderOverride`](EventReminderOverride.md)[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventStatus.md -->\n# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.\n\n\n<!-- generated/email/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventTransparency.md -->\n# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.\n\n\n<!-- generated/email/types.gen/type-aliases/EventType.md -->\n# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.\n\n\n<!-- generated/email/types.gen/type-aliases/EventVisibility.md -->\n# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.\n\n\n<!-- generated/email/types.gen/type-aliases/GetAttachmentResponse.md -->\n# Type Alias: GetAttachmentResponse\n\n> **GetAttachmentResponse** = \\{ `attachment`: [`Attachment`](Attachment.md); \\}\n\nThe response returned from the get attachment endpoint\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment\"></a> `attachment` | [`Attachment`](Attachment.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GetAttachmentResponses.md -->\n# Type Alias: GetAttachmentResponses\n\n> **GetAttachmentResponses** = \\{ `200`: [`GetAttachmentResponse`](GetAttachmentResponse.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`GetAttachmentResponse`](GetAttachmentResponse.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GetMessageResponses.md -->\n# Type Alias: GetMessageResponses\n\n> **GetMessageResponses** = \\{ `200`: [`ParsedMessage`](ParsedMessage.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`ParsedMessage`](ParsedMessage.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GuestPolicy.md -->\n# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationDateTime.md -->\n# Type Alias: InvitationDateTime\n\n> **InvitationDateTime** = \\{ `kind`: `\"date\"`; `value`: `string`; \\} \\| \\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\} \\| \\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\nPreserve date-only and unresolved times without manufacturing UTC instants.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `value` | `string` | ISO calendar date. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"zoned\"` | - |\n| `time_zone` | `string` | IANA zone of the original TZID, or UTC. |\n| `value` | `string` | RFC3339 instant. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"unresolved\"` | - |\n| `time_zone?` | `string` \\| `null` | Original TZID if present. |\n| `value` | `string` | ISO local wall time, without an offset. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationMethod.md -->\n# Type Alias: InvitationMethod\n\n> **InvitationMethod** = `\"request\"` \\| `\"reply\"` \\| `\"cancel\"` \\| `\"counter\"` \\| `\"publish\"` \\| `\"unknown\"`\n\nOriginal scheduling method, including methods unsupported for actions.\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationParticipant.md -->\n# Type Alias: InvitationParticipant\n\n> **InvitationParticipant** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `participation_status?`: `string` \\| `null`; \\}\n\nScheduling participant; saved responses are historical, not current RSVP.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Participant calendar address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Sender-supplied display name. |\n| <a id=\"property-participation_status\"></a> `participation_status?` | `string` \\| `null` | Original PARTSTAT, retaining extensions. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationResolution.md -->\n# Type Alias: InvitationResolution\n\n> **InvitationResolution** = \\{ `kind`: `\"disconnected\"`; \\} \\| \\{ `kind`: `\"still_syncing\"`; \\} \\| \\{ `kind`: `\"cancelled\"`; \\} \\| \\{ `kind`: `\"unavailable\"`; \\} \\| \\{ `kind`: `\"no_match\"`; \\} \\| \\{ `kind`: `\"ambiguous\"`; \\} \\| \\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: [`CalendarEvent`](CalendarEvent.md); `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: [`CalendarOccurrence`](CalendarOccurrence.md); `responding_email`: `string`; \\}\n\nRefreshable result, distinct from the immutable email contents.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"disconnected\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"still_syncing\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"cancelled\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unavailable\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"no_match\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"ambiguous\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: [`CalendarEvent`](CalendarEvent.md); `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: [`CalendarOccurrence`](CalendarOccurrence.md); `responding_email`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `can_join` | `boolean` | Whether the conference link belongs to the reconciled scheduling target. |\n| `can_respond` | `boolean` | Whether a response is currently allowed. |\n| `event` | [`CalendarEvent`](CalendarEvent.md) | Current occurrence-specific content. |\n| `is_stale` | `boolean` | Whether the provider projection trails the email revision. |\n| `kind` | `\"resolved\"` | - |\n| `occurrence` | [`CalendarOccurrence`](CalendarOccurrence.md) | Original occurrence identity and current time. |\n| `responding_email` | `string` | Connected address that would respond. |\n\n\n<!-- generated/email/types.gen/type-aliases/LabelInfo.md -->\n# Type Alias: LabelInfo\n\n> **LabelInfo** = \\{ `name`: `string`; `provider_id`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-provider_id\"></a> `provider_id` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/Link.md -->\n# Type Alias: Link\n\n> **Link** = \\{ `calendar_disabled`: `boolean`; `created_at`: `string`; `email_address`: `string`; `fusionauth_user_id`: `string`; `has_calendar_data`: `boolean`; `id`: `string`; `is_primary`: `boolean`; `is_sync_active`: `boolean`; `macro_id`: `string`; `needs_calendar_permission`: `boolean`; `needs_reauth`: `boolean`; `photo_url?`: `string` \\| `null`; `provider`: [`UserProvider`](UserProvider.md); `settings`: [`Settings`](Settings.md); `sync_status`: [`SyncStatus`](SyncStatus.md); `updated_at`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar_disabled\"></a> `calendar_disabled` | `boolean` | Whether the user turned calendar off for this inbox, which also removed its calendar data. `needs_calendar_permission` is true either way, so this is what separates \"never granted\" from \"deliberately off\" — unprompted calendar nags must stay quiet for the latter. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-email_address\"></a> `email_address` | `string` | - |\n| <a id=\"property-fusionauth_user_id\"></a> `fusionauth_user_id` | `string` | - |\n| <a id=\"property-has_calendar_data\"></a> `has_calendar_data` | `boolean` | Whether Macro holds calendar data for this inbox. Drives the turn-off control on its own, so removing that data never depends on the recorded scopes still matching the set Macro requests today — a set that changes as the integration narrows, stranding data behind a capability check that no longer recognizes an older grant. |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_primary\"></a> `is_primary` | `boolean` | - |\n| <a id=\"property-is_sync_active\"></a> `is_sync_active` | `boolean` | - |\n| <a id=\"property-macro_id\"></a> `macro_id` | `string` | - |\n| <a id=\"property-needs_calendar_permission\"></a> `needs_calendar_permission` | `boolean` | Whether the link's Google grant is missing the calendar scope. True for inboxes connected before the calendar capability existed (and for grants where the user declined it); drives the per-inbox calendar upgrade prompt. Re-running the connect flow records the new grant. |\n| <a id=\"property-needs_reauth\"></a> `needs_reauth` | `boolean` | Whether the link's Google grant needs to be reconnected. Drives the per-inbox reconnect prompt independently of the sync-status badge. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | The inbox's own profile photo (its self-contact's SFS photo), if synced. |\n| <a id=\"property-provider\"></a> `provider` | [`UserProvider`](UserProvider.md) | - |\n| <a id=\"property-settings\"></a> `settings` | [`Settings`](Settings.md) | - |\n| <a id=\"property-sync_status\"></a> `sync_status` | [`SyncStatus`](SyncStatus.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxAction.md -->\n# Type Alias: MailboxAction\n\n> **MailboxAction** = \\{ `kind`: `\"read\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"archived\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"junk\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\nDesired organization state. Categories never stand in for folders or flags.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"read\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"read\"` | - |\n| `value` | `boolean` | Mark correspondence read or unread. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"flagged\"` | - |\n| `value` | `boolean` | Set the follow-up star. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"archived\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"archived\"` | - |\n| `value` | `boolean` | Archive inbox messages, or restore received correspondence to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"trashed\"` | - |\n| `value` | `boolean` | Move to recoverable trash, or restore correspondence to Inbox (drafts to Drafts). |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"junk\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"junk\"` | - |\n| `value` | `boolean` | Move to junk, or restore to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"category\"` | - |\n| `value` | \\{ `name`: `string`; `present`: `boolean`; \\} | Add/remove a category while preserving other provider assignments. |\n| `value.name` | `string` | - |\n| `value.present` | `boolean` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxOperation.md -->\n# Type Alias: MailboxOperation\n\n> **MailboxOperation** = \\{ `action`: [`MailboxAction`](MailboxAction.md); `id`: `string`; `state`: [`MailboxOperationState`](MailboxOperationState.md); `updated_at`: `string`; \\}\n\nDurable outcome of an accepted organization action.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-action\"></a> `action` | [`MailboxAction`](MailboxAction.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-state\"></a> `state` | [`MailboxOperationState`](MailboxOperationState.md) |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxOperationState.md -->\n# Type Alias: MailboxOperationState\n\n> **MailboxOperationState** = `\"pending\"` \\| `\"applied\"` \\| `\"failed\"` \\| `\"cancelled\"`\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxSettingsChange.md -->\n# Type Alias: MailboxSettingsChange\n\n> **MailboxSettingsChange** = `\"create_label\"` \\| `\"delete_label\"` \\| `\"sender_block\"`\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxSettingsOperation.md -->\n# Type Alias: MailboxSettingsOperation\n\n> **MailboxSettingsOperation** = \\{ `enabled`: `boolean`; `id`: `string`; `kind`: [`MailboxSettingsChange`](MailboxSettingsChange.md); `needs_attention`: `boolean`; `resource`: `string`; \\}\n\nAn accepted inbox configuration change awaiting provider confirmation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-enabled\"></a> `enabled` | `boolean` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-kind\"></a> `kind` | [`MailboxSettingsChange`](MailboxSettingsChange.md) |\n| <a id=\"property-needs_attention\"></a> `needs_attention` | `boolean` |\n| <a id=\"property-resource\"></a> `resource` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/MessageOperationResponse.md -->\n# Type Alias: MessageOperationResponse\n\n> **MessageOperationResponse** = \\{ `operation?`: `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md); \\}\n\nAuthorized polling response. Gmail has no asynchronous draft operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-operation\"></a> `operation?` | `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ParsedMessage.md -->\n# Type Alias: ParsedMessage\n\n> **ParsedMessage** = \\{ `bcc`: [`ContactInfo`](ContactInfo.md)[]; `body_parsed?`: `string` \\| `null`; `cc`: [`ContactInfo`](ContactInfo.md)[]; `db_id`: `string`; `draft_generation?`: `number`; `from?`: `null` \\| [`ContactInfo`](ContactInfo.md); `internal_date_ts?`: `string` \\| `null`; `labels`: [`LabelInfo`](LabelInfo.md)[]; `link_id`: `string`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: [`ContactInfo`](ContactInfo.md)[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | [`ContactInfo`](ContactInfo.md)[] | - |\n| <a id=\"property-body_parsed\"></a> `body_parsed?` | `string` \\| `null` | - |\n| <a id=\"property-cc\"></a> `cc` | [`ContactInfo`](ContactInfo.md)[] | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Draft edit generation captured with this message snapshot. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| [`ContactInfo`](ContactInfo.md) | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-labels\"></a> `labels` | [`LabelInfo`](LabelInfo.md)[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | [`ContactInfo`](ContactInfo.md)[] | - |\n\n\n<!-- generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md -->\n# Type Alias: ResolveMessageOperationRequest\n\n> **ResolveMessageOperationRequest** = \\{ `accept_duplicate_risk?`: `boolean`; `action`: [`ApiMessageResolutionAction`](ApiMessageResolutionAction.md); `remote_version?`: `string` \\| `null`; `revision`: `string`; \\}\n\nStale versions fail without altering the current operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-accept_duplicate_risk\"></a> `accept_duplicate_risk?` | `boolean` |\n| <a id=\"property-action\"></a> `action` | [`ApiMessageResolutionAction`](ApiMessageResolutionAction.md) |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/ScheduledSendStatus.md -->\n# Type Alias: ScheduledSendStatus\n\n> **ScheduledSendStatus** = `\"pending\"` \\| `\"sending\"` \\| `\"failed\"` \\| `\"unconfirmed\"`\n\nThe user-visible delivery state of an unsent scheduled message.\n\n\n<!-- generated/email/types.gen/type-aliases/Settings.md -->\n# Type Alias: Settings\n\n> **Settings** = \\{ `signature?`: `string` \\| `null`; `signature_on_replies_forwards?`: `boolean` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-signature\"></a> `signature?` | `string` \\| `null` | The user's email signature content (HTML). On a patch, omit or send `null` to leave unchanged (both deserialize to `None`); pass an empty string to clear it. The column cannot be set to SQL NULL via patch. |\n| <a id=\"property-signature_on_replies_forwards\"></a> `signature_on_replies_forwards?` | `boolean` \\| `null` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/SyncStatus.md -->\n# Type Alias: SyncStatus\n\n> **SyncStatus** = `\"SYNCING\"` \\| `\"UP_TO_DATE\"` \\| `\"ERROR\"` \\| `\"NEEDS_REAUTH\"` \\| `\"INACTIVE\"`\n\nCoarse sync state for an inbox, used to render a one-line hint in the\nmulti-inbox settings list. Derived from the link's `is_sync_active` flag, its\nreauth health, and its most recent backfill job.\n\n\n<!-- generated/email/types.gen/type-aliases/ThreadStateField.md -->\n# Type Alias: ThreadStateField\n\n> **ThreadStateField** = `\"read\"` \\| `\"starred\"` \\| `\"trashed\"` \\| `\"junk\"`\n\nSemantic mailbox facts, independent of folder/category names.\n\n\n<!-- generated/email/types.gen/type-aliases/TransferDraftRequest.md -->\n# Type Alias: TransferDraftRequest\n\n> **TransferDraftRequest** = \\{ `destination_link_id`: `string`; `draft_generation?`: `number`; `operation_id`: `string`; \\}\n\nReuse the same operation ID when retrying after a lost response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-destination_link_id\"></a> `destination_link_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation captured with the source draft. |\n| <a id=\"property-operation_id\"></a> `operation_id` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/TransferDraftResponse.md -->\n# Type Alias: TransferDraftResponse\n\n> **TransferDraftResponse** = \\{ `attachments`: [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[]; `message_id`: `string`; `source_id`: `string`; `source_thread_id`: `string`; `thread_id`: `string`; \\}\n\nA new identity prevents delayed writes from mutating the moved copy.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[] |\n| <a id=\"property-message_id\"></a> `message_id` | `string` |\n| <a id=\"property-source_id\"></a> `source_id` | `string` |\n| <a id=\"property-source_thread_id\"></a> `source_thread_id` | `string` |\n| <a id=\"property-thread_id\"></a> `thread_id` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/TransferRecoveryResponse.md -->\n# Type Alias: TransferRecoveryResponse\n\n> **TransferRecoveryResponse** = \\{ `committed?`: `null` \\| [`TransferDraftResponse`](TransferDraftResponse.md); \\}\n\nA null result confirms that the move cannot commit, even if its request was delayed.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-committed\"></a> `committed?` | `null` \\| [`TransferDraftResponse`](TransferDraftResponse.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/UpdateThreadStateRequest.md -->\n# Type Alias: UpdateThreadStateRequest\n\n> **UpdateThreadStateRequest** = \\{ `field`: [`ThreadStateField`](ThreadStateField.md); `value`: `boolean`; \\}\n\nDesired state for every applicable message in an authorized thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-field\"></a> `field` | [`ThreadStateField`](ThreadStateField.md) |\n| <a id=\"property-value\"></a> `value` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/UserProvider.md -->\n# Type Alias: UserProvider\n\n> **UserProvider** = `\"GMAIL\"` \\| `\"OUTLOOK\"`\n\n\n<!-- generated/email/types.gen/type-aliases/Value.md -->\n# Type Alias: Value\n\n> **Value** = `unknown`\n\n\n<!-- generated/email/types.gen/type-aliases/ViewerCapabilities.md -->\n# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-organize\"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |\n\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowup.md -->\n# Type Alias: EmailFollowup\n\n> **EmailFollowup** = \\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `linkId`: `string`; `remindAt`: `string`; `reminderId`: `string`; `revision`: `string`; `state`: [`FollowupState`](FollowupState.md); `threadId`: `string`; \\}\n\nPublic status shown on email and in the Reminders editor.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-condition\"></a> `condition` | [`EmailReminderCondition`](EmailReminderCondition.md) | Condition, defaulting to no reply for new follow-ups. |\n| <a id=\"property-linkid\"></a> `linkId` | `string` | Canonical owned/delegated inbox. |\n| <a id=\"property-remindat\"></a> `remindAt` | `string` | Confirmed schedule. |\n| <a id=\"property-reminderid\"></a> `reminderId` | `string` | Identity of the snooze and its delivery records. |\n| <a id=\"property-revision\"></a> `revision` | `string` | Last accepted operation; edits/removal compare this to prevent stale undo. |\n| <a id=\"property-state\"></a> `state` | [`FollowupState`](FollowupState.md) | Durable lifecycle progress. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Conversation identity. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowupCommand.md -->\n# Type Alias: EmailFollowupCommand\n\n> **EmailFollowupCommand** = \\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\} \\| \\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\nIdempotent email command. Reusing an operation ID with different data fails.\n\n## Union Members\n\n### Type Literal\n\n\\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `condition` | [`EmailReminderCondition`](EmailReminderCondition.md) | Reply condition. |\n| `expectedRevision?` | `string` \\| `null` | None for creation, the current revision for edits. |\n| `operationId` | `string` | Unique request identity retained across network retries. |\n| `remindAt` | `string` | One future instant; conditional recurrence is deliberately absent. |\n| `type` | `\"set\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `expectedRevision` | `string` | Reject removal if a newer edit has replaced this operation. |\n| `operationId` | `string` | Unique request identity. |\n| `type` | `\"remove\"` | - |\n| `undo?` | `boolean` | Undo restores original visibility; ordinary Remove returns to inbox. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowupResponse.md -->\n# Type Alias: EmailFollowupResponse\n\n> **EmailFollowupResponse** = \\{ `followup?`: `null` \\| [`EmailFollowup`](EmailFollowup.md); \\}\n\nLookup response, including an email with no follow-up yet.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-followup\"></a> `followup?` | `null` \\| [`EmailFollowup`](EmailFollowup.md) |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailReminderCondition.md -->\n# Type Alias: EmailReminderCondition\n\n> **EmailReminderCondition** = `\"if_no_reply\"` \\| `\"regardless\"`\n\nWhen an email follow-up should return the conversation.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/FollowupState.md -->\n# Type Alias: FollowupState\n\n> **FollowupState** = `\"archiving\"` \\| `\"pending\"` \\| `\"returning\"` \\| `\"returned\"` \\| `\"cancelled\"` \\| `\"removed\"`\n\nDurable progress of an email operation.\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- src/entities/email/attachment/classes/EmailAttachment.md -->\n# Class: EmailAttachment\n\nA file attached to an email message. A thin handle keyed by attachment id;\nthe record loads lazily on first field access.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`EmailAttachmentData`](../type-aliases/EmailAttachmentData.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-contentid\"></a> `contentId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's Content-ID header value (for inline attachments). | - |\n| <a id=\"property-dataurl\"></a> `dataUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A URL to the attachment's raw data, when available. | - |\n| <a id=\"property-filename\"></a> `filename` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's original filename. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-mimetype\"></a> `mimeType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's MIME type. | - |\n| <a id=\"property-sfsid\"></a> `sfsId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's static-file-service id, when it has been stored there. | - |\n| <a id=\"property-size\"></a> `size` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | The attachment's size in bytes. | - |\n\n## Methods\n\n### toDocument()\n\n> **toDocument**(): `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\n\nThe Macro document holding this attachment's content. Get-or-create: the\nserver returns the existing document's id, or downloads the attachment\nfrom the provider and uploads it as a new document first (deduplicated\nbehind a server-side lock).\n\n#### Returns\n\n`Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailAttachment`\n\nA handle to an attachment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailAttachment`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `EmailAttachment`\n\nBuild an attachment from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md) |\n\n#### Returns\n\n`EmailAttachment`\n\n\n<!-- src/entities/email/attachment/type-aliases/EmailAttachmentData.md -->\n# Type Alias: EmailAttachmentData\n\n> **EmailAttachmentData** = [`GetAttachmentResponses`](../../../../../generated/email/types.gen/type-aliases/GetAttachmentResponses.md)\\[`200`\\]\\[`\"attachment\"`\\]\n\nThe API's representation of an email attachment (`Attachment`).\n\n\n<!-- src/entities/email/draft/classes/DraftAttachment.md -->\n# Class: DraftAttachment\n\nAn uploaded or forwarded attachment belonging to a draft.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-draft\"></a> `draft` | `readonly` | [`EmailDraft`](EmailDraft.md) | Parent draft. |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | `number` | Draft generation captured when the attachment was reserved. |\n| <a id=\"property-forwarded\"></a> `forwarded` | `readonly` | `boolean` | Whether this attachment was forwarded. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Attachment identity. |\n\n## Methods\n\n### complete()\n\n> **complete**(): `Promise`\\<`void`\\>\n\nComplete verification after uploading the file.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### remove()\n\n> **remove**(): `Promise`\\<`void`\\>\n\nRemove this attachment from its draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\nSerialize identity without credentials.\n\n#### Returns\n\n\\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `draftGeneration` | `number` |\n| `draftId` | `string` |\n| `forwarded` | `boolean` |\n| `id` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`_client`, `draft`, `id`, `forwarded?`, `draftGeneration?`): `DraftAttachment`\n\nConstruct a draft scoped attachment handle.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `_client` | `MacroClient` | `undefined` |\n| `draft` | [`EmailDraft`](EmailDraft.md) | `undefined` |\n| `id` | `string` | `undefined` |\n| `forwarded?` | `boolean` | `false` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`DraftAttachment`\n\n\n<!-- src/entities/email/draft/classes/EmailDraft.md -->\n# Class: EmailDraft\n\nA draft email. Sending remains an explicit separate operation.\n\n## Extends\n\n- [`EmailMessage`](../../message/classes/EmailMessage.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Bcc recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`bcc`](../../message/classes/EmailMessage.md#property-bcc) |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`body`](../../message/classes/EmailMessage.md#property-body) |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Cc recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`cc`](../../message/classes/EmailMessage.md#property-cc) |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | Edit generation to capture with content before saving or transferring it. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md) \\| `undefined`\\> | The sender. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`from`](../../message/classes/EmailMessage.md#property-from) |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`EmailMessage`](../../message/classes/EmailMessage.md).[`id`](../../message/classes/EmailMessage.md#property-id) |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | () => `Promise`\\<[`LabelInfo`](../../../../../generated/email/types.gen/type-aliases/LabelInfo.md)[]\\> | Labels on this message. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`labels`](../../message/classes/EmailMessage.md#property-labels) |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | The inbox (email link) this message belongs to. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`link`](../../message/classes/EmailMessage.md#property-link) |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`sentAt`](../../message/classes/EmailMessage.md#property-sentat) |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`subject`](../../message/classes/EmailMessage.md#property-subject) |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The To recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`to`](../../message/classes/EmailMessage.md#property-to) |\n\n## Methods\n\n### addAttachment()\n\n> **addAttachment**(`options`): `Promise`\\<\\{ `attachment`: [`DraftAttachment`](DraftAttachment.md); `contentType`: `string`; `uploadUrl`: `string`; \\}\\>\n\nReserve an attachment upload. Upload to the returned URL, then call complete().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `fileName`: `string`; `sha`: `string`; `size`: `number`; `uploadId?`: `string`; \\} |\n| `options.fileName` | `string` |\n| `options.sha` | `string` |\n| `options.size` | `number` |\n| `options.uploadId?` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `attachment`: [`DraftAttachment`](DraftAttachment.md); `contentType`: `string`; `uploadUrl`: `string`; \\}\\>\n\n***\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`addLabel`](../../message/classes/EmailMessage.md#addlabel)\n\n***\n\n### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`completeDraftAttachment`](../../message/classes/EmailMessage.md#completedraftattachment)\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### forwardAttachment()\n\n> **forwardAttachment**(`attachment`): `Promise`\\<[`DraftAttachment`](DraftAttachment.md)\\>\n\nForward an existing attachment into this draft.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`EmailAttachment`](../../attachment/classes/EmailAttachment.md) |\n\n#### Returns\n\n`Promise`\\<[`DraftAttachment`](DraftAttachment.md)\\>\n\n***\n\n### operationStatus()\n\n> **operationStatus**(): `Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`operationStatus`](../../message/classes/EmailMessage.md#operationstatus)\n\n***\n\n### removeAttachment()\n\n> **removeAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nRemove a draft attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`DraftAttachment`](DraftAttachment.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`removeLabel`](../../message/classes/EmailMessage.md#removelabel)\n\n***\n\n### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`ResolveMessageOperationRequest`](../../../../../generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`resolveOperation`](../../message/classes/EmailMessage.md#resolveoperation)\n\n***\n\n### schedule()\n\n> **schedule**(`sendTime`, `options?`): `Promise`\\<`void`\\>\n\nSchedule this draft for sending.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sendTime` | `string` |\n| `options?` | \\{ `includeSignature?`: `boolean`; \\} |\n| `options.includeSignature?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### thread()\n\n> **thread**(): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`thread`](../../message/classes/EmailMessage.md#thread)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`toJSON`](../../message/classes/EmailMessage.md#tojson)\n\n***\n\n### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`TransferDraftRequest`](../../../../../generated/email/types.gen/type-aliases/TransferDraftRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`transferDraft`](../../message/classes/EmailMessage.md#transferdraft)\n\n***\n\n### unschedule()\n\n> **unschedule**(): `Promise`\\<`void`\\>\n\nRemove a scheduled send.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace draft content without changing its identity or sending it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../type-aliases/DraftOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### verifyAttachment()\n\n> **verifyAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nComplete verification of an uploaded attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`DraftAttachment`](DraftAttachment.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailDraft`\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailDraft`\n\n#### Overrides\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`byId`](../../message/classes/EmailMessage.md#byid)\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`from`](../../message/classes/EmailMessage.md#from)\n\n***\n\n### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`send`](../../message/classes/EmailMessage.md#send)\n\n\n<!-- src/entities/email/draft/functions/draftBody.md -->\n# Function: draftBody()\n\n> **draftBody**(`options`): [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\n\nTranslate draft content to the generated contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../type-aliases/DraftOptions.md) |\n\n## Returns\n\n[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\n\n\n<!-- src/entities/email/draft/type-aliases/DraftOptions.md -->\n# Type Alias: DraftOptions\n\n> **DraftOptions** = `Omit`\\<[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md), `\"db_id\"` \\| `\"provider_id\"` \\| `\"provider_thread_id\"` \\| `\"replying_to_id\"` \\| `\"thread_db_id\"` \\| `\"body_text\"` \\| `\"body_html\"` \\| `\"body_macro\"` \\| `\"headers_json\"` \\| `\"include_signature\"` \\| `\"draft_generation\"`\\> & \\{ `bodyHtml?`: `string`; `bodyMacro?`: `string`; `bodyText?`: `string`; `draftGeneration?`: `number`; `headers?`: [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\]; `includeSignature?`: `boolean`; `replyingTo?`: [`EmailMessage`](../../message/classes/EmailMessage.md); `thread?`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}\n\nDraft content; relationships use message and thread handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `bodyHtml?` | `string` | HTML body. |\n| `bodyMacro?` | `string` | Macro body. |\n| `bodyText?` | `string` | Plain text body. |\n| `draftGeneration?` | `number` | Generation captured when editing began; defaults to the loaded draft. |\n| `headers?` | [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\] | Extra headers. |\n| `includeSignature?` | `boolean` | Include the inbox signature. |\n| `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | Message being replied to. |\n| `thread?` | [`EmailThread`](../../thread/classes/EmailThread.md) | Thread receiving this draft. |\n\n\n<!-- src/entities/email/filter/classes/EmailFilter.md -->\n# Class: EmailFilter\n\nAn importance filter matched by sender address or domain.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched address. | - |\n| <a id=\"property-emaildomain\"></a> `emailDomain` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched domain. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isimportant\"></a> `isImportant` | `readonly` | () => `Promise`\\<`boolean`\\> | Importance assigned by this filter. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this filter.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setImportant()\n\n> **setImportant**(`isImportant`): `Promise`\\<`void`\\>\n\nChange the importance for the same sender selector.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `isImportant` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`, `inbox?`): `EmailFilter`\n\nConstruct a lazy filter handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`EmailFilter`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`, `inbox?`): `EmailFilter`\n\nSeed from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`EmailFilter`\n\n\n<!-- src/entities/email/filter/interfaces/EmailFilterOptions.md -->\n# Interface: EmailFilterOptions\n\nSender importance rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress?` | `string` | Match an address. |\n| <a id=\"property-emaildomain\"></a> `emailDomain?` | `string` | Match a domain. |\n| <a id=\"property-isimportant\"></a> `isImportant` | `boolean` | Whether matches are important. |\n\n\n<!-- src/entities/email/label/classes/Label.md -->\n# Class: Label\n\nAn email label. A free-to-construct handle: there is no single-label GET,\nso the detail record loads lazily on first field access by listing all\nlabels and finding this one (mirroring Link).\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the label was created. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-labellistvisibility\"></a> `labelListVisibility` | `readonly` | () => `Promise`\\<[`ApiLabelListVisibility`](../../../../../generated/email/types.gen/type-aliases/ApiLabelListVisibility.md)\\> | Whether the label is shown in the label list. | - |\n| <a id=\"property-linkid\"></a> `linkId` | `readonly` | () => `Promise`\\<`string`\\> | The inbox (email link) this label belongs to. | - |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | `readonly` | () => `Promise`\\<[`ApiMessageListVisibility`](../../../../../generated/email/types.gen/type-aliases/ApiMessageListVisibility.md)\\> | Whether the label is shown in the message list. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The label's display name. | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<[`ApiLabelType`](../../../../../generated/email/types.gen/type-aliases/ApiLabelType.md)\\> | Whether this is a system label or a user-created one. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this label.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Label`\n\nA handle to a label by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Label`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `name`): `Promise`\\<`Label`\\>\n\nCreate a user label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Label`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Label`[]\\>\n\nAll labels across the user's inboxes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Label`[]\\>\n\n\n<!-- src/entities/email/link/classes/Link.md -->\n# Class: Link\n\nAn email link: a connected inbox (e.g. Gmail or Outlook) that threads and\nmessages sync through. A free-to-construct handle, resolved from the\ncaller's connected links.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | The inbox's email address. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is the user's primary inbox. | - |\n| <a id=\"property-issyncactive\"></a> `isSyncActive` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether syncing is currently active for this inbox. | - |\n| <a id=\"property-needsreauth\"></a> `needsReauth` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the inbox needs to be re-authenticated. | - |\n| <a id=\"property-photourl\"></a> `photoUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The inbox's avatar URL, if any. | - |\n| <a id=\"property-provider\"></a> `provider` | `readonly` | () => `Promise`\\<[`UserProvider`](../../../../../generated/email/types.gen/type-aliases/UserProvider.md)\\> | The email provider (e.g. `GMAIL` or `OUTLOOK`). | - |\n| <a id=\"property-syncstatus\"></a> `syncStatus` | `readonly` | () => `Promise`\\<[`SyncStatus`](../../../../../generated/email/types.gen/type-aliases/SyncStatus.md)\\> | The inbox's sync status. | - |\n\n## Methods\n\n### settingsOperations()\n\n> **settingsOperations**(): `Promise`\\<[`MailboxSettingsOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxSettingsOperation.md)[]\\>\n\nRead category and sender-policy changes for this inbox.\n\n#### Returns\n\n`Promise`\\<[`MailboxSettingsOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxSettingsOperation.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Link`\n\nA handle to an email link by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Link`\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Link`[]\\>\n\nThe caller's connected email links.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Link`[]\\>\n\n\n<!-- src/entities/email/message/classes/EmailMessage.md -->\n# Class: EmailMessage\n\nA message in an email thread. A thin handle keyed by message id; the\nrecord loads lazily on first field access.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`EmailMessageData`](../type-aliases/EmailMessageData.md)\\>\n\n## Extended by\n\n- [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Bcc recipients. | - |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | - |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Cc recipients. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md) \\| `undefined`\\> | The sender. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | () => `Promise`\\<[`LabelInfo`](../../../../../generated/email/types.gen/type-aliases/LabelInfo.md)[]\\> | Labels on this message. | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | The inbox (email link) this message belongs to. | - |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | - |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | - |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The To recipients. | - |\n\n## Methods\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### operationStatus()\n\n> **operationStatus**(): `Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`ResolveMessageOperationRequest`](../../../../../generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### thread()\n\n> **thread**(): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`TransferDraftRequest`](../../../../../generated/email/types.gen/type-aliases/TransferDraftRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailMessage`\n\nA handle to a message by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailMessage`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `EmailMessage`\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n\n#### Returns\n\n`EmailMessage`\n\n***\n\n### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<`EmailMessage` \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | [`SendEmailOptions`](../interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<`EmailMessage` \\| `undefined`\\>\n\n\n<!-- src/entities/email/message/interfaces/SendEmailOptions.md -->\n# Interface: SendEmailOptions\n\nOptions for sending a fresh email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n\n\n<!-- src/entities/email/message/type-aliases/EmailMessageData.md -->\n# Type Alias: EmailMessageData\n\n> **EmailMessageData** = [`GetMessageResponses`](../../../../../generated/email/types.gen/type-aliases/GetMessageResponses.md)\\[`200`\\]\n\nThe API's representation of an email message (`ParsedMessage`).\n\n\n<!-- src/entities/email/namespace/classes/EmailNamespace.md -->\n# Class: EmailNamespace\n\n## Constructors\n\n### Constructor\n\n> **new EmailNamespace**(`client`): `EmailNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`EmailNamespace`\n\n## Methods\n\n### attachment()\n\n> **attachment**(`id`): [`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\nA handle to an email attachment by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\n***\n\n### blockedSenders()\n\n> **blockedSenders**(): `Promise`\\<`string`[]\\>\n\nThe email addresses currently blocked.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### blockSender()\n\n> **blockSender**(`email`): `Promise`\\<`void`\\>\n\nBlock an email sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`EmailThread`](../../thread/classes/EmailThread.md)\n\nA handle to an email thread by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailThread`](../../thread/classes/EmailThread.md)\n\n***\n\n### connectionProviders()\n\n> **connectionProviders**(): `Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\nProviders the server currently permits this caller to connect.\n\n#### Returns\n\n`Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\n***\n\n### contacts()\n\n> **contacts**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\nAddress book contacts grouped by the service's interaction buckets.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\n***\n\n### createDraft()\n\n> **createDraft**(`options`, `inbox?`): `Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nCreate a draft without sending it; the inbox defaults to the caller's primary.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../../draft/type-aliases/DraftOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### createLabel()\n\n> **createLabel**(`name`): `Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\nCreate a user label. Returns the created label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\n***\n\n### deleteLabel()\n\n> **deleteLabel**(`label`): `Promise`\\<`void`\\>\n\nDelete a label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### draftById()\n\n> **draftById**(`id`): [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n***\n\n### filters()\n\n> **filters**(`inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\nImportance filters.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\n***\n\n### inbox()\n\n> **inbox**(`opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe threads in the inbox, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`InboxOptions`](../interfaces/InboxOptions.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### label()\n\n> **label**(`id`): [`Label`](../../label/classes/Label.md)\n\nA handle to a label by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Label`](../../label/classes/Label.md)\n\n***\n\n### labels()\n\n> **labels**(): `Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\nAll labels across the user's inboxes.\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\n***\n\n### link()\n\n> **link**(`id`): [`Link`](../../link/classes/Link.md)\n\nA handle to a connected inbox (email link) by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Link`](../../link/classes/Link.md)\n\n***\n\n### links()\n\n> **links**(): `Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\nThe caller's connected inboxes (email links).\n\n#### Returns\n\n`Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\n***\n\n### message()\n\n> **message**(`id`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nA handle to an email message by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n***\n\n### recoverDraftTransfer()\n\n> **recoverDraftTransfer**(`operationId`): `Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\nRecover a draft move using its original operation UUID; never starts a new move.\nAn empty committed result fences the old move so it cannot commit later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n`Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\n***\n\n### reminders()\n\n> **reminders**(`options?`): `AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\nFollow-up reminders with thread handles, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<\\{ `attachments?`: `string`[] \\| `null`; `calendar?`: `boolean` \\| `null`; `cursor?`: `string` \\| `null`; `done?`: `boolean` \\| `null`; `inboxIds?`: `string`[] \\| `null`; `limit?`: `number` \\| `null`; `noInboxes?`: `boolean` \\| `null`; `read?`: `boolean` \\| `null`; `tags?`: `string`[] \\| `null`; \\}, `\"cursor\"` \\| `\"inboxIds\"`\\> & \\{ `inboxes?`: [`Link`](../../link/classes/Link.md)[]; \\} |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\n***\n\n### scheduled()\n\n> **scheduled**(`options?`): `AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nScheduled drafts, fetched lazily in bounded pages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `inbox?`: [`Link`](../../link/classes/Link.md); `pageSize?`: `number`; \\} |\n| `options.inbox?` | [`Link`](../../link/classes/Link.md) |\n| `options.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nSearch email threads by subject and content.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### send()\n\n> **send**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### unblockSender()\n\n> **unblockSender**(`email`): `Promise`\\<`void`\\>\n\nUnblock a previously blocked sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### upsertFilter()\n\n> **upsertFilter**(`options`, `inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\nCreate or replace a filter matching an address or domain.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`EmailFilterOptions`](../../filter/interfaces/EmailFilterOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\n\n<!-- src/entities/email/namespace/interfaces/InboxOptions.md -->\n# Interface: InboxOptions\n\nOptions for listing inbox threads.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` | Page size (default 20, max 500). |\n| <a id=\"property-sort\"></a> `sort?` | [`ApiSortMethod`](../../../../../generated/email/types.gen/type-aliases/ApiSortMethod.md) | Sort order. Defaults to `viewed_updated`. |\n\n\n<!-- src/entities/email/thread/classes/EmailThread.md -->\n# Class: EmailThread\n\nAn email thread. A free-to-construct handle: the detail record (including\nup to the first 100 messages) loads lazily on first field access.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`ThreadDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | `...` | Access requests and direct user grants. | - | - |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<[`AccessLevel`](../../../../../generated/email/types.gen/type-aliases/AccessLevel.md)\\> | `...` | The viewer's access level to this thread. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was created. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"email_thread\"` | `'email_thread'` | Favorites identify email threads as `email_thread`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-inboxvisible\"></a> `inboxVisible` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread is visible in the inbox (i.e. not archived). | - | - |\n| <a id=\"property-isread\"></a> `isRead` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread has been read. | - | - |\n| <a id=\"property-latestinboundat\"></a> `latestInboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest inbound message, if any. | - | - |\n| <a id=\"property-latestnonspamat\"></a> `latestNonSpamAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest non-spam message, if any. | - | - |\n| <a id=\"property-latestoutboundat\"></a> `latestOutboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest outbound message, if any. | - | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | `...` | The inbox (email link) that owns this thread. | - | - |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<[`Project`](../../../projects/project/classes/Project.md) \\| `undefined`\\> | `...` | The project this thread is attached to, if any. | - | - |\n| <a id=\"property-providerid\"></a> `providerId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The provider-internal thread id (e.g. Gmail/Outlook), if any. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`EmailThread`\\> | `...` | Search email threads by subject and content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### archive()\n\n> **archive**(`archived?`): `Promise`\\<`void`\\>\n\nArchive the thread (or unarchive with `false`).\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### attachments()\n\n> **attachments**(): `Promise`\\<[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)[]\\>\n\nThe attachments across this thread's first 100 messages, pre-seeded from the thread detail.\n\n#### Returns\n\n`Promise`\\<[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)[]\\>\n\n***\n\n### calendarInvitations()\n\n> **calendarInvitations**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`InvitationResolution`](../../../../../generated/email/types.gen/type-aliases/InvitationResolution.md); \\}\\>\n\nCalendar invitations resolved from this thread's messages.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`InvitationResolution`](../../../../../generated/email/types.gen/type-aliases/InvitationResolution.md); \\}\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`EmailThread`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### followup()\n\n> **followup**(): `Promise`\\<[`EmailFollowupResponse`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupResponse.md)\\>\n\nRead follow-up state for this thread.\n\n#### Returns\n\n`Promise`\\<[`EmailFollowupResponse`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupResponse.md)\\>\n\n***\n\n### markSeen()\n\n> **markSeen**(): `Promise`\\<`void`\\>\n\nMark the thread as seen.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### messages()\n\n> **messages**(`opts?`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md)[]\\>\n\nThe messages in this thread, pre-seeded from the list endpoint.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `limit?`: `number`; `since?`: `string`; \\} |\n| `opts.limit?` | `number` |\n| `opts.since?` | `string` |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md)[]\\>\n\n***\n\n### moveToProject()\n\n> **moveToProject**(`project`): `Promise`\\<`void`\\>\n\nAttach the thread to a project, or clear the project with `null`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `project` | [`Project`](../../../projects/project/classes/Project.md) \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### operations()\n\n> **operations**(): `Promise`\\<[`MailboxOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxOperation.md)[]\\>\n\nRead pending or failed mailbox changes without initiating a retry.\n\n#### Returns\n\n`Promise`\\<[`MailboxOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxOperation.md)[]\\>\n\n***\n\n### participants()\n\n> **participants**(): `Promise`\\<[`ApiContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiContactInfo.md)[]\\>\n\nEveryone on the thread (senders and recipients), deduped by email.\nDerived from the thread's first 100 messages.\n\n#### Returns\n\n`Promise`\\<[`ApiContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiContactInfo.md)[]\\>\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### reply()\n\n> **reply**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a reply within this thread. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`ReplyEmailOptions`](../interfaces/ReplyEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### setFollowup()\n\n> **setFollowup**(`command`): `Promise`\\<[`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md)\\>\n\nSet or remove a follow-up using a persisted operation id and revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `command` | [`EmailFollowupCommand`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupCommand.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md)\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### subject()\n\n> **subject**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe thread's subject, from its first message with one.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`EmailThread`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nChange project membership or share permissions for this thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `project?`: [`Project`](../../../projects/project/classes/Project.md) \\| `null`; `sharePermission?`: [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md); \\} |\n| `options.project?` | [`Project`](../../../projects/project/classes/Project.md) \\| `null` |\n| `options.sharePermission?` | [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### updateState()\n\n> **updateState**(`request`): `Promise`\\<`void`\\>\n\nUpdate provider-neutral read, trash, spam, or star state.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`UpdateThreadStateRequest`](../../../../../generated/email/types.gen/type-aliases/UpdateThreadStateRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailThread`\n\nA handle to a thread by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailThread`\n\n\n<!-- src/entities/email/thread/interfaces/ReplyEmailOptions.md -->\n# Interface: ReplyEmailOptions\n\nOptions for replying within an email thread.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-replyingto\"></a> `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | The message being replied to. |\n| <a id=\"property-subject\"></a> `subject?` | `string` | Subject line. Defaults to the subject of the thread's first message. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n"},{"name": "favorites",diff --git a/crates/calendar_events/AGENTS.md b/crates/calendar_events/AGENTS.mdindex 9010104969..41e09b8ae6 100644--- a/crates/calendar_events/AGENTS.md+++ b/crates/calendar_events/AGENTS.md@@ -75,6 +75,15 @@ reminder dispatch, team availability, and provider/Postgres persistence.(`get_event_details`, the series or the addressed occurrence) and refusesany other detail change with `GuestsCannotModify` before inviting anyone.Someone neither organizing nor invited is left to their calendar access.+- Only the organizer of a Google copy sets the guest policy+ (`src/domain/mutations/guest_policy.rs`): drafts and patches carry it as+ Google's three switches, a policy equal to the stored one (or Google's+ defaults on create) is dropped, a change from anyone else is `NotOrganizer`,+ one on Outlook, which has no such switches, is `ProviderRejected`, and one+ scoped to a single occurrence or on a new out-of-office event is+ `InvalidInput`.+ `ViewerCapabilities::set_guest_policy` is therefore Google-only, and+ `organize` is the organizer signal clients read instead.- A channel-shared event reaches a member's calendar as a snapshot, not aseat: `copy_shared_event` (`src/domain/mutations/copy.rs`) imports it underthe meeting's iCalendar UID with no join link, behind the samediff --git a/crates/calendar_events/src/domain/capabilities.rs b/crates/calendar_events/src/domain/capabilities.rsindex d15be3337a..9c923c5117 100644--- a/crates/calendar_events/src/domain/capabilities.rs+++ b/crates/calendar_events/src/domain/capabilities.rs@@ -69,10 +69,13 @@ pub struct ViewerCapabilities {pub invite_guests: bool,/// Remove guests.pub remove_guests: bool,- /// Change the event's guest policy.+ /// Change the event's guest policy, which only Google calendars have.pub set_guest_policy: bool,/// Answer the invitation.pub rsvp: bool,+ /// Act as the event's organizer: replace its whole guest list and manage+ /// its conferencing.+ pub organize: bool,}impl ViewerCapabilities {@@ -83,6 +86,7 @@ impl ViewerCapabilities {remove_guests: false,set_guest_policy: false,rsvp: false,+ organize: false,};/// Whether the viewer may do nothing with the event.@@ -98,7 +102,8 @@ impl ViewerCapabilities {/// so the provider accepts the copy, but an answer or a guest added to/// it would never reach the meeting. The organizer may do/// everything, and so may anyone on a writable event without attendees,- /// which is treated as the actor's own. A guest of a Google copy follows+ /// which is treated as the actor's own, except that only a Google copy+ /// has a guest policy to set. A guest of a Google copy follows/// the event's [`GuestPolicy`]: modify allows everything except changing/// the policy, invite allows adding guests, and every guest may answer./// A guest may change the guest list only while it is visible: Google@@ -157,8 +162,10 @@ impl ViewerCapabilities {edit_details: true,invite_guests: true,remove_guests: true,- set_guest_policy: true,+ set_guest_policy: inbox+ .is_some_and(|inbox| inbox.provider == CalendarProvider::Google),rsvp: is_guest,+ organize: true,};}match inbox {@@ -176,6 +183,7 @@ impl ViewerCapabilities {remove_guests: policy.can_see_other_guests && policy.can_modify,set_guest_policy: false,rsvp: true,+ organize: false,},CalendarProvider::Outlook => Self {rsvp: true,diff --git a/crates/calendar_events/src/domain/capabilities/test.rs b/crates/calendar_events/src/domain/capabilities/test.rsindex 63be1c9802..417afe92b6 100644--- a/crates/calendar_events/src/domain/capabilities/test.rs+++ b/crates/calendar_events/src/domain/capabilities/test.rs@@ -81,6 +81,7 @@ const EVERYTHING: ViewerCapabilities = ViewerCapabilities {remove_guests: true,set_guest_policy: true,rsvp: true,+ organize: true,};const LOCKED_DOWN: GuestPolicy = GuestPolicy {@@ -169,6 +170,7 @@ fn a_guest_who_may_modify_may_do_everything_but_set_the_policy() {capabilities,ViewerCapabilities {set_guest_policy: false,+ organize: false,..EVERYTHING});@@ -208,6 +210,7 @@ fn a_guest_cannot_change_a_hidden_guest_list_even_with_permission() {remove_guests: false,set_guest_policy: false,rsvp: true,+ organize: false,});}@@ -265,15 +268,17 @@ fn a_delegate_may_do_nothing_with_a_meeting_on_the_inbox_they_were_granted() {}#[test]-fn a_delegate_may_change_a_writable_event_without_attendees() {+fn a_delegate_may_change_a_writable_event_without_attendees_but_not_its_guest_policy() {let capabilities = ViewerCapabilities::for_event(&event(Vec::new(), LOCKED_DOWN), None);assert_eq!(capabilities,ViewerCapabilities {rsvp: false,+ set_guest_policy: false,..EVERYTHING- }+ },+ "without the copy's inbox its provider, and so its guest policy, is unknown");}@@ -376,7 +381,7 @@ fn an_outlook_guest_copy_of_a_google_meeting_may_only_answer() {}#[test]-fn an_outlook_organizer_copy_may_do_everything() {+fn an_outlook_organizer_copy_may_do_everything_but_set_a_guest_policy() {let mut copy = event(vec![attendee(OUTLOOK, true), attendee(GUEST, false)],GuestPolicy::default(),@@ -385,7 +390,14 @@ fn an_outlook_organizer_copy_may_do_everything() {three_inboxes().mark_event(&mut copy, OUTLOOK_LINK);- assert_eq!(copy.viewer_can, EVERYTHING);+ assert_eq!(+ copy.viewer_can,+ ViewerCapabilities {+ set_guest_policy: false,+ ..EVERYTHING+ },+ "Outlook has no guest policy, but its organizer still organizes"+ );}const NO_INVITES: GuestPolicy = GuestPolicy {diff --git a/crates/calendar_events/src/domain/meeting_links/test.rs b/crates/calendar_events/src/domain/meeting_links/test.rsindex cc745ace07..38817c6bb2 100644--- a/crates/calendar_events/src/domain/meeting_links/test.rs+++ b/crates/calendar_events/src/domain/meeting_links/test.rs@@ -70,6 +70,7 @@ fn draft() -> CalendarEventDraft {reminders: None,conference: None,out_of_office: None,+ guest_policy: None,}}diff --git a/crates/calendar_events/src/domain/models.rs b/crates/calendar_events/src/domain/models.rsindex 4401a93ce5..2892c15ce1 100644--- a/crates/calendar_events/src/domain/models.rs+++ b/crates/calendar_events/src/domain/models.rs@@ -1295,6 +1295,8 @@ pub struct CalendarEventDraft {/// out-of-office status event (primary calendar only, timed, no/// attendees); `None` creates a regular event.pub out_of_office: Option<OutOfOfficeProperties>,+ /// What guests may do. `None` keeps Google's defaults.+ pub guest_policy: Option<GuestPolicy>,}/// User-supplied changes to an existing provider event. `None` fields are@@ -1325,6 +1327,9 @@ pub struct CalendarEventPatch {/// already out-of-office — the provider event type is immutable. `None`/// leaves them untouched.pub out_of_office: Option<OutOfOfficeProperties>,+ /// Replacement guest policy; only the organizer of a Google event may+ /// change it.+ pub guest_policy: Option<GuestPolicy>,}impl CalendarEventPatch {@@ -1516,6 +1521,8 @@ pub struct CalendarCapabilities {pub custom_recurrence: bool,/// Whether an attendee can reset their RSVP to unanswered.pub reset_rsvp: bool,+ /// Whether the organizer can set what guests may do.+ pub guest_policy: bool,}impl CalendarCapabilities {/// Google Calendar's established editor capabilities.@@ -1527,6 +1534,7 @@ impl CalendarCapabilities {email_reminders: true,custom_recurrence: true,reset_rsvp: true,+ guest_policy: true,}}/// Outlook capabilities depend on the calendar's conferencing entitlement.@@ -1538,6 +1546,7 @@ impl CalendarCapabilities {email_reminders: true,custom_recurrence: false,reset_rsvp: false,+ guest_policy: false,}}}diff --git a/crates/calendar_events/src/domain/mutations.rs b/crates/calendar_events/src/domain/mutations.rsindex 6fbd6b62d5..16e89a9025 100644--- a/crates/calendar_events/src/domain/mutations.rs+++ b/crates/calendar_events/src/domain/mutations.rs@@ -9,6 +9,7 @@use std::collections::HashMap;mod copy;mod details;+mod guest_policy;mod invite;mod replacement;@@ -272,6 +273,7 @@ where}self.require_provider_writes(target.token_identity.provider)?;validate_conference(target.token_identity.provider, draft.conference)?;+ guest_policy::validate_draft_guest_policy(target.token_identity.provider, &mut draft)?;// An out-of-office event carries no attendees and Google auto-declines// on the owner's behalf, so it must not gain an organizer guest.if draft.out_of_office.is_some() {@@ -345,6 +347,7 @@ where&mut patch,).await?;+ guest_policy::require_guest_policy_rights(&target, &scope, capabilities, &mut patch)?;if patch.is_empty() {return Err(CalendarMutationError::InvalidInput(EMPTY_PATCH.to_string()));}@@ -775,7 +778,8 @@ fn validate_time(time: &EventTime) -> Result<(), CalendarMutationError> {/// Enforce Google's rules for creating an out-of-office event so the provider/// never rejects a write we already accepted: primary calendar only, a timed-/// span rather than whole days, and no attendees, conference, or description.+/// span rather than whole days, and no attendees, conference, description, or+/// guest policy beyond Google's defaults.fn validate_out_of_office_create(draft: &CalendarEventDraft,target: &CalendarCreationTarget,@@ -806,6 +810,11 @@ fn validate_out_of_office_create("out-of-office events cannot have a description".to_string(),));}+ if draft.guest_policy.is_some() {+ return Err(CalendarMutationError::InvalidInput(+ "out-of-office events have no guests to set permissions for".to_string(),+ ));+ }Ok(())}diff --git a/crates/calendar_events/src/domain/mutations/details.rs b/crates/calendar_events/src/domain/mutations/details.rsindex 7bcca66892..a84d8faa2f 100644--- a/crates/calendar_events/src/domain/mutations/details.rs+++ b/crates/calendar_events/src/domain/mutations/details.rs@@ -57,7 +57,7 @@ fn is_guest_without_modify(capabilities: ViewerCapabilities) -> bool {}/// Whether the patch changes a detail. Reminders and availability are each-/// guest's own, and the guest list follows its own rules.+/// guest's own, and the guest list and guest policy follow their own rules.fn changes_details(patch: &CalendarEventPatch) -> bool {let CalendarEventPatch {title,@@ -71,6 +71,7 @@ fn changes_details(patch: &CalendarEventPatch) -> bool {reminders: _,conference,out_of_office,+ guest_policy: _,} = patch;title.is_some()|| description.is_some()diff --git a/crates/calendar_events/src/domain/mutations/guest_policy.rs b/crates/calendar_events/src/domain/mutations/guest_policy.rsnew file mode 100644index 0000000000..152e36df65--- /dev/null+++ b/crates/calendar_events/src/domain/mutations/guest_policy.rs@@ -0,0 +1,64 @@+//! Setting what guests may do with an event. Only the organizer of a Google+//! event may: Outlook has no equivalent of Google's guest switches.+use super::*;+use crate::domain::capabilities::ViewerCapabilities;+use crate::domain::models::CalendarProvider;++/// Why an Outlook event refuses a guest policy, worded like the other+/// changes Microsoft Graph cannot represent.+const OUTLOOK_HAS_NO_GUEST_POLICY: &str = "Outlook events have no guest permissions to set";++/// Keep a new event's guest policy only when it departs from Google's+/// defaults, which Google applies on its own, and refuse one on Outlook.+pub(super) fn validate_draft_guest_policy(+ provider: CalendarProvider,+ draft: &mut CalendarEventDraft,+) -> Result<(), CalendarMutationError> {+ if draft.guest_policy.is_some_and(|policy| policy.is_default()) {+ draft.guest_policy = None;+ }+ match draft.guest_policy {+ Some(_) => require_policy_support(provider),+ None => Ok(()),+ }+}++/// Drop a guest policy the patch repeats at its stored value, and refuse a+/// change to one occurrence, on an Outlook event, or from anyone but the+/// organizer.+pub(super) fn require_guest_policy_rights(+ target: &CalendarEventMutationTarget,+ scope: &CalendarUpdateScope,+ capabilities: ViewerCapabilities,+ patch: &mut CalendarEventPatch,+) -> Result<(), CalendarMutationError> {+ let Some(policy) = patch.guest_policy else {+ return Ok(());+ };+ if policy == target.guest_policy {+ patch.guest_policy = None;+ return Ok(());+ }+ // Macro stores the policy on the series alone, so an occurrence's own+ // would be lost on the next read.+ if matches!(scope, CalendarUpdateScope::ThisEvent { .. }) {+ return Err(CalendarMutationError::InvalidInput(+ "guest permissions apply to the whole series; update all events to change them"+ .to_string(),+ ));+ }+ require_policy_support(target.token_identity.provider)?;+ if !capabilities.set_guest_policy {+ return Err(CalendarMutationError::NotOrganizer);+ }+ Ok(())+}++fn require_policy_support(provider: CalendarProvider) -> Result<(), CalendarMutationError> {+ match provider {+ CalendarProvider::Google => Ok(()),+ CalendarProvider::Outlook => Err(CalendarMutationError::ProviderRejected(+ OUTLOOK_HAS_NO_GUEST_POLICY.to_string(),+ )),+ }+}diff --git a/crates/calendar_events/src/domain/mutations/test.rs b/crates/calendar_events/src/domain/mutations/test.rsindex 05e7c72231..6f15500b9f 100644--- a/crates/calendar_events/src/domain/mutations/test.rs+++ b/crates/calendar_events/src/domain/mutations/test.rs@@ -159,6 +159,7 @@ fn draft() -> CalendarEventDraft {reminders: None,conference: None,out_of_office: None,+ guest_policy: None,}}@@ -2933,5 +2934,6 @@ async fn outlook_write_pause_rejects_provider_operations_before_fetching_tokens(mod copy;mod details;+mod guest_policy;mod invite;mod replacement;diff --git a/crates/calendar_events/src/domain/mutations/test/guest_policy.rs b/crates/calendar_events/src/domain/mutations/test/guest_policy.rsnew file mode 100644index 0000000000..1e9cff3fa6--- /dev/null+++ b/crates/calendar_events/src/domain/mutations/test/guest_policy.rs@@ -0,0 +1,287 @@+use super::*;+use crate::domain::models::CalendarProvider;++const ORGANIZER: &str = "[email protected]";++const NO_INVITES: GuestPolicy = GuestPolicy {+ can_modify: false,+ can_invite_others: false,+ can_see_other_guests: true,+};++/// The actor's own meeting, with one guest.+fn organizer_repo() -> FakeRepo {+ let mut organizer = echo_attendee("[email protected]", false);+ organizer.is_organizer = true;+ FakeRepo {+ mutation_target: Some(mutation_target(false)),+ stored_attendees: vec![organizer, echo_attendee("[email protected]", false)],+ ..FakeRepo::default()+ }+}++/// Olivia's meeting, with the actor as a guest she lets modify it.+fn modifying_guest_repo() -> FakeRepo {+ let mut organizer = echo_attendee(ORGANIZER, false);+ organizer.is_organizer = true;+ FakeRepo {+ mutation_target: Some(CalendarEventMutationTarget {+ organizer_email: Some(ORGANIZER.to_string()),+ guest_policy: GuestPolicy {+ can_modify: true,+ can_invite_others: true,+ can_see_other_guests: true,+ },+ ..mutation_target(false)+ }),+ stored_attendees: vec![organizer, echo_attendee("[email protected]", false)],+ ..FakeRepo::default()+ }+}++/// The actor's own meeting on their Outlook calendar.+fn outlook_organizer_repo() -> FakeRepo {+ let mut repo = organizer_repo();+ let target = repo.mutation_target.as_mut().unwrap();+ target.token_identity.provider = CalendarProvider::Outlook;+ target.actor = ActorInboxes::from_owned(vec![OwnedInbox {+ link_id: SELF_LINK,+ email: "[email protected]".to_string(),+ provider: CalendarProvider::Outlook,+ }]);+ repo+}++fn policy_patch(guest_policy: GuestPolicy) -> CalendarEventPatch {+ CalendarEventPatch {+ guest_policy: Some(guest_policy),+ ..CalendarEventPatch::default()+ }+}++#[tokio::test]+async fn the_organizer_changes_the_guest_policy() {+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let patches = provider.updated_patches.clone();++ service(organizer_repo(), provider, FakeTokens::ok())+ .update_event(+ "macro|user",+ Uuid::now_v7(),+ None,+ policy_patch(NO_INVITES),+ CalendarUpdateScope::All,+ )+ .await+ .unwrap();++ assert_eq!(+ patches.lock().unwrap().as_slice(),+ [policy_patch(NO_INVITES)]+ );+}++#[tokio::test]+async fn an_unchanged_guest_policy_is_not_sent() {+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let patches = provider.updated_patches.clone();++ service(organizer_repo(), provider, FakeTokens::ok())+ .update_event(+ "macro|user",+ Uuid::now_v7(),+ None,+ CalendarEventPatch {+ title: Some("Retro".to_string()),+ guest_policy: Some(GuestPolicy::default()),+ ..CalendarEventPatch::default()+ },+ CalendarUpdateScope::All,+ )+ .await+ .unwrap();++ assert_eq!(+ patches.lock().unwrap().as_slice(),+ [CalendarEventPatch {+ title: Some("Retro".to_string()),+ ..CalendarEventPatch::default()+ }]+ );+}++#[tokio::test]+async fn a_guest_who_may_modify_still_cannot_change_the_guest_policy() {+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let calls = provider.calls.clone();++ let error = service(modifying_guest_repo(), provider, FakeTokens::ok())+ .update_event(+ "macro|user",+ Uuid::now_v7(),+ None,+ policy_patch(NO_INVITES),+ CalendarUpdateScope::All,+ )+ .await+ .unwrap_err();++ assert!(+ matches!(error, CalendarMutationError::NotOrganizer),+ "{error:?}"+ );+ assert!(calls.lock().unwrap().is_empty());+}++#[tokio::test]+async fn an_outlook_event_refuses_a_guest_policy_as_unsupported() {+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let calls = provider.calls.clone();++ let error = service(outlook_organizer_repo(), provider, FakeTokens::ok())+ .update_event(+ "macro|user",+ Uuid::now_v7(),+ None,+ policy_patch(NO_INVITES),+ CalendarUpdateScope::All,+ )+ .await+ .unwrap_err();++ assert!(+ matches!(error, CalendarMutationError::ProviderRejected(_)),+ "{error:?}"+ );+ assert!(calls.lock().unwrap().is_empty());+}++#[tokio::test]+async fn a_new_event_carries_a_guest_policy_only_when_it_departs_from_the_defaults() {+ for (requested, sent) in [+ (Some(NO_INVITES), Some(NO_INVITES)),+ (Some(GuestPolicy::default()), None),+ (None, None),+ ] {+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let drafts = provider.created_drafts.clone();++ service(+ FakeRepo {+ creation_target: Some(creation_target(false)),+ persisted_event_id: Some(Uuid::now_v7()),+ ..FakeRepo::default()+ },+ provider,+ FakeTokens::ok(),+ )+ .create_event(+ "macro|user",+ None,+ None,+ CalendarEventDraft {+ guest_policy: requested,+ ..draft()+ },+ )+ .await+ .unwrap();++ assert_eq!(+ drafts.lock().unwrap()[0].guest_policy,+ sent,+ "{requested:?}"+ );+ }+}++#[tokio::test]+async fn a_new_outlook_event_refuses_a_guest_policy() {+ let mut creation = creation_target(false);+ creation.token_identity.provider = CalendarProvider::Outlook;+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let calls = provider.calls.clone();++ let error = service(+ FakeRepo {+ creation_target: Some(creation),+ ..FakeRepo::default()+ },+ provider,+ FakeTokens::ok(),+ )+ .create_event(+ "macro|user",+ None,+ None,+ CalendarEventDraft {+ guest_policy: Some(NO_INVITES),+ ..draft()+ },+ )+ .await+ .unwrap_err();++ assert!(+ matches!(error, CalendarMutationError::ProviderRejected(_)),+ "{error:?}"+ );+ assert!(calls.lock().unwrap().is_empty());+}++#[tokio::test]+async fn a_guest_policy_change_to_one_occurrence_is_refused() {+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let calls = provider.calls.clone();++ let error = service(organizer_repo(), provider, FakeTokens::ok())+ .update_event(+ "macro|user",+ Uuid::now_v7(),+ None,+ policy_patch(NO_INVITES),+ CalendarUpdateScope::ThisEvent {+ recurrence_id: "2026-08-06T14:00:00+00:00".to_string(),+ },+ )+ .await+ .unwrap_err();++ assert!(+ matches!(error, CalendarMutationError::InvalidInput(_)),+ "{error:?}"+ );+ assert!(calls.lock().unwrap().is_empty());+}++#[tokio::test]+async fn an_out_of_office_event_refuses_a_guest_policy() {+ let provider = FakeProvider::new(FakeProviderBehavior::Echo);+ let calls = provider.calls.clone();++ let error = service(+ FakeRepo {+ creation_target: Some(creation_target(false)),+ ..FakeRepo::default()+ },+ provider,+ FakeTokens::ok(),+ )+ .create_event(+ "macro|user",+ None,+ None,+ CalendarEventDraft {+ guest_policy: Some(NO_INVITES),+ ..out_of_office_draft()+ },+ )+ .await+ .unwrap_err();++ assert!(+ matches!(&error, CalendarMutationError::InvalidInput(message) if message.contains("guests to set permissions")),+ "{error:?}"+ );+ assert!(calls.lock().unwrap().is_empty());+}diff --git a/crates/calendar_events/src/domain/ports.rs b/crates/calendar_events/src/domain/ports.rsindex 70c116388f..b10117785f 100644--- a/crates/calendar_events/src/domain/ports.rs+++ b/crates/calendar_events/src/domain/ports.rs@@ -978,6 +978,9 @@ pub enum CalendarMutationError {/// The connected account is not an attendee of the event.#[error("the connected account is not an attendee of this event")]NotAttendee,+ /// Only the organizer may change the event's guest policy.+ #[error("only the organizer can change guest permissions")]+ NotOrganizer,/// Only the organizer may invite guests: the organizer does not let/// guests invite others, or the event is an Outlook meeting, which/// gives its attendees no way to change it.diff --git a/crates/calendar_events/src/inbound/mutation_router.rs b/crates/calendar_events/src/inbound/mutation_router.rsindex 2a162e505e..3c52ed840e 100644--- a/crates/calendar_events/src/inbound/mutation_router.rs+++ b/crates/calendar_events/src/inbound/mutation_router.rs@@ -29,7 +29,7 @@ use crate::domain::{models::{AttendeeResponseStatus, CalendarAttendeeInput, CalendarEvent, CalendarEventDraft,CalendarEventPatch, ConferenceChange, EventReminders, EventTime, EventTransparency,- EventVisibility, OutOfOfficeProperties, VisibleCalendar,+ EventVisibility, GuestPolicy, OutOfOfficeProperties, VisibleCalendar,},ports::{CalendarDeletionScope, CalendarMutationError, CalendarMutationService, CalendarRsvpScope,@@ -175,6 +175,10 @@ pub struct CreateCalendarEventRequest {/// out-of-office status event (primary calendar only, timed, no/// attendees), omitted for a regular event.pub out_of_office: Option<OutOfOfficeProperties>,+ /// What guests may do; omit for Google's defaults (guests may invite+ /// others and see the guest list, not modify the event). Google+ /// calendars only.+ pub guest_policy: Option<GuestPolicy>,}/// Request body patching an event; omitted fields are left untouched.@@ -213,6 +217,9 @@ pub struct UpdateCalendarEventRequest {/// already out-of-office — the provider event type is immutable. Omit to/// leave them untouched.pub out_of_office: Option<OutOfOfficeProperties>,+ /// Replacement guest policy; only the organizer of a Google event may+ /// change it, for the whole event or series. Omit to leave it untouched.+ pub guest_policy: Option<GuestPolicy>,/// How much of a recurring series the update covers. Omit to let/// `recurrenceId` decide: the identified occurrence alone when one is/// supplied, otherwise the whole event or series. An explicit@@ -359,6 +366,8 @@ pub enum CalendarMutationErrorCode {NoWritableCalendar,/// The connected account is not an attendee of the event.NotAttendee,+ /// Only the organizer may change the event's guest policy.+ NotOrganizer,/// Only the organizer may invite guests: the organizer does not let/// guests invite others, or the event is an Outlook meeting.GuestsCannotInvite,@@ -442,6 +451,11 @@ impl From<CalendarMutationError> for CalendarMutationApiError {CalendarMutationErrorCode::NotAttendee,"the connected account is not an attendee of this event".to_string(),),+ CalendarMutationError::NotOrganizer => (+ StatusCode::FORBIDDEN,+ CalendarMutationErrorCode::NotOrganizer,+ "Only the organizer can change guest permissions.".to_string(),+ ),CalendarMutationError::GuestsCannotInvite => (StatusCode::FORBIDDEN,CalendarMutationErrorCode::GuestsCannotInvite,@@ -576,6 +590,7 @@ wherereminders: request.reminders,conference: request.conference,out_of_office: request.out_of_office,+ guest_policy: request.guest_policy,};let requester_id: &str = user.authorization.user.macro_user_id.as_ref();let event = if request.macro_call {@@ -708,6 +723,7 @@ wherereminders: request.reminders,conference: request.conference,out_of_office: request.out_of_office,+ guest_policy: request.guest_policy,};let event = state.servicediff --git a/crates/calendar_events/src/inbound/mutation_router/test.rs b/crates/calendar_events/src/inbound/mutation_router/test.rsindex d987c7270d..3aceac4bd5 100644--- a/crates/calendar_events/src/inbound/mutation_router/test.rs+++ b/crates/calendar_events/src/inbound/mutation_router/test.rs@@ -33,6 +33,13 @@ fn domain_errors_map_to_distinct_transport_semantics() {transport_of(CalendarMutationError::NotAttendee),(StatusCode::CONFLICT, CalendarMutationErrorCode::NotAttendee));+ assert_eq!(+ transport_of(CalendarMutationError::NotOrganizer),+ (+ StatusCode::FORBIDDEN,+ CalendarMutationErrorCode::NotOrganizer+ )+ );assert_eq!(transport_of(CalendarMutationError::GuestsCannotInvite),(diff --git a/crates/calendar_events/src/inbound/toolset.rs b/crates/calendar_events/src/inbound/toolset.rsindex 6ae302d48e..df79de4c88 100644--- a/crates/calendar_events/src/inbound/toolset.rs+++ b/crates/calendar_events/src/inbound/toolset.rs@@ -476,6 +476,11 @@ fn mutation_tool_error(action: &str, error: CalendarMutationError) -> ToolCallErCalendarMutationError::NotAttendee => {"The user's connected account is not an attendee of this event.".to_string()}+ CalendarMutationError::NotOrganizer => {+ "Only the event's organizer can change its guest permissions \+ (`viewerCan.setGuestPolicy` from ListCalendarEvents), so leave `guestPolicy` out."+ .to_string()+ }CalendarMutationError::GuestsCannotInvite => {"Only the organizer can invite guests to this event: the organizer doesn't let \guests invite others, or it is an Outlook meeting, where guests cannot add anyone. \diff --git a/crates/calendar_events/src/inbound/toolset/create_calendar_event.rs b/crates/calendar_events/src/inbound/toolset/create_calendar_event.rsindex 5af68678c9..5db1877430 100644--- a/crates/calendar_events/src/inbound/toolset/create_calendar_event.rs+++ b/crates/calendar_events/src/inbound/toolset/create_calendar_event.rs@@ -16,7 +16,7 @@ use super::{};use crate::domain::{meeting_links::create_event_with_macro_call,- models::{CalendarEventDraft, ConferenceChange},+ models::{CalendarEventDraft, ConferenceChange, GuestPolicy},ports::{CalendarMutationService, CalendarOccurrenceService, MeetingLinkProvider},};@@ -142,6 +142,16 @@ pub struct CreateCalendarEvent {)]#[serde(default)]pub out_of_office: Option<OutOfOfficeInput>,++ /// What guests may do with the event.+ #[schemars(+ description = "What guests may do: `canModify` (change the event; implies \+ `canInviteOthers`), `canInviteOthers` and `canSeeOtherGuests`. Omit for \+ the defaults: guests may invite others and see the guest list but not \+ modify the event. Google calendars only; an Outlook calendar refuses it."+ )]+ #[serde(default)]+ pub guest_policy: Option<GuestPolicy>,}impl ToolAnnotated for CreateCalendarEvent {@@ -219,6 +229,7 @@ where.add_conference.then_some(ConferenceChange::ProviderDefault),out_of_office,+ guest_policy: self.guest_policy,};if self.add_macro_call {diff --git a/crates/calendar_events/src/inbound/toolset/test.rs b/crates/calendar_events/src/inbound/toolset/test.rsindex 3365e33ef6..73d18c58fe 100644--- a/crates/calendar_events/src/inbound/toolset/test.rs+++ b/crates/calendar_events/src/inbound/toolset/test.rs@@ -594,6 +594,7 @@ async fn create_converts_input_into_a_domain_draft() {add_conference: true,event_type: CalendarEventTypeInput::Default,out_of_office: None,+ guest_policy: None,};let response = tool.call(context, request_context()).await.unwrap();assert_eq!(response.event_id, Uuid::from_u128(7));@@ -647,6 +648,7 @@ async fn create_maps_out_of_office_input_into_the_draft() {auto_decline_mode: Some(AutoDeclineModeInput::DeclineAll),decline_message: Some("Away".to_string()),}),+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -684,6 +686,7 @@ async fn create_rejects_out_of_office_settings_on_a_default_event() {add_conference: false,event_type: CalendarEventTypeInput::Default,out_of_office: Some(OutOfOfficeInput::default()),+ guest_policy: None,};tool.call(context, request_context()).await.unwrap_err();assert!(mutations.created.lock().unwrap().is_empty());@@ -714,6 +717,7 @@ async fn create_surfaces_missing_calendar_as_an_actionable_error() {add_conference: false,event_type: CalendarEventTypeInput::Default,out_of_office: None,+ guest_policy: None,};let error = tool.call(context, request_context()).await.unwrap_err();assert!(@@ -744,6 +748,7 @@ fn macro_call_tool() -> CreateCalendarEvent {add_conference: false,event_type: CalendarEventTypeInput::Default,out_of_office: None,+ guest_policy: None,}}@@ -914,6 +919,7 @@ async fn update_converts_input_into_a_domain_patch() {reminders: None,rsvp: None,out_of_office: None,+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -955,6 +961,7 @@ async fn update_maps_out_of_office_settings_into_the_patch() {auto_decline_mode: Some(AutoDeclineModeInput::DeclineNewOnly),decline_message: None,}),+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -994,6 +1001,7 @@ async fn update_passes_the_selected_occurrence_scope() {reminders: None,rsvp: None,out_of_office: None,+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -1026,6 +1034,7 @@ async fn scoped_update_requires_a_recurrence_id() {reminders: None,rsvp: None,out_of_office: None,+ guest_policy: None,};let error = tool.call(context, request_context()).await.unwrap_err();assert!(error.description.contains("recurrenceId"));@@ -1054,6 +1063,7 @@ async fn series_update_rejects_a_stray_recurrence_id() {reminders: None,rsvp: None,out_of_office: None,+ guest_policy: None,};let error = tool.call(context, request_context()).await.unwrap_err();assert!(error.description.contains("this_event"));@@ -1085,6 +1095,7 @@ async fn update_carries_reminders_into_the_patch() {}),rsvp: None,out_of_office: None,+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -1124,6 +1135,7 @@ async fn rsvp_alone_answers_without_patching() {reminders: None,rsvp: Some(RsvpResponseInput::Declined),out_of_office: None,+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -1158,6 +1170,7 @@ async fn rsvp_follows_the_occurrence_scope_of_the_call() {reminders: None,rsvp: Some(RsvpResponseInput::Tentative),out_of_office: None,+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -1196,6 +1209,7 @@ async fn update_answers_after_applying_the_patch() {reminders: None,rsvp: Some(RsvpResponseInput::Accepted),out_of_office: None,+ guest_policy: None,};tool.call(context, request_context()).await.unwrap();@@ -1222,6 +1236,7 @@ async fn update_without_a_change_or_an_rsvp_is_rejected() {reminders: None,rsvp: None,out_of_office: None,+ guest_policy: None,};let error = tool.call(context, request_context()).await.unwrap_err();assert!(error.description.contains("changes nothing"));diff --git a/crates/calendar_events/src/inbound/toolset/update_calendar_event.rs b/crates/calendar_events/src/inbound/toolset/update_calendar_event.rsindex 21cc8043c8..5c00236249 100644--- a/crates/calendar_events/src/inbound/toolset/update_calendar_event.rs+++ b/crates/calendar_events/src/inbound/toolset/update_calendar_event.rs@@ -14,7 +14,7 @@ use super::{ToolCalendarEvent, mutation_tool_error,};use crate::domain::{- models::{AttendeeResponseStatus, CalendarEventPatch, ConferenceChange},+ models::{AttendeeResponseStatus, CalendarEventPatch, ConferenceChange, GuestPolicy},ports::{CalendarMutationService, CalendarOccurrenceService, CalendarRsvpScope, CalendarUpdateScope,MeetingLinkProvider,@@ -236,6 +236,17 @@ pub struct UpdateCalendarEvent {)]#[serde(default)]pub out_of_office: Option<OutOfOfficeInput>,++ /// Replacement guest policy.+ #[schemars(+ description = "Replace what guests may do: `canModify` (change the event; implies \+ `canInviteOthers`), `canInviteOthers` and `canSeeOtherGuests`, all three \+ required. Only the organizer of a Google event may set it \+ (`viewerCan.setGuestPolicy`), and only with scope \"all\": it belongs to \+ the whole series. Outlook events have none. Omit to leave it untouched."+ )]+ #[serde(default)]+ pub guest_policy: Option<GuestPolicy>,}impl ToolAnnotated for UpdateCalendarEvent {@@ -311,6 +322,7 @@ wherereminders: self.reminders.clone().map(Into::into),conference: self.conference.map(Into::into),out_of_office: self.out_of_office.clone().map(Into::into),+ guest_policy: self.guest_policy,};// An RSVP is its own provider call, so a call carrying only one runsdiff --git a/crates/calendar_events/src/outbound/calendar_service_mutations.rs b/crates/calendar_events/src/outbound/calendar_service_mutations.rsindex 39b72d9162..22761bff25 100644--- a/crates/calendar_events/src/outbound/calendar_service_mutations.rs+++ b/crates/calendar_events/src/outbound/calendar_service_mutations.rs@@ -157,6 +157,7 @@ fn error_from_response(status: StatusCode, body: Option<String>) -> CalendarMuta"read_only" => CalendarMutationError::ReadOnly,"no_writable_calendar" => CalendarMutationError::NoWritableCalendar,"not_attendee" => CalendarMutationError::NotAttendee,+ "not_organizer" => CalendarMutationError::NotOrganizer,"guests_cannot_invite" => CalendarMutationError::GuestsCannotInvite,"guest_list_hidden" => CalendarMutationError::GuestListHidden,"guests_cannot_modify" => CalendarMutationError::GuestsCannotModify,@@ -226,6 +227,7 @@ fn create_body("reminders": draft.reminders,"conference": draft.conference,"outOfOffice": draft.out_of_office,+ "guestPolicy": draft.guest_policy,"idempotencyKey": draft.idempotency_key,"macroCall": macro_call,})@@ -259,6 +261,7 @@ fn update_body("reminders": patch.reminders,"conference": patch.conference,"outOfOffice": patch.out_of_office,+ "guestPolicy": patch.guest_policy,"scope": scope_name,"recurrenceId": recurrence_id,})diff --git a/crates/calendar_events/src/outbound/calendar_service_mutations/test.rs b/crates/calendar_events/src/outbound/calendar_service_mutations/test.rsindex 69423dc555..95594c5992 100644--- a/crates/calendar_events/src/outbound/calendar_service_mutations/test.rs+++ b/crates/calendar_events/src/outbound/calendar_service_mutations/test.rs@@ -39,6 +39,7 @@ fn sample_draft() -> CalendarEventDraft {reminders: Some(EventReminders::default()),conference: Some(crate::domain::models::ConferenceChange::GoogleMeet),out_of_office: None,+ guest_policy: None,}}@@ -240,6 +241,7 @@ fn router_error_bodies_round_trip_to_their_domain_failures() {CalendarMutationError::ReadOnly,CalendarMutationError::NoWritableCalendar,CalendarMutationError::NotAttendee,+ CalendarMutationError::NotOrganizer,CalendarMutationError::GuestsCannotInvite,CalendarMutationError::GuestListHidden,CalendarMutationError::GuestsCannotModify,diff --git a/crates/calendar_events/src/outbound/google.rs b/crates/calendar_events/src/outbound/google.rsindex 65a361a67a..be794324e3 100644--- a/crates/calendar_events/src/outbound/google.rs+++ b/crates/calendar_events/src/outbound/google.rs@@ -2010,9 +2010,19 @@ fn draft_body(draft: &CalendarEventDraft) -> serde_json::Value {serde_json::Value::String(EventTransparency::Opaque.as_str().to_string());body["outOfOfficeProperties"] = google_out_of_office_body(out_of_office);}+ if let Some(policy) = draft.guest_policy {+ google_guest_policy_body(&mut body, policy);+ }body}+/// Write the three guest switches, so the stored copy reflects all of them.+fn google_guest_policy_body(body: &mut serde_json::Value, policy: GuestPolicy) {+ body["guestsCanModify"] = serde_json::Value::Bool(policy.can_modify);+ body["guestsCanInviteOthers"] = serde_json::Value::Bool(policy.can_invite_others);+ body["guestsCanSeeOtherGuests"] = serde_json::Value::Bool(policy.can_see_other_guests);+}+/// Serialize the `outOfOfficeProperties` block Google requires on an/// out-of-office event.fn google_out_of_office_body(properties: &OutOfOfficeProperties) -> serde_json::Value {@@ -2100,6 +2110,9 @@ fn patch_body(patch: &CalendarEventPatch) -> serde_json::Value {if let Some(out_of_office) = &patch.out_of_office {body["outOfOfficeProperties"] = google_out_of_office_body(out_of_office);}+ if let Some(policy) = patch.guest_policy {+ google_guest_policy_body(&mut body, policy);+ }body}diff --git a/crates/calendar_events/src/outbound/google/test.rs b/crates/calendar_events/src/outbound/google/test.rsindex 6dac38ab75..cc029cca84 100644--- a/crates/calendar_events/src/outbound/google/test.rs+++ b/crates/calendar_events/src/outbound/google/test.rs@@ -1260,6 +1260,7 @@ fn mutation_bodies_serialize_reminders_in_google_shape() {reminders: Some(reminders.clone()),conference: None,out_of_office: None,+ guest_policy: None,};assert_eq!(draft_body(&draft)["reminders"], expected);@@ -1397,6 +1398,7 @@ fn drafts_carry_conference_requests_and_their_parameter() {reminders: None,conference: Some(ConferenceChange::GoogleMeet),out_of_office: None,+ guest_policy: None,};let body = draft_body(&draft);@@ -1430,6 +1432,7 @@ fn timed_draft(out_of_office: Option<OutOfOfficeProperties>) -> CalendarEventDrareminders: None,conference: None,out_of_office,+ guest_policy: None,}}@@ -1699,3 +1702,48 @@ async fn keyed_create_recovers_lost_response_and_duplicate_conflict_without_secotask.abort();}}++#[test]+fn a_guest_policy_writes_all_three_switches() {+ let policy = GuestPolicy {+ can_modify: false,+ can_invite_others: false,+ can_see_other_guests: true,+ };+ let expected = serde_json::json!({+ "guestsCanModify": false,+ "guestsCanInviteOthers": false,+ "guestsCanSeeOtherGuests": true,+ });+ let switches = |body: serde_json::Value| {+ [+ "guestsCanModify",+ "guestsCanInviteOthers",+ "guestsCanSeeOtherGuests",+ ]+ .into_iter()+ .filter_map(|key| body.get(key).map(|value| (key.to_string(), value.clone())))+ .collect::<serde_json::Map<_, _>>()+ };++ let draft = CalendarEventDraft {+ guest_policy: Some(policy),+ ..timed_draft(None)+ };+ assert_eq!(+ serde_json::Value::Object(switches(draft_body(&draft))),+ expected+ );+ let patch = CalendarEventPatch {+ guest_policy: Some(policy),+ ..CalendarEventPatch::default()+ };+ assert_eq!(+ serde_json::Value::Object(switches(patch_body(&patch))),+ expected+ );+ assert!(+ switches(patch_body(&CalendarEventPatch::default())).is_empty(),+ "an untouched policy leaves Google's switches alone"+ );+}diff --git a/crates/calendar_scheduling/src/outbound/macro_services.rs b/crates/calendar_scheduling/src/outbound/macro_services.rsindex 32e73ff65b..83f8421b68 100644--- a/crates/calendar_scheduling/src/outbound/macro_services.rs+++ b/crates/calendar_scheduling/src/outbound/macro_services.rs@@ -292,6 +292,7 @@ impl<O: CalendarOccurrenceService, M: CalendarCreationRecoveryService, L: Meetinconference: (!event.macro_call && event.google_meet).then_some(ConferenceChange::ProviderDefault),out_of_office: None,+ guest_policy: None,};if event.macro_call {if event.google_meet {diff --git a/crates/code_execution/src/outbound/deno/sdk.mjs b/crates/code_execution/src/outbound/deno/sdk.mjsindex 1b737c3897..5700ae1c7a 100644--- a/crates/code_execution/src/outbound/deno/sdk.mjs+++ b/crates/code_execution/src/outbound/deno/sdk.mjs@@ -1,5 +1,5 @@// Generated by packages/code-mode-sdk/scripts/generate.ts.-async function bO($,O,j){if(!Number.isInteger(O)||O<1)throw RangeError(`concurrency limit must be a positive integer, got ${O}`);let x=Array($.length),S=0,K=async()=>{while(S<$.length){let X=S;S+=1,x[X]=await j($[X])}},Z=Array.from({length:Math.min(O,$.length)},K);return await Promise.all(Z),x}class V${loader;value;inflight;constructor($,O){this.loader=$;this.value=O}get(){if(this.value!==void 0)return Promise.resolve(this.value);return this.inflight??=this.loader().then(($)=>{return this.value=$,$}),this.inflight}peek(){return this.value}clear(){this.value=void 0,this.inflight=void 0}}async function*a($){let O;do{let j=await $(O),x=j.nextCursor??void 0;if(O!==void 0&&x!==void 0&&JSON.stringify(x)===JSON.stringify(O))throw Error("Pagination cursor did not advance");yield*j.items,O=x}while(O!==void 0)}class b extends Error{constructor($){super($);this.name="MacroError"}}class SO extends b{status;data;constructor($,O){super(`Macro API error ${$}`);this.status=$;this.data=O;this.name="MacroApiError"}}class w extends b{constructor($){super($);this.name="MacroNotFoundError"}}function Q($){if($.error!==void 0)throw new SO($.response?.status??0,$.error);return $.data}class A{client;id;detail;constructor($,O,j){this.client=$;this.id=O;this.detail=new V$(()=>this.fetch(),j)}field($){return async()=>(await this.detail.get())[$]??void 0}mappedField($,O){return async()=>O((await this.detail.get())[$]??void 0)}toJSON(){let $=this.detail.peek();return $===void 0?{id:this.id}:{id:this.id,detail:$}}async mutate($){let O=Q(await $(this.client));return this.detail.clear(),O}}class F$ extends A{async permission(){return Q(await this.client.storage.getEntityPermission({path:{entity_type:this.entityType,entity_id:this.id}}))}async favorite(){return Q(await this.client.storage.addFavorite({body:{entityId:this.id,entityType:this.entityType}})),this}async unfavorite(){return Q(await this.client.storage.removeFavoriteByEntity({path:{entity_type:this.entityType,entity_id:this.id}})),this}}class S$ extends F${propertyReference(){return{entity_type:this.propertyEntityType,entity_id:this.id}}async properties($){let{properties:O}=Q(await this.client.properties.getEntityProperties({path:{entity_type:this.propertyEntityType,entity_id:this.id},query:$?.includeMetadata!==void 0?{include_metadata:$.includeMetadata}:void 0}));return O}async setProperty($,O){Q(await this.client.properties.setEntityProperty({path:{...this.propertyReference(),property_id:$.id},body:{value:O??null}}))}async updatePropertyOptions($){return Q(await this.client.properties.bulkUpdateEntityPropertyOptions({path:this.propertyReference(),body:{properties:$.map((O)=>({property_id:O.property.id,...O.add?{add_option_ids:O.add.map((j)=>j.id)}:{},...O.remove?{remove_option_ids:O.remove.map((j)=>j.id)}:{}}))}}))}async deleteProperty($){Q(await this.client.properties.deleteEntityProperty({path:{entity_property_id:$.property.id}}))}}function l$($,O){return`<${$}>${JSON.stringify(O)}</${$}>`}function H6($){return typeof $==="object"&&$!==null&&typeof $.toMention==="function"}var R6={toMention:()=>({tag:l$("m-group-mention",{groupAlias:"here"}),mention:{entity_type:"group",entity_id:"here"}})};function D6($,...O){let j="",x=[];for(let[S,K]of $.entries()){j+=K;let Z=O[S];if(Z===void 0)continue;if(H6(Z)){let X=Z.toMention();j+=X.tag,x.push(X.mention)}else j+=String(Z)}return{content:j,mentions:C6(x)}}function C6($){let O=new Set;return $.filter((j)=>{let x=`${j.entity_type}:${j.entity_id}`;if(O.has(x))return!1;return O.add(x),!0})}function $$($){return typeof $==="string"?{content:$,mentions:[]}:$}class W$ extends A{static byId($,O){return new W$($,O)}static from($,O){return new W$($,O.id,O)}async fetch(){let $=Q(await this.client.storage.listHarnesses()).find((O)=>O.id===this.id);if(!$)throw new w(`Harness ${this.id} is unavailable`);return $}name=this.field("name");connected=this.field("connected");kind=this.field("kind");async delete(){await this.mutate(($)=>$.storage.deleteHarness({path:{harness_id:this.id}}))}}class U$ extends A{static byId($,O){return new U$($,O)}static from($,O){return new U$($,O.bot.id,O)}async fetch(){let $=Q(await this.client.storage.listAgents()).find((O)=>O.bot.id===this.id);if(!$)throw new w(`Agent ${this.id} is unavailable`);return $}name=this.mappedField("bot",($)=>$.name);instructions=this.field("instructions");defaultModel=this.field("default_model");channels=this.mappedField("channel_ids",($)=>$.map((O)=>f.byId(this.client,O)));host=this.mappedField("harness_id",($)=>$?W$.byId(this.client,$):void 0);async update($){await this.mutate((O)=>O.storage.updateAgent({path:{agent_id:this.id},body:Fx($)}))}}function Fx($){let{channels:O,team:j,host:x,autoAcceptPermissions:S,avatarUrl:K,channelScope:Z,defaultModel:X,isCoding:G,...L}=$;return{...L,channel_ids:O?.map((Y)=>Y.id),team_id:j?.id,harness_id:x?.id,auto_accept_permissions:S,avatar_url:K,channel_scope:Z,default_model:X,is_coding:G}}async function Xj($,O,j){let{channelId:x,thread:S}=_6(O);if(await M6($)){let{id:Z}=Q(await $.storage.entityMessageCreate({path:{parent_type:"channel",parent_id:x},body:{content:j.content,mentions:j.mentions,attachments:[],thread_id:S?.rootId??null,nonce:crypto.randomUUID()}}));return Z}if(S)throw new b("a user-owned bot can only post via the channel webhook endpoint, which "+"does not support threads — use a team-owned bot, or requestedAs(user), "+"to reply in a thread");let{message_id:K}=Q(await $.storage.postChannelBotWebhook({path:{channel_id:x},body:{content:j.content},headers:{"x-macro-bot-scope":"user"}}));return K}function _6($){return"rootId"in $?{channelId:$.channelId,thread:$}:{channelId:$.id}}async function M6($){if($.authConfig.type!=="bot"||$.hasActingUser())return!0;let{owner:O}=await $.selfBot();return O?.type==="team"}class g${client;channelId;rootId;constructor($,O,j){this.client=$;this.channelId=O;this.rootId=j}toJSON(){return{channelId:this.channelId,rootId:this.rootId}}channel(){return f.byId(this.client,this.channelId)}root(){return e.byId(this.client,this.channelId,this.rootId)}async replies(){let{replies:$}=Q(await this.client.storage.entityMessageGetThread({path:{parent_type:"channel",parent_id:this.channelId,id:this.rootId}}));return $.map((O)=>e.from(this.client,this.channelId,O))}async reply($){let O=await Xj(this.client,this,$$($));return e.byId(this.client,this.channelId,O)}}class e extends F${channelId;mentions;entityType="channel_message";constructor($,O,j,x=[],S){super($,j,S);this.channelId=O;this.mentions=x}get path(){return{parent_type:"channel",parent_id:this.channelId,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j,x=[]){return new e($,O,j,x)}static from($,O,j){return new e($,O,j.id,j.mentions,j)}content=this.field("content");createdAt=this.field("created_at");editedAt=this.field("edited_at");updatedAt=this.field("updated_at");async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}channel(){return f.byId(this.client,this.channelId)}thread(){return new g$(this.client,this.channelId,this.id)}async react($){return await this.mutate((O)=>O.storage.entityMessageReact({path:this.path,body:{add:!0,emoji:$}})),this}async unreact($){return await this.mutate((O)=>O.storage.entityMessageReact({path:this.path,body:{add:!1,emoji:$}})),this}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}async reply($){return this.thread().reply($)}}class Gj{client;channel;record;constructor($,O,j){this.client=$;this.channel=O;this.record=j}agent(){return U$.byId(this.client,this.record.botId)}sessions(){return this.record.sessions.map(($)=>({session:i.byId(this.client,$.sessionId),isCurrent:$.isCurrent,createdAt:$.createdAt}))}turns(){return this.record.turns.map(($)=>new Ex(this.client,this,$))}async startFresh($){Q(await this.client.agentHarness.startFreshAgentConversation({path:{channel_id:this.channel.id,bot_id:this.record.botId},body:{sessionId:$.id}}))}toJSON(){return{channelId:this.channel.id,agentId:this.record.botId}}}class Ex{client;conversation;record;constructor($,O,j){this.client=$;this.conversation=O;this.record=j}source(){return e.byId(this.client,this.conversation.channel.id,this.record.sourceMessageId)}session(){return i.byId(this.client,this.record.sessionId)}async retry($){Q(await this.client.agentHarness.retryAgentConversationTurn({path:{channel_id:this.conversation.channel.id,bot_id:this.conversation.agent().id,source:this.record.sourceMessageId},body:{actionId:$}}))}toJSON(){return{channelId:this.conversation.channel.id,sourceMessageId:this.record.sourceMessageId}}}class B$ extends A{parent;toJSON(){return{...super.toJSON(),parentType:this.parent.type,parentId:this.parent.entity.id}}constructor($,O,j){super($,j);this.parent=O}static byId($,O,j){return new B$($,O,j)}get path(){return{parent_type:this.parent.type,parent_id:this.parent.entity.id,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetThread({path:this.path})).state}resolved=this.field("resolved");async update($){let O={resolved:$.resolved,detach_anchor:$.detachAnchor,nonce:$.nonce};await this.mutate((j)=>j.storage.entityMessagePatchThread({path:this.path,body:O}))}async delete($){await this.mutate((O)=>O.storage.entityMessageDeleteThread({path:this.path,query:{nonce:$}}))}}async function E$($,O,j,x){for(let K of[...x?.messages??[],...x?.around?[x.around]:[]]){let Z="channelId"in K?{type:"channel",id:K.channelId}:("documentId"in K)?{type:"document",id:K.documentId}:("callId"in K)?{type:"call",id:K.callId}:K.parent;if(Z.type!==O.type||Z.id!==O.entity.id)throw Error("Timeline message belongs to another resource")}let S=Q(await $.storage.messageTimelineEntries({path:{parent_type:O.type,parent_id:O.entity.id},query:{selection:x?JSON.stringify({cursor:x.cursor,around:x.around?.id,ids:x.messages?.map((K)=>K.id),activity_after:x.activityAfter,activity_before:x.activityBefore,anchored:x.anchored,direction:x.direction,include_deleted_threads:x.includeDeletedThreads,limit:x.limit}):void 0}}));return{entries:S.entries.map((K)=>{if(K.type==="activity")return{type:"activity",activity:{...K.activity,actor:M.byId($,K.activity.actor_id)}};return{type:"message",message:j(K.message)}}),nextCursor:S.next_cursor??void 0,previousCursor:S.previous_cursor??void 0}}var A6=50;function j$($){let{filters:O,type:j,make:x,includeCrm:S}=$;return(K,Z,X)=>{let G=X?.searchOn??"name_content",L=X?.pageSize??A6;return a(async(Y)=>{let{results:J,next_cursor:T}=Q(await K.search.unifiedSearch({body:{query:Z,match_type:"partial",search_on:G,...O?{filters:O}:{},...S?{include_crm:!0}:{}},query:{page_size:L,...Y?{cursor:Y}:{}}}));return{items:J.filter((W)=>W.type===j).map((W)=>x(K,W)),nextCursor:T}})}}class ZO{client;channel;record;constructor($,O,j){this.client=$;this.channel=O;this.record=j}get id(){return this.record.id}user(){return M.byId(this.client,this.record.user_id)}createdAt(){return this.record.created_at}async recordInteraction($){return new ZO(this.client,this.channel,Q(await this.client.storage.postActivity({body:{activity_type:$,channel_id:this.channel.id}})))}toJSON(){return this.record}}class f extends S${async recordActivity($){return new ZO(this.client,this,Q(await this.client.storage.postActivity({body:{activity_type:$,channel_id:this.id}})))}async setPicture($){await this.mutate((O)=>O.storage.setChannelPicture({path:{channel_id:this.id},body:{profile_picture_id:$?.id??null}}))}messageThreadById($){return B$.byId(this.client,{type:"channel",entity:this},$)}timelinePage($){return E$(this.client,{type:"channel",entity:this},(O)=>e.from(this.client,this.id,O),$)}async agentConversations(){return Q(await this.client.agentHarness.listAgentConversations({path:{channel_id:this.id}})).conversations.map(($)=>new Gj(this.client,this,$))}entityType="channel";propertyEntityType="CHANNEL";async fetch(){return Q(await this.client.storage.getChannel({path:{channel_id:this.id}}))}static byId($,O){return new f($,O)}static async dm($,O){let{channel_id:j}=Q(await $.storage.getOrCreateDm({body:{recipient_id:O.id}}));return new f($,j)}static async private($,O){let{channel_id:j}=Q(await $.storage.getOrCreatePrivate({body:{recipients:O.map((x)=>x.id)}}));return new f($,j)}static async create($,O){let{id:j}=Q(await $.storage.createChannel({body:{channel_type:O.type,name:O.name??null,participants:(O.participants??[]).map((x)=>x.id),team_id:O.team?.id??null}}));return new f($,j)}name=this.field("channel_name");type=this.field("channel_type");async send($,O){let j=await Xj(this.client,O?.thread??this,$$($));return e.byId(this.client,this.id,j)}messages($){return this.timeline({limit:$?.pageSize})}messagesAfter($,O){return this.timeline({activity_after:$ instanceof Date?$.toISOString():$,limit:O?.pageSize})}timeline($){return a(async(O)=>{let j=Q(await this.client.storage.messageTimeline({path:{parent_type:"channel",parent_id:this.id},query:{selection:JSON.stringify({...$,cursor:O})}}));return{items:j.items.map((x)=>e.from(this.client,this.id,x)),nextCursor:j.next_cursor}})}message($){return e.byId(this.client,this.id,$)}async rename($){await this.mutate((O)=>O.storage.patchChannel({path:{channel_id:this.id},body:{channel_name:$}}))}async delete(){await this.mutate(($)=>$.storage.deleteChannel({path:{channel_id:this.id}}))}async join(){await this.mutate(($)=>$.storage.joinChannel({path:{channel_id:this.id}}))}async joinCode(){let{join_code:$}=Q(await this.client.storage.getChannelJoinLink({path:{channel_id:this.id}}));return $}async leave(){await this.mutate(($)=>$.storage.leaveChannel({path:{channel_id:this.id}}))}async participants(){return Q(await this.client.storage.getChannelParticipants({path:{channel_id:this.id}}))}async addParticipants($){await this.mutate((O)=>O.storage.addParticipants({path:{channel_id:this.id},body:{participants:$.map((j)=>j.id)}}))}async removeParticipants($){await this.mutate((O)=>O.storage.removeParticipants({path:{channel_id:this.id},body:{participants:$.map((j)=>j.id)}}))}async typing($,O){Q(await this.client.storage.entityMessageTyping({path:{parent_type:"channel",parent_id:this.id},body:{active:$==="start",thread_id:O?.thread?.rootId??null}}))}attachments($){return a(async(O)=>{let j=Q(await this.client.storage.getChannelAttachments({path:{channel_id:this.id},query:{...$?.pageSize?{limit:$.pageSize}:{},...$?.type?{attachment_type:$.type}:{},...O?{cursor:O}:{}}}));return{items:j.items,nextCursor:j.next_cursor}})}webUrl(){return`${this.client.webAppUrl}/app/channel/${this.id}`}static search=j$({type:"channel",make:($,O)=>new f($,O.channel_id)})}class M extends S${entityType="user";propertyEntityType="USER";async fetch(){let{names:$}=Q(await this.client.auth.getUserNamesWithEmail({body:{user_ids:[this.id]}})),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`user ${this.id} not found`);return O}static byId($,O){return new M($,O)}static async me($){let{user_id:O}=Q(await $.auth.getUserInfo());return new M($,O)}async name(){let $=await this.detail.get();return[$.first_name,$.last_name].filter(Boolean).join(" ")||void 0}email(){let $=this.id.startsWith("macro|")?this.id.slice(6):void 0;return $?.includes("@")?$:void 0}dm(){return f.dm(this.client,this)}toMention(){return{tag:l$("m-user-mention",{userId:this.id}),mention:{entity_type:"user",entity_id:this.id}}}}class o{client;entityType;entity;constructor($,O,j){this.client=$;this.entityType=O;this.entity=j}get path(){return{entity_type:this.entityType,entity_id:this.entity.id}}async state($){let O=Q(await this.client.storage.accessRequestsState({path:this.path,query:{offset:$}}));return{accessLevel:O.accessLevel??void 0,canReview:O.canReview,owner:O.owner?M.byId(this.client,O.owner):void 0,pendingCount:O.pendingCount,supportedLevels:O.supportedLevels,nextOffset:O.nextOffset??void 0,mine:O.mine?WO.from(this.client,this,O.mine):void 0,requests:O.requests.map((j)=>WO.from(this.client,this,j))}}async submit($,O){return WO.from(this.client,this,Q(await this.client.storage.accessRequestsSubmit({path:this.path,body:{requestedLevel:$,revision:O}})))}async cancel($){Q(await this.client.storage.accessRequestsCancel({path:this.path,query:{revision:$}}))}async direct(){return Q(await this.client.storage.accessRequestsDirect({path:this.path})).map(($)=>({user:M.byId(this.client,$.userId),accessLevel:$.accessLevel}))}async grant($,O){Q(await this.client.storage.accessRequestsSetDirect({path:{...this.path,user_id:$.id},body:{accessLevel:O}}))}async remove($){Q(await this.client.storage.accessRequestsRemoveDirect({path:{...this.path,user_id:$.id}}))}async resolve($,O){let j=$.access.toJSON();if(j.entity_type!==this.entityType||j.entity_id!==this.entity.id)throw Error("Access request belongs to another entity");return Q(await this.client.storage.accessRequestsResolve({path:{...this.path,request_id:$.id},body:O}))}toJSON(){return this.path}}class WO extends A{access;resolvedRecord;constructor($,O,j){super($,j.id,j);this.access=O}static from($,O,j){return new WO($,O,j)}async fetch(){if(this.resolvedRecord)return this.resolvedRecord;let $;do{let O=await this.access.state($),j=[O.mine,...O.requests].find((x)=>x?.id===this.id);if(j)return j.detail.get();$=O.nextOffset}while($!==void 0);throw new w(`Access request ${this.id} is unavailable`)}revision=this.field("revision");status=this.field("status");requestedLevel=this.field("requestedLevel");requester=this.mappedField("requesterId",($)=>M.byId(this.client,$));async resolve($){this.resolvedRecord=await this.access.resolve(this,{revision:await this.revision(),grantedLevel:$}),this.detail.clear()}}function r$($){return{...$,channelSharePermissions:$.channelSharePermissions===void 0||$.channelSharePermissions===null?$.channelSharePermissions:$.channelSharePermissions.map((O)=>({channelId:O.channel.id,accessLevel:O.accessLevel,operation:O.operation}))}}class L$ extends A{parent;constructor($,O,j,x){super($,j,x);this.parent=O}static byId($,O,j){return new L$($,O,j)}static fromRecord($,O,j){return new L$($,O,j.id,j)}static async create($,O,j){return L$.createForSession($,O.session(),j,O)}static async createForSession($,O,j,x){let S=Q(await $.agentHarness.createSessionReview({path:{session_id:O.id},body:{...j,executionId:x?.id??null}}));return L$.fromRecord($,O,S)}static async list($,O){return Q(await $.agentHarness.listExecutionReviews({path:{session_id:O.session().id,execution_id:O.id}})).map((x)=>L$.fromRecord($,O.session(),x))}async fetch(){return Q(await this.client.agentHarness.getSessionReview({path:{session_id:this.parent.id,review_id:this.id}}))}title=this.field("title");kind=this.field("kind");session(){return this.parent}async reference(){return{kind:await this.kind(),id:this.id}}async items(){return(await this.detail.get()).items.map(($)=>new wx($,{edit:(O)=>this.decide({action:"edit",item:$.id,draft:O}),submit:()=>this.decide({action:"submit",items:[$.id]}),dismiss:()=>this.decide({action:"dismiss",items:[$.id]})}))}async refresh(){return this.detail.clear(),await this.detail.get(),this}async submitAll(){await this.decide({action:"submit",items:[]})}async dismissAll(){await this.decide({action:"dismiss",items:[]})}async decide($){let O=(await this.detail.get()).revision;await this.mutate((j)=>j.agentHarness.decideSessionReview({path:{session_id:this.parent.id,review_id:this.id},body:{...$,revision:O}}))}}class wx{snapshot;actions;constructor($,O){this.snapshot=$;this.actions=O}get id(){return this.snapshot.id}get status(){return this.snapshot.status}get draft(){return this.snapshot.draft}get result(){return this.snapshot.result}async edit($){await this.actions.edit($)}async submit(){await this.actions.submit()}async dismiss(){await this.actions.dismiss()}}class kO extends A{parent;constructor($,O,j){super($,O);this.parent=j}static byId($,O,j){return new kO($,j,O)}async fetch(){return Q(await this.client.agentHarness.getCodeExecution({path:{session_id:this.parent.id,execution_id:this.id}}))}reviews={create:($)=>L$.create(this.client,this,$),list:()=>L$.list(this.client,this)};session(){return this.parent}status=this.field("status");source=this.field("source");calls=this.field("calls");error=this.field("error");async result(){return(await this.detail.get()).result}async refresh(){return this.detail.clear(),await this.detail.get(),this}}class Kj{client;sessionId;dto;constructor($,O,j){this.client=$;this.sessionId=O;this.dto=j}static from($,O,j){return new Kj($,O,j)}get actionId(){return this.dto.actionId}get kind(){return this.dto.kind}get prompt(){return this.dto.prompt??void 0}get attachments(){return this.dto.attachments??[]}get actorUserId(){return this.dto.actorUserId??void 0}get createdAt(){return this.dto.createdAt}async edit($){return Q(await this.client.agentHarness.editQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId},body:{prompt:$}})),this.dto={...this.dto,prompt:$},this}async steer(){Q(await this.client.agentHarness.steerQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId}}))}async remove(){Q(await this.client.agentHarness.removeQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId}}))}}class gO{client;session;id;constructor($,O,j){this.client=$;this.session=O;this.id=j}static byId($,O,j){return new gO($,O,j)}async answer($){return Q(await this.client.agentHarness.answerAgentSessionToolApproval({path:{session_id:this.session.id,approval_id:this.id},body:{answer:$}}))}toJSON(){return{id:this.id,sessionId:this.session.id}}}class i extends A{access=new o(this.client,"agent_session",this);toolApprovalById($){return gO.byId(this.client,this,$)}async sharePermissions(){return Q(await this.client.agentHarness.getAgentSessionPermissions({path:{session_id:this.id}}))}async updateSharePermissions($){return this.mutate((O)=>O.agentHarness.updateAgentSessionPermissions({path:{session_id:this.id},body:r$($)}))}static byId($,O){return new i($,O)}static async createManaged($,O){let{session:j}=Q(await $.agentHarness.createAgentSession({body:{prompt:O?.prompt,instructions:O?.instructions,model:O?.model,repoUrl:O?.repoUrl,repoBranch:O?.repoBranch}}));return new i($,j.id,j)}static async repositories($){let{repositories:O}=Q(await $.agentHarness.listAgentRepositories());return O.map((j)=>({url:j.url,defaultBranch:j.defaultBranch??void 0}))}static async repositoryBranches($,O){let{branches:j}=Q(await $.agentHarness.listAgentRepositoryBranches({query:{repoUrl:O}}));return j}async fetch(){return Q(await this.client.agentHarness.getAgentSession({path:{session_id:this.id}}))}name=this.field("name");isArchived=this.field("isArchived");model=this.field("model");harness=this.field("harness");repoUrl=this.field("repoUrl");workspace=this.field("workspace");instructions=this.field("instructions");status=this.field("status");sandboxSize=this.field("sandboxSize");createdAt=this.field("createdAt");modifiedAt=this.field("modifiedAt");static async forPullRequest($,O){let{sessionIds:j}=Q(await $.agentHarness.agentSessionsForPullRequest({body:{url:O}}));return j.map((x)=>i.byId($,x))}async pullRequests(){let{pullRequests:$}=Q(await this.client.agentHarness.listAgentSessionPullRequests({path:{session_id:this.id}}));return $.map((O)=>({githubKey:O.githubKey,url:O.url,source:O.source,linkedBy:O.linkedBy?M.byId(this.client,O.linkedBy):void 0,createdAt:O.createdAt}))}async linkPullRequest($){Q(await this.client.agentHarness.linkAgentSessionPullRequest({path:{session_id:this.id},body:{url:$}}))}async unlinkPullRequest($){Q(await this.client.agentHarness.unlinkAgentSessionPullRequest({path:{session_id:this.id},query:{url:$}}))}async rename($){await this.mutate((O)=>O.agentHarness.renameAgentSession({path:{session_id:this.id},body:{name:$}}))}async archive(){await this.setArchived(!0)}async unarchive(){await this.setArchived(!1)}async setArchived($){await this.mutate((O)=>O.agentHarness.setAgentSessionArchived({path:{session_id:this.id},body:{isArchived:$}}))}async setSandboxSize($){let{size:O}=await this.mutate((j)=>j.agentHarness.putAgentSessionSandboxSize({path:{session_id:this.id},body:{size:$}}));return O}static async defaultSandboxSize($){return Q(await $.agentHarness.getAgentSandboxSize()).size}static async setDefaultSandboxSize($,O){return Q(await $.agentHarness.putAgentSandboxSize({body:{size:O}})).size}static async codingPreferences($){return Q(await $.agentHarness.getAgentCodingPreferences())}static async setCodingPreferences($,O){return Q(await $.agentHarness.putAgentCodingPreferences({body:O}))}async control($){return this.mutate((O)=>O.agentHarness.controlAgentSession({path:{session_id:this.id},body:$}))}prompt($,O){return this.control({type:"prompt",prompt:$,...O&&O.length>0?{attachments:O}:{}})}async queue(){let{entries:$}=Q(await this.client.agentHarness.getAgentSessionQueue({path:{session_id:this.id}}));return $.map((O)=>Kj.from(this.client,this.id,O))}async changes(){return Q(await this.client.agentHarness.getAgentSessionChanges({path:{session_id:this.id}}))}async changesPatch(){return Q(await this.client.agentHarness.getAgentSessionChangesPatch({path:{session_id:this.id}})).patch}async refreshChanges(){return this.mutate(($)=>$.agentHarness.refreshAgentSessionChanges({path:{session_id:this.id}}))}async foldedLog(){let{bot:$,messages:O}=Q(await this.client.agentHarness.getAgentSessionFoldedLog({path:{session_id:this.id}}));return{bot:$,messages:O}}async log(){return Q(await this.client.agentHarness.getAgentSessionLog({path:{session_id:this.id}}))}reviews={create:($)=>L$.createForSession(this.client,this,$),byId:($)=>L$.byId(this.client,this,$)};codeExecutions={byId:($)=>kO.byId(this.client,this,$)};async delete(){await this.mutate(($)=>$.agentHarness.deleteAgentSession({path:{session_id:this.id}}))}}class qx{client;constructor($){this.client=$}byId($){return i.byId(this.client,$)}createManaged($){return i.createManaged(this.client,$)}repositories(){return i.repositories(this.client)}repositoryBranches($){return i.repositoryBranches(this.client,$)}forPullRequest($){return i.forPullRequest(this.client,$)}defaultSandboxSize(){return i.defaultSandboxSize(this.client)}setDefaultSandboxSize($){return i.setDefaultSandboxSize(this.client,$)}codingPreferences(){return i.codingPreferences(this.client)}setCodingPreferences($){return i.setCodingPreferences(this.client,$)}}class fx{client;constructor($){this.client=$}byId($){return U$.byId(this.client,$)}async list(){return Q(await this.client.storage.listAgents()).map(($)=>U$.from(this.client,$))}async create($){return U$.from(this.client,Q(await this.client.storage.createAgent({body:Fx($)})))}}class bx{client;async usage($={}){let{users:O,...j}=$;return Q(await this.client.cognition.getUsageHandler({body:{...j,include_users:O?.map((x)=>x.id)}}))}constructor($){this.client=$}async structuredCompletion($){return Q(await this.client.cognition.structuredCompletion({body:$}))}async decide($){return Q(await this.client.cognition.decisions({body:$}))}}class p$ extends A{static byId($,O){return new p$($,O)}static from($,O){return new p$($,O.id,{id:O.id,name:O.name,createdAt:O.createdAt})}async fetch(){let $=Q(await this.client.storage.listUserApiKeys()).keys.find((O)=>O.id===this.id);if(!$)throw new w(`API key ${this.id} is unavailable`);return $}name=this.field("name");createdAt=this.field("createdAt");async delete(){await this.mutate(($)=>$.storage.deleteUserApiKey({path:{id:this.id}}))}}class kx{client;constructor($){this.client=$}byId($){return p$.byId(this.client,$)}async list(){return Q(await this.client.storage.listUserApiKeys()).keys.map(($)=>p$.from(this.client,$))}async create($){let O=Q(await this.client.storage.createUserApiKey({body:{name:$}}));return{key:p$.from(this.client,O),secret:O.key}}async tokenForEmail($){return Q(await this.client.auth.macroApiToken({query:{email:$}}))}}class yO{client;constructor($){this.client=$}async me(){if(this.client.authConfig.type!=="bot")throw new b("bots.me() requires bot auth — a user API key has no bot identity");return Q(await this.client.storage.getSelfBot())}async channels(){if(this.client.authConfig.type!=="bot")throw new b("bots.channels() requires bot auth — a user API key has no bot identity");let $=await this.me();return Q(await this.client.storage.listBotChannels({path:{bot_id:$.id}}))}async myPrincipalId(){if(this.client.authConfig.type!=="bot")throw new b("bots.myPrincipalId() requires bot auth — a user API key has no bot identity");return this.client.myPrincipalId()}}class z$ extends A{async fetch(){let{links:$}=Q(await this.client.email.listLinks()),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`email link ${this.id} not found`);return O}static byId($,O){return new z$($,O)}static async list($){let{links:O}=Q(await $.email.listLinks());return O.map((j)=>new z$($,j.id,j))}emailAddress=this.field("email_address");provider=this.field("provider");isPrimary=this.field("is_primary");isSyncActive=this.field("is_sync_active");syncStatus=this.field("sync_status");needsReauth=this.field("needs_reauth");photoUrl=this.field("photo_url");async settingsOperations(){return Q(await this.client.email.mailboxSettingsOperations({headers:{"X-Email-Link-Id":this.id}}))}}class y$ extends A{async setContributesToAvailability($){await this.mutate((O)=>O.calendar.setAvailabilityCalendar({path:{calendar_id:this.id},body:{contributesToAvailability:$}}))}async fetch(){let{calendars:$}=Q(await this.client.calendar.listCalendars()),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`calendar ${this.id} not found`);return O}static byId($,O){return new y$($,O)}static async list($){let{calendars:O}=Q(await $.calendar.listCalendars());return O.map((j)=>new y$($,j.id,j))}name=this.field("name");emailAddress=this.field("emailAddress");isPrimary=this.field("isPrimary");isWritable=this.field("isWritable");isSubscription=this.field("isSubscription");color=this.field("color");syncError=this.field("syncError");emailLink=this.mappedField("emailLinkId",($)=>z$.byId(this.client,$))}class vO{client;id;constructor($,O){this.client=$;this.id=O}async status(){return Q(await this.client.calendar.calendarReplacementStatus({path:{operation_id:this.id}}))}async confirm(){return Q(await this.client.calendar.confirmCalendarReplacement({path:{operation_id:this.id}}))}async discard(){Q(await this.client.calendar.discardCalendarReplacement({path:{operation_id:this.id}}))}}class K$ extends A{async fetch(){throw new b(`calendar event ${this.id} has no fetch-by-id endpoint; read the record returned by calendar.createEvent / event.update / event.rsvp instead`)}static byId($,O){return new K$($,O)}static fromRecord($,O){return new K$($,O.id,O)}title=this.field("title");description=this.field("description");location=this.field("location");time=this.field("time");status=this.field("status");attendees=this.field("attendees");transparency=this.field("transparency");isReadOnly=this.field("isReadOnly");recurrenceLines=this.field("recurrenceLines");guestPolicy=this.field("guestPolicy");viewerCan=this.field("viewerCan");calendar=this.mappedField("calendarId",($)=>$?y$.byId(this.client,$):void 0);record(){return this.detail.get()}async update($){let O=await this.mutate((j)=>j.calendar.updateCalendarEvent({path:{event_id:this.id},body:P6($)}));return K$.fromRecord(this.client,O)}async delete($={}){await this.mutate((O)=>O.calendar.deleteCalendarEvent({path:{event_id:this.id},query:{calendarId:$.calendar?.id,scope:$.scope,recurrenceId:$.recurrenceId}}))}async prepareReplacement($){let O=Q(await this.client.calendar.prepareCalendarReplacement({path:{event_id:this.id},body:{removeConference:$.removeConference,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return new vO(this.client,O.operationId)}async providerUrl($={}){return Q(await this.client.calendar.calendarEventProviderUrl({path:{event_id:this.id},query:{recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}})).url??void 0}async inviteGuests($){let O=await this.mutate((j)=>j.calendar.inviteCalendarEventGuests({path:{event_id:this.id},body:{guests:$.guests,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return K$.fromRecord(this.client,O)}async addToCalendar($={}){let O=await this.mutate((j)=>j.calendar.copyCalendarEvent({path:{event_id:this.id},body:{calendarId:$.calendar?.id}}));return K$.fromRecord(this.client,O)}async ics(){return Q(await this.client.storage.eventIcs({path:{event_id:this.id}}))}async rsvp($){let O=await this.mutate((j)=>j.calendar.rsvpCalendarEvent({path:{event_id:this.id},body:{response:$.response,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return K$.fromRecord(this.client,O)}}function P6($){return{title:$.title,description:$.description,location:$.location,time:$.time,attendees:$.attendees,recurrenceLines:$.recurrenceLines,visibility:$.visibility,transparency:$.transparency,reminders:$.reminders,conference:$.conference,outOfOffice:$.outOfOffice,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}class gx{client;async availabilityCalendars(){return Q(await this.client.calendar.getAvailabilityCalendars()).calendars.map(($)=>({calendar:y$.byId(this.client,$.calendarId),name:$.name,isPrimary:$.isPrimary,contributesToAvailability:$.contributesToAvailability}))}async teamSharing(){return Q(await this.client.calendar.getTeamSharing()).sharing}async setTeamSharing($){return Q(await this.client.calendar.setTeamSharing({body:{sharing:$}})).sharing}occurrences($){return a(async(O)=>{let j=Q(await this.client.storage.listOccurrences({query:{...$,cursor:O}}));return{items:j.items.map((x)=>({event:K$.fromRecord(this.client,x.event),occurrence:x.occurrence})),nextCursor:j.nextCursor}})}async teamPage($){let O=Q(await this.client.storage.listTeamCalendar({query:$}));return{items:O.items.map(({ownerId:j,...x})=>({...x,owner:M.byId(this.client,j)})),members:O.members.map((j)=>({user:M.byId(this.client,j.userId),sharing:j.sharing,coverage:j.coverage})),nextCursor:O.nextCursor??void 0}}async teamOutOfOffice($){let O=Q(await this.client.storage.listTeamOutOfOffice({query:$}));return{items:O.items.map((j)=>({event:K$.byId(this.client,j.eventId),owner:M.byId(this.client,j.ownerId),occurrenceKey:j.occurrenceKey,time:j.time,title:j.title??void 0})),hasMore:O.hasMore}}constructor($){this.client=$}calendars(){return y$.list(this.client)}calendar($){return y$.byId(this.client,$)}event($){return K$.byId(this.client,$)}replacement($){return new vO(this.client,$)}async createEvent($){let O=Q(await this.client.calendar.createCalendarEvent({body:F6($)}));return K$.fromRecord(this.client,O)}}function F6($){return{title:$.title,time:$.time,description:$.description,location:$.location,attendees:$.attendees,recurrenceLines:$.recurrenceLines,visibility:$.visibility,transparency:$.transparency,reminders:$.reminders,conference:$.conference,macroCall:$.macroCall,outOfOffice:$.outOfOffice,calendarId:$.calendar?.id,emailLinkId:$.emailLink?.id}}class I$ extends A{lookupToken;constructor($,O,j){super($,O,j);this.lookupToken=j?.shareToken}static byId($,O){return new I$($,O)}static from($,O){return new I$($,O.id,O)}async fetch(){if(this.lookupToken)return Q(await this.client.storage.meetingLookup({path:{token:this.lookupToken}}));let $=Q(await this.client.storage.meetingList()).meetings.find((O)=>O.id===this.id);if(!$)throw new w(`Meeting ${this.id} is unavailable`);return this.lookupToken=$.shareToken,$}title=this.field("title");scheduledStart=this.field("scheduledStart");scheduledEnd=this.field("scheduledEnd");channel=this.mappedField("channelId",($)=>$?f.byId(this.client,$):void 0);call=this.mappedField("callId",($)=>$?Y$.byId(this.client,$):void 0);async update($){await this.mutate((O)=>O.storage.meetingUpdate({path:{meeting_id:this.id},body:$}))}async cancel(){await this.mutate(($)=>$.storage.meetingCancel({path:{meeting_id:this.id}}))}async invitePermissions(){return Q(await this.client.storage.meetingInvitePermissions({path:{token:(await this.detail.get()).shareToken}}))}async invite($){Q(await this.client.storage.meetingInvite({path:{token:(await this.detail.get()).shareToken},body:{email:$}}))}async inviteUsers($){Q(await this.client.storage.meetingInviteUsers({path:{token:(await this.detail.get()).shareToken},body:{userIds:$.map((O)=>O.id)}}))}async webUrl(){return`${this.client.webAppUrl}/app/meet/join/${encodeURIComponent((await this.detail.get()).shareToken)}`}}class v$ extends A{callId;constructor($,O,j,x){super($,j,x);this.callId=O}get path(){return{parent_type:"call",parent_id:this.callId,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new v$($,O,j)}static from($,O,j){return new v$($,O,j.id,j)}content=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");call(){return Y$.byId(this.client,this.callId)}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){let O=Q(await this.client.storage.entityMessageCreate({path:{parent_type:"call",parent_id:this.callId},body:{...$$($),thread_id:this.callId}}));return v$.from(this.client,this.callId,O)}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}class Y$ extends F${messageThreadById($){return B$.byId(this.client,{type:"call",entity:this},$)}timelinePage($){return E$(this.client,{type:"call",entity:this},(O)=>v$.from(this.client,this.id,O),$)}access=new o(this.client,"call",this);async meeting(){return I$.from(this.client,Q(await this.client.storage.meetingShare({path:{call_id:this.id}})))}async editTranscript($){await this.mutate((O)=>O.storage.editCallTranscript({path:{call_id:this.id},body:{assignments:$}}))}async toggleTeamShare(){return this.mutate(($)=>$.storage.toggleShareWithTeam({path:{call_id:this.id}}))}entityType="call";async fetch(){return Q(await this.client.storage.getCallRecord({path:{call_id:this.id}}))}static byId($,O){return new Y$($,O)}message($){return v$.byId(this.client,this.id,$)}name=this.field("customName");channel=this.mappedField("channelId",($)=>$?f.byId(this.client,$):void 0);channelName=this.field("channelName");creator=this.mappedField("createdBy",($)=>M.byId(this.client,$));isActive=this.field("isActive");status=this.field("status");roomName=this.field("roomName");startedAt=this.field("startedAt");endedAt=this.field("endedAt");durationMs=this.field("durationMs");summary=this.field("summary");transcript=this.field("transcript");participants=this.field("participants");guests=this.field("guests");teamShareAccessLevel=this.field("teamShareAccessLevel");shareWithTeam=this.field("shareWithTeam");recordingUrl=this.field("recordingUrl");recordingPreviewUrl=this.field("recordingPreviewUrl");recordingStartedAt=this.field("recordingStartedAt");async rename($){await this.mutate((O)=>O.storage.editCallRecord({path:{call_id:this.id},body:{customName:$??""}}))}async setTeamShare($){await this.mutate((O)=>O.storage.editCallRecord({path:{call_id:this.id},body:{sharePermission:{teamShareAccessLevel:$?"view":null}}}))}async delete(){await this.mutate(($)=>$.storage.deleteCallRecord({path:{call_id:this.id}}))}static search=j$({filters:{call_filters:{}},type:"call",make:($,O)=>new Y$($,O.call_id)})}class yx{client;constructor($){this.client=$}byId($){return Y$.byId(this.client,$)}search($,O){return Y$.search(this.client,$,O)}}class vx{client;constructor($){this.client=$}async list(){let{labels:$}=Q(await this.client.storage.listChannelLabels());return $}async create($,O=[]){return Q(await this.client.storage.createChannelLabel({body:{name:$,channelIds:O.map((j)=>j.id)}}))}async createSmartTag($,O){return Q(await this.client.storage.createChannelLabel({body:{name:$,rule:O}}))}async previewSmartTag($){return Q(await this.client.storage.previewSmartTag({body:$}))}async updateSmartTag($,O,j){return Q(await this.client.storage.renameChannelLabel({path:{label_id:$.id},body:{name:O,rule:j}}))}async rename($,O){return Q(await this.client.storage.renameChannelLabel({path:{label_id:$.id},body:{name:O}}))}async delete($){Q(await this.client.storage.deleteChannelLabel({path:{label_id:$.id}}))}async setLabel($,O){Q(await this.client.storage.setChannelLabel({path:{channel_id:$.id},body:{labelId:O?.id??null}}))}}class hx{client;async activity(){return Q(await this.client.storage.getActivity()).map(($)=>new ZO(this.client,f.byId(this.client,$.channel_id),$))}labels;constructor($){this.client=$;this.labels=new vx($)}byId($){return f.byId(this.client,$)}async dm($){return f.dm(this.client,$)}async private($){return f.private(this.client,$)}async create($){return f.create(this.client,$)}async list(){let{items:$}=Q(await this.client.storage.getChannels());return $.map((O)=>f.byId(this.client,O.id.toString()))}async*search($,O){if(!O?.searchOn||O.searchOn==="name"){let{items:j}=Q(await this.client.storage.getChannels()),x=$.toLowerCase();for(let S of j)if(S.name?.toLowerCase().includes(x))yield f.byId(this.client,S.id.toString())}else yield*f.search(this.client,$,O)}}class n extends S${async sharePermissions(){return Q(await this.client.storage.getProjectPermissionsV2({path:{id:this.id}}))}async accessLevel(){return Q(await this.client.storage.getProjectUserAccessLevel({path:{id:this.id}}))}access=new o(this.client,"project",this);entityType="project";propertyEntityType="PROJECT";async fetch(){let{data:$}=Q(await this.client.storage.getProjectHandler({path:{id:this.id}}));return $.projectMetadata}static byId($,O){return new n($,O)}static async create($,O){let{data:j}=Q(await $.storage.createProjectHandler({body:{name:O.name,projectParentId:O.parent?.id??null}}));return new n($,j.id,j)}name=this.field("name");parent=this.mappedField("parentId",($)=>$?n.byId(this.client,$):void 0);createdAt=this.field("createdAt");async items(){let{data:$}=Q(await this.client.storage.getProjectContentHandler({path:{id:this.id}}));return $.map((O)=>O.item)}async rename($){await this.mutate((O)=>O.storage.editProjectV2({path:{id:this.id},body:{name:$}}))}async delete($){await this.mutate((O)=>$?.permanent?O.storage.permanentlyDeleteProject({path:{id:this.id}}):O.storage.deleteProjectHandler({path:{id:this.id}}))}async restore(){await this.mutate(($)=>$.storage.revertDeleteProject({path:{id:this.id}}))}static search=j$({filters:{project_filters:{}},type:"project",make:($,O)=>new n($,O.id)})}class hO{client;chat;id;message;constructor($,O,j,x){this.client=$;this.chat=O;this.id=j;this.message=x}static byId($,O,j,x){return new hO($,O,j,x)}async stop(){Q(await this.client.cognition.stopChatStream({body:{chat_id:this.chat.id,stream_id:this.id}}))}toJSON(){return{id:this.id,chatId:this.chat.id,messageId:this.message.id}}}class mO extends A{chat;constructor($,O,j){super($,j);this.chat=O}static byId($,O,j){return new mO($,O,j)}async fetch(){let $=Q(await this.client.cognition.getChat({path:{chat_id:this.chat.id}})).chat.messages.find((O)=>O.id===this.id);if(!$)throw new w(`Chat message ${this.id} is not yet available`);return $}content=this.field("content");role=this.field("role");async refresh(){this.detail.clear(),await this.detail.get()}toJSON(){return{...super.toJSON(),chatId:this.chat.id}}}class Z$ extends S${async send($){let{attachments:O,additionalInstructions:j,...x}=$,S=await this.mutate((Z)=>Z.cognition.sendChatMessage({body:{...x,chat_id:this.id,additional_instructions:j,attachments:O?.map((X)=>({entity_id:X.entity.id,entity_type:X.type}))}})),K=Z$.byId(this.client,S.chat_id);return hO.byId(this.client,K,S.stream_id,mO.byId(this.client,K,S.message_id))}access=new o(this.client,"chat",this);entityType="chat";propertyEntityType="CHAT";async fetch(){let{chat:$}=Q(await this.client.cognition.getChat({path:{chat_id:this.id}}));return $}static byId($,O){return new Z$($,O)}static async create($,O){let{id:j}=Q(await $.cognition.createChat({body:{name:O?.name??null,projectId:O?.project?.id??null}}));return new Z$($,j)}name=this.field("name");model=this.field("model");project=this.mappedField("projectId",($)=>$?n.byId(this.client,$):void 0);createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");messages=this.field("messages");async rename($){await this.mutate((O)=>O.cognition.patchChat({path:{chat_id:this.id},body:{name:$}}))}async delete($){await this.mutate((O)=>$?.permanent?O.cognition.permanentlyDeleteChat({path:{chat_id:this.id}}):O.cognition.deleteChat({path:{chat_id:this.id}}))}async copy(){let{id:$}=await this.mutate((O)=>O.cognition.copyChat({path:{chat_id:this.id}}));return new Z$(this.client,$)}async restore(){await this.mutate(($)=>$.cognition.revertDeleteChat({path:{chat_id:this.id}}))}async history(){let{conversation:$}=Q(await this.client.cognition.getChatHistoryHandler({path:{chat_id:this.id}}));return $}webUrl(){return`${this.client.webAppUrl}/app/chat/${this.id}`}static search=j$({filters:{chat_filters:{}},type:"chat",make:($,O)=>new Z$($,O.chat_id)});toMention(){return{tag:l$("m-document-mention",{documentId:this.id,documentName:this.detail.peek()?.name??"",blockName:"chat",blockParams:{}}),mention:{entity_type:"chat",entity_id:this.id}}}}class mx{client;constructor($){this.client=$}byId($){return Z$.byId(this.client,$)}create($){return Z$.create(this.client,$)}search($,O){return Z$.search(this.client,$,O)}}class T$ extends A{async fetch(){let O=Q(await this.client.auth.getUserTeams()).find((j)=>j.id===this.id);if(!O)throw new w(`team ${this.id} not found`);return O}static byId($,O){return new T$($,O)}static async current($){let O=Q(await $.auth.getTeam());if(!O)throw new w("caller has no current team");return new T$($,O.team.id,O.team)}static async list($){return Q(await $.auth.getUserTeams()).map((j)=>new T$($,j.id,j))}name=this.field("name");slug=this.field("slug");defaultLinkShare=this.field("default_link_share");owner=this.mappedField("owner_id",($)=>M.byId(this.client,$));async members(){let $=Q(await this.client.auth.getTeam());if(!$||$.team.id!==this.id)throw new b("members are only available for the current team (see Team.current)");return $.members.map((O)=>({user:M.byId(this.client,O.user_id),role:O.role}))}}var E6=8;class _$ extends A{parent;constructor($,O,j,x){super($,j,x);this.parent=O}get path(){return{parent_type:this.parent.type,parent_id:this.parent.id,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new _$($,O,j)}static from($,O,j){return new _$($,O,j.id,j)}text=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");deletedAt=this.field("deleted_at");async threadId(){return(await this.detail.get()).thread_id??this.id}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){return cO(this.client,this.parent,$,{threadId:await this.threadId()})}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}async function Yj($,O){let j={parent_type:O.type,parent_id:O.id},x=a(async(K)=>{let Z=Q(await $.storage.messageTimeline({path:j,query:{selection:JSON.stringify({limit:100,cursor:K})}}));return{items:Z.items,nextCursor:Z.next_cursor}}),S=[];for await(let K of x)S.push(K);return bO(S,E6,async(K)=>{let{state:Z,root:X,replies:G}=Q(await $.storage.entityMessageGetThread({path:{...j,id:K.id}}));return{thread:Z,comments:[X,...G].map((L)=>_$.from($,O,L))}})}async function cO($,O,j,x){let S=Q(await $.storage.entityMessageCreate({path:{parent_type:O.type,parent_id:O.id},body:{...$$(j),thread_id:x?.threadId??null}}));return _$.from($,O,S)}class w$ extends F${messageThreadById($){return B$.byId(this.client,{type:"crm_contact",entity:this},$)}timelinePage($){return E$(this.client,{type:"crm_contact",entity:this},(O)=>_$.from(this.client,{type:"crm_contact",id:this.id},O),$)}entityType="crm_contact";async fetch(){return Q(await this.client.storage.getContact({path:{contact_id:this.id}}))}static byId($,O){return new w$($,O)}static from($,O){return new w$($,O.id,O)}name=this.field("name");email=this.field("email");company=this.mappedField("companyId",($)=>q$.byId(this.client,$));hidden=this.field("hidden");createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");firstInteraction=this.field("firstInteraction");lastInteraction=this.field("lastInteraction");async hide(){await this.setHidden(!0)}async unhide(){await this.setHidden(!1)}async setHidden($){await this.mutate((O)=>O.storage.setContactHidden({path:{contact_id:this.id},body:{hidden:$}}))}async rename($){await this.mutate((O)=>O.storage.setCrmContactName({path:{contact_id:this.id},body:{name:$}}))}get commentParent(){return{type:"crm_contact",id:this.id}}async comments(){return Yj(this.client,this.commentParent)}async comment($,O){return cO(this.client,this.commentParent,$,O)}commentById($){return _$.byId(this.client,this.commentParent,$)}}class q$ extends S${messageThreadById($){return B$.byId(this.client,{type:"crm_company",entity:this},$)}timelinePage($){return E$(this.client,{type:"crm_company",entity:this},(O)=>_$.from(this.client,{type:"crm_company",id:this.id},O),$)}entityType="crm_company";propertyEntityType="COMPANY";async fetch(){return Q(await this.client.storage.getCompany({path:{company_id:this.id}}))}static byId($,O){return new q$($,O)}static from($,O){return new q$($,O.id,O)}name=this.field("name");description=this.field("description");hidden=this.field("hidden");emailSync=this.field("emailSync");team=this.mappedField("teamId",($)=>T$.byId(this.client,$));createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");async domain(){let{domains:$}=await this.detail.get();return $[0]?.domain}async domains(){let{domains:$}=await this.detail.get();return $.map((O)=>O.domain)}async contacts(){return Q(await this.client.storage.listCompanyContacts({path:{company_id:this.id}})).map((O)=>w$.from(this.client,O))}static search=j$({filters:{crm_company_filters:{}},type:"company",includeCrm:!0,make:($,O)=>new q$($,O.id)});async hide(){await this.setHidden(!0)}async unhide(){await this.setHidden(!1)}async setHidden($){await this.mutate((O)=>O.storage.setCompanyHidden({path:{company_id:this.id},body:{hidden:$}}))}async setEmailSync($){await this.mutate((O)=>O.storage.setEmailSync({path:{company_id:this.id},body:{email_sync:$}}))}async rename($){await this.mutate((O)=>O.storage.setCrmCompanyName({path:{company_id:this.id},body:{name:$}}))}async createContact($){let O=await this.mutate((j)=>j.storage.createCrmContact({path:{company_id:this.id},body:$}));return w$.from(this.client,O)}get commentParent(){return{type:"crm_company",id:this.id}}async comments(){return Yj(this.client,this.commentParent)}async comment($,O){return cO(this.client,this.commentParent,$,O)}commentById($){return _$.byId(this.client,this.commentParent,$)}}class a$ extends A{tableDetail=new V$(async()=>Q(await this.client.storage.getCrmPipelineTable({path:{id:this.id}})));static byId($,O){return new a$($,O)}static from($,O){return new a$($,O.id,O)}async fetch(){return Q(await this.client.storage.getCrmPipeline({path:{id:this.id}}))}name=this.field("name");recordType=this.field("recordType");accessLevel=this.field("grant");sharing=this.field("sharing");owner=this.mappedField("userId",($)=>M.byId(this.client,$));team=this.mappedField("teamId",($)=>T$.byId(this.client,$));async rename($){await this.mutate((O)=>O.storage.renameCrmPipeline({path:{id:this.id},body:{name:$}}))}async setSharing($){if($===void 0)throw Error("Sharing is required");await this.mutate((O)=>O.storage.shareCrmPipeline({path:{id:this.id},body:{sharing:$}}))}async setTrashed($){await this.mutate((O)=>O.storage.trashCrmPipeline({path:{id:this.id},body:{trashed:$}}))}async sharePermissions(){return Q(await this.client.storage.getCrmPipelinePermissions({path:{id:this.id}}))}async updateSharePermissions($){return this.mutate((O)=>O.storage.updateCrmPipelinePermissions({path:{id:this.id},body:r$($)}))}async table(){return Qj.from(this.client,this,await this.tableRecord())}tableRecord(){return this.tableDetail.get()}rows(){return a(async($)=>{let O=Q(await this.client.storage.getCrmPipelineRows({path:{id:this.id},query:{after:$}}));return{items:O.rows.map((j)=>XO.from(this.client,this,j)),nextCursor:O.next}})}queryRows($={}){if($.rows?.some((O)=>O.pipeline.id!==this.id))throw Error("Rows belong to another pipeline");return a(async(O)=>{let j=Q(await this.client.storage.queryCrmPipelineRows({path:{id:this.id},body:{after:O,query:$.query,rowIds:$.rows?.map((x)=>x.id)}}));return{items:j.rows.map((x)=>XO.from(this.client,this,x)),nextCursor:j.next}})}async applyOps($,O){if(O?.baseVersions?.some((S)=>S.table.pipeline.id!==this.id))throw Error("Table belongs to another pipeline");let j={ops:$,baseVersions:O?.baseVersions?Object.fromEntries(O.baseVersions.map((S)=>[S.table.id,S.version])):void 0},x=await this.mutate((S)=>S.storage.applyCrmPipelineOps({path:{id:this.id},body:j}));return this.tableDetail.clear(),x}}class Qj extends A{pipeline;toJSON(){return{...super.toJSON(),pipelineId:this.pipeline.id}}constructor($,O,j){super($,j.table.id,j);this.pipeline=O}static from($,O,j){return new Qj($,O,j)}fetch(){return this.pipeline.tableRecord()}async columns(){return(await this.pipeline.tableRecord()).columns.map(($)=>Jj.from(this.client,this,$))}async version(){return(await this.pipeline.tableRecord()).table.version}rowById($){return XO.byId(this.client,this.pipeline,$)}rows(){return this.pipeline.rows()}}class XO extends A{pipeline;toJSON(){return{...super.toJSON(),pipelineId:this.pipeline.id}}constructor($,O,j,x){super($,j,x);this.pipeline=O}static byId($,O,j){return new XO($,O,j)}static from($,O,j){return new XO($,O,j.rowId,j)}async fetch(){for await(let $ of this.pipeline.queryRows({rows:[this]}))if($.id===this.id)return $.detail.get();throw new w(`Pipeline row ${this.id} is unavailable`)}cells=this.field("cells");async refresh(){this.detail.clear(),await this.detail.get()}}class Jj extends A{table;toJSON(){return{...super.toJSON(),pipelineId:this.table.pipeline.id,tableId:this.table.id}}constructor($,O,j){super($,j.column.id,j);this.table=O}static from($,O,j){return new Jj($,O,j)}async fetch(){let $=(await this.table.pipeline.tableRecord()).columns.find((O)=>O.column.id===this.id);if(!$)throw new w(`Pipeline column ${this.id} is unavailable`);return $}async writable(){return(await this.fetch()).writable}async name(){return(await this.fetch()).column.display_name??(await this.fetch()).definition.definition.display_name}}class cx{client;constructor($){this.client=$}byId($){return a$.byId(this.client,$)}async list(){return Q(await this.client.storage.listCrmPipelines()).map(($)=>a$.from(this.client,$))}async create($){return a$.from(this.client,Q(await this.client.storage.createCrmPipeline({body:$})))}}class ux{client;pipelines;constructor($){this.client=$;this.pipelines=new cx($)}companyById($){return q$.byId(this.client,$)}contactById($){return w$.byId(this.client,$)}async contactByEmail($){let{contact:O}=Q(await this.client.storage.getContactByEmail({query:{email:$}}));return O?w$.from(this.client,O):void 0}async searchContacts($,O={}){let{contacts:j}=Q(await this.client.storage.searchContacts({query:{query:$,limit:O.limit}}));return j.map((x)=>w$.from(this.client,x))}async createCompany($){return q$.from(this.client,Q(await this.client.storage.createCrmCompany({body:$})))}async settings(){return Q(await this.client.storage.getCrmTeamSettings())}async updateSettings($){return Q(await this.client.storage.putCrmTeamSettings({body:$}))}async setStages($){return Q(await this.client.storage.putCrmTeamStages({body:$}))}async resetStages(){Q(await this.client.storage.resetCrmTeamStages())}searchCompanies($){return q$.search(this.client,$)}}var G$=Symbol.for("@ts-pattern/matcher"),P1=Symbol.for("@ts-pattern/isVariadic");var dx=($)=>Boolean($&&typeof $=="object"),Vj=($)=>$&&!!$[G$],s=($,O,j)=>{if(Vj($)){let x=$[G$](),{matched:S,selections:K}=x.match(O);return S&&K&&Object.keys(K).forEach((Z)=>j(Z,K[Z])),S}if(dx($)){if(!dx(O))return!1;if(Array.isArray($)){if(!Array.isArray(O))return!1;let x=[],S=[],K=[];for(let Z of $.keys()){let X=$[Z];Vj(X)&&X[P1]?K.push(X):K.length?S.push(X):x.push(X)}if(K.length){if(K.length>1)throw Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(O.length<x.length+S.length)return!1;let Z=O.slice(0,x.length),X=S.length===0?[]:O.slice(-S.length),G=O.slice(x.length,S.length===0?1/0:-S.length);return x.every((L,Y)=>s(L,Z[Y],j))&&S.every((L,Y)=>s(L,X[Y],j))&&(K.length===0||s(K[0],G,j))}return $.length===O.length&&$.every((Z,X)=>s(Z,O[X],j))}return Reflect.ownKeys($).every((x)=>{let S=$[x];return((x in O)||Vj(K=S)&&K[G$]().matcherType==="optional")&&s(S,O[x],j);var K})}return Object.is(O,$)},X$=($)=>{var O,j,x;return dx($)?Vj($)?(O=(j=(x=$[G$]()).getSelectionKeys)==null?void 0:j.call(x))!=null?O:[]:Array.isArray($)?uO($,X$):uO(Object.values($),X$):[]},uO=($,O)=>$.reduce((j,x)=>j.concat(O(x)),[]);function w6(...$){if($.length===1){let[O]=$;return(j)=>s(O,j,()=>{})}if($.length===2){let[O,j]=$;return s(O,j,()=>{})}throw Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${$.length}.`)}function t($){return Object.assign($,{optional:()=>px($),and:(O)=>u($,O),or:(O)=>F1($,O),select:(O)=>O===void 0?dO($):dO(O,$)})}function lx($){return Object.assign(((O)=>Object.assign(O,{[Symbol.iterator](){let j=0,x=[{value:Object.assign(O,{[P1]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var S;return(S=x[j++])!=null?S:x.at(-1)}}}}))($),{optional:()=>lx(px($)),select:(O)=>lx(O===void 0?dO($):dO(O,$))})}function px($){return t({[G$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return O===void 0?(X$($).forEach((S)=>x(S,void 0)),{matched:!0,selections:j}):{matched:s($,O,x),selections:j}},getSelectionKeys:()=>X$($),matcherType:"optional"})})}var q6=($,O)=>{for(let j of $)if(!O(j))return!1;return!0},f6=($,O)=>{for(let[j,x]of $.entries())if(!O(x,j))return!1;return!0},b6=($,O)=>{let j=Reflect.ownKeys($);for(let x of j)if(!O(x,$[x]))return!1;return!0};function u(...$){return t({[G$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return{matched:$.every((S)=>s(S,O,x)),selections:j}},getSelectionKeys:()=>uO($,X$),matcherType:"and"})})}function F1(...$){return t({[G$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return uO($,X$).forEach((S)=>x(S,void 0)),{matched:$.some((S)=>s(S,O,x)),selections:j}},getSelectionKeys:()=>uO($,X$),matcherType:"or"})})}function m($){return{[G$]:()=>({match:(O)=>({matched:Boolean($(O))})})}}function dO(...$){let O=typeof $[0]=="string"?$[0]:void 0,j=$.length===2?$[1]:typeof $[0]=="string"?void 0:$[0];return t({[G$]:()=>({match:(x)=>{let S={[O!=null?O:"@ts-pattern/anonymous-select-key"]:x};return{matched:j===void 0||s(j,x,(K,Z)=>{S[K]=Z}),selections:S}},getSelectionKeys:()=>[O!=null?O:"@ts-pattern/anonymous-select-key"].concat(j===void 0?[]:X$(j))})})}function E1($){return!0}function f$($){return typeof $=="number"}function i$($){return typeof $=="string"}function n$($){return typeof $=="bigint"}var w1=t(m(E1)),k6=t(m(E1)),g6=w1,s$=($)=>Object.assign(t($),{startsWith:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&x.startsWith(j)))));var j},endsWith:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&x.endsWith(j)))));var j},minLength:(O)=>s$(u($,((j)=>m((x)=>i$(x)&&x.length>=j))(O))),length:(O)=>s$(u($,((j)=>m((x)=>i$(x)&&x.length===j))(O))),maxLength:(O)=>s$(u($,((j)=>m((x)=>i$(x)&&x.length<=j))(O))),includes:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&x.includes(j)))));var j},regex:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&Boolean(x.match(j))))));var j}}),A1=s$(m(i$)),b$=($)=>Object.assign(t($),{between:(O,j)=>b$(u($,((x,S)=>m((K)=>f$(K)&&x<=K&&S>=K))(O,j))),lt:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x<j))(O))),gt:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x>j))(O))),lte:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x<=j))(O))),gte:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x>=j))(O))),int:()=>b$(u($,m((O)=>f$(O)&&Number.isInteger(O)))),finite:()=>b$(u($,m((O)=>f$(O)&&Number.isFinite(O)))),positive:()=>b$(u($,m((O)=>f$(O)&&O>0))),negative:()=>b$(u($,m((O)=>f$(O)&&O<0)))}),y6=b$(m(f$)),t$=($)=>Object.assign(t($),{between:(O,j)=>t$(u($,((x,S)=>m((K)=>n$(K)&&x<=K&&S>=K))(O,j))),lt:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x<j))(O))),gt:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x>j))(O))),lte:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x<=j))(O))),gte:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x>=j))(O))),positive:()=>t$(u($,m((O)=>n$(O)&&O>0))),negative:()=>t$(u($,m((O)=>n$(O)&&O<0)))}),v6=t$(m(n$)),h6=t(m(function($){return typeof $=="boolean"})),m6=t(m(function($){return typeof $=="symbol"})),c6=t(m(function($){return $==null})),u6=t(m(function($){return $!=null})),x$={__proto__:null,matcher:G$,optional:px,array:function(...$){return lx({[G$]:()=>({match:(O)=>{if(!Array.isArray(O))return{matched:!1};if($.length===0)return{matched:!0};let j=$[0],x={};if(O.length===0)return X$(j).forEach((K)=>{x[K]=[]}),{matched:!0,selections:x};let S=(K,Z)=>{x[K]=(x[K]||[]).concat([Z])};return{matched:O.every((K)=>s(j,K,S)),selections:x}},getSelectionKeys:()=>$.length===0?[]:X$($[0])})})},set:function(...$){return t({[G$]:()=>({match:(O)=>{if(!(O instanceof Set))return{matched:!1};let j={};if(O.size===0)return{matched:!0,selections:j};if($.length===0)return{matched:!0};let x=(K,Z)=>{j[K]=(j[K]||[]).concat([Z])},S=$[0];return{matched:q6(O,(K)=>s(S,K,x)),selections:j}},getSelectionKeys:()=>$.length===0?[]:X$($[0])})})},map:function(...$){return t({[G$]:()=>({match:(O)=>{if(!(O instanceof Map))return{matched:!1};let j={};if(O.size===0)return{matched:!0,selections:j};let x=(X,G)=>{j[X]=(j[X]||[]).concat([G])};if($.length===0)return{matched:!0};var S;if($.length===1)throw Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(S=$[0])==null?void 0:S.toString()}`);let[K,Z]=$;return{matched:f6(O,(X,G)=>{let L=s(K,G,x),Y=s(Z,X,x);return L&&Y}),selections:j}},getSelectionKeys:()=>$.length===0?[]:[...X$($[0]),...X$($[1])]})})},record:function(...$){return t({[G$]:()=>({match:(O)=>{if(O===null||typeof O!="object"||Array.isArray(O))return{matched:!1};var j;if($.length===0)throw Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(j=$[0])==null?void 0:j.toString()}`);let x={},S=(X,G)=>{x[X]=(x[X]||[]).concat([G])},[K,Z]=$.length===1?[A1,$[0]]:$;return{matched:b6(O,(X,G)=>{let L=typeof X!="string"||Number.isNaN(Number(X))?null:Number(X),Y=L!==null&&s(K,L,S),J=s(K,X,S),T=s(Z,G,S);return(J||Y)&&T}),selections:x}},getSelectionKeys:()=>$.length===0?[]:[...X$($[0]),...X$($[1])]})})},intersection:u,union:F1,not:function($){return t({[G$]:()=>({match:(O)=>({matched:!s($,O,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:m,select:dO,any:w1,unknown:k6,_:g6,string:A1,number:y6,bigint:v6,boolean:h6,symbol:m6,nullish:c6,nonNullable:u6,instanceOf:function($){return t(m(function(O){return(j)=>j instanceof O}($)))},shape:function($){return t(m(w6($)))}};class q1 extends Error{constructor($){let O;try{O=JSON.stringify($)}catch(j){O=$}super(`Pattern matching error: no pattern matches value ${O}`),this.input=void 0,this.input=$}}var rx={matched:!1,value:void 0};function c($){return new Wj($,rx)}class Wj{constructor($,O){this.input=void 0,this.state=void 0,this.input=$,this.state=O}with(...$){if(this.state.matched)return this;let O=$[$.length-1],j=[$[0]],x;$.length===3&&typeof $[1]=="function"?x=$[1]:$.length>2&&j.push(...$.slice(1,$.length-1));let S=!1,K={},Z=(G,L)=>{S=!0,K[G]=L},X=!j.some((G)=>s(G,this.input,Z))||x&&!Boolean(x(this.input))?rx:{matched:!0,value:O(S?"@ts-pattern/anonymous-select-key"in K?K["@ts-pattern/anonymous-select-key"]:K:this.input,this.input)};return new Wj(this.input,X)}when($,O){if(this.state.matched)return this;let j=Boolean($(this.input));return new Wj(this.input,j?{matched:!0,value:O(this.input,this.input)}:rx)}otherwise($){return this.state.matched?this.state.value:$(this.input)}exhaustive($=d6){return this.state.matched?this.state.value:$(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function d6($){throw new q1($)}var ax,l6=new Uint8Array(16);function Bj(){if(!ax){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ax=crypto.getRandomValues.bind(crypto)}return ax(l6)}var O$=[];for(let $=0;$<256;++$)O$.push(($+256).toString(16).slice(1));function f1($,O=0){return(O$[$[O+0]]+O$[$[O+1]]+O$[$[O+2]]+O$[$[O+3]]+"-"+O$[$[O+4]]+O$[$[O+5]]+"-"+O$[$[O+6]]+O$[$[O+7]]+"-"+O$[$[O+8]]+O$[$[O+9]]+"-"+O$[$[O+10]]+O$[$[O+11]]+O$[$[O+12]]+O$[$[O+13]]+O$[$[O+14]]+O$[$[O+15]]).toLowerCase()}var ix={};function r6($,O,j){let x;if($)x=b1($.random??$.rng?.()??Bj(),$.msecs,$.seq,O,j);else{let S=Date.now(),K=Bj();p6(ix,S,K),x=b1(K,ix.msecs,ix.seq,O,j)}return O??f1(x)}function p6($,O,j){if($.msecs??=-1/0,$.seq??=0,O>$.msecs)$.seq=j[6]<<23|j[7]<<16|j[8]<<8|j[9],$.msecs=O;else if($.seq=$.seq+1|0,$.seq===0)$.msecs++;return $}function b1($,O,j,x,S=0){if($.length<16)throw Error("Random bytes length must be >= 16");if(!x)x=new Uint8Array(16),S=0;else if(S<0||S+16>x.length)throw RangeError(`UUID byte range ${S}:${S+15} is out of buffer bounds`);return O??=Date.now(),j??=$[6]*127<<24|$[7]<<16|$[8]<<8|$[9],x[S++]=O/1099511627776&255,x[S++]=O/4294967296&255,x[S++]=O/16777216&255,x[S++]=O/65536&255,x[S++]=O/256&255,x[S++]=O&255,x[S++]=112|j>>>28&15,x[S++]=j>>>20&255,x[S++]=128|j>>>14&63,x[S++]=j>>>6&255,x[S++]=j<<2&255|$[10]&3,x[S++]=$[11],x[S++]=$[12],x[S++]=$[13],x[S++]=$[14],x[S++]=$[15],x}var h$=r6;class M${table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new M$($,O)}async detail(){let{columns:$}=await this.table.detail(),O=$.find((j)=>j.column.id===this.id);if(!O)throw new w(`column ${this.id} is not on table ${this.table.id}`);return O}async name(){let $=await this.detail();return $.column.display_name??$.definition.definition.display_name}async rename($){return await this.table.database.renameColumn(this,$),this}async inferType($){return await this.table.database.inferColumnType(this,$),this}changeType($){return this.table.database.changeColumnType(this,$)}convertIntoNewColumn($){return this.table.database.convertColumnIntoNewColumn(this,$)}casts(){return this.table.database.columnCasts(this)}async delete(){await this.table.database.deleteColumn(this)}async dataType(){return(await this.detail()).definition.definition.data_type}async isMultiSelect(){return(await this.detail()).definition.definition.is_multi_select}async position(){return(await this.detail()).column.position}async definition(){return(await this.detail()).definition}async config(){return(await this.detail()).column.config??void 0}async addOptions($){return await this.table.database.addColumnOptions(this,$),this}toJSON(){return{id:this.id,tableId:this.table.id}}}class A${table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new A$($,O)}history(){return this.table.database.rowHistory(this)}toJSON(){return{id:this.id,tableId:this.table.id}}}class Lj{table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new Lj($,O)}async detail(){let{views:$}=await this.table.detail(),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`view ${this.id} is not on table ${this.table.id}`);return O}async name(){return(await this.detail()).name}async position(){return(await this.detail()).position}async layout(){return(await this.detail()).layout}async query(){return(await this.detail()).query}positions(){return this.table.database.viewPositions(this)}toJSON(){return{id:this.id,tableId:this.table.id}}}class Q${database;id;constructor($,O){this.database=$;this.id=O}static byId($,O){return new Q$($,O)}async detail(){let{tables:$}=await this.database.schema(),O=$.find((j)=>j.table.id===this.id);if(!O)throw new w(`table ${this.id} is not in database ${this.database.id}`);return O}async name(){return(await this.detail()).table.name}async rename($){return await this.database.renameTable(this,$),this}async version(){return(await this.detail()).table.version}async position(){return(await this.detail()).table.position}async columns(){let{columns:$}=await this.detail();return $.map((O)=>M$.byId(this,O.column.id))}addColumn($){return this.database.addColumn(this,$)}async reorderColumns($){return await this.database.reorderColumns(this,$),this}row($){return A$.byId(this,$)}async views(){let{views:$}=await this.detail();return $.map((O)=>Lj.byId(this,O.id))}createWebhook(){return this.database.createWebhook(this)}async delete(){await this.database.deleteTable(this)}toJSON(){return{id:this.id,databaseId:this.database.id}}}async function Nj($,O,j,x={}){let S=Q(await $.storage.queryDatabases({body:{sql:j,databaseId:x.database?.id,baseVersions:Object.fromEntries((x.baseVersions??[]).map(({table:Y,version:J})=>[Y.id,J]))}})),K=new Map;for(let Y of[x.database,...(x.baseVersions??[]).map(({table:J})=>J.database)]){if(!Y)continue;let J=K.get(Y.id);if(J)J.add(Y);else K.set(Y.id,new Set([Y]))}let Z=(Y)=>{let J=K.get(Y)?.values().next().value;if(J)return J;let T=O($,Y);return K.set(Y,new Set([T])),T},X=(Y)=>{let J=S.tableDatabases[Y];if(!J)throw Error(`SQL response is missing the owner of table ${Y}`);return Q$.byId(Z(J),Y)},G=new Set(Object.keys(S.newVersions).map((Y)=>X(Y).database.id));if(S.statement.kind==="schema")G.add(S.statement.databaseId);for(let Y of G)for(let J of K.get(Y)??[])J.invalidateSchema();let L=c(S.statement).with({kind:"select"},(Y)=>Y).with({kind:"schema"},({databaseId:Y,summary:J})=>({kind:"schema",database:Z(Y),summary:J})).with({kind:"insert"},{kind:"update"},{kind:"delete"},({kind:Y,tableId:J,tableName:T})=>({kind:Y,table:X(J),tableName:T})).with({kind:"alterColumnType"},({tableId:Y,tableName:J,columnId:T,columnName:z,to:W})=>{let V=X(Y);return{kind:"alterColumnType",table:V,tableName:J,column:M$.byId(V,T),columnName:z,to:W}}).exhaustive();return{result:S.result?a6(S.result,X,S.tableDatabases):void 0,changesApplied:S.changesApplied,insertedRows:L.kind==="insert"?S.insertedRowIds.map((Y)=>A$.byId(L.table,Y)):[],newVersions:Object.entries(S.newVersions).map(([Y,J])=>({table:X(Y),version:J})),readVersions:Object.entries(S.readVersions).map(([Y,J])=>({table:X(Y),version:J})),truncatedTables:S.truncatedTables,statement:L}}function a6($,O,j){let x=$.sourceTable&&j[$.sourceTable]?O($.sourceTable):void 0;return{columns:$.columns.map(({relatedTable:S,...K})=>({...K,relatedTable:S&&j[S]?O(S):void 0})),rows:$.rows,sourceTable:x,rowHandles:x?$.rowIds.map((S)=>A$.byId(x,S)):[]}}class Uj{table;id;createdBy;record;constructor($,O,j,x){this.table=$;this.id=O;this.createdBy=j;this.record=x}static fromRecord($,O,j){return new Uj($,j.id,O,j)}get tokenPrefix(){return this.record.tokenPrefix}get createdAt(){return this.record.createdAt}delete(){return this.table.database.deleteWebhook(this)}toJSON(){return{id:this.id,tableId:this.table.id,tokenPrefix:this.tokenPrefix}}}class tx extends SO{op;row;column;taken;constructor($,O){super($,O);this.name="MacroOpRefusedError",this.message=O.message,this.op=O.op,this.row=O.row,this.column=O.column,this.taken=O.taken}}function zj($){return c($).with({type:"relation"},({table:O})=>({type:"relation",database:O.database.id,table:O.id})).with({type:x$.not("relation")},(O)=>O).exhaustive()}var i6={USER:"People",DOCUMENT:"Documents",TASK:"Tasks",COMPANY:"Companies",CONTACT:"Contacts",CALL_RECORD:"Calls",CHANNEL:"Channels",CHAT:"Chats",PROJECT:"Projects",THREAD:"Emails",CALENDAR_EVENT:"Events",INITIATIVE:"Initiatives"};function n6($){return c($).with({type:"text"},()=>"Text").with({type:"number"},()=>"Number").with({type:"boolean"},()=>"Checkbox").with({type:"date"},()=>"Date").with({type:"link"},()=>"URL").with({type:"select",multi:!0},()=>"Multi-select").with({type:"select",multi:!1},()=>"Select").with({type:"select_number",multi:!0},()=>"Multi-number select").with({type:"select_number",multi:!1},()=>"Number select").with({type:"tag"},()=>"Tag").with({type:"entity"},({target:O})=>i6[O]).with({type:"relation"},()=>"Relation").exhaustive(()=>"Column")}function nx($){return $.map((O)=>({id:h$(),label:O}))}function k1($,O,j){return $?.kind===O&&"change"in $&&$.change.kind===j}function sx($){return c($).with({kind:"reorder_tables"},({kind:O})=>O).with({kind:x$.union("table","column","rows","view")},({kind:O,change:j})=>`${O}.${j.kind}`).exhaustive(()=>"unknown")}function m$($,O,j){let[x]=$;if($.length!==1||!k1(x,O,j))throw new b(`expected one ${O}.${j} result, got ${$.map(sx).join(", ")||"none"}`);return x}class J$ extends A{access=new o(this.client,"database",this);async fetch(){return Q(await this.client.storage.getDatabase({path:{id:this.id}}))}assertOwns($,O){if(O.id!==this.id)throw new b(`${$} does not belong to database ${this.id}`)}static byId($,O){return new J$($,O)}static async create($,O){let j=Q(await $.storage.createDatabase({body:{name:O.name}}));return new J$($,j.id)}static async list($){return Q(await $.storage.listDatabases()).map((j)=>new J$($,j.database.id))}query($,O){return Nj(this.client,J$.byId,$,{...O,database:this})}invalidateSchema(){this.detail.clear()}schema(){return this.detail.get()}name=this.mappedField("database",($)=>$.name);owner=this.mappedField("database",($)=>M.byId(this.client,$.owner_id));createdAt=this.mappedField("database",($)=>$.created_at);trashedAt=this.mappedField("database",($)=>$.trashed_at??void 0);grant=this.field("grant");tables=this.mappedField("tables",($)=>$.map((O)=>Q$.byId(this,O.table.id)));async table($){let{tables:O}=await this.schema(),j=O.find((x)=>x.table.name===$);return j?Q$.byId(this,j.table.id):void 0}async createTable($){let{table:O}=m$(await this.applyOps([{kind:"table",table:h$(),change:{kind:"create",name:$.name}}]),"table","created");return Q$.byId(this,O)}async applyOps($,O={}){let j={ops:$};if(O.baseVersions!==void 0){for(let{table:S}of O.baseVersions)this.assertOwns(`table ${S.id}`,S.database);j.baseVersions=Object.fromEntries(O.baseVersions.map(({table:S,version:K})=>[S.id,K]))}let{results:x}=await this.mutate(async(S)=>{let K=await S.storage.applyDatabaseOps({path:{id:this.id},body:j});if(K.error!==void 0&&"op"in K.error)throw new tx(K.response?.status??0,K.error);return K});return x}async reorderTables($){for(let x of $)this.assertOwns(`table ${x.id}`,x.database);let O=await this.applyOps([{kind:"reorder_tables",order:$.map((x)=>x.id)}]),[j]=O;if(O.length!==1||j?.kind!=="reorder_tables")throw new b(`expected one reorder_tables result, got ${O.map(sx).join(", ")||"none"}`);return j.tables.map(({table:x})=>Q$.byId(this,x))}async deleteTable($){this.assertOwns(`table ${$.id}`,$.database),m$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"delete"}}]),"table","deleted")}async columnCasts($){return this.assertOwns(`column ${$.id}`,$.table.database),Q(await this.client.storage.listDatabaseColumnCasts({path:{id:this.id,table_id:$.table.id,column_id:$.id}}))}async viewPositions($){this.assertOwns(`view ${$.id}`,$.table.database);let{positions:O}=Q(await this.client.storage.getDatabaseViewPositions({path:{id:this.id,view_id:$.id}}));return O}async rowHistory($){this.assertOwns(`row ${$.id}`,$.table.database);let{changes:O}=Q(await this.client.storage.getDatabaseRowHistory({path:{id:this.id,table_id:$.table.id,row_id:$.id}}));return O}async importTable($){let O=await this.mutate((j)=>j.storage.importDatabaseTable({path:{id:this.id},body:$}));return Q$.byId(this,O.id)}webhookOf($){return Uj.fromRecord(Q$.byId(this,$.tableId),M.byId(this.client,$.createdBy),$)}async webhooks(){let{webhooks:$}=Q(await this.client.storage.listDatabaseWebhooks({path:{id:this.id}}));return $.map((O)=>this.webhookOf(O))}async createWebhook($){this.assertOwns("table",$.database);let O=Q(await this.client.storage.createDatabaseWebhook({path:{id:this.id},body:{tableId:$.id}}));return{webhook:this.webhookOf(O.webhook),token:O.token}}async deleteWebhook($){this.assertOwns("webhook",$.table.database),Q(await this.client.storage.deleteDatabaseWebhook({path:{id:this.id,webhook_id:$.id}}))}async sharePermissions(){return Q(await this.client.storage.getDatabasePermissions({path:{id:this.id}}))}updateSharePermissions($){return this.mutate((O)=>O.storage.updateDatabasePermissions({path:{id:this.id},body:$}))}async changeColumnType($,O){this.assertOwns(`column ${$.id}`,$.table.database);let j=await $.table.version();return m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"change_type",to:zj(O.to)}}],{baseVersions:[{table:$.table,version:j}]}),"column","type_changed")}async columnConversion($,O){return this.assertOwns(`column ${$.id}`,$.table.database),Q(await this.client.storage.convertDatabaseColumn({path:{id:this.id,table_id:$.table.id,column_id:$.id},body:{to:zj(O)}}))}async convertColumnIntoNewColumn($,O){let j=await this.columnConversion($,O.to),x=O.name??`${await $.name()} (${n6(O.to)})`,S=h$(),K=[{kind:"column",table:$.table.id,column:S,change:{kind:"create",definition:{source:"new",name:x,type:zj(O.to),options:nx(j.options)},after:$.id}}];if(j.cells.length>0)K.push({kind:"rows",table:$.table.id,change:{kind:"update",changes:{kind:"per_row",rows:j.cells.map(({row:X,value:G})=>({row:X,cells:[{column:S,value:G}]}))}}});let[Z]=await this.applyOps(K,{baseVersions:[{table:$.table,version:j.tableVersion}]});if(!k1(Z,"column","created"))throw new b(`expected a column.created result, got ${Z?sx(Z):"none"}`);return M$.byId($.table,Z.column)}async deleteColumn($){this.assertOwns(`column ${$.id}`,$.table.database);let O=await $.table.version(),{tableVersion:j}=m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"delete"}}],{baseVersions:[{table:$.table,version:O}]}),"column","deleted");return j}async reorderColumns($,O){this.assertOwns(`table ${$.id}`,$.database);for(let S of O)if(S.table.id!==$.id)throw new b(`column ${S.id} does not belong to table ${$.id}`);let j=await $.version(),{tableVersion:x}=m$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"reorder_columns",order:O.map((S)=>S.id)}}],{baseVersions:[{table:$,version:j}]}),"table","columns_reordered");if(x===void 0)throw new b(`table ${$.id} reordered its columns without a version`);return x}async renameTable($,O){this.assertOwns(`table ${$.id}`,$.database);let j=await $.name(),{tableVersion:x}=m$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"rename",name:O,previousName:j}}]),"table","renamed");if(x===void 0)throw new b(`table ${$.id} was renamed without a version`);return x}async renameColumn($,O){this.assertOwns(`column ${$.id}`,$.table.database);let j=await $.name(),{tableVersion:x}=m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"rename",name:O,previousName:j}}]),"column","renamed");return x}async inferColumnType($,O){return this.assertOwns(`column ${$.id}`,$.table.database),this.mutate((j)=>j.storage.inferDatabaseColumnType({path:{id:this.id,table_id:$.table.id,column_id:$.id},body:{dataType:O.dataType,baseVersion:O.baseVersion,...O.specificEntityType!==void 0?{specificEntityType:O.specificEntityType}:{}}}))}async addColumn($,O){if(this.assertOwns(`table ${$.id}`,$.database),O.after!==void 0&&O.after.table.id!==$.id)throw new b(`column ${O.after.id} does not belong to table ${$.id}`);let j="property"in O?{source:"existing",property:O.property.id}:{source:"new",name:O.name,type:zj(O.type),...O.options!==void 0?{options:nx(O.options)}:{},...O.inferType!==void 0?{inferType:O.inferType}:{}},{column:x}=m$(await this.applyOps([{kind:"column",table:$.id,column:h$(),change:{kind:"create",definition:j,...O.after!==void 0?{after:O.after.id}:{}}}]),"column","created");return M$.byId($,x)}async addColumnOptions($,O){return this.assertOwns(`column ${$.id}`,$.table.database),m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"add_options",options:nx(O)}}]),"column","options_added")}}class ex{client;constructor($){this.client=$}query($,O){return Nj(this.client,J$.byId,$,O)}byId($){return J$.byId(this.client,$)}create($){return J$.create(this.client,$)}list(){return J$.list(this.client)}}class GO extends A{document;toJSON(){return{...super.toJSON(),documentId:this.document.id}}constructor($,O,j,x){super($,j,x);this.document=O}static byId($,O,j){return new GO($,O,j)}static from($,O,j){return new GO($,O,j.uuid,j)}async fetch(){let $=Q(await this.client.storage.getDocumentAnchors({path:{document_id:this.document.id}})).data.find((O)=>O.uuid===this.id);if(!$)throw new w(`Annotation ${this.id} is unavailable`);return $}kind=this.field("anchorType");page=this.field("page");async edit($){if(await this.kind()!=="placeable")throw Error("Only placeable comment annotations can be edited");await this.mutate((O)=>O.storage.editAnchor({body:{...$,uuid:this.id,anchorType:"free-comment",fileType:"pdf"}}))}async delete(){if(await this.kind()!=="highlight")throw Error("Only standalone highlights can be deleted with this endpoint");await this.mutate(($)=>$.storage.deleteAnchor({body:{uuid:this.id,anchorType:"highlight",fileType:"pdf"}}))}}class c$ extends A{documentId;constructor($,O,j,x){super($,j,x);this.documentId=O}get path(){return{parent_type:"document",parent_id:this.documentId,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new c$($,O,j)}static from($,O,j){return new c$($,O,j.id,j)}text=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");async threadId(){return(await this.detail.get()).thread_id??this.id}document(){return q.byId(this.client,this.documentId)}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){return this.document().comment($,{threadId:await this.threadId()})}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}class lO{client;document;id;detail;constructor($,O,j){this.client=$;this.document=O;this.id=j;this.detail=new V$(async()=>Q(await this.client.storage.getDocumentVersion({path:{document_id:O.id,document_version_id:j}})).data)}static byId($,O,j){return new lO($,O,j)}read(){return this.detail.get()}toJSON(){return{id:this.id,documentId:this.document.id}}}var s6=8;class q extends S${async anchors(){return Q(await this.client.storage.getDocumentAnchors({path:{document_id:this.id}})).data.map(($)=>GO.from(this.client,this,$))}async createHighlight($){return GO.from(this.client,this,Q(await this.client.storage.createAnchor({path:{document_id:this.id},body:{...$,fileType:"pdf",anchorType:"highlight"}})))}version($){return lO.byId(this.client,this,$)}async sharePermissions(){return Q(await this.client.storage.getDocumentPermissionsV2({path:{document_id:this.id}})).documentPermissions}async permissionsToken(){return Q(await this.client.storage.getDocumentPermissionsToken({path:{document_id:this.id}})).token}async prepareSave($){return Q(await this.client.storage.presaveDocumentHandler({path:{document_id:this.id},body:{newBom:$}})).data}async save($){return(await this.mutate((O)=>O.storage.saveDocumentHandler({path:{document_id:this.id},body:$}))).data}async simpleSave(){return(await this.mutate(($)=>$.storage.simpleSave({path:{document_id:this.id}}))).data}messageThreadById($){return B$.byId(this.client,{type:"document",entity:this},$)}timelinePage($){return E$(this.client,{type:"document",entity:this},(O)=>c$.from(this.client,this.id,O),$)}access=new o(this.client,"document",this);async fetch(){let{data:$}=Q(await this.client.storage.getDocument({path:{document_id:this.id}}));return $.documentMetadata}static byId($,O){return new q($,O)}static async create($,O){let{documentId:j}=Q(await $.storage.createMarkdownHandler({body:{documentName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new q($,j)}static async createSnippet($,O){let{documentId:j}=Q(await $.storage.createSnippetHandler({body:{snippetName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new q($,j)}static async createSkill($,O){let{documentId:j}=Q(await $.storage.createSkillHandler({body:{skillName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new q($,j)}static recent($,O){let j=O?.pageSize??50;return a(async(x)=>{let S=Q(await $.storage.getUserDocumentsHandler({query:{limit:j,offset:x?Number(x):0,...O?.fileType!==void 0?{file_type:O.fileType}:{}}})),K=S.data?.next_offset;return{items:(S.data?.documents??[]).map((Z)=>new q($,Z.documentId)),nextCursor:K!=null?String(K):null}})}static async recentlyDeleted($){let{data:O}=Q(await $.storage.recentlyDeleted({}));return O.items.filter((j)=>j.type==="document").map((j)=>new q($,j.id))}entityType="document";propertyEntityType="DOCUMENT";name=this.field("documentName");fileType=this.field("fileType");project=this.mappedField("projectId",($)=>$?n.byId(this.client,$):void 0);owner=this.mappedField("owner",($)=>M.byId(this.client,$));branchedFrom=this.mappedField("branchedFromId",($)=>$?q.byId(this.client,$):void 0);createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");deletedAt=this.field("deletedAt");async content(){let{text:$}=Q(await this.client.storage.getDocumentTextContent({path:{document_id:this.id}}));if($!==null)return $;let{presigned_url:O}=Q(await this.client.storage.exportDocument({path:{document_id:this.id}})),j=await fetch(O);if(!j.ok)throw new SO(j.status,{message:"failed to download document content"});return j.text()}async rename($){await this.mutate((O)=>O.storage.editDocument({path:{document_id:this.id},body:{documentName:$}}))}async move($){await this.mutate((O)=>O.storage.editDocument({path:{document_id:this.id},body:{projectId:$?.id??""}}))}async delete($){await this.mutate((O)=>$?.permanent?O.storage.permanentlyDeleteDocument({path:{document_id:this.id}}):O.storage.deleteDocument({path:{document_id:this.id}}))}async restore(){await this.mutate(($)=>$.storage.revertDeleteDocument({path:{document_id:this.id}}))}async copy($){let{data:O}=Q(await this.client.storage.copyDocument({path:{document_id:this.id},query:$.versionId!==void 0?{version_id:$.versionId}:void 0,body:{documentName:$.name}}));return new q(this.client,O.documentMetadata.documentId)}async comments(){let $={parent_type:"document",parent_id:this.id},O=a(async(x)=>{let S=Q(await this.client.storage.messageTimeline({path:$,query:{selection:JSON.stringify({limit:100,cursor:x})}}));return{items:S.items,nextCursor:S.next_cursor}}),j=[];for await(let x of O)j.push(x);return bO(j,s6,async(x)=>{let{state:S,root:K,replies:Z}=Q(await this.client.storage.entityMessageGetThread({path:{...$,id:x.id}}));return{thread:S,comments:[K,...Z].map((X)=>c$.from(this.client,this.id,X))}})}async comment($,O){let j=await this.mutate((x)=>x.storage.entityMessageCreate({path:{parent_type:"document",parent_id:this.id},body:{...$$($),thread_id:O?.threadId??null}}));return c$.from(this.client,this.id,j)}async shortId(){return Q(await this.client.storage.getDocumentShortId({path:{document_id:this.id}}))}async teamShare(){return Q(await this.client.storage.getDocumentTeamShare({path:{document_id:this.id}}))}async setTeamShare($){await this.mutate((O)=>O.storage.setDocumentTeamShare({path:{document_id:this.id},body:{shareWithTeam:$}}))}async githubPullRequests(){let{pullRequests:$}=Q(await this.client.storage.getDocumentGithubPullRequests({path:{document_id:this.id}}));return $}async branchName(){let{branchName:$}=Q(await this.client.storage.getDocumentBranchName({path:{document_id:this.id}}));return $}webUrl(){return`${this.client.webAppUrl}/app/md/${this.id}`}static search=j$({filters:{document_filters:{}},type:"document",make:($,O)=>new q($,O.document_id)});toMention(){let $=this.detail.peek();return{tag:l$("m-document-mention",{documentId:this.id,documentName:$?.documentName??"",blockName:$?.fileType??"md"}),mention:{entity_type:"document",entity_id:this.id}}}}class Ij{id;name;constructor($,O){this.id=$;this.name=O}static async list($){let{skills:O}=Q(await $.storage.getSystemSkillsHandler());return O.map((j)=>new Ij(j.id,j.name))}}class ox{client;async byTeamSlug($){let O=Q(await this.client.storage.getDocumentByTeamSlug({path:{slug:$}}));if(typeof O!=="object"||O===null||!("data"in O)||typeof O.data!=="object"||O.data===null||!("documentMetadata"in O.data)||typeof O.data.documentMetadata!=="object"||O.data.documentMetadata===null||!("documentId"in O.data.documentMetadata)||typeof O.data.documentMetadata.documentId!=="string")throw Error("Invalid team task document response");return q.byId(this.client,O.data.documentMetadata.documentId)}async validatePermissionsToken($){let O=Q(await this.client.storage.validateDocumentPermissionsToken({body:{token:$}}));return{document:q.byId(this.client,O.document_id),user:O.user_id?M.byId(this.client,O.user_id):void 0,accessLevel:O.access_level,expiresAt:O.exp,issuer:O.iss}}async createUpload($){let O={documentName:$.name,sha:$.sha,fileType:$.fileType,mimeType:$.mimeType,projectId:$.project?.id,teamId:$.team?.id,branchedFromId:$.branchedFrom?.id,emailAttachmentId:$.attachment?.id,isTask:$.isTask},j=Q(await this.client.storage.createDocument({body:O})).data;return{document:q.byId(this.client,j.documentMetadata.documentId),uploadUrl:j.presignedUrl??void 0,contentType:j.contentType,content:j.documentMetadata.content}}constructor($){this.client=$}byId($){return q.byId(this.client,$)}create($){return q.create(this.client,$)}createSnippet($){return q.createSnippet(this.client,$)}createSkill($){return q.createSkill(this.client,$)}systemSkills(){return Ij.list(this.client)}search($,O){return q.search(this.client,$,O)}recent($){return q.recent(this.client,$)}recentlyDeleted(){return q.recentlyDeleted(this.client)}}class KO extends A{async fetch(){let{attachment:$}=Q(await this.client.email.getAttachment({path:{id:this.id}}));return $}static byId($,O){return new KO($,O)}static from($,O){return new KO($,O.db_id,O)}filename=this.field("filename");mimeType=this.field("mime_type");size=this.field("size_bytes");dataUrl=this.field("data_url");sfsId=this.field("sfs_id");contentId=this.field("content_id");async toDocument(){let{document_id:$}=Q(await this.client.email.getAttachmentDocumentId({path:{id:this.id}}));return q.byId(this.client,$)}}class H$ extends S${access=new o(this.client,"email_thread",this);async followup(){return Q(await this.client.storage.getEmailFollowup({path:{thread_id:this.id}}))}async setFollowup($){return Q(await this.client.storage.setEmailFollowup({path:{thread_id:this.id},body:$}))}async calendarInvitations(){return Q(await this.client.email.getThreadCalendarInvitations({path:{thread_id:this.id}}))}async update($){await this.mutate((O)=>O.storage.editThreadV2({path:{thread_id:this.id},body:{projectId:$.project===void 0?void 0:$.project?.id??null,sharePermission:$.sharePermission?r$($.sharePermission):void 0}}))}entityType="email_thread";propertyEntityType="THREAD";async fetch(){let{thread:$}=Q(await this.client.email.getThread({path:{thread_id:this.id},query:{limit:100}}));return $}static byId($,O){return new H$($,O)}createdAt=this.field("created_at");updatedAt=this.field("updated_at");isRead=this.field("is_read");inboxVisible=this.field("inbox_visible");accessLevel=this.field("access_level");providerId=this.field("provider_id");link=this.mappedField("link_id",($)=>z$.byId(this.client,$));project=this.mappedField("project_id",($)=>$?n.byId(this.client,$):void 0);latestInboundAt=this.field("latest_inbound_message_ts");latestOutboundAt=this.field("latest_outbound_message_ts");latestNonSpamAt=this.field("latest_non_spam_message_ts");async subject(){let{messages:$}=await this.detail.get();for(let O of $)if(O.subject)return O.subject;return}async participants(){let{messages:$}=await this.detail.get(),O=new Map;for(let j of $)for(let x of[j.from,...j.to,...j.cc,...j.bcc])if(x&&!O.has(x.email))O.set(x.email,x);return[...O.values()]}async messages($){return Q(await this.client.email.getThreadMessagesHandler({path:{id:this.id},query:{...$?.since?{since:$.since}:{},...$?.limit?{limit:$.limit}:{}}})).map((j)=>R$.from(this.client,j))}async attachments(){let{messages:$}=await this.detail.get();return $.flatMap((O)=>O.attachments.map((j)=>KO.from(this.client,j)))}async reply($){let O=$.subject??await this.subject()??"",{message:j}=await this.mutate((x)=>x.email.sendMessage({body:{message:{thread_db_id:this.id,replying_to_id:$.replyingTo?.id??null,to:$.to,cc:$.cc??null,bcc:$.bcc??null,subject:O,body_text:$.bodyText}}}));return j.db_id?R$.byId(this.client,j.db_id):void 0}async archive($=!0){await this.mutate((O)=>O.email.archiveThread({path:{id:this.id},body:{value:$}}))}async updateState($){await this.mutate((O)=>O.email.updateThreadState({path:{id:this.id},body:$}))}async operations(){return Q(await this.client.email.threadOperations({path:{id:this.id}}))}async markSeen(){await this.mutate(($)=>$.email.threadSeen({path:{id:this.id}}))}async addLabel($){await this.mutate((O)=>O.email.addRemoveThreadLabel({path:{id:this.id},body:{label_id:$.id,value:!0}}))}async removeLabel($){await this.mutate((O)=>O.email.addRemoveThreadLabel({path:{id:this.id},body:{label_id:$.id,value:!1}}))}async moveToProject($){await this.mutate((O)=>O.email.updateThreadProject({path:{thread_id:this.id},body:{projectId:$?.id??null}}))}static search=j$({filters:{email_filters:{}},type:"email",make:($,O)=>new H$($,O.thread_id)})}class R$ extends A{async fetch(){return Q(await this.client.email.getMessage({path:{id:this.id}}))}static byId($,O){return new R$($,O)}static from($,O){return new R$($,O.db_id,O)}static async send($,O){let{message:j}=Q(await $.email.sendMessage({body:{message:{to:O.to,cc:O.cc??null,bcc:O.bcc??null,subject:O.subject,body_text:O.bodyText}}}));return j.db_id?R$.byId($,j.db_id):void 0}subject=this.field("subject");from=this.field("from");to=this.field("to");cc=this.field("cc");bcc=this.field("bcc");body=this.field("body_parsed");sentAt=this.field("internal_date_ts");labels=this.field("labels");link=this.mappedField("link_id",($)=>z$.byId(this.client,$));async operationStatus(){return Q(await this.client.email.messageOperationStatus({path:{id:this.id}}))}async resolveOperation($){await this.mutate((O)=>O.email.resolveMessageOperation({path:{id:this.id},body:$}))}async completeDraftAttachment($,O=0){let j=await this.link();await this.mutate((x)=>x.email.completeDraftAttachment({path:{id:this.id,attachment_id:$},query:{draft_generation:O},headers:{"X-Email-Link-Id":j.id}}))}async transferDraft($){let O=await this.detail.get();return this.mutate((j)=>j.email.transferDraft({path:{id:this.id},body:{...$,draft_generation:$.draft_generation??O.draft_generation??0},headers:{"X-Email-Link-Id":O.link_id}}))}async addLabel($){await this.mutate((O)=>O.email.addRemoveLabel({body:{label_id:$.id,message_ids:[this.id],value:!0}}))}async removeLabel($){await this.mutate((O)=>O.email.addRemoveLabel({body:{label_id:$.id,message_ids:[this.id],value:!1}}))}async thread(){return H$.byId(this.client,(await this.detail.get()).thread_db_id)}}class YO extends R${async draftContext(){let $=await this.detail.get();return{headers:{"X-Email-Link-Id":$.link_id},query:{draft_generation:$.draft_generation??0}}}static byId($,O){return new YO($,O)}draftGeneration=this.field("draft_generation");async update($){let{headers:O,query:j}=await this.draftContext();await this.mutate((x)=>x.email.createDraft({headers:O,body:{draft:{...$0($),db_id:this.id,draft_generation:$.draftGeneration??j.draft_generation}}}))}async delete(){let{headers:$,query:O}=await this.draftContext();await this.mutate((j)=>j.email.deleteDraft({path:{id:this.id},headers:$,query:O}))}async schedule($,O){let{headers:j,query:x}=await this.draftContext();await this.mutate((S)=>S.email.upsertScheduledMessage({path:{id:this.id},headers:j,query:x,body:{send_time:$,include_signature:O?.includeSignature}}))}async unschedule(){let{headers:$,query:O}=await this.draftContext();await this.mutate((j)=>j.email.deleteScheduledDraft({path:{message_id:this.id},headers:$,query:O}))}async addAttachment($){let O={file_name:$.fileName,sha:$.sha,size:$.size,upload_id:$.uploadId},{headers:j,query:x}=await this.draftContext(),S=await this.mutate((K)=>K.email.addDraftAttachment({path:{id:this.id},headers:j,query:x,body:O}));return{attachment:rO.byId(this.client,this,S.attachment_id,!1,x.draft_generation),uploadUrl:S.upload_url,contentType:S.content_type}}async forwardAttachment($){let{headers:O,query:j}=await this.draftContext(),x=await this.mutate((S)=>S.email.addForwardedAttachment({path:{id:this.id},headers:O,query:j,body:{attachment_id:$.id}}));return rO.byId(this.client,this,x.attachment_id,!0,j.draft_generation)}async removeAttachment($){if($.draft.id!==this.id)throw Error("Attachment belongs to another draft");let{headers:O}=await this.draftContext(),j={draft_generation:$.draftGeneration};if($.forwarded)await this.mutate((x)=>x.email.removeForwardedAttachment({path:{id:this.id,attachment_id:$.id},headers:O,query:j}));else await this.mutate((x)=>x.email.removeDraftAttachment({path:{id:this.id,attachment_id:$.id},headers:O,query:j}))}async verifyAttachment($){if($.draft.id!==this.id||$.forwarded)throw Error("Expected an uploaded attachment on this draft");await this.completeDraftAttachment($.id,$.draftGeneration)}}class rO{draft;id;forwarded;draftGeneration;constructor($,O,j,x){this.draft=$;this.id=O;this.forwarded=j;this.draftGeneration=x}static byId($,O,j,x=!1,S=0){return new rO(O,j,x,S)}complete(){return this.draft.verifyAttachment(this)}remove(){return this.draft.removeAttachment(this)}toJSON(){return{id:this.id,draftId:this.draft.id,forwarded:this.forwarded,draftGeneration:this.draftGeneration}}}function $0($){let{bodyText:O,bodyHtml:j,bodyMacro:x,headers:S,includeSignature:K,draftGeneration:Z,thread:X,replyingTo:G,...L}=$;return{...L,body_text:O,body_html:j===void 0?void 0:btoa(Array.from(new TextEncoder().encode(j),(Y)=>String.fromCharCode(Y)).join("")).replaceAll("+","-").replaceAll("/","_").replaceAll("=",""),body_macro:x,headers_json:S,include_signature:K,draft_generation:Z,thread_db_id:X?.id,replying_to_id:G?.id}}class QO extends A{inbox;constructor($,O,j,x){super($,O,j);this.inbox=x}get headers(){return this.inbox?{"X-Email-Link-Id":this.inbox.id}:void 0}static byId($,O,j){return new QO($,O,void 0,j)}static from($,O,j){return new QO($,O.id,O,j)}async fetch(){let $=Q(await this.client.email.listEmailFilters({headers:this.headers})).filters.find((O)=>O.id===this.id);if(!$)throw new w(`Email filter ${this.id} is unavailable`);return $}emailAddress=this.field("email_address");emailDomain=this.field("email_domain");isImportant=this.field("is_important");async setImportant($){let O=await this.detail.get();await this.mutate((j)=>j.email.upsertEmailFilter({headers:this.headers,body:{email_address:O.email_address,email_domain:O.email_domain,is_important:$}}))}async delete(){await this.mutate(($)=>$.email.deleteEmailFilter({path:{id:this.id},headers:this.headers}))}}class e$ extends A{async fetch(){let{labels:$}=Q(await this.client.email.listLabels()),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`label ${this.id} not found`);return O}static byId($,O){return new e$($,O)}static async list($){let{labels:O}=Q(await $.email.listLabels());return O.map((j)=>new e$($,j.id,j))}static async create($,O){let{label:j}=Q(await $.email.createLabel({body:{label_name:O}}));if(!j.id)throw new b("created label has no id");return new e$($,j.id)}async delete(){Q(await this.client.email.deleteLabel({path:{id:this.id}}))}name=this.field("name");linkId=this.field("linkId");type=this.field("type");createdAt=this.field("createdAt");labelListVisibility=this.field("labelListVisibility");messageListVisibility=this.field("messageListVisibility")}class O0{client;async createDraft($,O){let j=Q(await this.client.email.createDraft({body:{draft:$0($)},headers:O?{"X-Email-Link-Id":O.id}:void 0}));if(!j.draft.db_id)throw Error("Draft response has no message id");return YO.byId(this.client,j.draft.db_id)}draftById($){return YO.byId(this.client,$)}async*scheduled($){let O=$?.pageSize??100;if(!Number.isInteger(O)||O<1)throw Error("pageSize must be positive");let j=Math.min(O,1000);for(let x=0;;x+=j){let S=Q(await this.client.email.getScheduledMessages({query:{offset:x,limit:j},headers:$?.inbox?{"X-Email-Link-Id":$.inbox.id}:void 0}));for(let K of S.messages)yield YO.byId(this.client,K.db_id);if(S.messages.length<j)return}}async filters($){return Q(await this.client.email.listEmailFilters({headers:$?{"X-Email-Link-Id":$.id}:void 0})).filters.map((O)=>QO.from(this.client,O,$))}async upsertFilter($,O){return QO.from(this.client,Q(await this.client.email.upsertEmailFilter({headers:O?{"X-Email-Link-Id":O.id}:void 0,body:{email_address:$.emailAddress,email_domain:$.emailDomain,is_important:$.isImportant}})).filter,O)}async contacts(){return Q(await this.client.email.listContacts()).contacts}reminders($){let{inboxes:O,...j}=$??{};return a(async(x)=>{let S=Q(await this.client.storage.listEmailReminders({query:{...j,inboxIds:O?.map((K)=>K.id),cursor:x}}));return{items:S.items.map(({threadId:K,...Z})=>({...Z,thread:H$.byId(this.client,K)})),nextCursor:S.nextCursor}})}constructor($){this.client=$}byId($){return H$.byId(this.client,$)}message($){return R$.byId(this.client,$)}attachment($){return KO.byId(this.client,$)}link($){return z$.byId(this.client,$)}links(){return z$.list(this.client)}async connectionProviders(){return Q(await this.client.auth.emailConnectionProviders())}async recoverDraftTransfer($){return Q(await this.client.email.recoverDraftTransfer({path:{id:$}}))}send($){return R$.send(this.client,$)}search($,O){return H$.search(this.client,$,O)}inbox($){return a(async(O)=>{let j=Q(await this.client.email.previewsInboxCursor({path:{view:"inbox"},query:{...$?.pageSize?{limit:$.pageSize}:{},...$?.sort?{sort_method:$.sort}:{},...O?{cursor:O}:{}}}));return{items:j.items.map((x)=>H$.byId(this.client,x.id)),nextCursor:j.next_cursor}})}label($){return e$.byId(this.client,$)}labels(){return e$.list(this.client)}createLabel($){return e$.create(this.client,$)}async deleteLabel($){Q(await this.client.email.deleteLabel({path:{id:$.id}}))}async blockSender($){Q(await this.client.email.blockSender({body:{email_address:$}}))}async unblockSender($){Q(await this.client.email.unblockSender({body:{email_address:$}}))}async blockedSenders(){return Q(await this.client.email.listBlockedSenders()).blocked_emails}}class BO{client;id;constructor($,O){this.client=$;this.id=O}static byId($,O){return new BO($,O)}async delete(){Q(await this.client.storage.deleteEntityMention({path:{mention_id:this.id}}))}toJSON(){return{id:this.id}}}class j0{client;constructor($){this.client=$}byId($){return BO.byId(this.client,$)}async create($,O){let j=Q(await this.client.storage.createEntityMention({body:{source_entity_id:$.entity.id,source_entity_type:$.type,entity_id:O.entity.id,entity_type:O.type}}));return BO.byId(this.client,j.id)}}class x0{client;constructor($){this.client=$}async list($={}){let{favorites:O}=Q(await this.client.storage.listFavorites({query:{entityType:$.entityTypes,entityId:$.entityIds}}));return O}async add($){return Q(await this.client.storage.addFavorite({body:{entityId:$.id,entityType:$.entityType}}))}async remove($){Q(await this.client.storage.removeFavoriteByEntity({path:{entity_type:$.entityType,entity_id:$.id}}))}async reorder($){Q(await this.client.storage.reorderFavorites({body:{favorites:$}}))}}class o$ extends F${entityType="foreign_entity";async fetch(){return Q(await this.client.storage.getForeignEntity({path:{id:this.id}}))}static byId($,O){return new o$($,O)}static fromRecord($,O){return new o$($,O.id,O)}foreignEntityId=this.field("foreignEntityId");source=this.field("foreignEntitySource");storedForId=this.field("storedForId");storedForAuthEntity=this.field("storedForAuthEntity");createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");async metadata(){return(await this.detail.get()).metadata}}function g1({login:$,...O}){return{...O,login:$??void 0}}class S0{client;constructor($){this.client=$}byId($){return o$.byId(this.client,$)}async bySource($,O){return o$.fromRecord(this.client,Q(await this.client.storage.getForeignEntityBySource({path:{source:$,foreign_entity_id:O}})))}async githubPullRequestFacets(){let{repositories:$,authors:O,assignees:j,labels:x}=Q(await this.client.storage.getGithubPullRequestFacets());return{repositories:$,authors:O.map(g1),assignees:j.map(g1),labels:x.map(({color:S,...K})=>({...K,color:S??void 0}))}}}class u${form;id;constructor($,O){this.form=$;this.id=O}static byId($,O){return new u$($,O)}async detail(){let O=(await this.form.schema()).sections.flatMap((j)=>j.kind==="questions"?j.questions:[]).find((j)=>j.id===this.id);if(!O)throw new w(`question ${this.id} is not on form ${this.form.id}`);return O}async title(){return(await this.detail()).title}async column(){return M$.byId(await this.form.table(),(await this.detail()).column)}async options(){return(await this.detail()).options.map(($)=>JO.byId(this,$.id))}}class JO{question;id;constructor($,O){this.question=$;this.id=O}static byId($,O){return new JO($,O)}async detail(){let $=(await this.question.detail()).options.find((O)=>O.id===this.id);if(!$)throw new w(`option ${this.id} is not on question ${this.question.id}`);return $}async label(){return(await this.detail()).label}async color(){return(await this.detail()).color??void 0}}class LO{form;id;detail;constructor($,O,j){this.form=$;this.id=O;this.detail=new V$(()=>this.load(),j)}async load(){let $=await this.form.myResponse();if($.response.id!==this.id)throw new w(`response ${this.id} is not your current response`);return $}static byId($,O,j){return new LO($,O,j)}async status(){return(await this.detail.get()).status}async row(){return(await this.detail.get()).row}async answers(){return(await this.detail.get()).answers}async booking(){return(await this.detail.get()).booking}async refresh(){let $=await this.load();return this.detail=new V$(()=>this.load(),$),this}}class d${form;id;constructor($,O){this.form=$;this.id=O}static byId($,O){return new d$($,O)}async detail(){let $=(await this.form.schema()).sections.find((O)=>O.id===this.id);if(!$)throw new w(`section ${this.id} is not on form ${this.form.id}`);return $}async title(){return(await this.detail()).title}async questions(){let $=await this.detail();return $.kind==="questions"?$.questions.map((O)=>u$.byId(this.form,O.id)):[]}}class Tj{entityType;id;constructor($,O){this.entityType=$;this.id=O}static byId($,O){return new Tj($,O)}}class k$ extends A{async fetch(){return Q(await this.client.storage.getForm({path:{id:this.id}}))}static byId($,O){return new k$($,O)}static async create($,O){let j=Q(await $.storage.createForm({body:{name:O.name,source:O.table?{kind:"table",databaseId:O.table.database.id,tableId:O.table.id}:{kind:"new"}}}));return new k$($,j.form.id,j)}static async list($,O){if(!O)return Q(await $.storage.listAccessibleForms()).map(({form:S})=>new k$($,S.id));return Q(await $.storage.listForms({query:{databaseId:O.id}})).map((x)=>new k$($,x.id))}schema(){return this.detail.get()}name=this.mappedField("form",($)=>$.name);description=this.mappedField("form",($)=>$.description);owner=this.mappedField("form",($)=>M.byId(this.client,$.ownerId));database=this.mappedField("form",($)=>J$.byId(this.client,$.databaseId));table=this.mappedField("form",($)=>Q$.byId(J$.byId(this.client,$.databaseId),$.tableId));audience=this.mappedField("form",($)=>$.audience);status=this.mappedField("form",($)=>$.status);closesAt=this.mappedField("form",($)=>$.closesAt??void 0);access=this.field("access");async sections(){return(await this.detail.get()).sections.map(($)=>d$.byId(this,$.id))}async questions(){return(await this.detail.get()).sections.flatMap(($)=>$.kind==="questions"?$.questions.map((O)=>u$.byId(this,O.id)):[])}async update($){return await this.mutate((O)=>O.storage.updateForm({path:{id:this.id},body:$})),this}assertOwns($){if($.form.id!==this.id)throw new b(`question or section does not belong to form ${this.id}`)}async replaceLayout($){let O=await this.table(),j=(Z)=>{if(Z.table.id!==O.id||Z.table.database.id!==O.database.id)throw new b(`column does not belong to form ${this.id}'s table`);return Z.id},x=(Z)=>({conjunction:Z.conjunction,conditions:Z.conditions.map((X)=>c(X).with({kind:"group"},(G)=>({kind:"group",...x(G)})).with({kind:"condition"},(G)=>({kind:"condition",column:j(G.column),test:c(G.test).with({kind:"options"},(L)=>({...L,options:L.options.map((Y)=>Y.id)})).with({kind:"entities"},(L)=>({...L,entities:L.entities.map((Y)=>Y.id)})).with({kind:x$.union("presence","text","number","date","checkbox")},(L)=>L).exhaustive()})).exhaustive())}),S={sections:$.map((Z)=>{if(Z.section)this.assertOwns(Z.section);let X={id:Z.section?.id??h$(),title:Z.title,description:Z.description??""};return c(Z).with({kind:"booking"},(G)=>({...X,kind:"booking",target:G.target})).with({kind:"gate"},(G)=>({...X,kind:"gate",rules:x(G.rules),message:G.message})).with({kind:"questions"},(G)=>({...X,kind:"questions",questions:G.questions.map((L)=>{if(L.question)this.assertOwns(L.question);return{id:L.question?.id??h$(),column:j(L.column),helpText:L.helpText??"",required:L.required??!1,widget:L.widget??null}})})).exhaustive()})},K=await this.mutate((Z)=>Z.storage.putFormLayout({path:{id:this.id},body:S}));return{form:this,publicationError:K.publicationError}}wireAnswers($){return $.map(({question:O,value:j})=>{this.assertOwns(O);let x=c(j).with({type:"rows"},(S)=>({type:"rows",value:S.value.map((K)=>K.id)})).with({type:"options"},(S)=>({type:"options",value:S.value.map((K)=>{if(K.question.id!==O.id||K.question.form.id!==this.id)throw new b("option does not belong to the answered question");return{id:K.id}})})).with({type:"entities"},(S)=>({type:"entities",value:S.value.map(({entityType:K,entity:Z})=>({entityType:K,entityId:Z.id}))})).with({type:x$.union("text","number","boolean","date","link","clear")},(S)=>S).exhaustive();return{question:O.id,value:x}})}unlockedBooking($){return $?{...$,section:d$.byId(this,$.section)}:void 0}async outcome($,O){return c($).with({outcome:"stopped"},(j)=>({...j,section:d$.byId(this,j.section)})).with({outcome:"submitted"},async(j)=>{let x=A$.byId(await this.table(),j.row),S=this.unlockedBooking(j.booking);return{outcome:"submitted",response:LO.byId(this,j.response,{status:"submitted",row:x,answers:O,booking:S}),row:x,...S?{booking:S}:{}}}).exhaustive()}async submit($){let O={answers:this.wireAnswers($)};return this.outcome(Q(await this.client.storage.submitFormResponse({path:{id:this.id},body:O})),$)}async editResponse($){let O={answers:this.wireAnswers($)};return this.outcome(Q(await this.client.storage.editMyFormResponse({path:{id:this.id},body:O})),$)}async myResponse(){let $=Q(await this.client.storage.getMyFormResponse({path:{id:this.id}})),O=await this.table(),j=await Promise.all($.answers.map(async(K)=>{let Z=u$.byId(this,K.question),X=await c(K.value).with({type:"options"},(G)=>({type:"options",value:G.value.map((L)=>{if(!("id"in L))throw new b("stored form answers must reference options by id");return JO.byId(Z,L.id)})})).with({type:"entities"},(G)=>({type:"entities",value:G.value.map((L)=>({entityType:L.entityType,entity:Tj.byId(L.entityType,L.entityId)}))})).with({type:"rows"},async(G)=>{let L=await Z.detail();if(L.kind.type!=="relation")throw new b("row answer requires a relation question");let Y=Q$.byId(J$.byId(this.client,L.kind.database),L.kind.table);return{type:"rows",value:G.value.map((J)=>A$.byId(Y,J))}}).with({type:x$.union("text","number","boolean","date","link","clear")},(G)=>G).exhaustive(()=>{throw new b(`answer to question ${Z.id} has a type this SDK doesn't know`)});return{question:Z,value:X}})),x=$.response.row?A$.byId(O,$.response.row):void 0,S=this.unlockedBooking($.booking);return{...S?{booking:S}:{},response:LO.byId(this,$.response.id,{status:$.response.status,row:x,answers:j,booking:S}),status:$.response.status,stoppedAtSection:$.response.stoppedAtSection?d$.byId(this,$.response.stoppedAtSection):void 0,row:x,submittedAt:$.response.submittedAt,updatedAt:$.response.updatedAt,answers:j}}async responseSummary(){let $=Q(await this.client.storage.getFormResponseSummary({path:{id:this.id}}));return{...$,stoppedBySection:$.stoppedBySection.map((O)=>({section:d$.byId(this,O.section),count:O.count}))}}async tally(){return Q(await this.client.storage.getFormTally({path:{id:this.id}})).questions.map((O)=>{let j=u$.byId(this,O.question);return{question:j,responses:O.responses,buckets:O.buckets.flatMap((x)=>c(x.value).with({kind:"option"},(S)=>[{count:x.count,value:{kind:"option",option:JO.byId(j,S.option)}}]).with({kind:"checkbox"},(S)=>[{count:x.count,value:S}]).exhaustive((S)=>{return console.warn("macro sdk: unknown form tally bucket",S),[]}))}})}async sharePermissions(){return Q(await this.client.storage.getFormPermissions({path:{id:this.id}}))}updateSharePermissions($){return this.mutate((O)=>O.storage.updateFormPermissions({path:{id:this.id},body:$}))}webUrl(){return`${this.client.webAppUrl}/app/form/${this.id}`}respondUrl(){return`${this.client.webAppUrl}/app/form/${this.id}/respond`}}class Z0{client;constructor($){this.client=$}byId($){return k$.byId(this.client,$)}create($){return k$.create(this.client,$)}list($){return k$.list(this.client,$)}}class NO extends A{static byId($,O){return new NO($,O)}async fetch(){return Q(await this.client.storage.getGithubPullRequest({path:{id:this.id}}))}title=this.field("title");url=this.field("url");status=this.field("status");async changes(){let $=Q(await this.client.storage.getGithubPullRequestChanges({path:{id:this.id}}));return{changeset:$.changeset?new X0(this.client,this,$.changeset):void 0,error:$.error??void 0}}}class X0{client;pullRequest;record;constructor($,O,j){this.client=$;this.pullRequest=O;this.record=j}get id(){return this.record.id}async patch(){return Q(await this.client.storage.getGithubPullRequestChangesPatch({path:{id:this.pullRequest.id},query:{changeset:this.id}})).patch}toJSON(){return{pullRequestId:this.pullRequest.id,...this.record}}}class G0{client;constructor($){this.client=$}byId($){return NO.byId(this.client,$)}forEntity($){return NO.byId(this.client,$.id)}}class UO extends A{static byId($,O){return new UO($,O)}async fetch(){return Q(await this.client.storage.getHarnessPairing({path:{code:this.id}}))}name=this.field("requested_name");expiresAt=this.field("expires_at");async approve($){let O={name:$?.name,team_id:$?.team?.id,allow_permission_bypass:$?.allowPermissionBypass};return W$.from(this.client,await this.mutate((j)=>j.storage.approveHarnessPairing({path:{code:this.id},body:O})))}}class pO{client;id;constructor($,O){this.client=$;this.id=O}static byId($,O){return new pO($,O)}async claim($){let O=Q(await this.client.storage.claimHarnessPairing({path:{pairing_id:this.id},body:{device_secret:$}}));return"harness"in O?{harness:W$.from(this.client,O.harness),token:O.token}:void 0}toJSON(){return{id:this.id}}}class K0{client;constructor($){this.client=$}byId($){return W$.byId(this.client,$)}async list(){return Q(await this.client.storage.listHarnesses()).map(($)=>W$.from(this.client,$))}async me(){return W$.from(this.client,Q(await this.client.storage.getSelfHarness()))}async deleteSelf(){Q(await this.client.storage.deleteSelfHarness())}async agents(){return Q(await this.client.storage.listHarnessAgents()).map(($)=>U$.byId(this.client,$.bot_id))}async sessions(){return Q(await this.client.storage.listHarnessSessions()).map(($)=>i.byId(this.client,$.session_id))}pairing($){return UO.byId(this.client,$)}async createPairing($){let O=Q(await this.client.storage.createHarnessPairing({body:$}));return{pairing:UO.byId(this.client,O.code),device:pO.byId(this.client,O.pairing_id),deviceSecret:O.device_secret,expiresAt:O.expires_at,pollIntervalSeconds:O.poll_interval_seconds}}}var t6="00000001-0000-0000-0000-000000000002",e6="00000001-0000-0000-0002-000000000004";function o6($){let O=$.match(/^https:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/([1-9][0-9]*)\/?(?:[?#].*)?$/i);if(!O)throw Error(`Expected a GitHub pull request URL like https://github.com/owner/repo/pull/1, got ${$}`);return`${O[1]}/${O[2]}/pull/${O[3]}`}class D$ extends q{static byId($,O){return new D$($,O)}static async create($,O){let{documentId:j}=Q(await $.storage.createTaskHandler({body:{taskName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null,teamId:O.team?.id??null,shareWithTeam:O.shareWithTeam??!0}}));return new D$($,j)}static async forPullRequest($,O){let j=o6(O),{pullRequests:x}=Q(await $.storage.getGithubPullRequestTasks({body:{githubKeys:[j]}}));return(x[0]?.taskIds??[]).map((S)=>new D$($,S))}async completed(){let{subType:$}=await this.detail.get();if($!=="task")return;let j=(await this.properties()).find((x)=>x.definition.id===t6)?.value;return j?.type==="SelectOption"&&j.value.includes(e6)}webUrl(){return`${this.client.webAppUrl}/app/task/${this.id}`}static search=j$({filters:{document_filters:{sub_types:["task"],task_filters:{}}},type:"document",make:($,O)=>new D$($,O.document_id)})}class $O extends A{access=new o(this.client,"initiative",this);static byId($,O){return new $O($,O)}static from($,O){return new $O($,O.id,O)}async fetch(){return Q(await this.client.storage.getInitiative({path:{initiative_id:this.id}}))}name=this.field("name");owner=this.mappedField("ownerId",($)=>M.byId(this.client,$));members=this.mappedField("memberIds",($)=>$.map((O)=>M.byId(this.client,O)));tasks=this.mappedField("taskIds",($)=>$.map((O)=>D$.byId(this.client,O)));accessLevel=this.field("userAccessLevel");sharePermissions=this.field("sharePermission");async update($){await this.mutate((O)=>O.storage.updateInitiative({path:{initiative_id:this.id},body:{name:$.name,memberIds:$.members?.map((j)=>j.id),sharePermission:$.sharePermission?r$($.sharePermission):void 0}}))}async delete(){await this.mutate(($)=>$.storage.deleteInitiative({path:{initiative_id:this.id}}))}}class Y0{client;constructor($){this.client=$}byId($){return $O.byId(this.client,$)}async list(){return Q(await this.client.storage.listInitiatives()).initiatives.map(($)=>$O.byId(this.client,$.id))}async create($){return $O.from(this.client,Q(await this.client.storage.createInitiative({body:{name:$.name,description:$.description,memberIds:$.members?.map((O)=>O.id),shareWithTeam:$.shareWithTeam,propertyValues:$.propertyValues}})))}}class Q0{client;constructor($){this.client=$}byId($){return I$.byId(this.client,$)}async create($){return I$.from(this.client,Q(await this.client.storage.meetingCreate({body:$})))}async list(){return Q(await this.client.storage.meetingList()).meetings.map(($)=>I$.from(this.client,$))}async active(){return Q(await this.client.storage.meetingListActive()).meetings.map(($)=>I$.from(this.client,$))}async lookup($){return I$.from(this.client,Q(await this.client.storage.meetingLookup({path:{token:$}})))}}class VO extends A{async fetch(){return Q(await this.client.notification.getTypedNotificationById({path:{notification_id:this.id}}))}static byId($,O){return new VO($,O)}static from($,O){return new VO($,O.id,O)}static list($,O){return a(async(j)=>{let x=Q(await $.notification.listTypedNotifications({query:{...O?.pageSize?{limit:O.pageSize}:{},...O?.states!==void 0?{states:O.states.join(",")}:{},...j?{cursor:j}:{}}}));return{items:x.items.map((S)=>VO.from($,S)),nextCursor:x.next_cursor}})}type=this.field("notification_event_type");createdAt=this.field("created_at");updatedAt=this.field("updated_at");state=this.field("state");done=this.mappedField("state",($)=>$==="done");sent=this.field("sent");viewedAt=this.field("viewed_at");deletedAt=this.field("deleted_at");owner=this.mappedField("owner_id",($)=>M.byId(this.client,$));sender=this.mappedField("sender_id",($)=>$?M.byId(this.client,$):void 0);metadata=this.field("notification_metadata");async seen(){return await this.state()!=="unseen"}async markSeen(){await this.mutate(($)=>$.notification.bulkMarkNotificationsSeen({body:{notificationIds:[this.id]}}))}async markDone(){await this.mutate(($)=>$.notification.bulkMarkNotificationsDone({body:{notificationIds:[this.id]}}))}async markUndone(){await this.mutate(($)=>$.notification.bulkMarkNotificationsUndone({body:{notificationIds:[this.id]}}))}async delete(){await this.mutate(($)=>$.notification.deleteUserNotificationV2({path:{notification_id:this.id}}))}}class J0{client;constructor($){this.client=$}byId($){return VO.byId(this.client,$)}list($){return VO.list(this.client,$)}async markSeen($){Q(await this.client.notification.bulkMarkNotificationsSeen({body:{notificationIds:$}}))}async markDone($){Q(await this.client.notification.bulkMarkNotificationsDone({body:{notificationIds:$}}))}async delete($){Q(await this.client.notification.bulkDeleteUserNotificationsV2({body:{notificationIds:$}}))}async preferences(){return Q(await this.client.notification.getNotificationTypePreferences())}async enableType($){Q(await this.client.notification.enableNotificationType({path:{notification_event_type:$}}))}async disableType($){Q(await this.client.notification.disableNotificationType({path:{notification_event_type:$}}))}}class V0{client;constructor($){this.client=$}async list(){let{data:$}=Q(await this.client.storage.getPinsHandler({}));return $?.recent??[]}async add($,O){Q(await this.client.storage.addPinHandler({path:{pinned_item_id:$.id},body:{pinType:$.entityType,pinIndex:O.index}}))}async remove($){Q(await this.client.storage.removePinHandler({path:{pinned_item_id:$.id},body:{pinType:$.entityType}}))}async reorder($){Q(await this.client.storage.reorderPinsHandler({body:$}))}}class W0{client;constructor($){this.client=$}byId($){return n.byId(this.client,$)}create($){return n.create(this.client,$)}search($,O){return n.search(this.client,$,O)}}class zO{client;definitionId;id;record;constructor($,O,j,x){this.client=$;this.definitionId=O;this.id=j;this.record=x}static from($,O,j){return new zO($,O,j.id,j)}get value(){return this.record.value}get color(){return this.record.color??void 0}get displayOrder(){return this.record.display_order}get createdAt(){return this.record.created_at}get updatedAt(){return this.record.updated_at}async update($){return this.record=Q(await this.client.properties.updatePropertyOption({path:{definition_id:this.definitionId,option_id:this.id},body:$})),this}async delete(){Q(await this.client.properties.deletePropertyOption({path:{definition_id:this.definitionId,option_id:this.id}}))}}class OO{client;id;detail;constructor($,O,j){this.client=$;this.id=O;this.detail=new V$(()=>this.fetch(),j)}async fetch(){return Q(await this.client.properties.getPropertyDefinition({path:{definition_id:this.id}}))}static async create($,O){let j=Q(await $.properties.createPropertyDefinition({body:{display_name:O.displayName,scope:O.scope,data_type:O.dataType}}));return new OO($,j.id,j)}static byId($,O){return new OO($,O)}static fromRecord($,O){return new OO($,O.id,O)}get displayName(){return this.detail.get().then(($)=>$.display_name)}get dataType(){return this.detail.get().then(($)=>$.data_type)}get owner(){return this.detail.get().then(($)=>$.owner)}get isSystem(){return this.detail.get().then(($)=>$.is_system)}get isMultiSelect(){return this.detail.get().then(($)=>$.is_multi_select)}get createdAt(){return this.detail.get().then(($)=>$.created_at)}get updatedAt(){return this.detail.get().then(($)=>$.updated_at)}async delete(){return Q(await this.client.properties.deletePropertyDefinition({path:{definition_id:this.id}}))}async options(){return Q(await this.client.properties.getPropertyOptions({path:{definition_id:this.id}})).map((O)=>zO.from(this.client,this.id,O))}async addOption($){let O=Q(await this.client.properties.addPropertyOption({path:{definition_id:this.id},body:$}));return zO.from(this.client,this.id,O)}async updateOption($,O){let j=Q(await this.client.properties.updatePropertyOption({path:{definition_id:this.id,option_id:$.id},body:O}));return zO.from(this.client,this.id,j)}async deleteOption($){return Q(await this.client.properties.deletePropertyOption({path:{definition_id:this.id,option_id:$.id}}))}}class B0{client;constructor($){this.client=$}async list($){return Q(await this.client.properties.listProperties({query:{scope:$?.scope??"all",...$?.forEntityType!==void 0?{for_entity_type:$.forEntityType}:{}}})).map((j)=>{let x="definition"in j?j.definition:j;return OO.fromRecord(this.client,x)})}create($){return OO.create(this.client,$)}definition($){return OO.byId(this.client,$)}async bulkEntityProperties($){return Q(await this.client.properties.getBulkEntityProperties({body:$}))}async updateEntityPropertyOptions($,O){return Q(await this.client.properties.bulkUpdateEntitiesPropertyOptions({body:{entities:$.map((x)=>x.propertyReference()),property_id:O.property.id,...O.add?{add_option_ids:O.add.map((x)=>x.id)}:{},...O.remove?{remove_option_ids:O.remove.map((x)=>x.id)}:{}}})).results}async addEntityPropertyOption($){return Q(await this.client.properties.addEntityPropertyOption({path:{...$.entity.propertyReference(),property_id:$.property.id,option_id:$.option.id}}))}async removeEntityPropertyOption($){return Q(await this.client.properties.removeEntityPropertyOption({path:{...$.entity.propertyReference(),property_id:$.property.id,option_id:$.option.id}}))}async tags(){return Q(await this.client.properties.listTags({}))}}function L0($){return c($).with({type:"cron"},(O)=>O).with({type:"events"},(O)=>({type:"events",filters:O.filters.map(({entities:j,...x})=>({...x,ids:j?.map((S)=>S.entity.id)}))})).exhaustive()}function $7($){return c($).with({type:"multiple"},(O)=>({type:"multiple",triggers:O.triggers.map(L0)})).with({type:"cron"},L0).with({type:"events"},L0).exhaustive()}class jO extends A{static byId($,O){return new jO($,O)}static from($,O){if(!O.id)throw Error("Routine response has no id");return new jO($,O.id,O)}async fetch(){return Q(await this.client.scheduledAction.getScheduledAction({path:{id:this.id}}))}name=this.field("name");trigger=this.field("trigger");enabled=this.field("enabled");nextRunAt=this.field("next_run_at");revision=this.field("configuration_revision");owner=this.mappedField("owner",($)=>M.byId(this.client,$));async update($){await this.mutate((O)=>O.scheduledAction.updateScheduledAction({path:{id:this.id},body:U0($)}))}async setEnabled($){await this.mutate((O)=>O.scheduledAction.setScheduledActionEnabled({path:{id:this.id},body:{enabled:$}}))}async execute(){let $=Q(await this.client.scheduledAction.executeScheduledActionNow({path:{id:this.id}}));if($.resource)return c($.resource).with({type:"agent"},(O)=>i.byId(this.client,O.id)).with({type:"chat"},(O)=>Z$.byId(this.client,O.id)).exhaustive();return $.chat_id?Z$.byId(this.client,$.chat_id):void 0}async history(){return Q(await this.client.scheduledAction.listScheduledActionHistory({path:{id:this.id}})).map(($)=>new N0(this,$))}async delete(){await this.mutate(($)=>$.scheduledAction.deleteScheduledAction({path:{id:this.id}}))}}class N0{routine;record;constructor($,O){this.routine=$;this.record=O}get id(){return this.record.id??void 0}toJSON(){return{routine:this.routine.id,...this.record}}}function U0($){let O={prompt:$.prompt,user_prompt:$.userPrompt,model:$.model,agent:$.agent?{bot_id:$.agent.id}:void 0};return{kind:"Agent",name:$.name,enabled:$.enabled,trigger:$7($.trigger),task:{...O}}}class z0{client;constructor($){this.client=$}byId($){return jO.byId(this.client,$)}async create($){return jO.from(this.client,Q(await this.client.scheduledAction.createScheduledAction({body:{...U0($),enabled:$.enabled??!0}})))}async list($){return Q(await this.client.scheduledAction.listScheduledActions({query:{include_events:$?.includeEvents}})).map((O)=>jO.from(this.client,O))}}class I0{client;constructor($){this.client=$}byId($){return D$.byId(this.client,$)}create($){return D$.create(this.client,$)}forPullRequest($){return D$.forPullRequest(this.client,$)}search($,O){return D$.search(this.client,$,O)}}class T0{client;constructor($){this.client=$}byId($){return T$.byId(this.client,$)}current(){return T$.current(this.client)}list(){return T$.list(this.client)}}class H0{client;constructor($){this.client=$}async get($){return Q(await this.client.unfurl.getUnfurl({query:{url:$}}))}async bulk($){return Q(await this.client.unfurl.getUnfurlBulk({body:{url_list:$}}))}}class R0{client;constructor($){this.client=$}byId($){return M.byId(this.client,$)}me(){return M.me(this.client)}}class xO extends A{signingSecret;constructor($,O,j,x){super($,O,j);this.signingSecret=x}async fetch(){return Q(await this.client.storage.getWebhook({path:{webhook_id:this.id}}))}static async create($,O){let j=Q(await $.storage.createWebhook({body:{endpoint_url:O.url,namespace:O.namespace,name:O.name,filters:O.filters,scope:O.scope??"user",...O.headers!==void 0?{headers:O.headers}:{}}}));return new xO($,j.id,j,j.signing_secret)}static byId($,O){return new xO($,O)}static fromRecord($,O){return new xO($,O.id,O)}name=this.field("name");namespace=this.field("namespace");endpointUrl=this.field("endpoint_url");status=this.field("status");isValid=this.field("is_valid");filters=this.field("filters");createdAt=this.field("created_at");workspaceId=this.field("workspace_id");createdBy=this.mappedField("created_by_user_id",($)=>M.byId(this.client,$));async scope(){let $=await this.detail.get();return $.workspace_id===$.created_by_user_id?"user":"team"}async update($){await this.mutate((O)=>O.storage.patchWebhook({path:{webhook_id:this.id},body:$}))}async rename($){await this.update({name:$})}async setUrl($){await this.update({endpoint_url:$})}async setFilters($){await this.update({filters:$})}async pause(){await this.update({status:"paused"})}async resume(){await this.update({status:"active"})}async delete(){await this.mutate(($)=>$.storage.deleteWebhook({path:{webhook_id:this.id}}))}async validate(){return this.mutate(($)=>$.storage.validateWebhook({path:{webhook_id:this.id}}))}}class D0{client;constructor($){this.client=$}create($){return xO.create(this.client,$)}byId($){return xO.byId(this.client,$)}async list(){let{webhooks:$}=Q(await this.client.storage.listWebhooks());return $.map((O)=>xO.fromRecord(this.client,O))}}function C0($){if("properties"in $.data)return $.data.properties;if($.tag==="calendarEvent")return $.data.extra.properties;return[]}function y1($,O,j){let x=[];for(let S of C0(O)){if(S.definition.data_type!=="TAG"||S.value?.type!=="SelectOption")continue;for(let K of S.value.value){let Z=j.get(K);if(Z&&!x.some((X)=>X.label===Z.label&&X.scope===Z.scope))x.push(Z)}}switch(O.tag){case"document":return{type:"document",id:O.data.id,entity:q.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name,fileType:O.data.fileType,subType:O.data.subType?.type};case"chat":return{type:"ai_chat",id:O.data.id,entity:Z$.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name};case"project":return{type:"project",id:O.data.id,entity:n.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name};case"emailThread":return{type:"email",id:O.data.id,entity:H$.byId($,O.data.id),snapshot:O,tags:x,subject:O.data.name,snippet:O.data.snippet,senderName:O.data.senderName,senderEmail:O.data.senderEmail,inboxVisible:O.data.inboxVisible,isRead:O.data.isRead,isDraft:O.data.isDraft};case"channel":return{type:"channel",id:O.data.channel.id,entity:f.byId($,O.data.channel.id),snapshot:O,tags:x,name:O.data.channel.name};case"channelThread":return{type:"channel_thread",id:O.data.id,entity:new g$($,O.data.channel_id,O.data.id),snapshot:O,tags:x,channelId:O.data.channel_id};case"call":return{type:"call",id:O.data.callId,entity:Y$.byId($,O.data.callId),snapshot:O,tags:x,createdBy:O.data.createdBy};case"calendarEvent":return{type:"calendar_event",id:O.data.id,entity:K$.byId($,O.data.id),snapshot:O,tags:x,title:O.data.title,status:O.data.status,location:O.data.location,conferenceUrl:O.data.conferenceUrl,conferenceProvider:O.data.conferenceProvider,time:O.data.time};case"foreignEntity":return{type:"foreign_entity",id:O.data.id,entity:o$.byId($,O.data.id),snapshot:O,tags:x,foreignEntityId:O.data.foreignEntityId,foreignEntitySource:O.data.foreignEntitySource,metadata:O.data.metadata};default:throw Error(`Unexpected workspace entity type: ${O.tag}`)}}var v1="00000000-0000-0000-0000-000000000000",_0={document:["df","id"],project:["pf","pid"],ai_chat:["cf","cid"],email:["ef","ThreadId"],channel:["chanf","ChannelId"],channel_thread:["cthf","ThreadId"],call:["callf","CallId"],calendar_event:["calf","id"],foreign_entity:["fef","id"]},Hj=($)=>$.replace(/[A-Z]/g,(O)=>O.toLowerCase()),h1=($,O)=>$==null?O:{"&":[$,O]};function M0($,O){if(!$||typeof $!=="object"||Array.isArray($))throw Error(`Invalid workspace ${O}: expected a filter expression.`);let j=Object.entries($),x=j[0];if(j.length!==1||x===void 0)throw Error(`Invalid workspace ${O}: use exactly one of l, &, |, !.`);let[S,K]=x;if(S==="l")return;if(S==="!"){M0(K,`${O}.!`);return}if(S!=="&"&&S!=="|")throw Error(`Invalid workspace ${O}: use l, &, | or !.`);if(!Array.isArray(K)||K.length!==2)throw Error(`Invalid workspace ${O}.${S}: expected exactly two expressions. Use {l: {...}} for a single condition; nest binary operators for three or more.`);K.forEach((Z,X)=>{M0(Z,`${O}.${S}[${X}]`)})}class Rj{client;tagSets;constructor($){this.client=$}sets(){return this.tagSets??=this.client.properties.listTags({}).then(Q),this.tagSets}async tagMap(){let $=new Map;for(let O of await this.sets())for(let j of O.options)if(j.value.type==="string")$.set(j.id,{label:j.value.value,scope:O.scope==="user"?"personal":"team"});return $}async body($){for(let[S,K,Z]of[["sortBy",$.sortBy,["recently_viewed","recently_updated","recently_created"]],["emailPreset",$.emailPreset,["signal"]],["tagsMatch",$.tagsMatch,["any","all"]]])if(K!==void 0&&!Z.includes(K))throw Error(`Invalid workspace ${S}: ${K}`);if($.includeTypes!==void 0&&(!Array.isArray($.includeTypes)||$.includeTypes.some((S)=>!Object.hasOwn(_0,S))))throw Error(`Invalid workspace includeTypes. Supported values: ${Object.keys(_0).join(", ")}. Tasks use document with df: {l: {dst: 'task'}}.`);for(let S of["df","pf","cf","ef","chanf","cthf","callf","fef","calf","propf"])if($[S]!=null)M0($[S],S);if($.tags?.some((S)=>S.scope!==void 0&&S.scope!=="personal"&&S.scope!=="team"))throw Error("Invalid workspace tag scope");if($.limit!==void 0&&!Number.isFinite($.limit))throw Error("Workspace limit must be finite");let O={df:$.df,pf:$.pf,cf:$.cf,ef:$.ef,chanf:$.chanf,cthf:$.cthf,callf:$.callf,fef:$.fef,calf:$.calf,propf:$.propf,ccf:{l:{id:v1}},favorites_only:$.favoritesOnly,expand:!0,limit:Math.max(1,Math.min(500,Math.trunc($.limit??50))),sort_method:$.sortBy==="recently_viewed"?"viewed_at":$.sortBy==="recently_created"?"created_at":"updated_at",sort_direction:"desc",emailView:$.emailView??"inbox"};if($.emailPreset==="signal")O.ef={"&":[{l:{Importance:!0}},{l:{Shared:"exclude"}}]};let j=$.inbox?.trim();if(j){let{links:S}=Q(await this.client.email.listLinks()),K=S.filter((X)=>Hj(X.email_address)===Hj(j)),Z=K[0];if(!Z)throw Error(`No connected inbox matches "${j}". Connected inboxes: ${S.map((X)=>X.email_address).join(", ")}.`);if(K.length>1)throw Error(`Multiple connected inboxes match "${j}"; cannot pick one.`);O.ef=h1(O.ef,{l:{Owner:Z.id}})}let x=$.includeTypes??($.emailPreset==="signal"?["email"]:void 0);if(x?.length){for(let[S,[K,Z]]of Object.entries(_0))if(!x.includes(S))O[K]={l:{[Z]:v1}}}if($.tags?.length){let S=(await this.sets()).flatMap((G)=>{let L=G.definition;if(!L)return[];return G.options.flatMap((Y)=>Y.value.type==="string"?[{id:Y.id,definitionId:L.id,label:Y.value.value,scope:G.scope==="user"?"personal":"team"}]:[])}),K=new Map;for(let G of $.tags){let L=S.filter((Y)=>Hj(Y.label)===Hj(G.label.trim())&&(!G.scope||Y.scope===G.scope));if(!L.length)throw Error(`Unknown tag "${G.label}". Available tags: ${S.map((Y)=>`${Y.label} (${Y.scope})`).join(", ")}.`);if($.tagsMatch==="all"&&L.length>1)throw Error(`Tag "${G.label}" is ambiguous; specify personal or team scope.`);for(let Y of L)K.set(Y.id,Y)}let X=[...K.values()].map((G)=>({l:{pd:G.definitionId,v:{so:G.id}}})).reduce((G,L)=>G===void 0?L:{[$.tagsMatch==="all"?"&":"|"]:[G,L]},void 0);O.propf=h1(O.propf,X)}return O}}class A0{client;constructor($){this.client=$}async page($={}){let O=new Rj(this.client);return this.fetch(O,await O.body($),$.cursor)}async*list($={}){let O=new Rj(this.client),j=await O.body($);yield*a((x)=>this.fetch(O,j,x))}async fetch($,O,j){let x=Q(await this.client.storage.postItemsSoupAst({body:O,query:j?{cursor:j}:void 0})),K=x.items.some((Z)=>C0(Z).some((X)=>X.definition.data_type==="TAG"))?await $.tagMap():new Map;return{items:x.items.map((Z)=>y1(this.client,Z,K)),nextCursor:x.next_cursor,hasMore:x.next_cursor!=null}}}function m1({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:G,url:L,...Y}){let J,T=G??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,I=Y.signal??new AbortController().signal;while(!0){if(I.aborted)break;B++;let P=Y.headers instanceof Headers?Y.headers:new Headers(Y.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...Y,body:Y.serializedBody,headers:P,signal:I},C=new Request(L,D);if($)C=await $(L,D);let N=await(Y.fetch??globalThis.fetch)(C);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let H=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",k=()=>{try{H.cancel()}catch{}};I.addEventListener("abort",k);try{while(!0){let{done:d,value:l}=await H.read();if(d)break;U+=l,U=U.replace(/\r\n?/g,`+async function bO($,O,j){if(!Number.isInteger(O)||O<1)throw RangeError(`concurrency limit must be a positive integer, got ${O}`);let x=Array($.length),S=0,K=async()=>{while(S<$.length){let X=S;S+=1,x[X]=await j($[X])}},Z=Array.from({length:Math.min(O,$.length)},K);return await Promise.all(Z),x}class V${loader;value;inflight;constructor($,O){this.loader=$;this.value=O}get(){if(this.value!==void 0)return Promise.resolve(this.value);return this.inflight??=this.loader().then(($)=>{return this.value=$,$}),this.inflight}peek(){return this.value}clear(){this.value=void 0,this.inflight=void 0}}async function*a($){let O;do{let j=await $(O),x=j.nextCursor??void 0;if(O!==void 0&&x!==void 0&&JSON.stringify(x)===JSON.stringify(O))throw Error("Pagination cursor did not advance");yield*j.items,O=x}while(O!==void 0)}class b extends Error{constructor($){super($);this.name="MacroError"}}class SO extends b{status;data;constructor($,O){super(`Macro API error ${$}`);this.status=$;this.data=O;this.name="MacroApiError"}}class w extends b{constructor($){super($);this.name="MacroNotFoundError"}}function Q($){if($.error!==void 0)throw new SO($.response?.status??0,$.error);return $.data}class A{client;id;detail;constructor($,O,j){this.client=$;this.id=O;this.detail=new V$(()=>this.fetch(),j)}field($){return async()=>(await this.detail.get())[$]??void 0}mappedField($,O){return async()=>O((await this.detail.get())[$]??void 0)}toJSON(){let $=this.detail.peek();return $===void 0?{id:this.id}:{id:this.id,detail:$}}async mutate($){let O=Q(await $(this.client));return this.detail.clear(),O}}class F$ extends A{async permission(){return Q(await this.client.storage.getEntityPermission({path:{entity_type:this.entityType,entity_id:this.id}}))}async favorite(){return Q(await this.client.storage.addFavorite({body:{entityId:this.id,entityType:this.entityType}})),this}async unfavorite(){return Q(await this.client.storage.removeFavoriteByEntity({path:{entity_type:this.entityType,entity_id:this.id}})),this}}class S$ extends F${propertyReference(){return{entity_type:this.propertyEntityType,entity_id:this.id}}async properties($){let{properties:O}=Q(await this.client.properties.getEntityProperties({path:{entity_type:this.propertyEntityType,entity_id:this.id},query:$?.includeMetadata!==void 0?{include_metadata:$.includeMetadata}:void 0}));return O}async setProperty($,O){Q(await this.client.properties.setEntityProperty({path:{...this.propertyReference(),property_id:$.id},body:{value:O??null}}))}async updatePropertyOptions($){return Q(await this.client.properties.bulkUpdateEntityPropertyOptions({path:this.propertyReference(),body:{properties:$.map((O)=>({property_id:O.property.id,...O.add?{add_option_ids:O.add.map((j)=>j.id)}:{},...O.remove?{remove_option_ids:O.remove.map((j)=>j.id)}:{}}))}}))}async deleteProperty($){Q(await this.client.properties.deleteEntityProperty({path:{entity_property_id:$.property.id}}))}}function l$($,O){return`<${$}>${JSON.stringify(O)}</${$}>`}function H6($){return typeof $==="object"&&$!==null&&typeof $.toMention==="function"}var R6={toMention:()=>({tag:l$("m-group-mention",{groupAlias:"here"}),mention:{entity_type:"group",entity_id:"here"}})};function D6($,...O){let j="",x=[];for(let[S,K]of $.entries()){j+=K;let Z=O[S];if(Z===void 0)continue;if(H6(Z)){let X=Z.toMention();j+=X.tag,x.push(X.mention)}else j+=String(Z)}return{content:j,mentions:C6(x)}}function C6($){let O=new Set;return $.filter((j)=>{let x=`${j.entity_type}:${j.entity_id}`;if(O.has(x))return!1;return O.add(x),!0})}function $$($){return typeof $==="string"?{content:$,mentions:[]}:$}class W$ extends A{static byId($,O){return new W$($,O)}static from($,O){return new W$($,O.id,O)}async fetch(){let $=Q(await this.client.storage.listHarnesses()).find((O)=>O.id===this.id);if(!$)throw new w(`Harness ${this.id} is unavailable`);return $}name=this.field("name");connected=this.field("connected");kind=this.field("kind");async delete(){await this.mutate(($)=>$.storage.deleteHarness({path:{harness_id:this.id}}))}}class U$ extends A{static byId($,O){return new U$($,O)}static from($,O){return new U$($,O.bot.id,O)}async fetch(){let $=Q(await this.client.storage.listAgents()).find((O)=>O.bot.id===this.id);if(!$)throw new w(`Agent ${this.id} is unavailable`);return $}name=this.mappedField("bot",($)=>$.name);instructions=this.field("instructions");defaultModel=this.field("default_model");channels=this.mappedField("channel_ids",($)=>$.map((O)=>f.byId(this.client,O)));host=this.mappedField("harness_id",($)=>$?W$.byId(this.client,$):void 0);async update($){await this.mutate((O)=>O.storage.updateAgent({path:{agent_id:this.id},body:Fx($)}))}}function Fx($){let{channels:O,team:j,host:x,autoAcceptPermissions:S,avatarUrl:K,channelScope:Z,defaultModel:X,isCoding:G,...L}=$;return{...L,channel_ids:O?.map((Y)=>Y.id),team_id:j?.id,harness_id:x?.id,auto_accept_permissions:S,avatar_url:K,channel_scope:Z,default_model:X,is_coding:G}}async function Xj($,O,j){let{channelId:x,thread:S}=_6(O);if(await M6($)){let{id:Z}=Q(await $.storage.entityMessageCreate({path:{parent_type:"channel",parent_id:x},body:{content:j.content,mentions:j.mentions,attachments:[],thread_id:S?.rootId??null,nonce:crypto.randomUUID()}}));return Z}if(S)throw new b("a user-owned bot can only post via the channel webhook endpoint, which "+"does not support threads — use a team-owned bot, or requestedAs(user), "+"to reply in a thread");let{message_id:K}=Q(await $.storage.postChannelBotWebhook({path:{channel_id:x},body:{content:j.content},headers:{"x-macro-bot-scope":"user"}}));return K}function _6($){return"rootId"in $?{channelId:$.channelId,thread:$}:{channelId:$.id}}async function M6($){if($.authConfig.type!=="bot"||$.hasActingUser())return!0;let{owner:O}=await $.selfBot();return O?.type==="team"}class g${client;channelId;rootId;constructor($,O,j){this.client=$;this.channelId=O;this.rootId=j}toJSON(){return{channelId:this.channelId,rootId:this.rootId}}channel(){return f.byId(this.client,this.channelId)}root(){return e.byId(this.client,this.channelId,this.rootId)}async replies(){let{replies:$}=Q(await this.client.storage.entityMessageGetThread({path:{parent_type:"channel",parent_id:this.channelId,id:this.rootId}}));return $.map((O)=>e.from(this.client,this.channelId,O))}async reply($){let O=await Xj(this.client,this,$$($));return e.byId(this.client,this.channelId,O)}}class e extends F${channelId;mentions;entityType="channel_message";constructor($,O,j,x=[],S){super($,j,S);this.channelId=O;this.mentions=x}get path(){return{parent_type:"channel",parent_id:this.channelId,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j,x=[]){return new e($,O,j,x)}static from($,O,j){return new e($,O,j.id,j.mentions,j)}content=this.field("content");createdAt=this.field("created_at");editedAt=this.field("edited_at");updatedAt=this.field("updated_at");async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}channel(){return f.byId(this.client,this.channelId)}thread(){return new g$(this.client,this.channelId,this.id)}async react($){return await this.mutate((O)=>O.storage.entityMessageReact({path:this.path,body:{add:!0,emoji:$}})),this}async unreact($){return await this.mutate((O)=>O.storage.entityMessageReact({path:this.path,body:{add:!1,emoji:$}})),this}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}async reply($){return this.thread().reply($)}}class Gj{client;channel;record;constructor($,O,j){this.client=$;this.channel=O;this.record=j}agent(){return U$.byId(this.client,this.record.botId)}sessions(){return this.record.sessions.map(($)=>({session:i.byId(this.client,$.sessionId),isCurrent:$.isCurrent,createdAt:$.createdAt}))}turns(){return this.record.turns.map(($)=>new Ex(this.client,this,$))}async startFresh($){Q(await this.client.agentHarness.startFreshAgentConversation({path:{channel_id:this.channel.id,bot_id:this.record.botId},body:{sessionId:$.id}}))}toJSON(){return{channelId:this.channel.id,agentId:this.record.botId}}}class Ex{client;conversation;record;constructor($,O,j){this.client=$;this.conversation=O;this.record=j}source(){return e.byId(this.client,this.conversation.channel.id,this.record.sourceMessageId)}session(){return i.byId(this.client,this.record.sessionId)}async retry($){Q(await this.client.agentHarness.retryAgentConversationTurn({path:{channel_id:this.conversation.channel.id,bot_id:this.conversation.agent().id,source:this.record.sourceMessageId},body:{actionId:$}}))}toJSON(){return{channelId:this.conversation.channel.id,sourceMessageId:this.record.sourceMessageId}}}class B$ extends A{parent;toJSON(){return{...super.toJSON(),parentType:this.parent.type,parentId:this.parent.entity.id}}constructor($,O,j){super($,j);this.parent=O}static byId($,O,j){return new B$($,O,j)}get path(){return{parent_type:this.parent.type,parent_id:this.parent.entity.id,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetThread({path:this.path})).state}resolved=this.field("resolved");async update($){let O={resolved:$.resolved,detach_anchor:$.detachAnchor,nonce:$.nonce};await this.mutate((j)=>j.storage.entityMessagePatchThread({path:this.path,body:O}))}async delete($){await this.mutate((O)=>O.storage.entityMessageDeleteThread({path:this.path,query:{nonce:$}}))}}async function E$($,O,j,x){for(let K of[...x?.messages??[],...x?.around?[x.around]:[]]){let Z="channelId"in K?{type:"channel",id:K.channelId}:("documentId"in K)?{type:"document",id:K.documentId}:("callId"in K)?{type:"call",id:K.callId}:K.parent;if(Z.type!==O.type||Z.id!==O.entity.id)throw Error("Timeline message belongs to another resource")}let S=Q(await $.storage.messageTimelineEntries({path:{parent_type:O.type,parent_id:O.entity.id},query:{selection:x?JSON.stringify({cursor:x.cursor,around:x.around?.id,ids:x.messages?.map((K)=>K.id),activity_after:x.activityAfter,activity_before:x.activityBefore,anchored:x.anchored,direction:x.direction,include_deleted_threads:x.includeDeletedThreads,limit:x.limit}):void 0}}));return{entries:S.entries.map((K)=>{if(K.type==="activity")return{type:"activity",activity:{...K.activity,actor:M.byId($,K.activity.actor_id)}};return{type:"message",message:j(K.message)}}),nextCursor:S.next_cursor??void 0,previousCursor:S.previous_cursor??void 0}}var A6=50;function j$($){let{filters:O,type:j,make:x,includeCrm:S}=$;return(K,Z,X)=>{let G=X?.searchOn??"name_content",L=X?.pageSize??A6;return a(async(Y)=>{let{results:J,next_cursor:T}=Q(await K.search.unifiedSearch({body:{query:Z,match_type:"partial",search_on:G,...O?{filters:O}:{},...S?{include_crm:!0}:{}},query:{page_size:L,...Y?{cursor:Y}:{}}}));return{items:J.filter((W)=>W.type===j).map((W)=>x(K,W)),nextCursor:T}})}}class ZO{client;channel;record;constructor($,O,j){this.client=$;this.channel=O;this.record=j}get id(){return this.record.id}user(){return M.byId(this.client,this.record.user_id)}createdAt(){return this.record.created_at}async recordInteraction($){return new ZO(this.client,this.channel,Q(await this.client.storage.postActivity({body:{activity_type:$,channel_id:this.channel.id}})))}toJSON(){return this.record}}class f extends S${async recordActivity($){return new ZO(this.client,this,Q(await this.client.storage.postActivity({body:{activity_type:$,channel_id:this.id}})))}async setPicture($){await this.mutate((O)=>O.storage.setChannelPicture({path:{channel_id:this.id},body:{profile_picture_id:$?.id??null}}))}messageThreadById($){return B$.byId(this.client,{type:"channel",entity:this},$)}timelinePage($){return E$(this.client,{type:"channel",entity:this},(O)=>e.from(this.client,this.id,O),$)}async agentConversations(){return Q(await this.client.agentHarness.listAgentConversations({path:{channel_id:this.id}})).conversations.map(($)=>new Gj(this.client,this,$))}entityType="channel";propertyEntityType="CHANNEL";async fetch(){return Q(await this.client.storage.getChannel({path:{channel_id:this.id}}))}static byId($,O){return new f($,O)}static async dm($,O){let{channel_id:j}=Q(await $.storage.getOrCreateDm({body:{recipient_id:O.id}}));return new f($,j)}static async private($,O){let{channel_id:j}=Q(await $.storage.getOrCreatePrivate({body:{recipients:O.map((x)=>x.id)}}));return new f($,j)}static async create($,O){let{id:j}=Q(await $.storage.createChannel({body:{channel_type:O.type,name:O.name??null,participants:(O.participants??[]).map((x)=>x.id),team_id:O.team?.id??null}}));return new f($,j)}name=this.field("channel_name");type=this.field("channel_type");async send($,O){let j=await Xj(this.client,O?.thread??this,$$($));return e.byId(this.client,this.id,j)}messages($){return this.timeline({limit:$?.pageSize})}messagesAfter($,O){return this.timeline({activity_after:$ instanceof Date?$.toISOString():$,limit:O?.pageSize})}timeline($){return a(async(O)=>{let j=Q(await this.client.storage.messageTimeline({path:{parent_type:"channel",parent_id:this.id},query:{selection:JSON.stringify({...$,cursor:O})}}));return{items:j.items.map((x)=>e.from(this.client,this.id,x)),nextCursor:j.next_cursor}})}message($){return e.byId(this.client,this.id,$)}async rename($){await this.mutate((O)=>O.storage.patchChannel({path:{channel_id:this.id},body:{channel_name:$}}))}async delete(){await this.mutate(($)=>$.storage.deleteChannel({path:{channel_id:this.id}}))}async join(){await this.mutate(($)=>$.storage.joinChannel({path:{channel_id:this.id}}))}async joinCode(){let{join_code:$}=Q(await this.client.storage.getChannelJoinLink({path:{channel_id:this.id}}));return $}async leave(){await this.mutate(($)=>$.storage.leaveChannel({path:{channel_id:this.id}}))}async participants(){return Q(await this.client.storage.getChannelParticipants({path:{channel_id:this.id}}))}async addParticipants($){await this.mutate((O)=>O.storage.addParticipants({path:{channel_id:this.id},body:{participants:$.map((j)=>j.id)}}))}async removeParticipants($){await this.mutate((O)=>O.storage.removeParticipants({path:{channel_id:this.id},body:{participants:$.map((j)=>j.id)}}))}async typing($,O){Q(await this.client.storage.entityMessageTyping({path:{parent_type:"channel",parent_id:this.id},body:{active:$==="start",thread_id:O?.thread?.rootId??null}}))}attachments($){return a(async(O)=>{let j=Q(await this.client.storage.getChannelAttachments({path:{channel_id:this.id},query:{...$?.pageSize?{limit:$.pageSize}:{},...$?.type?{attachment_type:$.type}:{},...O?{cursor:O}:{}}}));return{items:j.items,nextCursor:j.next_cursor}})}webUrl(){return`${this.client.webAppUrl}/app/channel/${this.id}`}static search=j$({type:"channel",make:($,O)=>new f($,O.channel_id)})}class M extends S${entityType="user";propertyEntityType="USER";async fetch(){let{names:$}=Q(await this.client.auth.getUserNamesWithEmail({body:{user_ids:[this.id]}})),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`user ${this.id} not found`);return O}static byId($,O){return new M($,O)}static async me($){let{user_id:O}=Q(await $.auth.getUserInfo());return new M($,O)}async name(){let $=await this.detail.get();return[$.first_name,$.last_name].filter(Boolean).join(" ")||void 0}email(){let $=this.id.startsWith("macro|")?this.id.slice(6):void 0;return $?.includes("@")?$:void 0}dm(){return f.dm(this.client,this)}toMention(){return{tag:l$("m-user-mention",{userId:this.id}),mention:{entity_type:"user",entity_id:this.id}}}}class o{client;entityType;entity;constructor($,O,j){this.client=$;this.entityType=O;this.entity=j}get path(){return{entity_type:this.entityType,entity_id:this.entity.id}}async state($){let O=Q(await this.client.storage.accessRequestsState({path:this.path,query:{offset:$}}));return{accessLevel:O.accessLevel??void 0,canReview:O.canReview,owner:O.owner?M.byId(this.client,O.owner):void 0,pendingCount:O.pendingCount,supportedLevels:O.supportedLevels,nextOffset:O.nextOffset??void 0,mine:O.mine?WO.from(this.client,this,O.mine):void 0,requests:O.requests.map((j)=>WO.from(this.client,this,j))}}async submit($,O){return WO.from(this.client,this,Q(await this.client.storage.accessRequestsSubmit({path:this.path,body:{requestedLevel:$,revision:O}})))}async cancel($){Q(await this.client.storage.accessRequestsCancel({path:this.path,query:{revision:$}}))}async direct(){return Q(await this.client.storage.accessRequestsDirect({path:this.path})).map(($)=>({user:M.byId(this.client,$.userId),accessLevel:$.accessLevel}))}async grant($,O){Q(await this.client.storage.accessRequestsSetDirect({path:{...this.path,user_id:$.id},body:{accessLevel:O}}))}async remove($){Q(await this.client.storage.accessRequestsRemoveDirect({path:{...this.path,user_id:$.id}}))}async resolve($,O){let j=$.access.toJSON();if(j.entity_type!==this.entityType||j.entity_id!==this.entity.id)throw Error("Access request belongs to another entity");return Q(await this.client.storage.accessRequestsResolve({path:{...this.path,request_id:$.id},body:O}))}toJSON(){return this.path}}class WO extends A{access;resolvedRecord;constructor($,O,j){super($,j.id,j);this.access=O}static from($,O,j){return new WO($,O,j)}async fetch(){if(this.resolvedRecord)return this.resolvedRecord;let $;do{let O=await this.access.state($),j=[O.mine,...O.requests].find((x)=>x?.id===this.id);if(j)return j.detail.get();$=O.nextOffset}while($!==void 0);throw new w(`Access request ${this.id} is unavailable`)}revision=this.field("revision");status=this.field("status");requestedLevel=this.field("requestedLevel");requester=this.mappedField("requesterId",($)=>M.byId(this.client,$));async resolve($){this.resolvedRecord=await this.access.resolve(this,{revision:await this.revision(),grantedLevel:$}),this.detail.clear()}}function r$($){return{...$,channelSharePermissions:$.channelSharePermissions===void 0||$.channelSharePermissions===null?$.channelSharePermissions:$.channelSharePermissions.map((O)=>({channelId:O.channel.id,accessLevel:O.accessLevel,operation:O.operation}))}}class L$ extends A{parent;constructor($,O,j,x){super($,j,x);this.parent=O}static byId($,O,j){return new L$($,O,j)}static fromRecord($,O,j){return new L$($,O,j.id,j)}static async create($,O,j){return L$.createForSession($,O.session(),j,O)}static async createForSession($,O,j,x){let S=Q(await $.agentHarness.createSessionReview({path:{session_id:O.id},body:{...j,executionId:x?.id??null}}));return L$.fromRecord($,O,S)}static async list($,O){return Q(await $.agentHarness.listExecutionReviews({path:{session_id:O.session().id,execution_id:O.id}})).map((x)=>L$.fromRecord($,O.session(),x))}async fetch(){return Q(await this.client.agentHarness.getSessionReview({path:{session_id:this.parent.id,review_id:this.id}}))}title=this.field("title");kind=this.field("kind");session(){return this.parent}async reference(){return{kind:await this.kind(),id:this.id}}async items(){return(await this.detail.get()).items.map(($)=>new wx($,{edit:(O)=>this.decide({action:"edit",item:$.id,draft:O}),submit:()=>this.decide({action:"submit",items:[$.id]}),dismiss:()=>this.decide({action:"dismiss",items:[$.id]})}))}async refresh(){return this.detail.clear(),await this.detail.get(),this}async submitAll(){await this.decide({action:"submit",items:[]})}async dismissAll(){await this.decide({action:"dismiss",items:[]})}async decide($){let O=(await this.detail.get()).revision;await this.mutate((j)=>j.agentHarness.decideSessionReview({path:{session_id:this.parent.id,review_id:this.id},body:{...$,revision:O}}))}}class wx{snapshot;actions;constructor($,O){this.snapshot=$;this.actions=O}get id(){return this.snapshot.id}get status(){return this.snapshot.status}get draft(){return this.snapshot.draft}get result(){return this.snapshot.result}async edit($){await this.actions.edit($)}async submit(){await this.actions.submit()}async dismiss(){await this.actions.dismiss()}}class kO extends A{parent;constructor($,O,j){super($,O);this.parent=j}static byId($,O,j){return new kO($,j,O)}async fetch(){return Q(await this.client.agentHarness.getCodeExecution({path:{session_id:this.parent.id,execution_id:this.id}}))}reviews={create:($)=>L$.create(this.client,this,$),list:()=>L$.list(this.client,this)};session(){return this.parent}status=this.field("status");source=this.field("source");calls=this.field("calls");error=this.field("error");async result(){return(await this.detail.get()).result}async refresh(){return this.detail.clear(),await this.detail.get(),this}}class Kj{client;sessionId;dto;constructor($,O,j){this.client=$;this.sessionId=O;this.dto=j}static from($,O,j){return new Kj($,O,j)}get actionId(){return this.dto.actionId}get kind(){return this.dto.kind}get prompt(){return this.dto.prompt??void 0}get attachments(){return this.dto.attachments??[]}get actorUserId(){return this.dto.actorUserId??void 0}get createdAt(){return this.dto.createdAt}async edit($){return Q(await this.client.agentHarness.editQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId},body:{prompt:$}})),this.dto={...this.dto,prompt:$},this}async steer(){Q(await this.client.agentHarness.steerQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId}}))}async remove(){Q(await this.client.agentHarness.removeQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId}}))}}class gO{client;session;id;constructor($,O,j){this.client=$;this.session=O;this.id=j}static byId($,O,j){return new gO($,O,j)}async answer($){return Q(await this.client.agentHarness.answerAgentSessionToolApproval({path:{session_id:this.session.id,approval_id:this.id},body:{answer:$}}))}toJSON(){return{id:this.id,sessionId:this.session.id}}}class i extends A{access=new o(this.client,"agent_session",this);toolApprovalById($){return gO.byId(this.client,this,$)}async sharePermissions(){return Q(await this.client.agentHarness.getAgentSessionPermissions({path:{session_id:this.id}}))}async updateSharePermissions($){return this.mutate((O)=>O.agentHarness.updateAgentSessionPermissions({path:{session_id:this.id},body:r$($)}))}static byId($,O){return new i($,O)}static async createManaged($,O){let{session:j}=Q(await $.agentHarness.createAgentSession({body:{prompt:O?.prompt,instructions:O?.instructions,model:O?.model,repoUrl:O?.repoUrl,repoBranch:O?.repoBranch}}));return new i($,j.id,j)}static async repositories($){let{repositories:O}=Q(await $.agentHarness.listAgentRepositories());return O.map((j)=>({url:j.url,defaultBranch:j.defaultBranch??void 0}))}static async repositoryBranches($,O){let{branches:j}=Q(await $.agentHarness.listAgentRepositoryBranches({query:{repoUrl:O}}));return j}async fetch(){return Q(await this.client.agentHarness.getAgentSession({path:{session_id:this.id}}))}name=this.field("name");isArchived=this.field("isArchived");model=this.field("model");harness=this.field("harness");repoUrl=this.field("repoUrl");workspace=this.field("workspace");instructions=this.field("instructions");status=this.field("status");sandboxSize=this.field("sandboxSize");createdAt=this.field("createdAt");modifiedAt=this.field("modifiedAt");static async forPullRequest($,O){let{sessionIds:j}=Q(await $.agentHarness.agentSessionsForPullRequest({body:{url:O}}));return j.map((x)=>i.byId($,x))}async pullRequests(){let{pullRequests:$}=Q(await this.client.agentHarness.listAgentSessionPullRequests({path:{session_id:this.id}}));return $.map((O)=>({githubKey:O.githubKey,url:O.url,source:O.source,linkedBy:O.linkedBy?M.byId(this.client,O.linkedBy):void 0,createdAt:O.createdAt}))}async linkPullRequest($){Q(await this.client.agentHarness.linkAgentSessionPullRequest({path:{session_id:this.id},body:{url:$}}))}async unlinkPullRequest($){Q(await this.client.agentHarness.unlinkAgentSessionPullRequest({path:{session_id:this.id},query:{url:$}}))}async rename($){await this.mutate((O)=>O.agentHarness.renameAgentSession({path:{session_id:this.id},body:{name:$}}))}async archive(){await this.setArchived(!0)}async unarchive(){await this.setArchived(!1)}async setArchived($){await this.mutate((O)=>O.agentHarness.setAgentSessionArchived({path:{session_id:this.id},body:{isArchived:$}}))}async setSandboxSize($){let{size:O}=await this.mutate((j)=>j.agentHarness.putAgentSessionSandboxSize({path:{session_id:this.id},body:{size:$}}));return O}static async defaultSandboxSize($){return Q(await $.agentHarness.getAgentSandboxSize()).size}static async setDefaultSandboxSize($,O){return Q(await $.agentHarness.putAgentSandboxSize({body:{size:O}})).size}static async codingPreferences($){return Q(await $.agentHarness.getAgentCodingPreferences())}static async setCodingPreferences($,O){return Q(await $.agentHarness.putAgentCodingPreferences({body:O}))}async control($){return this.mutate((O)=>O.agentHarness.controlAgentSession({path:{session_id:this.id},body:$}))}prompt($,O){return this.control({type:"prompt",prompt:$,...O&&O.length>0?{attachments:O}:{}})}async queue(){let{entries:$}=Q(await this.client.agentHarness.getAgentSessionQueue({path:{session_id:this.id}}));return $.map((O)=>Kj.from(this.client,this.id,O))}async changes(){return Q(await this.client.agentHarness.getAgentSessionChanges({path:{session_id:this.id}}))}async changesPatch(){return Q(await this.client.agentHarness.getAgentSessionChangesPatch({path:{session_id:this.id}})).patch}async refreshChanges(){return this.mutate(($)=>$.agentHarness.refreshAgentSessionChanges({path:{session_id:this.id}}))}async foldedLog(){let{bot:$,messages:O}=Q(await this.client.agentHarness.getAgentSessionFoldedLog({path:{session_id:this.id}}));return{bot:$,messages:O}}async log(){return Q(await this.client.agentHarness.getAgentSessionLog({path:{session_id:this.id}}))}reviews={create:($)=>L$.createForSession(this.client,this,$),byId:($)=>L$.byId(this.client,this,$)};codeExecutions={byId:($)=>kO.byId(this.client,this,$)};async delete(){await this.mutate(($)=>$.agentHarness.deleteAgentSession({path:{session_id:this.id}}))}}class qx{client;constructor($){this.client=$}byId($){return i.byId(this.client,$)}createManaged($){return i.createManaged(this.client,$)}repositories(){return i.repositories(this.client)}repositoryBranches($){return i.repositoryBranches(this.client,$)}forPullRequest($){return i.forPullRequest(this.client,$)}defaultSandboxSize(){return i.defaultSandboxSize(this.client)}setDefaultSandboxSize($){return i.setDefaultSandboxSize(this.client,$)}codingPreferences(){return i.codingPreferences(this.client)}setCodingPreferences($){return i.setCodingPreferences(this.client,$)}}class fx{client;constructor($){this.client=$}byId($){return U$.byId(this.client,$)}async list(){return Q(await this.client.storage.listAgents()).map(($)=>U$.from(this.client,$))}async create($){return U$.from(this.client,Q(await this.client.storage.createAgent({body:Fx($)})))}}class bx{client;async usage($={}){let{users:O,...j}=$;return Q(await this.client.cognition.getUsageHandler({body:{...j,include_users:O?.map((x)=>x.id)}}))}constructor($){this.client=$}async structuredCompletion($){return Q(await this.client.cognition.structuredCompletion({body:$}))}async decide($){return Q(await this.client.cognition.decisions({body:$}))}}class p$ extends A{static byId($,O){return new p$($,O)}static from($,O){return new p$($,O.id,{id:O.id,name:O.name,createdAt:O.createdAt})}async fetch(){let $=Q(await this.client.storage.listUserApiKeys()).keys.find((O)=>O.id===this.id);if(!$)throw new w(`API key ${this.id} is unavailable`);return $}name=this.field("name");createdAt=this.field("createdAt");async delete(){await this.mutate(($)=>$.storage.deleteUserApiKey({path:{id:this.id}}))}}class kx{client;constructor($){this.client=$}byId($){return p$.byId(this.client,$)}async list(){return Q(await this.client.storage.listUserApiKeys()).keys.map(($)=>p$.from(this.client,$))}async create($){let O=Q(await this.client.storage.createUserApiKey({body:{name:$}}));return{key:p$.from(this.client,O),secret:O.key}}async tokenForEmail($){return Q(await this.client.auth.macroApiToken({query:{email:$}}))}}class yO{client;constructor($){this.client=$}async me(){if(this.client.authConfig.type!=="bot")throw new b("bots.me() requires bot auth — a user API key has no bot identity");return Q(await this.client.storage.getSelfBot())}async channels(){if(this.client.authConfig.type!=="bot")throw new b("bots.channels() requires bot auth — a user API key has no bot identity");let $=await this.me();return Q(await this.client.storage.listBotChannels({path:{bot_id:$.id}}))}async myPrincipalId(){if(this.client.authConfig.type!=="bot")throw new b("bots.myPrincipalId() requires bot auth — a user API key has no bot identity");return this.client.myPrincipalId()}}class z$ extends A{async fetch(){let{links:$}=Q(await this.client.email.listLinks()),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`email link ${this.id} not found`);return O}static byId($,O){return new z$($,O)}static async list($){let{links:O}=Q(await $.email.listLinks());return O.map((j)=>new z$($,j.id,j))}emailAddress=this.field("email_address");provider=this.field("provider");isPrimary=this.field("is_primary");isSyncActive=this.field("is_sync_active");syncStatus=this.field("sync_status");needsReauth=this.field("needs_reauth");photoUrl=this.field("photo_url");async settingsOperations(){return Q(await this.client.email.mailboxSettingsOperations({headers:{"X-Email-Link-Id":this.id}}))}}class y$ extends A{async setContributesToAvailability($){await this.mutate((O)=>O.calendar.setAvailabilityCalendar({path:{calendar_id:this.id},body:{contributesToAvailability:$}}))}async fetch(){let{calendars:$}=Q(await this.client.calendar.listCalendars()),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`calendar ${this.id} not found`);return O}static byId($,O){return new y$($,O)}static async list($){let{calendars:O}=Q(await $.calendar.listCalendars());return O.map((j)=>new y$($,j.id,j))}name=this.field("name");emailAddress=this.field("emailAddress");isPrimary=this.field("isPrimary");isWritable=this.field("isWritable");isSubscription=this.field("isSubscription");color=this.field("color");syncError=this.field("syncError");emailLink=this.mappedField("emailLinkId",($)=>z$.byId(this.client,$))}class vO{client;id;constructor($,O){this.client=$;this.id=O}async status(){return Q(await this.client.calendar.calendarReplacementStatus({path:{operation_id:this.id}}))}async confirm(){return Q(await this.client.calendar.confirmCalendarReplacement({path:{operation_id:this.id}}))}async discard(){Q(await this.client.calendar.discardCalendarReplacement({path:{operation_id:this.id}}))}}class K$ extends A{async fetch(){throw new b(`calendar event ${this.id} has no fetch-by-id endpoint; read the record returned by calendar.createEvent / event.update / event.rsvp instead`)}static byId($,O){return new K$($,O)}static fromRecord($,O){return new K$($,O.id,O)}title=this.field("title");description=this.field("description");location=this.field("location");time=this.field("time");status=this.field("status");attendees=this.field("attendees");transparency=this.field("transparency");isReadOnly=this.field("isReadOnly");recurrenceLines=this.field("recurrenceLines");guestPolicy=this.field("guestPolicy");viewerCan=this.field("viewerCan");calendar=this.mappedField("calendarId",($)=>$?y$.byId(this.client,$):void 0);record(){return this.detail.get()}async update($){let O=await this.mutate((j)=>j.calendar.updateCalendarEvent({path:{event_id:this.id},body:P6($)}));return K$.fromRecord(this.client,O)}async delete($={}){await this.mutate((O)=>O.calendar.deleteCalendarEvent({path:{event_id:this.id},query:{calendarId:$.calendar?.id,scope:$.scope,recurrenceId:$.recurrenceId}}))}async prepareReplacement($){let O=Q(await this.client.calendar.prepareCalendarReplacement({path:{event_id:this.id},body:{removeConference:$.removeConference,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return new vO(this.client,O.operationId)}async providerUrl($={}){return Q(await this.client.calendar.calendarEventProviderUrl({path:{event_id:this.id},query:{recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}})).url??void 0}async inviteGuests($){let O=await this.mutate((j)=>j.calendar.inviteCalendarEventGuests({path:{event_id:this.id},body:{guests:$.guests,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return K$.fromRecord(this.client,O)}async addToCalendar($={}){let O=await this.mutate((j)=>j.calendar.copyCalendarEvent({path:{event_id:this.id},body:{calendarId:$.calendar?.id}}));return K$.fromRecord(this.client,O)}async ics(){return Q(await this.client.storage.eventIcs({path:{event_id:this.id}}))}async rsvp($){let O=await this.mutate((j)=>j.calendar.rsvpCalendarEvent({path:{event_id:this.id},body:{response:$.response,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return K$.fromRecord(this.client,O)}}function P6($){return{title:$.title,description:$.description,location:$.location,time:$.time,attendees:$.attendees,recurrenceLines:$.recurrenceLines,visibility:$.visibility,transparency:$.transparency,reminders:$.reminders,conference:$.conference,outOfOffice:$.outOfOffice,guestPolicy:$.guestPolicy,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}class gx{client;async availabilityCalendars(){return Q(await this.client.calendar.getAvailabilityCalendars()).calendars.map(($)=>({calendar:y$.byId(this.client,$.calendarId),name:$.name,isPrimary:$.isPrimary,contributesToAvailability:$.contributesToAvailability}))}async teamSharing(){return Q(await this.client.calendar.getTeamSharing()).sharing}async setTeamSharing($){return Q(await this.client.calendar.setTeamSharing({body:{sharing:$}})).sharing}occurrences($){return a(async(O)=>{let j=Q(await this.client.storage.listOccurrences({query:{...$,cursor:O}}));return{items:j.items.map((x)=>({event:K$.fromRecord(this.client,x.event),occurrence:x.occurrence})),nextCursor:j.nextCursor}})}async teamPage($){let O=Q(await this.client.storage.listTeamCalendar({query:$}));return{items:O.items.map(({ownerId:j,...x})=>({...x,owner:M.byId(this.client,j)})),members:O.members.map((j)=>({user:M.byId(this.client,j.userId),sharing:j.sharing,coverage:j.coverage})),nextCursor:O.nextCursor??void 0}}async teamOutOfOffice($){let O=Q(await this.client.storage.listTeamOutOfOffice({query:$}));return{items:O.items.map((j)=>({event:K$.byId(this.client,j.eventId),owner:M.byId(this.client,j.ownerId),occurrenceKey:j.occurrenceKey,time:j.time,title:j.title??void 0})),hasMore:O.hasMore}}constructor($){this.client=$}calendars(){return y$.list(this.client)}calendar($){return y$.byId(this.client,$)}event($){return K$.byId(this.client,$)}replacement($){return new vO(this.client,$)}async createEvent($){let O=Q(await this.client.calendar.createCalendarEvent({body:F6($)}));return K$.fromRecord(this.client,O)}}function F6($){return{title:$.title,time:$.time,description:$.description,location:$.location,attendees:$.attendees,recurrenceLines:$.recurrenceLines,visibility:$.visibility,transparency:$.transparency,reminders:$.reminders,conference:$.conference,macroCall:$.macroCall,outOfOffice:$.outOfOffice,guestPolicy:$.guestPolicy,calendarId:$.calendar?.id,emailLinkId:$.emailLink?.id}}class I$ extends A{lookupToken;constructor($,O,j){super($,O,j);this.lookupToken=j?.shareToken}static byId($,O){return new I$($,O)}static from($,O){return new I$($,O.id,O)}async fetch(){if(this.lookupToken)return Q(await this.client.storage.meetingLookup({path:{token:this.lookupToken}}));let $=Q(await this.client.storage.meetingList()).meetings.find((O)=>O.id===this.id);if(!$)throw new w(`Meeting ${this.id} is unavailable`);return this.lookupToken=$.shareToken,$}title=this.field("title");scheduledStart=this.field("scheduledStart");scheduledEnd=this.field("scheduledEnd");channel=this.mappedField("channelId",($)=>$?f.byId(this.client,$):void 0);call=this.mappedField("callId",($)=>$?Y$.byId(this.client,$):void 0);async update($){await this.mutate((O)=>O.storage.meetingUpdate({path:{meeting_id:this.id},body:$}))}async cancel(){await this.mutate(($)=>$.storage.meetingCancel({path:{meeting_id:this.id}}))}async invitePermissions(){return Q(await this.client.storage.meetingInvitePermissions({path:{token:(await this.detail.get()).shareToken}}))}async invite($){Q(await this.client.storage.meetingInvite({path:{token:(await this.detail.get()).shareToken},body:{email:$}}))}async inviteUsers($){Q(await this.client.storage.meetingInviteUsers({path:{token:(await this.detail.get()).shareToken},body:{userIds:$.map((O)=>O.id)}}))}async webUrl(){return`${this.client.webAppUrl}/app/meet/join/${encodeURIComponent((await this.detail.get()).shareToken)}`}}class v$ extends A{callId;constructor($,O,j,x){super($,j,x);this.callId=O}get path(){return{parent_type:"call",parent_id:this.callId,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new v$($,O,j)}static from($,O,j){return new v$($,O,j.id,j)}content=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");call(){return Y$.byId(this.client,this.callId)}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){let O=Q(await this.client.storage.entityMessageCreate({path:{parent_type:"call",parent_id:this.callId},body:{...$$($),thread_id:this.callId}}));return v$.from(this.client,this.callId,O)}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}class Y$ extends F${messageThreadById($){return B$.byId(this.client,{type:"call",entity:this},$)}timelinePage($){return E$(this.client,{type:"call",entity:this},(O)=>v$.from(this.client,this.id,O),$)}access=new o(this.client,"call",this);async meeting(){return I$.from(this.client,Q(await this.client.storage.meetingShare({path:{call_id:this.id}})))}async editTranscript($){await this.mutate((O)=>O.storage.editCallTranscript({path:{call_id:this.id},body:{assignments:$}}))}async toggleTeamShare(){return this.mutate(($)=>$.storage.toggleShareWithTeam({path:{call_id:this.id}}))}entityType="call";async fetch(){return Q(await this.client.storage.getCallRecord({path:{call_id:this.id}}))}static byId($,O){return new Y$($,O)}message($){return v$.byId(this.client,this.id,$)}name=this.field("customName");channel=this.mappedField("channelId",($)=>$?f.byId(this.client,$):void 0);channelName=this.field("channelName");creator=this.mappedField("createdBy",($)=>M.byId(this.client,$));isActive=this.field("isActive");status=this.field("status");roomName=this.field("roomName");startedAt=this.field("startedAt");endedAt=this.field("endedAt");durationMs=this.field("durationMs");summary=this.field("summary");transcript=this.field("transcript");participants=this.field("participants");guests=this.field("guests");teamShareAccessLevel=this.field("teamShareAccessLevel");shareWithTeam=this.field("shareWithTeam");recordingUrl=this.field("recordingUrl");recordingPreviewUrl=this.field("recordingPreviewUrl");recordingStartedAt=this.field("recordingStartedAt");async rename($){await this.mutate((O)=>O.storage.editCallRecord({path:{call_id:this.id},body:{customName:$??""}}))}async setTeamShare($){await this.mutate((O)=>O.storage.editCallRecord({path:{call_id:this.id},body:{sharePermission:{teamShareAccessLevel:$?"view":null}}}))}async delete(){await this.mutate(($)=>$.storage.deleteCallRecord({path:{call_id:this.id}}))}static search=j$({filters:{call_filters:{}},type:"call",make:($,O)=>new Y$($,O.call_id)})}class yx{client;constructor($){this.client=$}byId($){return Y$.byId(this.client,$)}search($,O){return Y$.search(this.client,$,O)}}class vx{client;constructor($){this.client=$}async list(){let{labels:$}=Q(await this.client.storage.listChannelLabels());return $}async create($,O=[]){return Q(await this.client.storage.createChannelLabel({body:{name:$,channelIds:O.map((j)=>j.id)}}))}async createSmartTag($,O){return Q(await this.client.storage.createChannelLabel({body:{name:$,rule:O}}))}async previewSmartTag($){return Q(await this.client.storage.previewSmartTag({body:$}))}async updateSmartTag($,O,j){return Q(await this.client.storage.renameChannelLabel({path:{label_id:$.id},body:{name:O,rule:j}}))}async rename($,O){return Q(await this.client.storage.renameChannelLabel({path:{label_id:$.id},body:{name:O}}))}async delete($){Q(await this.client.storage.deleteChannelLabel({path:{label_id:$.id}}))}async setLabel($,O){Q(await this.client.storage.setChannelLabel({path:{channel_id:$.id},body:{labelId:O?.id??null}}))}}class hx{client;async activity(){return Q(await this.client.storage.getActivity()).map(($)=>new ZO(this.client,f.byId(this.client,$.channel_id),$))}labels;constructor($){this.client=$;this.labels=new vx($)}byId($){return f.byId(this.client,$)}async dm($){return f.dm(this.client,$)}async private($){return f.private(this.client,$)}async create($){return f.create(this.client,$)}async list(){let{items:$}=Q(await this.client.storage.getChannels());return $.map((O)=>f.byId(this.client,O.id.toString()))}async*search($,O){if(!O?.searchOn||O.searchOn==="name"){let{items:j}=Q(await this.client.storage.getChannels()),x=$.toLowerCase();for(let S of j)if(S.name?.toLowerCase().includes(x))yield f.byId(this.client,S.id.toString())}else yield*f.search(this.client,$,O)}}class n extends S${async sharePermissions(){return Q(await this.client.storage.getProjectPermissionsV2({path:{id:this.id}}))}async accessLevel(){return Q(await this.client.storage.getProjectUserAccessLevel({path:{id:this.id}}))}access=new o(this.client,"project",this);entityType="project";propertyEntityType="PROJECT";async fetch(){let{data:$}=Q(await this.client.storage.getProjectHandler({path:{id:this.id}}));return $.projectMetadata}static byId($,O){return new n($,O)}static async create($,O){let{data:j}=Q(await $.storage.createProjectHandler({body:{name:O.name,projectParentId:O.parent?.id??null}}));return new n($,j.id,j)}name=this.field("name");parent=this.mappedField("parentId",($)=>$?n.byId(this.client,$):void 0);createdAt=this.field("createdAt");async items(){let{data:$}=Q(await this.client.storage.getProjectContentHandler({path:{id:this.id}}));return $.map((O)=>O.item)}async rename($){await this.mutate((O)=>O.storage.editProjectV2({path:{id:this.id},body:{name:$}}))}async delete($){await this.mutate((O)=>$?.permanent?O.storage.permanentlyDeleteProject({path:{id:this.id}}):O.storage.deleteProjectHandler({path:{id:this.id}}))}async restore(){await this.mutate(($)=>$.storage.revertDeleteProject({path:{id:this.id}}))}static search=j$({filters:{project_filters:{}},type:"project",make:($,O)=>new n($,O.id)})}class hO{client;chat;id;message;constructor($,O,j,x){this.client=$;this.chat=O;this.id=j;this.message=x}static byId($,O,j,x){return new hO($,O,j,x)}async stop(){Q(await this.client.cognition.stopChatStream({body:{chat_id:this.chat.id,stream_id:this.id}}))}toJSON(){return{id:this.id,chatId:this.chat.id,messageId:this.message.id}}}class mO extends A{chat;constructor($,O,j){super($,j);this.chat=O}static byId($,O,j){return new mO($,O,j)}async fetch(){let $=Q(await this.client.cognition.getChat({path:{chat_id:this.chat.id}})).chat.messages.find((O)=>O.id===this.id);if(!$)throw new w(`Chat message ${this.id} is not yet available`);return $}content=this.field("content");role=this.field("role");async refresh(){this.detail.clear(),await this.detail.get()}toJSON(){return{...super.toJSON(),chatId:this.chat.id}}}class Z$ extends S${async send($){let{attachments:O,additionalInstructions:j,...x}=$,S=await this.mutate((Z)=>Z.cognition.sendChatMessage({body:{...x,chat_id:this.id,additional_instructions:j,attachments:O?.map((X)=>({entity_id:X.entity.id,entity_type:X.type}))}})),K=Z$.byId(this.client,S.chat_id);return hO.byId(this.client,K,S.stream_id,mO.byId(this.client,K,S.message_id))}access=new o(this.client,"chat",this);entityType="chat";propertyEntityType="CHAT";async fetch(){let{chat:$}=Q(await this.client.cognition.getChat({path:{chat_id:this.id}}));return $}static byId($,O){return new Z$($,O)}static async create($,O){let{id:j}=Q(await $.cognition.createChat({body:{name:O?.name??null,projectId:O?.project?.id??null}}));return new Z$($,j)}name=this.field("name");model=this.field("model");project=this.mappedField("projectId",($)=>$?n.byId(this.client,$):void 0);createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");messages=this.field("messages");async rename($){await this.mutate((O)=>O.cognition.patchChat({path:{chat_id:this.id},body:{name:$}}))}async delete($){await this.mutate((O)=>$?.permanent?O.cognition.permanentlyDeleteChat({path:{chat_id:this.id}}):O.cognition.deleteChat({path:{chat_id:this.id}}))}async copy(){let{id:$}=await this.mutate((O)=>O.cognition.copyChat({path:{chat_id:this.id}}));return new Z$(this.client,$)}async restore(){await this.mutate(($)=>$.cognition.revertDeleteChat({path:{chat_id:this.id}}))}async history(){let{conversation:$}=Q(await this.client.cognition.getChatHistoryHandler({path:{chat_id:this.id}}));return $}webUrl(){return`${this.client.webAppUrl}/app/chat/${this.id}`}static search=j$({filters:{chat_filters:{}},type:"chat",make:($,O)=>new Z$($,O.chat_id)});toMention(){return{tag:l$("m-document-mention",{documentId:this.id,documentName:this.detail.peek()?.name??"",blockName:"chat",blockParams:{}}),mention:{entity_type:"chat",entity_id:this.id}}}}class mx{client;constructor($){this.client=$}byId($){return Z$.byId(this.client,$)}create($){return Z$.create(this.client,$)}search($,O){return Z$.search(this.client,$,O)}}class T$ extends A{async fetch(){let O=Q(await this.client.auth.getUserTeams()).find((j)=>j.id===this.id);if(!O)throw new w(`team ${this.id} not found`);return O}static byId($,O){return new T$($,O)}static async current($){let O=Q(await $.auth.getTeam());if(!O)throw new w("caller has no current team");return new T$($,O.team.id,O.team)}static async list($){return Q(await $.auth.getUserTeams()).map((j)=>new T$($,j.id,j))}name=this.field("name");slug=this.field("slug");defaultLinkShare=this.field("default_link_share");owner=this.mappedField("owner_id",($)=>M.byId(this.client,$));async members(){let $=Q(await this.client.auth.getTeam());if(!$||$.team.id!==this.id)throw new b("members are only available for the current team (see Team.current)");return $.members.map((O)=>({user:M.byId(this.client,O.user_id),role:O.role}))}}var E6=8;class _$ extends A{parent;constructor($,O,j,x){super($,j,x);this.parent=O}get path(){return{parent_type:this.parent.type,parent_id:this.parent.id,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new _$($,O,j)}static from($,O,j){return new _$($,O,j.id,j)}text=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");deletedAt=this.field("deleted_at");async threadId(){return(await this.detail.get()).thread_id??this.id}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){return cO(this.client,this.parent,$,{threadId:await this.threadId()})}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}async function Yj($,O){let j={parent_type:O.type,parent_id:O.id},x=a(async(K)=>{let Z=Q(await $.storage.messageTimeline({path:j,query:{selection:JSON.stringify({limit:100,cursor:K})}}));return{items:Z.items,nextCursor:Z.next_cursor}}),S=[];for await(let K of x)S.push(K);return bO(S,E6,async(K)=>{let{state:Z,root:X,replies:G}=Q(await $.storage.entityMessageGetThread({path:{...j,id:K.id}}));return{thread:Z,comments:[X,...G].map((L)=>_$.from($,O,L))}})}async function cO($,O,j,x){let S=Q(await $.storage.entityMessageCreate({path:{parent_type:O.type,parent_id:O.id},body:{...$$(j),thread_id:x?.threadId??null}}));return _$.from($,O,S)}class w$ extends F${messageThreadById($){return B$.byId(this.client,{type:"crm_contact",entity:this},$)}timelinePage($){return E$(this.client,{type:"crm_contact",entity:this},(O)=>_$.from(this.client,{type:"crm_contact",id:this.id},O),$)}entityType="crm_contact";async fetch(){return Q(await this.client.storage.getContact({path:{contact_id:this.id}}))}static byId($,O){return new w$($,O)}static from($,O){return new w$($,O.id,O)}name=this.field("name");email=this.field("email");company=this.mappedField("companyId",($)=>q$.byId(this.client,$));hidden=this.field("hidden");createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");firstInteraction=this.field("firstInteraction");lastInteraction=this.field("lastInteraction");async hide(){await this.setHidden(!0)}async unhide(){await this.setHidden(!1)}async setHidden($){await this.mutate((O)=>O.storage.setContactHidden({path:{contact_id:this.id},body:{hidden:$}}))}async rename($){await this.mutate((O)=>O.storage.setCrmContactName({path:{contact_id:this.id},body:{name:$}}))}get commentParent(){return{type:"crm_contact",id:this.id}}async comments(){return Yj(this.client,this.commentParent)}async comment($,O){return cO(this.client,this.commentParent,$,O)}commentById($){return _$.byId(this.client,this.commentParent,$)}}class q$ extends S${messageThreadById($){return B$.byId(this.client,{type:"crm_company",entity:this},$)}timelinePage($){return E$(this.client,{type:"crm_company",entity:this},(O)=>_$.from(this.client,{type:"crm_company",id:this.id},O),$)}entityType="crm_company";propertyEntityType="COMPANY";async fetch(){return Q(await this.client.storage.getCompany({path:{company_id:this.id}}))}static byId($,O){return new q$($,O)}static from($,O){return new q$($,O.id,O)}name=this.field("name");description=this.field("description");hidden=this.field("hidden");emailSync=this.field("emailSync");team=this.mappedField("teamId",($)=>T$.byId(this.client,$));createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");async domain(){let{domains:$}=await this.detail.get();return $[0]?.domain}async domains(){let{domains:$}=await this.detail.get();return $.map((O)=>O.domain)}async contacts(){return Q(await this.client.storage.listCompanyContacts({path:{company_id:this.id}})).map((O)=>w$.from(this.client,O))}static search=j$({filters:{crm_company_filters:{}},type:"company",includeCrm:!0,make:($,O)=>new q$($,O.id)});async hide(){await this.setHidden(!0)}async unhide(){await this.setHidden(!1)}async setHidden($){await this.mutate((O)=>O.storage.setCompanyHidden({path:{company_id:this.id},body:{hidden:$}}))}async setEmailSync($){await this.mutate((O)=>O.storage.setEmailSync({path:{company_id:this.id},body:{email_sync:$}}))}async rename($){await this.mutate((O)=>O.storage.setCrmCompanyName({path:{company_id:this.id},body:{name:$}}))}async createContact($){let O=await this.mutate((j)=>j.storage.createCrmContact({path:{company_id:this.id},body:$}));return w$.from(this.client,O)}get commentParent(){return{type:"crm_company",id:this.id}}async comments(){return Yj(this.client,this.commentParent)}async comment($,O){return cO(this.client,this.commentParent,$,O)}commentById($){return _$.byId(this.client,this.commentParent,$)}}class a$ extends A{tableDetail=new V$(async()=>Q(await this.client.storage.getCrmPipelineTable({path:{id:this.id}})));static byId($,O){return new a$($,O)}static from($,O){return new a$($,O.id,O)}async fetch(){return Q(await this.client.storage.getCrmPipeline({path:{id:this.id}}))}name=this.field("name");recordType=this.field("recordType");accessLevel=this.field("grant");sharing=this.field("sharing");owner=this.mappedField("userId",($)=>M.byId(this.client,$));team=this.mappedField("teamId",($)=>T$.byId(this.client,$));async rename($){await this.mutate((O)=>O.storage.renameCrmPipeline({path:{id:this.id},body:{name:$}}))}async setSharing($){if($===void 0)throw Error("Sharing is required");await this.mutate((O)=>O.storage.shareCrmPipeline({path:{id:this.id},body:{sharing:$}}))}async setTrashed($){await this.mutate((O)=>O.storage.trashCrmPipeline({path:{id:this.id},body:{trashed:$}}))}async sharePermissions(){return Q(await this.client.storage.getCrmPipelinePermissions({path:{id:this.id}}))}async updateSharePermissions($){return this.mutate((O)=>O.storage.updateCrmPipelinePermissions({path:{id:this.id},body:r$($)}))}async table(){return Qj.from(this.client,this,await this.tableRecord())}tableRecord(){return this.tableDetail.get()}rows(){return a(async($)=>{let O=Q(await this.client.storage.getCrmPipelineRows({path:{id:this.id},query:{after:$}}));return{items:O.rows.map((j)=>XO.from(this.client,this,j)),nextCursor:O.next}})}queryRows($={}){if($.rows?.some((O)=>O.pipeline.id!==this.id))throw Error("Rows belong to another pipeline");return a(async(O)=>{let j=Q(await this.client.storage.queryCrmPipelineRows({path:{id:this.id},body:{after:O,query:$.query,rowIds:$.rows?.map((x)=>x.id)}}));return{items:j.rows.map((x)=>XO.from(this.client,this,x)),nextCursor:j.next}})}async applyOps($,O){if(O?.baseVersions?.some((S)=>S.table.pipeline.id!==this.id))throw Error("Table belongs to another pipeline");let j={ops:$,baseVersions:O?.baseVersions?Object.fromEntries(O.baseVersions.map((S)=>[S.table.id,S.version])):void 0},x=await this.mutate((S)=>S.storage.applyCrmPipelineOps({path:{id:this.id},body:j}));return this.tableDetail.clear(),x}}class Qj extends A{pipeline;toJSON(){return{...super.toJSON(),pipelineId:this.pipeline.id}}constructor($,O,j){super($,j.table.id,j);this.pipeline=O}static from($,O,j){return new Qj($,O,j)}fetch(){return this.pipeline.tableRecord()}async columns(){return(await this.pipeline.tableRecord()).columns.map(($)=>Jj.from(this.client,this,$))}async version(){return(await this.pipeline.tableRecord()).table.version}rowById($){return XO.byId(this.client,this.pipeline,$)}rows(){return this.pipeline.rows()}}class XO extends A{pipeline;toJSON(){return{...super.toJSON(),pipelineId:this.pipeline.id}}constructor($,O,j,x){super($,j,x);this.pipeline=O}static byId($,O,j){return new XO($,O,j)}static from($,O,j){return new XO($,O,j.rowId,j)}async fetch(){for await(let $ of this.pipeline.queryRows({rows:[this]}))if($.id===this.id)return $.detail.get();throw new w(`Pipeline row ${this.id} is unavailable`)}cells=this.field("cells");async refresh(){this.detail.clear(),await this.detail.get()}}class Jj extends A{table;toJSON(){return{...super.toJSON(),pipelineId:this.table.pipeline.id,tableId:this.table.id}}constructor($,O,j){super($,j.column.id,j);this.table=O}static from($,O,j){return new Jj($,O,j)}async fetch(){let $=(await this.table.pipeline.tableRecord()).columns.find((O)=>O.column.id===this.id);if(!$)throw new w(`Pipeline column ${this.id} is unavailable`);return $}async writable(){return(await this.fetch()).writable}async name(){return(await this.fetch()).column.display_name??(await this.fetch()).definition.definition.display_name}}class cx{client;constructor($){this.client=$}byId($){return a$.byId(this.client,$)}async list(){return Q(await this.client.storage.listCrmPipelines()).map(($)=>a$.from(this.client,$))}async create($){return a$.from(this.client,Q(await this.client.storage.createCrmPipeline({body:$})))}}class ux{client;pipelines;constructor($){this.client=$;this.pipelines=new cx($)}companyById($){return q$.byId(this.client,$)}contactById($){return w$.byId(this.client,$)}async contactByEmail($){let{contact:O}=Q(await this.client.storage.getContactByEmail({query:{email:$}}));return O?w$.from(this.client,O):void 0}async searchContacts($,O={}){let{contacts:j}=Q(await this.client.storage.searchContacts({query:{query:$,limit:O.limit}}));return j.map((x)=>w$.from(this.client,x))}async createCompany($){return q$.from(this.client,Q(await this.client.storage.createCrmCompany({body:$})))}async settings(){return Q(await this.client.storage.getCrmTeamSettings())}async updateSettings($){return Q(await this.client.storage.putCrmTeamSettings({body:$}))}async setStages($){return Q(await this.client.storage.putCrmTeamStages({body:$}))}async resetStages(){Q(await this.client.storage.resetCrmTeamStages())}searchCompanies($){return q$.search(this.client,$)}}var G$=Symbol.for("@ts-pattern/matcher"),P1=Symbol.for("@ts-pattern/isVariadic");var dx=($)=>Boolean($&&typeof $=="object"),Vj=($)=>$&&!!$[G$],s=($,O,j)=>{if(Vj($)){let x=$[G$](),{matched:S,selections:K}=x.match(O);return S&&K&&Object.keys(K).forEach((Z)=>j(Z,K[Z])),S}if(dx($)){if(!dx(O))return!1;if(Array.isArray($)){if(!Array.isArray(O))return!1;let x=[],S=[],K=[];for(let Z of $.keys()){let X=$[Z];Vj(X)&&X[P1]?K.push(X):K.length?S.push(X):x.push(X)}if(K.length){if(K.length>1)throw Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(O.length<x.length+S.length)return!1;let Z=O.slice(0,x.length),X=S.length===0?[]:O.slice(-S.length),G=O.slice(x.length,S.length===0?1/0:-S.length);return x.every((L,Y)=>s(L,Z[Y],j))&&S.every((L,Y)=>s(L,X[Y],j))&&(K.length===0||s(K[0],G,j))}return $.length===O.length&&$.every((Z,X)=>s(Z,O[X],j))}return Reflect.ownKeys($).every((x)=>{let S=$[x];return((x in O)||Vj(K=S)&&K[G$]().matcherType==="optional")&&s(S,O[x],j);var K})}return Object.is(O,$)},X$=($)=>{var O,j,x;return dx($)?Vj($)?(O=(j=(x=$[G$]()).getSelectionKeys)==null?void 0:j.call(x))!=null?O:[]:Array.isArray($)?uO($,X$):uO(Object.values($),X$):[]},uO=($,O)=>$.reduce((j,x)=>j.concat(O(x)),[]);function w6(...$){if($.length===1){let[O]=$;return(j)=>s(O,j,()=>{})}if($.length===2){let[O,j]=$;return s(O,j,()=>{})}throw Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${$.length}.`)}function t($){return Object.assign($,{optional:()=>px($),and:(O)=>u($,O),or:(O)=>F1($,O),select:(O)=>O===void 0?dO($):dO(O,$)})}function lx($){return Object.assign(((O)=>Object.assign(O,{[Symbol.iterator](){let j=0,x=[{value:Object.assign(O,{[P1]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var S;return(S=x[j++])!=null?S:x.at(-1)}}}}))($),{optional:()=>lx(px($)),select:(O)=>lx(O===void 0?dO($):dO(O,$))})}function px($){return t({[G$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return O===void 0?(X$($).forEach((S)=>x(S,void 0)),{matched:!0,selections:j}):{matched:s($,O,x),selections:j}},getSelectionKeys:()=>X$($),matcherType:"optional"})})}var q6=($,O)=>{for(let j of $)if(!O(j))return!1;return!0},f6=($,O)=>{for(let[j,x]of $.entries())if(!O(x,j))return!1;return!0},b6=($,O)=>{let j=Reflect.ownKeys($);for(let x of j)if(!O(x,$[x]))return!1;return!0};function u(...$){return t({[G$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return{matched:$.every((S)=>s(S,O,x)),selections:j}},getSelectionKeys:()=>uO($,X$),matcherType:"and"})})}function F1(...$){return t({[G$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return uO($,X$).forEach((S)=>x(S,void 0)),{matched:$.some((S)=>s(S,O,x)),selections:j}},getSelectionKeys:()=>uO($,X$),matcherType:"or"})})}function m($){return{[G$]:()=>({match:(O)=>({matched:Boolean($(O))})})}}function dO(...$){let O=typeof $[0]=="string"?$[0]:void 0,j=$.length===2?$[1]:typeof $[0]=="string"?void 0:$[0];return t({[G$]:()=>({match:(x)=>{let S={[O!=null?O:"@ts-pattern/anonymous-select-key"]:x};return{matched:j===void 0||s(j,x,(K,Z)=>{S[K]=Z}),selections:S}},getSelectionKeys:()=>[O!=null?O:"@ts-pattern/anonymous-select-key"].concat(j===void 0?[]:X$(j))})})}function E1($){return!0}function f$($){return typeof $=="number"}function i$($){return typeof $=="string"}function n$($){return typeof $=="bigint"}var w1=t(m(E1)),k6=t(m(E1)),g6=w1,s$=($)=>Object.assign(t($),{startsWith:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&x.startsWith(j)))));var j},endsWith:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&x.endsWith(j)))));var j},minLength:(O)=>s$(u($,((j)=>m((x)=>i$(x)&&x.length>=j))(O))),length:(O)=>s$(u($,((j)=>m((x)=>i$(x)&&x.length===j))(O))),maxLength:(O)=>s$(u($,((j)=>m((x)=>i$(x)&&x.length<=j))(O))),includes:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&x.includes(j)))));var j},regex:(O)=>{return s$(u($,(j=O,m((x)=>i$(x)&&Boolean(x.match(j))))));var j}}),A1=s$(m(i$)),b$=($)=>Object.assign(t($),{between:(O,j)=>b$(u($,((x,S)=>m((K)=>f$(K)&&x<=K&&S>=K))(O,j))),lt:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x<j))(O))),gt:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x>j))(O))),lte:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x<=j))(O))),gte:(O)=>b$(u($,((j)=>m((x)=>f$(x)&&x>=j))(O))),int:()=>b$(u($,m((O)=>f$(O)&&Number.isInteger(O)))),finite:()=>b$(u($,m((O)=>f$(O)&&Number.isFinite(O)))),positive:()=>b$(u($,m((O)=>f$(O)&&O>0))),negative:()=>b$(u($,m((O)=>f$(O)&&O<0)))}),y6=b$(m(f$)),t$=($)=>Object.assign(t($),{between:(O,j)=>t$(u($,((x,S)=>m((K)=>n$(K)&&x<=K&&S>=K))(O,j))),lt:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x<j))(O))),gt:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x>j))(O))),lte:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x<=j))(O))),gte:(O)=>t$(u($,((j)=>m((x)=>n$(x)&&x>=j))(O))),positive:()=>t$(u($,m((O)=>n$(O)&&O>0))),negative:()=>t$(u($,m((O)=>n$(O)&&O<0)))}),v6=t$(m(n$)),h6=t(m(function($){return typeof $=="boolean"})),m6=t(m(function($){return typeof $=="symbol"})),c6=t(m(function($){return $==null})),u6=t(m(function($){return $!=null})),x$={__proto__:null,matcher:G$,optional:px,array:function(...$){return lx({[G$]:()=>({match:(O)=>{if(!Array.isArray(O))return{matched:!1};if($.length===0)return{matched:!0};let j=$[0],x={};if(O.length===0)return X$(j).forEach((K)=>{x[K]=[]}),{matched:!0,selections:x};let S=(K,Z)=>{x[K]=(x[K]||[]).concat([Z])};return{matched:O.every((K)=>s(j,K,S)),selections:x}},getSelectionKeys:()=>$.length===0?[]:X$($[0])})})},set:function(...$){return t({[G$]:()=>({match:(O)=>{if(!(O instanceof Set))return{matched:!1};let j={};if(O.size===0)return{matched:!0,selections:j};if($.length===0)return{matched:!0};let x=(K,Z)=>{j[K]=(j[K]||[]).concat([Z])},S=$[0];return{matched:q6(O,(K)=>s(S,K,x)),selections:j}},getSelectionKeys:()=>$.length===0?[]:X$($[0])})})},map:function(...$){return t({[G$]:()=>({match:(O)=>{if(!(O instanceof Map))return{matched:!1};let j={};if(O.size===0)return{matched:!0,selections:j};let x=(X,G)=>{j[X]=(j[X]||[]).concat([G])};if($.length===0)return{matched:!0};var S;if($.length===1)throw Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(S=$[0])==null?void 0:S.toString()}`);let[K,Z]=$;return{matched:f6(O,(X,G)=>{let L=s(K,G,x),Y=s(Z,X,x);return L&&Y}),selections:j}},getSelectionKeys:()=>$.length===0?[]:[...X$($[0]),...X$($[1])]})})},record:function(...$){return t({[G$]:()=>({match:(O)=>{if(O===null||typeof O!="object"||Array.isArray(O))return{matched:!1};var j;if($.length===0)throw Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(j=$[0])==null?void 0:j.toString()}`);let x={},S=(X,G)=>{x[X]=(x[X]||[]).concat([G])},[K,Z]=$.length===1?[A1,$[0]]:$;return{matched:b6(O,(X,G)=>{let L=typeof X!="string"||Number.isNaN(Number(X))?null:Number(X),Y=L!==null&&s(K,L,S),J=s(K,X,S),T=s(Z,G,S);return(J||Y)&&T}),selections:x}},getSelectionKeys:()=>$.length===0?[]:[...X$($[0]),...X$($[1])]})})},intersection:u,union:F1,not:function($){return t({[G$]:()=>({match:(O)=>({matched:!s($,O,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:m,select:dO,any:w1,unknown:k6,_:g6,string:A1,number:y6,bigint:v6,boolean:h6,symbol:m6,nullish:c6,nonNullable:u6,instanceOf:function($){return t(m(function(O){return(j)=>j instanceof O}($)))},shape:function($){return t(m(w6($)))}};class q1 extends Error{constructor($){let O;try{O=JSON.stringify($)}catch(j){O=$}super(`Pattern matching error: no pattern matches value ${O}`),this.input=void 0,this.input=$}}var rx={matched:!1,value:void 0};function c($){return new Wj($,rx)}class Wj{constructor($,O){this.input=void 0,this.state=void 0,this.input=$,this.state=O}with(...$){if(this.state.matched)return this;let O=$[$.length-1],j=[$[0]],x;$.length===3&&typeof $[1]=="function"?x=$[1]:$.length>2&&j.push(...$.slice(1,$.length-1));let S=!1,K={},Z=(G,L)=>{S=!0,K[G]=L},X=!j.some((G)=>s(G,this.input,Z))||x&&!Boolean(x(this.input))?rx:{matched:!0,value:O(S?"@ts-pattern/anonymous-select-key"in K?K["@ts-pattern/anonymous-select-key"]:K:this.input,this.input)};return new Wj(this.input,X)}when($,O){if(this.state.matched)return this;let j=Boolean($(this.input));return new Wj(this.input,j?{matched:!0,value:O(this.input,this.input)}:rx)}otherwise($){return this.state.matched?this.state.value:$(this.input)}exhaustive($=d6){return this.state.matched?this.state.value:$(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function d6($){throw new q1($)}var ax,l6=new Uint8Array(16);function Bj(){if(!ax){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ax=crypto.getRandomValues.bind(crypto)}return ax(l6)}var O$=[];for(let $=0;$<256;++$)O$.push(($+256).toString(16).slice(1));function f1($,O=0){return(O$[$[O+0]]+O$[$[O+1]]+O$[$[O+2]]+O$[$[O+3]]+"-"+O$[$[O+4]]+O$[$[O+5]]+"-"+O$[$[O+6]]+O$[$[O+7]]+"-"+O$[$[O+8]]+O$[$[O+9]]+"-"+O$[$[O+10]]+O$[$[O+11]]+O$[$[O+12]]+O$[$[O+13]]+O$[$[O+14]]+O$[$[O+15]]).toLowerCase()}var ix={};function r6($,O,j){let x;if($)x=b1($.random??$.rng?.()??Bj(),$.msecs,$.seq,O,j);else{let S=Date.now(),K=Bj();p6(ix,S,K),x=b1(K,ix.msecs,ix.seq,O,j)}return O??f1(x)}function p6($,O,j){if($.msecs??=-1/0,$.seq??=0,O>$.msecs)$.seq=j[6]<<23|j[7]<<16|j[8]<<8|j[9],$.msecs=O;else if($.seq=$.seq+1|0,$.seq===0)$.msecs++;return $}function b1($,O,j,x,S=0){if($.length<16)throw Error("Random bytes length must be >= 16");if(!x)x=new Uint8Array(16),S=0;else if(S<0||S+16>x.length)throw RangeError(`UUID byte range ${S}:${S+15} is out of buffer bounds`);return O??=Date.now(),j??=$[6]*127<<24|$[7]<<16|$[8]<<8|$[9],x[S++]=O/1099511627776&255,x[S++]=O/4294967296&255,x[S++]=O/16777216&255,x[S++]=O/65536&255,x[S++]=O/256&255,x[S++]=O&255,x[S++]=112|j>>>28&15,x[S++]=j>>>20&255,x[S++]=128|j>>>14&63,x[S++]=j>>>6&255,x[S++]=j<<2&255|$[10]&3,x[S++]=$[11],x[S++]=$[12],x[S++]=$[13],x[S++]=$[14],x[S++]=$[15],x}var h$=r6;class M${table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new M$($,O)}async detail(){let{columns:$}=await this.table.detail(),O=$.find((j)=>j.column.id===this.id);if(!O)throw new w(`column ${this.id} is not on table ${this.table.id}`);return O}async name(){let $=await this.detail();return $.column.display_name??$.definition.definition.display_name}async rename($){return await this.table.database.renameColumn(this,$),this}async inferType($){return await this.table.database.inferColumnType(this,$),this}changeType($){return this.table.database.changeColumnType(this,$)}convertIntoNewColumn($){return this.table.database.convertColumnIntoNewColumn(this,$)}casts(){return this.table.database.columnCasts(this)}async delete(){await this.table.database.deleteColumn(this)}async dataType(){return(await this.detail()).definition.definition.data_type}async isMultiSelect(){return(await this.detail()).definition.definition.is_multi_select}async position(){return(await this.detail()).column.position}async definition(){return(await this.detail()).definition}async config(){return(await this.detail()).column.config??void 0}async addOptions($){return await this.table.database.addColumnOptions(this,$),this}toJSON(){return{id:this.id,tableId:this.table.id}}}class A${table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new A$($,O)}history(){return this.table.database.rowHistory(this)}toJSON(){return{id:this.id,tableId:this.table.id}}}class Lj{table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new Lj($,O)}async detail(){let{views:$}=await this.table.detail(),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`view ${this.id} is not on table ${this.table.id}`);return O}async name(){return(await this.detail()).name}async position(){return(await this.detail()).position}async layout(){return(await this.detail()).layout}async query(){return(await this.detail()).query}positions(){return this.table.database.viewPositions(this)}toJSON(){return{id:this.id,tableId:this.table.id}}}class Q${database;id;constructor($,O){this.database=$;this.id=O}static byId($,O){return new Q$($,O)}async detail(){let{tables:$}=await this.database.schema(),O=$.find((j)=>j.table.id===this.id);if(!O)throw new w(`table ${this.id} is not in database ${this.database.id}`);return O}async name(){return(await this.detail()).table.name}async rename($){return await this.database.renameTable(this,$),this}async version(){return(await this.detail()).table.version}async position(){return(await this.detail()).table.position}async columns(){let{columns:$}=await this.detail();return $.map((O)=>M$.byId(this,O.column.id))}addColumn($){return this.database.addColumn(this,$)}async reorderColumns($){return await this.database.reorderColumns(this,$),this}row($){return A$.byId(this,$)}async views(){let{views:$}=await this.detail();return $.map((O)=>Lj.byId(this,O.id))}createWebhook(){return this.database.createWebhook(this)}async delete(){await this.database.deleteTable(this)}toJSON(){return{id:this.id,databaseId:this.database.id}}}async function Nj($,O,j,x={}){let S=Q(await $.storage.queryDatabases({body:{sql:j,databaseId:x.database?.id,baseVersions:Object.fromEntries((x.baseVersions??[]).map(({table:Y,version:J})=>[Y.id,J]))}})),K=new Map;for(let Y of[x.database,...(x.baseVersions??[]).map(({table:J})=>J.database)]){if(!Y)continue;let J=K.get(Y.id);if(J)J.add(Y);else K.set(Y.id,new Set([Y]))}let Z=(Y)=>{let J=K.get(Y)?.values().next().value;if(J)return J;let T=O($,Y);return K.set(Y,new Set([T])),T},X=(Y)=>{let J=S.tableDatabases[Y];if(!J)throw Error(`SQL response is missing the owner of table ${Y}`);return Q$.byId(Z(J),Y)},G=new Set(Object.keys(S.newVersions).map((Y)=>X(Y).database.id));if(S.statement.kind==="schema")G.add(S.statement.databaseId);for(let Y of G)for(let J of K.get(Y)??[])J.invalidateSchema();let L=c(S.statement).with({kind:"select"},(Y)=>Y).with({kind:"schema"},({databaseId:Y,summary:J})=>({kind:"schema",database:Z(Y),summary:J})).with({kind:"insert"},{kind:"update"},{kind:"delete"},({kind:Y,tableId:J,tableName:T})=>({kind:Y,table:X(J),tableName:T})).with({kind:"alterColumnType"},({tableId:Y,tableName:J,columnId:T,columnName:z,to:W})=>{let V=X(Y);return{kind:"alterColumnType",table:V,tableName:J,column:M$.byId(V,T),columnName:z,to:W}}).exhaustive();return{result:S.result?a6(S.result,X,S.tableDatabases):void 0,changesApplied:S.changesApplied,insertedRows:L.kind==="insert"?S.insertedRowIds.map((Y)=>A$.byId(L.table,Y)):[],newVersions:Object.entries(S.newVersions).map(([Y,J])=>({table:X(Y),version:J})),readVersions:Object.entries(S.readVersions).map(([Y,J])=>({table:X(Y),version:J})),truncatedTables:S.truncatedTables,statement:L}}function a6($,O,j){let x=$.sourceTable&&j[$.sourceTable]?O($.sourceTable):void 0;return{columns:$.columns.map(({relatedTable:S,...K})=>({...K,relatedTable:S&&j[S]?O(S):void 0})),rows:$.rows,sourceTable:x,rowHandles:x?$.rowIds.map((S)=>A$.byId(x,S)):[]}}class Uj{table;id;createdBy;record;constructor($,O,j,x){this.table=$;this.id=O;this.createdBy=j;this.record=x}static fromRecord($,O,j){return new Uj($,j.id,O,j)}get tokenPrefix(){return this.record.tokenPrefix}get createdAt(){return this.record.createdAt}delete(){return this.table.database.deleteWebhook(this)}toJSON(){return{id:this.id,tableId:this.table.id,tokenPrefix:this.tokenPrefix}}}class tx extends SO{op;row;column;taken;constructor($,O){super($,O);this.name="MacroOpRefusedError",this.message=O.message,this.op=O.op,this.row=O.row,this.column=O.column,this.taken=O.taken}}function zj($){return c($).with({type:"relation"},({table:O})=>({type:"relation",database:O.database.id,table:O.id})).with({type:x$.not("relation")},(O)=>O).exhaustive()}var i6={USER:"People",DOCUMENT:"Documents",TASK:"Tasks",COMPANY:"Companies",CONTACT:"Contacts",CALL_RECORD:"Calls",CHANNEL:"Channels",CHAT:"Chats",PROJECT:"Projects",THREAD:"Emails",CALENDAR_EVENT:"Events",INITIATIVE:"Initiatives"};function n6($){return c($).with({type:"text"},()=>"Text").with({type:"number"},()=>"Number").with({type:"boolean"},()=>"Checkbox").with({type:"date"},()=>"Date").with({type:"link"},()=>"URL").with({type:"select",multi:!0},()=>"Multi-select").with({type:"select",multi:!1},()=>"Select").with({type:"select_number",multi:!0},()=>"Multi-number select").with({type:"select_number",multi:!1},()=>"Number select").with({type:"tag"},()=>"Tag").with({type:"entity"},({target:O})=>i6[O]).with({type:"relation"},()=>"Relation").exhaustive(()=>"Column")}function nx($){return $.map((O)=>({id:h$(),label:O}))}function k1($,O,j){return $?.kind===O&&"change"in $&&$.change.kind===j}function sx($){return c($).with({kind:"reorder_tables"},({kind:O})=>O).with({kind:x$.union("table","column","rows","view")},({kind:O,change:j})=>`${O}.${j.kind}`).exhaustive(()=>"unknown")}function m$($,O,j){let[x]=$;if($.length!==1||!k1(x,O,j))throw new b(`expected one ${O}.${j} result, got ${$.map(sx).join(", ")||"none"}`);return x}class J$ extends A{access=new o(this.client,"database",this);async fetch(){return Q(await this.client.storage.getDatabase({path:{id:this.id}}))}assertOwns($,O){if(O.id!==this.id)throw new b(`${$} does not belong to database ${this.id}`)}static byId($,O){return new J$($,O)}static async create($,O){let j=Q(await $.storage.createDatabase({body:{name:O.name}}));return new J$($,j.id)}static async list($){return Q(await $.storage.listDatabases()).map((j)=>new J$($,j.database.id))}query($,O){return Nj(this.client,J$.byId,$,{...O,database:this})}invalidateSchema(){this.detail.clear()}schema(){return this.detail.get()}name=this.mappedField("database",($)=>$.name);owner=this.mappedField("database",($)=>M.byId(this.client,$.owner_id));createdAt=this.mappedField("database",($)=>$.created_at);trashedAt=this.mappedField("database",($)=>$.trashed_at??void 0);grant=this.field("grant");tables=this.mappedField("tables",($)=>$.map((O)=>Q$.byId(this,O.table.id)));async table($){let{tables:O}=await this.schema(),j=O.find((x)=>x.table.name===$);return j?Q$.byId(this,j.table.id):void 0}async createTable($){let{table:O}=m$(await this.applyOps([{kind:"table",table:h$(),change:{kind:"create",name:$.name}}]),"table","created");return Q$.byId(this,O)}async applyOps($,O={}){let j={ops:$};if(O.baseVersions!==void 0){for(let{table:S}of O.baseVersions)this.assertOwns(`table ${S.id}`,S.database);j.baseVersions=Object.fromEntries(O.baseVersions.map(({table:S,version:K})=>[S.id,K]))}let{results:x}=await this.mutate(async(S)=>{let K=await S.storage.applyDatabaseOps({path:{id:this.id},body:j});if(K.error!==void 0&&"op"in K.error)throw new tx(K.response?.status??0,K.error);return K});return x}async reorderTables($){for(let x of $)this.assertOwns(`table ${x.id}`,x.database);let O=await this.applyOps([{kind:"reorder_tables",order:$.map((x)=>x.id)}]),[j]=O;if(O.length!==1||j?.kind!=="reorder_tables")throw new b(`expected one reorder_tables result, got ${O.map(sx).join(", ")||"none"}`);return j.tables.map(({table:x})=>Q$.byId(this,x))}async deleteTable($){this.assertOwns(`table ${$.id}`,$.database),m$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"delete"}}]),"table","deleted")}async columnCasts($){return this.assertOwns(`column ${$.id}`,$.table.database),Q(await this.client.storage.listDatabaseColumnCasts({path:{id:this.id,table_id:$.table.id,column_id:$.id}}))}async viewPositions($){this.assertOwns(`view ${$.id}`,$.table.database);let{positions:O}=Q(await this.client.storage.getDatabaseViewPositions({path:{id:this.id,view_id:$.id}}));return O}async rowHistory($){this.assertOwns(`row ${$.id}`,$.table.database);let{changes:O}=Q(await this.client.storage.getDatabaseRowHistory({path:{id:this.id,table_id:$.table.id,row_id:$.id}}));return O}async importTable($){let O=await this.mutate((j)=>j.storage.importDatabaseTable({path:{id:this.id},body:$}));return Q$.byId(this,O.id)}webhookOf($){return Uj.fromRecord(Q$.byId(this,$.tableId),M.byId(this.client,$.createdBy),$)}async webhooks(){let{webhooks:$}=Q(await this.client.storage.listDatabaseWebhooks({path:{id:this.id}}));return $.map((O)=>this.webhookOf(O))}async createWebhook($){this.assertOwns("table",$.database);let O=Q(await this.client.storage.createDatabaseWebhook({path:{id:this.id},body:{tableId:$.id}}));return{webhook:this.webhookOf(O.webhook),token:O.token}}async deleteWebhook($){this.assertOwns("webhook",$.table.database),Q(await this.client.storage.deleteDatabaseWebhook({path:{id:this.id,webhook_id:$.id}}))}async sharePermissions(){return Q(await this.client.storage.getDatabasePermissions({path:{id:this.id}}))}updateSharePermissions($){return this.mutate((O)=>O.storage.updateDatabasePermissions({path:{id:this.id},body:$}))}async changeColumnType($,O){this.assertOwns(`column ${$.id}`,$.table.database);let j=await $.table.version();return m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"change_type",to:zj(O.to)}}],{baseVersions:[{table:$.table,version:j}]}),"column","type_changed")}async columnConversion($,O){return this.assertOwns(`column ${$.id}`,$.table.database),Q(await this.client.storage.convertDatabaseColumn({path:{id:this.id,table_id:$.table.id,column_id:$.id},body:{to:zj(O)}}))}async convertColumnIntoNewColumn($,O){let j=await this.columnConversion($,O.to),x=O.name??`${await $.name()} (${n6(O.to)})`,S=h$(),K=[{kind:"column",table:$.table.id,column:S,change:{kind:"create",definition:{source:"new",name:x,type:zj(O.to),options:nx(j.options)},after:$.id}}];if(j.cells.length>0)K.push({kind:"rows",table:$.table.id,change:{kind:"update",changes:{kind:"per_row",rows:j.cells.map(({row:X,value:G})=>({row:X,cells:[{column:S,value:G}]}))}}});let[Z]=await this.applyOps(K,{baseVersions:[{table:$.table,version:j.tableVersion}]});if(!k1(Z,"column","created"))throw new b(`expected a column.created result, got ${Z?sx(Z):"none"}`);return M$.byId($.table,Z.column)}async deleteColumn($){this.assertOwns(`column ${$.id}`,$.table.database);let O=await $.table.version(),{tableVersion:j}=m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"delete"}}],{baseVersions:[{table:$.table,version:O}]}),"column","deleted");return j}async reorderColumns($,O){this.assertOwns(`table ${$.id}`,$.database);for(let S of O)if(S.table.id!==$.id)throw new b(`column ${S.id} does not belong to table ${$.id}`);let j=await $.version(),{tableVersion:x}=m$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"reorder_columns",order:O.map((S)=>S.id)}}],{baseVersions:[{table:$,version:j}]}),"table","columns_reordered");if(x===void 0)throw new b(`table ${$.id} reordered its columns without a version`);return x}async renameTable($,O){this.assertOwns(`table ${$.id}`,$.database);let j=await $.name(),{tableVersion:x}=m$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"rename",name:O,previousName:j}}]),"table","renamed");if(x===void 0)throw new b(`table ${$.id} was renamed without a version`);return x}async renameColumn($,O){this.assertOwns(`column ${$.id}`,$.table.database);let j=await $.name(),{tableVersion:x}=m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"rename",name:O,previousName:j}}]),"column","renamed");return x}async inferColumnType($,O){return this.assertOwns(`column ${$.id}`,$.table.database),this.mutate((j)=>j.storage.inferDatabaseColumnType({path:{id:this.id,table_id:$.table.id,column_id:$.id},body:{dataType:O.dataType,baseVersion:O.baseVersion,...O.specificEntityType!==void 0?{specificEntityType:O.specificEntityType}:{}}}))}async addColumn($,O){if(this.assertOwns(`table ${$.id}`,$.database),O.after!==void 0&&O.after.table.id!==$.id)throw new b(`column ${O.after.id} does not belong to table ${$.id}`);let j="property"in O?{source:"existing",property:O.property.id}:{source:"new",name:O.name,type:zj(O.type),...O.options!==void 0?{options:nx(O.options)}:{},...O.inferType!==void 0?{inferType:O.inferType}:{}},{column:x}=m$(await this.applyOps([{kind:"column",table:$.id,column:h$(),change:{kind:"create",definition:j,...O.after!==void 0?{after:O.after.id}:{}}}]),"column","created");return M$.byId($,x)}async addColumnOptions($,O){return this.assertOwns(`column ${$.id}`,$.table.database),m$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"add_options",options:nx(O)}}]),"column","options_added")}}class ex{client;constructor($){this.client=$}query($,O){return Nj(this.client,J$.byId,$,O)}byId($){return J$.byId(this.client,$)}create($){return J$.create(this.client,$)}list(){return J$.list(this.client)}}class GO extends A{document;toJSON(){return{...super.toJSON(),documentId:this.document.id}}constructor($,O,j,x){super($,j,x);this.document=O}static byId($,O,j){return new GO($,O,j)}static from($,O,j){return new GO($,O,j.uuid,j)}async fetch(){let $=Q(await this.client.storage.getDocumentAnchors({path:{document_id:this.document.id}})).data.find((O)=>O.uuid===this.id);if(!$)throw new w(`Annotation ${this.id} is unavailable`);return $}kind=this.field("anchorType");page=this.field("page");async edit($){if(await this.kind()!=="placeable")throw Error("Only placeable comment annotations can be edited");await this.mutate((O)=>O.storage.editAnchor({body:{...$,uuid:this.id,anchorType:"free-comment",fileType:"pdf"}}))}async delete(){if(await this.kind()!=="highlight")throw Error("Only standalone highlights can be deleted with this endpoint");await this.mutate(($)=>$.storage.deleteAnchor({body:{uuid:this.id,anchorType:"highlight",fileType:"pdf"}}))}}class c$ extends A{documentId;constructor($,O,j,x){super($,j,x);this.documentId=O}get path(){return{parent_type:"document",parent_id:this.documentId,id:this.id}}async fetch(){return Q(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new c$($,O,j)}static from($,O,j){return new c$($,O,j.id,j)}text=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");async threadId(){return(await this.detail.get()).thread_id??this.id}document(){return q.byId(this.client,this.documentId)}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){return this.document().comment($,{threadId:await this.threadId()})}async edit($){let{content:O,mentions:j}=$$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}class lO{client;document;id;detail;constructor($,O,j){this.client=$;this.document=O;this.id=j;this.detail=new V$(async()=>Q(await this.client.storage.getDocumentVersion({path:{document_id:O.id,document_version_id:j}})).data)}static byId($,O,j){return new lO($,O,j)}read(){return this.detail.get()}toJSON(){return{id:this.id,documentId:this.document.id}}}var s6=8;class q extends S${async anchors(){return Q(await this.client.storage.getDocumentAnchors({path:{document_id:this.id}})).data.map(($)=>GO.from(this.client,this,$))}async createHighlight($){return GO.from(this.client,this,Q(await this.client.storage.createAnchor({path:{document_id:this.id},body:{...$,fileType:"pdf",anchorType:"highlight"}})))}version($){return lO.byId(this.client,this,$)}async sharePermissions(){return Q(await this.client.storage.getDocumentPermissionsV2({path:{document_id:this.id}})).documentPermissions}async permissionsToken(){return Q(await this.client.storage.getDocumentPermissionsToken({path:{document_id:this.id}})).token}async prepareSave($){return Q(await this.client.storage.presaveDocumentHandler({path:{document_id:this.id},body:{newBom:$}})).data}async save($){return(await this.mutate((O)=>O.storage.saveDocumentHandler({path:{document_id:this.id},body:$}))).data}async simpleSave(){return(await this.mutate(($)=>$.storage.simpleSave({path:{document_id:this.id}}))).data}messageThreadById($){return B$.byId(this.client,{type:"document",entity:this},$)}timelinePage($){return E$(this.client,{type:"document",entity:this},(O)=>c$.from(this.client,this.id,O),$)}access=new o(this.client,"document",this);async fetch(){let{data:$}=Q(await this.client.storage.getDocument({path:{document_id:this.id}}));return $.documentMetadata}static byId($,O){return new q($,O)}static async create($,O){let{documentId:j}=Q(await $.storage.createMarkdownHandler({body:{documentName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new q($,j)}static async createSnippet($,O){let{documentId:j}=Q(await $.storage.createSnippetHandler({body:{snippetName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new q($,j)}static async createSkill($,O){let{documentId:j}=Q(await $.storage.createSkillHandler({body:{skillName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new q($,j)}static recent($,O){let j=O?.pageSize??50;return a(async(x)=>{let S=Q(await $.storage.getUserDocumentsHandler({query:{limit:j,offset:x?Number(x):0,...O?.fileType!==void 0?{file_type:O.fileType}:{}}})),K=S.data?.next_offset;return{items:(S.data?.documents??[]).map((Z)=>new q($,Z.documentId)),nextCursor:K!=null?String(K):null}})}static async recentlyDeleted($){let{data:O}=Q(await $.storage.recentlyDeleted({}));return O.items.filter((j)=>j.type==="document").map((j)=>new q($,j.id))}entityType="document";propertyEntityType="DOCUMENT";name=this.field("documentName");fileType=this.field("fileType");project=this.mappedField("projectId",($)=>$?n.byId(this.client,$):void 0);owner=this.mappedField("owner",($)=>M.byId(this.client,$));branchedFrom=this.mappedField("branchedFromId",($)=>$?q.byId(this.client,$):void 0);createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");deletedAt=this.field("deletedAt");async content(){let{text:$}=Q(await this.client.storage.getDocumentTextContent({path:{document_id:this.id}}));if($!==null)return $;let{presigned_url:O}=Q(await this.client.storage.exportDocument({path:{document_id:this.id}})),j=await fetch(O);if(!j.ok)throw new SO(j.status,{message:"failed to download document content"});return j.text()}async rename($){await this.mutate((O)=>O.storage.editDocument({path:{document_id:this.id},body:{documentName:$}}))}async move($){await this.mutate((O)=>O.storage.editDocument({path:{document_id:this.id},body:{projectId:$?.id??""}}))}async delete($){await this.mutate((O)=>$?.permanent?O.storage.permanentlyDeleteDocument({path:{document_id:this.id}}):O.storage.deleteDocument({path:{document_id:this.id}}))}async restore(){await this.mutate(($)=>$.storage.revertDeleteDocument({path:{document_id:this.id}}))}async copy($){let{data:O}=Q(await this.client.storage.copyDocument({path:{document_id:this.id},query:$.versionId!==void 0?{version_id:$.versionId}:void 0,body:{documentName:$.name}}));return new q(this.client,O.documentMetadata.documentId)}async comments(){let $={parent_type:"document",parent_id:this.id},O=a(async(x)=>{let S=Q(await this.client.storage.messageTimeline({path:$,query:{selection:JSON.stringify({limit:100,cursor:x})}}));return{items:S.items,nextCursor:S.next_cursor}}),j=[];for await(let x of O)j.push(x);return bO(j,s6,async(x)=>{let{state:S,root:K,replies:Z}=Q(await this.client.storage.entityMessageGetThread({path:{...$,id:x.id}}));return{thread:S,comments:[K,...Z].map((X)=>c$.from(this.client,this.id,X))}})}async comment($,O){let j=await this.mutate((x)=>x.storage.entityMessageCreate({path:{parent_type:"document",parent_id:this.id},body:{...$$($),thread_id:O?.threadId??null}}));return c$.from(this.client,this.id,j)}async shortId(){return Q(await this.client.storage.getDocumentShortId({path:{document_id:this.id}}))}async teamShare(){return Q(await this.client.storage.getDocumentTeamShare({path:{document_id:this.id}}))}async setTeamShare($){await this.mutate((O)=>O.storage.setDocumentTeamShare({path:{document_id:this.id},body:{shareWithTeam:$}}))}async githubPullRequests(){let{pullRequests:$}=Q(await this.client.storage.getDocumentGithubPullRequests({path:{document_id:this.id}}));return $}async branchName(){let{branchName:$}=Q(await this.client.storage.getDocumentBranchName({path:{document_id:this.id}}));return $}webUrl(){return`${this.client.webAppUrl}/app/md/${this.id}`}static search=j$({filters:{document_filters:{}},type:"document",make:($,O)=>new q($,O.document_id)});toMention(){let $=this.detail.peek();return{tag:l$("m-document-mention",{documentId:this.id,documentName:$?.documentName??"",blockName:$?.fileType??"md"}),mention:{entity_type:"document",entity_id:this.id}}}}class Ij{id;name;constructor($,O){this.id=$;this.name=O}static async list($){let{skills:O}=Q(await $.storage.getSystemSkillsHandler());return O.map((j)=>new Ij(j.id,j.name))}}class ox{client;async byTeamSlug($){let O=Q(await this.client.storage.getDocumentByTeamSlug({path:{slug:$}}));if(typeof O!=="object"||O===null||!("data"in O)||typeof O.data!=="object"||O.data===null||!("documentMetadata"in O.data)||typeof O.data.documentMetadata!=="object"||O.data.documentMetadata===null||!("documentId"in O.data.documentMetadata)||typeof O.data.documentMetadata.documentId!=="string")throw Error("Invalid team task document response");return q.byId(this.client,O.data.documentMetadata.documentId)}async validatePermissionsToken($){let O=Q(await this.client.storage.validateDocumentPermissionsToken({body:{token:$}}));return{document:q.byId(this.client,O.document_id),user:O.user_id?M.byId(this.client,O.user_id):void 0,accessLevel:O.access_level,expiresAt:O.exp,issuer:O.iss}}async createUpload($){let O={documentName:$.name,sha:$.sha,fileType:$.fileType,mimeType:$.mimeType,projectId:$.project?.id,teamId:$.team?.id,branchedFromId:$.branchedFrom?.id,emailAttachmentId:$.attachment?.id,isTask:$.isTask},j=Q(await this.client.storage.createDocument({body:O})).data;return{document:q.byId(this.client,j.documentMetadata.documentId),uploadUrl:j.presignedUrl??void 0,contentType:j.contentType,content:j.documentMetadata.content}}constructor($){this.client=$}byId($){return q.byId(this.client,$)}create($){return q.create(this.client,$)}createSnippet($){return q.createSnippet(this.client,$)}createSkill($){return q.createSkill(this.client,$)}systemSkills(){return Ij.list(this.client)}search($,O){return q.search(this.client,$,O)}recent($){return q.recent(this.client,$)}recentlyDeleted(){return q.recentlyDeleted(this.client)}}class KO extends A{async fetch(){let{attachment:$}=Q(await this.client.email.getAttachment({path:{id:this.id}}));return $}static byId($,O){return new KO($,O)}static from($,O){return new KO($,O.db_id,O)}filename=this.field("filename");mimeType=this.field("mime_type");size=this.field("size_bytes");dataUrl=this.field("data_url");sfsId=this.field("sfs_id");contentId=this.field("content_id");async toDocument(){let{document_id:$}=Q(await this.client.email.getAttachmentDocumentId({path:{id:this.id}}));return q.byId(this.client,$)}}class H$ extends S${access=new o(this.client,"email_thread",this);async followup(){return Q(await this.client.storage.getEmailFollowup({path:{thread_id:this.id}}))}async setFollowup($){return Q(await this.client.storage.setEmailFollowup({path:{thread_id:this.id},body:$}))}async calendarInvitations(){return Q(await this.client.email.getThreadCalendarInvitations({path:{thread_id:this.id}}))}async update($){await this.mutate((O)=>O.storage.editThreadV2({path:{thread_id:this.id},body:{projectId:$.project===void 0?void 0:$.project?.id??null,sharePermission:$.sharePermission?r$($.sharePermission):void 0}}))}entityType="email_thread";propertyEntityType="THREAD";async fetch(){let{thread:$}=Q(await this.client.email.getThread({path:{thread_id:this.id},query:{limit:100}}));return $}static byId($,O){return new H$($,O)}createdAt=this.field("created_at");updatedAt=this.field("updated_at");isRead=this.field("is_read");inboxVisible=this.field("inbox_visible");accessLevel=this.field("access_level");providerId=this.field("provider_id");link=this.mappedField("link_id",($)=>z$.byId(this.client,$));project=this.mappedField("project_id",($)=>$?n.byId(this.client,$):void 0);latestInboundAt=this.field("latest_inbound_message_ts");latestOutboundAt=this.field("latest_outbound_message_ts");latestNonSpamAt=this.field("latest_non_spam_message_ts");async subject(){let{messages:$}=await this.detail.get();for(let O of $)if(O.subject)return O.subject;return}async participants(){let{messages:$}=await this.detail.get(),O=new Map;for(let j of $)for(let x of[j.from,...j.to,...j.cc,...j.bcc])if(x&&!O.has(x.email))O.set(x.email,x);return[...O.values()]}async messages($){return Q(await this.client.email.getThreadMessagesHandler({path:{id:this.id},query:{...$?.since?{since:$.since}:{},...$?.limit?{limit:$.limit}:{}}})).map((j)=>R$.from(this.client,j))}async attachments(){let{messages:$}=await this.detail.get();return $.flatMap((O)=>O.attachments.map((j)=>KO.from(this.client,j)))}async reply($){let O=$.subject??await this.subject()??"",{message:j}=await this.mutate((x)=>x.email.sendMessage({body:{message:{thread_db_id:this.id,replying_to_id:$.replyingTo?.id??null,to:$.to,cc:$.cc??null,bcc:$.bcc??null,subject:O,body_text:$.bodyText}}}));return j.db_id?R$.byId(this.client,j.db_id):void 0}async archive($=!0){await this.mutate((O)=>O.email.archiveThread({path:{id:this.id},body:{value:$}}))}async updateState($){await this.mutate((O)=>O.email.updateThreadState({path:{id:this.id},body:$}))}async operations(){return Q(await this.client.email.threadOperations({path:{id:this.id}}))}async markSeen(){await this.mutate(($)=>$.email.threadSeen({path:{id:this.id}}))}async addLabel($){await this.mutate((O)=>O.email.addRemoveThreadLabel({path:{id:this.id},body:{label_id:$.id,value:!0}}))}async removeLabel($){await this.mutate((O)=>O.email.addRemoveThreadLabel({path:{id:this.id},body:{label_id:$.id,value:!1}}))}async moveToProject($){await this.mutate((O)=>O.email.updateThreadProject({path:{thread_id:this.id},body:{projectId:$?.id??null}}))}static search=j$({filters:{email_filters:{}},type:"email",make:($,O)=>new H$($,O.thread_id)})}class R$ extends A{async fetch(){return Q(await this.client.email.getMessage({path:{id:this.id}}))}static byId($,O){return new R$($,O)}static from($,O){return new R$($,O.db_id,O)}static async send($,O){let{message:j}=Q(await $.email.sendMessage({body:{message:{to:O.to,cc:O.cc??null,bcc:O.bcc??null,subject:O.subject,body_text:O.bodyText}}}));return j.db_id?R$.byId($,j.db_id):void 0}subject=this.field("subject");from=this.field("from");to=this.field("to");cc=this.field("cc");bcc=this.field("bcc");body=this.field("body_parsed");sentAt=this.field("internal_date_ts");labels=this.field("labels");link=this.mappedField("link_id",($)=>z$.byId(this.client,$));async operationStatus(){return Q(await this.client.email.messageOperationStatus({path:{id:this.id}}))}async resolveOperation($){await this.mutate((O)=>O.email.resolveMessageOperation({path:{id:this.id},body:$}))}async completeDraftAttachment($,O=0){let j=await this.link();await this.mutate((x)=>x.email.completeDraftAttachment({path:{id:this.id,attachment_id:$},query:{draft_generation:O},headers:{"X-Email-Link-Id":j.id}}))}async transferDraft($){let O=await this.detail.get();return this.mutate((j)=>j.email.transferDraft({path:{id:this.id},body:{...$,draft_generation:$.draft_generation??O.draft_generation??0},headers:{"X-Email-Link-Id":O.link_id}}))}async addLabel($){await this.mutate((O)=>O.email.addRemoveLabel({body:{label_id:$.id,message_ids:[this.id],value:!0}}))}async removeLabel($){await this.mutate((O)=>O.email.addRemoveLabel({body:{label_id:$.id,message_ids:[this.id],value:!1}}))}async thread(){return H$.byId(this.client,(await this.detail.get()).thread_db_id)}}class YO extends R${async draftContext(){let $=await this.detail.get();return{headers:{"X-Email-Link-Id":$.link_id},query:{draft_generation:$.draft_generation??0}}}static byId($,O){return new YO($,O)}draftGeneration=this.field("draft_generation");async update($){let{headers:O,query:j}=await this.draftContext();await this.mutate((x)=>x.email.createDraft({headers:O,body:{draft:{...$0($),db_id:this.id,draft_generation:$.draftGeneration??j.draft_generation}}}))}async delete(){let{headers:$,query:O}=await this.draftContext();await this.mutate((j)=>j.email.deleteDraft({path:{id:this.id},headers:$,query:O}))}async schedule($,O){let{headers:j,query:x}=await this.draftContext();await this.mutate((S)=>S.email.upsertScheduledMessage({path:{id:this.id},headers:j,query:x,body:{send_time:$,include_signature:O?.includeSignature}}))}async unschedule(){let{headers:$,query:O}=await this.draftContext();await this.mutate((j)=>j.email.deleteScheduledDraft({path:{message_id:this.id},headers:$,query:O}))}async addAttachment($){let O={file_name:$.fileName,sha:$.sha,size:$.size,upload_id:$.uploadId},{headers:j,query:x}=await this.draftContext(),S=await this.mutate((K)=>K.email.addDraftAttachment({path:{id:this.id},headers:j,query:x,body:O}));return{attachment:rO.byId(this.client,this,S.attachment_id,!1,x.draft_generation),uploadUrl:S.upload_url,contentType:S.content_type}}async forwardAttachment($){let{headers:O,query:j}=await this.draftContext(),x=await this.mutate((S)=>S.email.addForwardedAttachment({path:{id:this.id},headers:O,query:j,body:{attachment_id:$.id}}));return rO.byId(this.client,this,x.attachment_id,!0,j.draft_generation)}async removeAttachment($){if($.draft.id!==this.id)throw Error("Attachment belongs to another draft");let{headers:O}=await this.draftContext(),j={draft_generation:$.draftGeneration};if($.forwarded)await this.mutate((x)=>x.email.removeForwardedAttachment({path:{id:this.id,attachment_id:$.id},headers:O,query:j}));else await this.mutate((x)=>x.email.removeDraftAttachment({path:{id:this.id,attachment_id:$.id},headers:O,query:j}))}async verifyAttachment($){if($.draft.id!==this.id||$.forwarded)throw Error("Expected an uploaded attachment on this draft");await this.completeDraftAttachment($.id,$.draftGeneration)}}class rO{draft;id;forwarded;draftGeneration;constructor($,O,j,x){this.draft=$;this.id=O;this.forwarded=j;this.draftGeneration=x}static byId($,O,j,x=!1,S=0){return new rO(O,j,x,S)}complete(){return this.draft.verifyAttachment(this)}remove(){return this.draft.removeAttachment(this)}toJSON(){return{id:this.id,draftId:this.draft.id,forwarded:this.forwarded,draftGeneration:this.draftGeneration}}}function $0($){let{bodyText:O,bodyHtml:j,bodyMacro:x,headers:S,includeSignature:K,draftGeneration:Z,thread:X,replyingTo:G,...L}=$;return{...L,body_text:O,body_html:j===void 0?void 0:btoa(Array.from(new TextEncoder().encode(j),(Y)=>String.fromCharCode(Y)).join("")).replaceAll("+","-").replaceAll("/","_").replaceAll("=",""),body_macro:x,headers_json:S,include_signature:K,draft_generation:Z,thread_db_id:X?.id,replying_to_id:G?.id}}class QO extends A{inbox;constructor($,O,j,x){super($,O,j);this.inbox=x}get headers(){return this.inbox?{"X-Email-Link-Id":this.inbox.id}:void 0}static byId($,O,j){return new QO($,O,void 0,j)}static from($,O,j){return new QO($,O.id,O,j)}async fetch(){let $=Q(await this.client.email.listEmailFilters({headers:this.headers})).filters.find((O)=>O.id===this.id);if(!$)throw new w(`Email filter ${this.id} is unavailable`);return $}emailAddress=this.field("email_address");emailDomain=this.field("email_domain");isImportant=this.field("is_important");async setImportant($){let O=await this.detail.get();await this.mutate((j)=>j.email.upsertEmailFilter({headers:this.headers,body:{email_address:O.email_address,email_domain:O.email_domain,is_important:$}}))}async delete(){await this.mutate(($)=>$.email.deleteEmailFilter({path:{id:this.id},headers:this.headers}))}}class e$ extends A{async fetch(){let{labels:$}=Q(await this.client.email.listLabels()),O=$.find((j)=>j.id===this.id);if(!O)throw new w(`label ${this.id} not found`);return O}static byId($,O){return new e$($,O)}static async list($){let{labels:O}=Q(await $.email.listLabels());return O.map((j)=>new e$($,j.id,j))}static async create($,O){let{label:j}=Q(await $.email.createLabel({body:{label_name:O}}));if(!j.id)throw new b("created label has no id");return new e$($,j.id)}async delete(){Q(await this.client.email.deleteLabel({path:{id:this.id}}))}name=this.field("name");linkId=this.field("linkId");type=this.field("type");createdAt=this.field("createdAt");labelListVisibility=this.field("labelListVisibility");messageListVisibility=this.field("messageListVisibility")}class O0{client;async createDraft($,O){let j=Q(await this.client.email.createDraft({body:{draft:$0($)},headers:O?{"X-Email-Link-Id":O.id}:void 0}));if(!j.draft.db_id)throw Error("Draft response has no message id");return YO.byId(this.client,j.draft.db_id)}draftById($){return YO.byId(this.client,$)}async*scheduled($){let O=$?.pageSize??100;if(!Number.isInteger(O)||O<1)throw Error("pageSize must be positive");let j=Math.min(O,1000);for(let x=0;;x+=j){let S=Q(await this.client.email.getScheduledMessages({query:{offset:x,limit:j},headers:$?.inbox?{"X-Email-Link-Id":$.inbox.id}:void 0}));for(let K of S.messages)yield YO.byId(this.client,K.db_id);if(S.messages.length<j)return}}async filters($){return Q(await this.client.email.listEmailFilters({headers:$?{"X-Email-Link-Id":$.id}:void 0})).filters.map((O)=>QO.from(this.client,O,$))}async upsertFilter($,O){return QO.from(this.client,Q(await this.client.email.upsertEmailFilter({headers:O?{"X-Email-Link-Id":O.id}:void 0,body:{email_address:$.emailAddress,email_domain:$.emailDomain,is_important:$.isImportant}})).filter,O)}async contacts(){return Q(await this.client.email.listContacts()).contacts}reminders($){let{inboxes:O,...j}=$??{};return a(async(x)=>{let S=Q(await this.client.storage.listEmailReminders({query:{...j,inboxIds:O?.map((K)=>K.id),cursor:x}}));return{items:S.items.map(({threadId:K,...Z})=>({...Z,thread:H$.byId(this.client,K)})),nextCursor:S.nextCursor}})}constructor($){this.client=$}byId($){return H$.byId(this.client,$)}message($){return R$.byId(this.client,$)}attachment($){return KO.byId(this.client,$)}link($){return z$.byId(this.client,$)}links(){return z$.list(this.client)}async connectionProviders(){return Q(await this.client.auth.emailConnectionProviders())}async recoverDraftTransfer($){return Q(await this.client.email.recoverDraftTransfer({path:{id:$}}))}send($){return R$.send(this.client,$)}search($,O){return H$.search(this.client,$,O)}inbox($){return a(async(O)=>{let j=Q(await this.client.email.previewsInboxCursor({path:{view:"inbox"},query:{...$?.pageSize?{limit:$.pageSize}:{},...$?.sort?{sort_method:$.sort}:{},...O?{cursor:O}:{}}}));return{items:j.items.map((x)=>H$.byId(this.client,x.id)),nextCursor:j.next_cursor}})}label($){return e$.byId(this.client,$)}labels(){return e$.list(this.client)}createLabel($){return e$.create(this.client,$)}async deleteLabel($){Q(await this.client.email.deleteLabel({path:{id:$.id}}))}async blockSender($){Q(await this.client.email.blockSender({body:{email_address:$}}))}async unblockSender($){Q(await this.client.email.unblockSender({body:{email_address:$}}))}async blockedSenders(){return Q(await this.client.email.listBlockedSenders()).blocked_emails}}class BO{client;id;constructor($,O){this.client=$;this.id=O}static byId($,O){return new BO($,O)}async delete(){Q(await this.client.storage.deleteEntityMention({path:{mention_id:this.id}}))}toJSON(){return{id:this.id}}}class j0{client;constructor($){this.client=$}byId($){return BO.byId(this.client,$)}async create($,O){let j=Q(await this.client.storage.createEntityMention({body:{source_entity_id:$.entity.id,source_entity_type:$.type,entity_id:O.entity.id,entity_type:O.type}}));return BO.byId(this.client,j.id)}}class x0{client;constructor($){this.client=$}async list($={}){let{favorites:O}=Q(await this.client.storage.listFavorites({query:{entityType:$.entityTypes,entityId:$.entityIds}}));return O}async add($){return Q(await this.client.storage.addFavorite({body:{entityId:$.id,entityType:$.entityType}}))}async remove($){Q(await this.client.storage.removeFavoriteByEntity({path:{entity_type:$.entityType,entity_id:$.id}}))}async reorder($){Q(await this.client.storage.reorderFavorites({body:{favorites:$}}))}}class o$ extends F${entityType="foreign_entity";async fetch(){return Q(await this.client.storage.getForeignEntity({path:{id:this.id}}))}static byId($,O){return new o$($,O)}static fromRecord($,O){return new o$($,O.id,O)}foreignEntityId=this.field("foreignEntityId");source=this.field("foreignEntitySource");storedForId=this.field("storedForId");storedForAuthEntity=this.field("storedForAuthEntity");createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");async metadata(){return(await this.detail.get()).metadata}}function g1({login:$,...O}){return{...O,login:$??void 0}}class S0{client;constructor($){this.client=$}byId($){return o$.byId(this.client,$)}async bySource($,O){return o$.fromRecord(this.client,Q(await this.client.storage.getForeignEntityBySource({path:{source:$,foreign_entity_id:O}})))}async githubPullRequestFacets(){let{repositories:$,authors:O,assignees:j,labels:x}=Q(await this.client.storage.getGithubPullRequestFacets());return{repositories:$,authors:O.map(g1),assignees:j.map(g1),labels:x.map(({color:S,...K})=>({...K,color:S??void 0}))}}}class u${form;id;constructor($,O){this.form=$;this.id=O}static byId($,O){return new u$($,O)}async detail(){let O=(await this.form.schema()).sections.flatMap((j)=>j.kind==="questions"?j.questions:[]).find((j)=>j.id===this.id);if(!O)throw new w(`question ${this.id} is not on form ${this.form.id}`);return O}async title(){return(await this.detail()).title}async column(){return M$.byId(await this.form.table(),(await this.detail()).column)}async options(){return(await this.detail()).options.map(($)=>JO.byId(this,$.id))}}class JO{question;id;constructor($,O){this.question=$;this.id=O}static byId($,O){return new JO($,O)}async detail(){let $=(await this.question.detail()).options.find((O)=>O.id===this.id);if(!$)throw new w(`option ${this.id} is not on question ${this.question.id}`);return $}async label(){return(await this.detail()).label}async color(){return(await this.detail()).color??void 0}}class LO{form;id;detail;constructor($,O,j){this.form=$;this.id=O;this.detail=new V$(()=>this.load(),j)}async load(){let $=await this.form.myResponse();if($.response.id!==this.id)throw new w(`response ${this.id} is not your current response`);return $}static byId($,O,j){return new LO($,O,j)}async status(){return(await this.detail.get()).status}async row(){return(await this.detail.get()).row}async answers(){return(await this.detail.get()).answers}async booking(){return(await this.detail.get()).booking}async refresh(){let $=await this.load();return this.detail=new V$(()=>this.load(),$),this}}class d${form;id;constructor($,O){this.form=$;this.id=O}static byId($,O){return new d$($,O)}async detail(){let $=(await this.form.schema()).sections.find((O)=>O.id===this.id);if(!$)throw new w(`section ${this.id} is not on form ${this.form.id}`);return $}async title(){return(await this.detail()).title}async questions(){let $=await this.detail();return $.kind==="questions"?$.questions.map((O)=>u$.byId(this.form,O.id)):[]}}class Tj{entityType;id;constructor($,O){this.entityType=$;this.id=O}static byId($,O){return new Tj($,O)}}class k$ extends A{async fetch(){return Q(await this.client.storage.getForm({path:{id:this.id}}))}static byId($,O){return new k$($,O)}static async create($,O){let j=Q(await $.storage.createForm({body:{name:O.name,source:O.table?{kind:"table",databaseId:O.table.database.id,tableId:O.table.id}:{kind:"new"}}}));return new k$($,j.form.id,j)}static async list($,O){if(!O)return Q(await $.storage.listAccessibleForms()).map(({form:S})=>new k$($,S.id));return Q(await $.storage.listForms({query:{databaseId:O.id}})).map((x)=>new k$($,x.id))}schema(){return this.detail.get()}name=this.mappedField("form",($)=>$.name);description=this.mappedField("form",($)=>$.description);owner=this.mappedField("form",($)=>M.byId(this.client,$.ownerId));database=this.mappedField("form",($)=>J$.byId(this.client,$.databaseId));table=this.mappedField("form",($)=>Q$.byId(J$.byId(this.client,$.databaseId),$.tableId));audience=this.mappedField("form",($)=>$.audience);status=this.mappedField("form",($)=>$.status);closesAt=this.mappedField("form",($)=>$.closesAt??void 0);access=this.field("access");async sections(){return(await this.detail.get()).sections.map(($)=>d$.byId(this,$.id))}async questions(){return(await this.detail.get()).sections.flatMap(($)=>$.kind==="questions"?$.questions.map((O)=>u$.byId(this,O.id)):[])}async update($){return await this.mutate((O)=>O.storage.updateForm({path:{id:this.id},body:$})),this}assertOwns($){if($.form.id!==this.id)throw new b(`question or section does not belong to form ${this.id}`)}async replaceLayout($){let O=await this.table(),j=(Z)=>{if(Z.table.id!==O.id||Z.table.database.id!==O.database.id)throw new b(`column does not belong to form ${this.id}'s table`);return Z.id},x=(Z)=>({conjunction:Z.conjunction,conditions:Z.conditions.map((X)=>c(X).with({kind:"group"},(G)=>({kind:"group",...x(G)})).with({kind:"condition"},(G)=>({kind:"condition",column:j(G.column),test:c(G.test).with({kind:"options"},(L)=>({...L,options:L.options.map((Y)=>Y.id)})).with({kind:"entities"},(L)=>({...L,entities:L.entities.map((Y)=>Y.id)})).with({kind:x$.union("presence","text","number","date","checkbox")},(L)=>L).exhaustive()})).exhaustive())}),S={sections:$.map((Z)=>{if(Z.section)this.assertOwns(Z.section);let X={id:Z.section?.id??h$(),title:Z.title,description:Z.description??""};return c(Z).with({kind:"booking"},(G)=>({...X,kind:"booking",target:G.target})).with({kind:"gate"},(G)=>({...X,kind:"gate",rules:x(G.rules),message:G.message})).with({kind:"questions"},(G)=>({...X,kind:"questions",questions:G.questions.map((L)=>{if(L.question)this.assertOwns(L.question);return{id:L.question?.id??h$(),column:j(L.column),helpText:L.helpText??"",required:L.required??!1,widget:L.widget??null}})})).exhaustive()})},K=await this.mutate((Z)=>Z.storage.putFormLayout({path:{id:this.id},body:S}));return{form:this,publicationError:K.publicationError}}wireAnswers($){return $.map(({question:O,value:j})=>{this.assertOwns(O);let x=c(j).with({type:"rows"},(S)=>({type:"rows",value:S.value.map((K)=>K.id)})).with({type:"options"},(S)=>({type:"options",value:S.value.map((K)=>{if(K.question.id!==O.id||K.question.form.id!==this.id)throw new b("option does not belong to the answered question");return{id:K.id}})})).with({type:"entities"},(S)=>({type:"entities",value:S.value.map(({entityType:K,entity:Z})=>({entityType:K,entityId:Z.id}))})).with({type:x$.union("text","number","boolean","date","link","clear")},(S)=>S).exhaustive();return{question:O.id,value:x}})}unlockedBooking($){return $?{...$,section:d$.byId(this,$.section)}:void 0}async outcome($,O){return c($).with({outcome:"stopped"},(j)=>({...j,section:d$.byId(this,j.section)})).with({outcome:"submitted"},async(j)=>{let x=A$.byId(await this.table(),j.row),S=this.unlockedBooking(j.booking);return{outcome:"submitted",response:LO.byId(this,j.response,{status:"submitted",row:x,answers:O,booking:S}),row:x,...S?{booking:S}:{}}}).exhaustive()}async submit($){let O={answers:this.wireAnswers($)};return this.outcome(Q(await this.client.storage.submitFormResponse({path:{id:this.id},body:O})),$)}async editResponse($){let O={answers:this.wireAnswers($)};return this.outcome(Q(await this.client.storage.editMyFormResponse({path:{id:this.id},body:O})),$)}async myResponse(){let $=Q(await this.client.storage.getMyFormResponse({path:{id:this.id}})),O=await this.table(),j=await Promise.all($.answers.map(async(K)=>{let Z=u$.byId(this,K.question),X=await c(K.value).with({type:"options"},(G)=>({type:"options",value:G.value.map((L)=>{if(!("id"in L))throw new b("stored form answers must reference options by id");return JO.byId(Z,L.id)})})).with({type:"entities"},(G)=>({type:"entities",value:G.value.map((L)=>({entityType:L.entityType,entity:Tj.byId(L.entityType,L.entityId)}))})).with({type:"rows"},async(G)=>{let L=await Z.detail();if(L.kind.type!=="relation")throw new b("row answer requires a relation question");let Y=Q$.byId(J$.byId(this.client,L.kind.database),L.kind.table);return{type:"rows",value:G.value.map((J)=>A$.byId(Y,J))}}).with({type:x$.union("text","number","boolean","date","link","clear")},(G)=>G).exhaustive(()=>{throw new b(`answer to question ${Z.id} has a type this SDK doesn't know`)});return{question:Z,value:X}})),x=$.response.row?A$.byId(O,$.response.row):void 0,S=this.unlockedBooking($.booking);return{...S?{booking:S}:{},response:LO.byId(this,$.response.id,{status:$.response.status,row:x,answers:j,booking:S}),status:$.response.status,stoppedAtSection:$.response.stoppedAtSection?d$.byId(this,$.response.stoppedAtSection):void 0,row:x,submittedAt:$.response.submittedAt,updatedAt:$.response.updatedAt,answers:j}}async responseSummary(){let $=Q(await this.client.storage.getFormResponseSummary({path:{id:this.id}}));return{...$,stoppedBySection:$.stoppedBySection.map((O)=>({section:d$.byId(this,O.section),count:O.count}))}}async tally(){return Q(await this.client.storage.getFormTally({path:{id:this.id}})).questions.map((O)=>{let j=u$.byId(this,O.question);return{question:j,responses:O.responses,buckets:O.buckets.flatMap((x)=>c(x.value).with({kind:"option"},(S)=>[{count:x.count,value:{kind:"option",option:JO.byId(j,S.option)}}]).with({kind:"checkbox"},(S)=>[{count:x.count,value:S}]).exhaustive((S)=>{return console.warn("macro sdk: unknown form tally bucket",S),[]}))}})}async sharePermissions(){return Q(await this.client.storage.getFormPermissions({path:{id:this.id}}))}updateSharePermissions($){return this.mutate((O)=>O.storage.updateFormPermissions({path:{id:this.id},body:$}))}webUrl(){return`${this.client.webAppUrl}/app/form/${this.id}`}respondUrl(){return`${this.client.webAppUrl}/app/form/${this.id}/respond`}}class Z0{client;constructor($){this.client=$}byId($){return k$.byId(this.client,$)}create($){return k$.create(this.client,$)}list($){return k$.list(this.client,$)}}class NO extends A{static byId($,O){return new NO($,O)}async fetch(){return Q(await this.client.storage.getGithubPullRequest({path:{id:this.id}}))}title=this.field("title");url=this.field("url");status=this.field("status");async changes(){let $=Q(await this.client.storage.getGithubPullRequestChanges({path:{id:this.id}}));return{changeset:$.changeset?new X0(this.client,this,$.changeset):void 0,error:$.error??void 0}}}class X0{client;pullRequest;record;constructor($,O,j){this.client=$;this.pullRequest=O;this.record=j}get id(){return this.record.id}async patch(){return Q(await this.client.storage.getGithubPullRequestChangesPatch({path:{id:this.pullRequest.id},query:{changeset:this.id}})).patch}toJSON(){return{pullRequestId:this.pullRequest.id,...this.record}}}class G0{client;constructor($){this.client=$}byId($){return NO.byId(this.client,$)}forEntity($){return NO.byId(this.client,$.id)}}class UO extends A{static byId($,O){return new UO($,O)}async fetch(){return Q(await this.client.storage.getHarnessPairing({path:{code:this.id}}))}name=this.field("requested_name");expiresAt=this.field("expires_at");async approve($){let O={name:$?.name,team_id:$?.team?.id,allow_permission_bypass:$?.allowPermissionBypass};return W$.from(this.client,await this.mutate((j)=>j.storage.approveHarnessPairing({path:{code:this.id},body:O})))}}class pO{client;id;constructor($,O){this.client=$;this.id=O}static byId($,O){return new pO($,O)}async claim($){let O=Q(await this.client.storage.claimHarnessPairing({path:{pairing_id:this.id},body:{device_secret:$}}));return"harness"in O?{harness:W$.from(this.client,O.harness),token:O.token}:void 0}toJSON(){return{id:this.id}}}class K0{client;constructor($){this.client=$}byId($){return W$.byId(this.client,$)}async list(){return Q(await this.client.storage.listHarnesses()).map(($)=>W$.from(this.client,$))}async me(){return W$.from(this.client,Q(await this.client.storage.getSelfHarness()))}async deleteSelf(){Q(await this.client.storage.deleteSelfHarness())}async agents(){return Q(await this.client.storage.listHarnessAgents()).map(($)=>U$.byId(this.client,$.bot_id))}async sessions(){return Q(await this.client.storage.listHarnessSessions()).map(($)=>i.byId(this.client,$.session_id))}pairing($){return UO.byId(this.client,$)}async createPairing($){let O=Q(await this.client.storage.createHarnessPairing({body:$}));return{pairing:UO.byId(this.client,O.code),device:pO.byId(this.client,O.pairing_id),deviceSecret:O.device_secret,expiresAt:O.expires_at,pollIntervalSeconds:O.poll_interval_seconds}}}var t6="00000001-0000-0000-0000-000000000002",e6="00000001-0000-0000-0002-000000000004";function o6($){let O=$.match(/^https:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/([1-9][0-9]*)\/?(?:[?#].*)?$/i);if(!O)throw Error(`Expected a GitHub pull request URL like https://github.com/owner/repo/pull/1, got ${$}`);return`${O[1]}/${O[2]}/pull/${O[3]}`}class D$ extends q{static byId($,O){return new D$($,O)}static async create($,O){let{documentId:j}=Q(await $.storage.createTaskHandler({body:{taskName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null,teamId:O.team?.id??null,shareWithTeam:O.shareWithTeam??!0}}));return new D$($,j)}static async forPullRequest($,O){let j=o6(O),{pullRequests:x}=Q(await $.storage.getGithubPullRequestTasks({body:{githubKeys:[j]}}));return(x[0]?.taskIds??[]).map((S)=>new D$($,S))}async completed(){let{subType:$}=await this.detail.get();if($!=="task")return;let j=(await this.properties()).find((x)=>x.definition.id===t6)?.value;return j?.type==="SelectOption"&&j.value.includes(e6)}webUrl(){return`${this.client.webAppUrl}/app/task/${this.id}`}static search=j$({filters:{document_filters:{sub_types:["task"],task_filters:{}}},type:"document",make:($,O)=>new D$($,O.document_id)})}class $O extends A{access=new o(this.client,"initiative",this);static byId($,O){return new $O($,O)}static from($,O){return new $O($,O.id,O)}async fetch(){return Q(await this.client.storage.getInitiative({path:{initiative_id:this.id}}))}name=this.field("name");owner=this.mappedField("ownerId",($)=>M.byId(this.client,$));members=this.mappedField("memberIds",($)=>$.map((O)=>M.byId(this.client,O)));tasks=this.mappedField("taskIds",($)=>$.map((O)=>D$.byId(this.client,O)));accessLevel=this.field("userAccessLevel");sharePermissions=this.field("sharePermission");async update($){await this.mutate((O)=>O.storage.updateInitiative({path:{initiative_id:this.id},body:{name:$.name,memberIds:$.members?.map((j)=>j.id),sharePermission:$.sharePermission?r$($.sharePermission):void 0}}))}async delete(){await this.mutate(($)=>$.storage.deleteInitiative({path:{initiative_id:this.id}}))}}class Y0{client;constructor($){this.client=$}byId($){return $O.byId(this.client,$)}async list(){return Q(await this.client.storage.listInitiatives()).initiatives.map(($)=>$O.byId(this.client,$.id))}async create($){return $O.from(this.client,Q(await this.client.storage.createInitiative({body:{name:$.name,description:$.description,memberIds:$.members?.map((O)=>O.id),shareWithTeam:$.shareWithTeam,propertyValues:$.propertyValues}})))}}class Q0{client;constructor($){this.client=$}byId($){return I$.byId(this.client,$)}async create($){return I$.from(this.client,Q(await this.client.storage.meetingCreate({body:$})))}async list(){return Q(await this.client.storage.meetingList()).meetings.map(($)=>I$.from(this.client,$))}async active(){return Q(await this.client.storage.meetingListActive()).meetings.map(($)=>I$.from(this.client,$))}async lookup($){return I$.from(this.client,Q(await this.client.storage.meetingLookup({path:{token:$}})))}}class VO extends A{async fetch(){return Q(await this.client.notification.getTypedNotificationById({path:{notification_id:this.id}}))}static byId($,O){return new VO($,O)}static from($,O){return new VO($,O.id,O)}static list($,O){return a(async(j)=>{let x=Q(await $.notification.listTypedNotifications({query:{...O?.pageSize?{limit:O.pageSize}:{},...O?.states!==void 0?{states:O.states.join(",")}:{},...j?{cursor:j}:{}}}));return{items:x.items.map((S)=>VO.from($,S)),nextCursor:x.next_cursor}})}type=this.field("notification_event_type");createdAt=this.field("created_at");updatedAt=this.field("updated_at");state=this.field("state");done=this.mappedField("state",($)=>$==="done");sent=this.field("sent");viewedAt=this.field("viewed_at");deletedAt=this.field("deleted_at");owner=this.mappedField("owner_id",($)=>M.byId(this.client,$));sender=this.mappedField("sender_id",($)=>$?M.byId(this.client,$):void 0);metadata=this.field("notification_metadata");async seen(){return await this.state()!=="unseen"}async markSeen(){await this.mutate(($)=>$.notification.bulkMarkNotificationsSeen({body:{notificationIds:[this.id]}}))}async markDone(){await this.mutate(($)=>$.notification.bulkMarkNotificationsDone({body:{notificationIds:[this.id]}}))}async markUndone(){await this.mutate(($)=>$.notification.bulkMarkNotificationsUndone({body:{notificationIds:[this.id]}}))}async delete(){await this.mutate(($)=>$.notification.deleteUserNotificationV2({path:{notification_id:this.id}}))}}class J0{client;constructor($){this.client=$}byId($){return VO.byId(this.client,$)}list($){return VO.list(this.client,$)}async markSeen($){Q(await this.client.notification.bulkMarkNotificationsSeen({body:{notificationIds:$}}))}async markDone($){Q(await this.client.notification.bulkMarkNotificationsDone({body:{notificationIds:$}}))}async delete($){Q(await this.client.notification.bulkDeleteUserNotificationsV2({body:{notificationIds:$}}))}async preferences(){return Q(await this.client.notification.getNotificationTypePreferences())}async enableType($){Q(await this.client.notification.enableNotificationType({path:{notification_event_type:$}}))}async disableType($){Q(await this.client.notification.disableNotificationType({path:{notification_event_type:$}}))}}class V0{client;constructor($){this.client=$}async list(){let{data:$}=Q(await this.client.storage.getPinsHandler({}));return $?.recent??[]}async add($,O){Q(await this.client.storage.addPinHandler({path:{pinned_item_id:$.id},body:{pinType:$.entityType,pinIndex:O.index}}))}async remove($){Q(await this.client.storage.removePinHandler({path:{pinned_item_id:$.id},body:{pinType:$.entityType}}))}async reorder($){Q(await this.client.storage.reorderPinsHandler({body:$}))}}class W0{client;constructor($){this.client=$}byId($){return n.byId(this.client,$)}create($){return n.create(this.client,$)}search($,O){return n.search(this.client,$,O)}}class zO{client;definitionId;id;record;constructor($,O,j,x){this.client=$;this.definitionId=O;this.id=j;this.record=x}static from($,O,j){return new zO($,O,j.id,j)}get value(){return this.record.value}get color(){return this.record.color??void 0}get displayOrder(){return this.record.display_order}get createdAt(){return this.record.created_at}get updatedAt(){return this.record.updated_at}async update($){return this.record=Q(await this.client.properties.updatePropertyOption({path:{definition_id:this.definitionId,option_id:this.id},body:$})),this}async delete(){Q(await this.client.properties.deletePropertyOption({path:{definition_id:this.definitionId,option_id:this.id}}))}}class OO{client;id;detail;constructor($,O,j){this.client=$;this.id=O;this.detail=new V$(()=>this.fetch(),j)}async fetch(){return Q(await this.client.properties.getPropertyDefinition({path:{definition_id:this.id}}))}static async create($,O){let j=Q(await $.properties.createPropertyDefinition({body:{display_name:O.displayName,scope:O.scope,data_type:O.dataType}}));return new OO($,j.id,j)}static byId($,O){return new OO($,O)}static fromRecord($,O){return new OO($,O.id,O)}get displayName(){return this.detail.get().then(($)=>$.display_name)}get dataType(){return this.detail.get().then(($)=>$.data_type)}get owner(){return this.detail.get().then(($)=>$.owner)}get isSystem(){return this.detail.get().then(($)=>$.is_system)}get isMultiSelect(){return this.detail.get().then(($)=>$.is_multi_select)}get createdAt(){return this.detail.get().then(($)=>$.created_at)}get updatedAt(){return this.detail.get().then(($)=>$.updated_at)}async delete(){return Q(await this.client.properties.deletePropertyDefinition({path:{definition_id:this.id}}))}async options(){return Q(await this.client.properties.getPropertyOptions({path:{definition_id:this.id}})).map((O)=>zO.from(this.client,this.id,O))}async addOption($){let O=Q(await this.client.properties.addPropertyOption({path:{definition_id:this.id},body:$}));return zO.from(this.client,this.id,O)}async updateOption($,O){let j=Q(await this.client.properties.updatePropertyOption({path:{definition_id:this.id,option_id:$.id},body:O}));return zO.from(this.client,this.id,j)}async deleteOption($){return Q(await this.client.properties.deletePropertyOption({path:{definition_id:this.id,option_id:$.id}}))}}class B0{client;constructor($){this.client=$}async list($){return Q(await this.client.properties.listProperties({query:{scope:$?.scope??"all",...$?.forEntityType!==void 0?{for_entity_type:$.forEntityType}:{}}})).map((j)=>{let x="definition"in j?j.definition:j;return OO.fromRecord(this.client,x)})}create($){return OO.create(this.client,$)}definition($){return OO.byId(this.client,$)}async bulkEntityProperties($){return Q(await this.client.properties.getBulkEntityProperties({body:$}))}async updateEntityPropertyOptions($,O){return Q(await this.client.properties.bulkUpdateEntitiesPropertyOptions({body:{entities:$.map((x)=>x.propertyReference()),property_id:O.property.id,...O.add?{add_option_ids:O.add.map((x)=>x.id)}:{},...O.remove?{remove_option_ids:O.remove.map((x)=>x.id)}:{}}})).results}async addEntityPropertyOption($){return Q(await this.client.properties.addEntityPropertyOption({path:{...$.entity.propertyReference(),property_id:$.property.id,option_id:$.option.id}}))}async removeEntityPropertyOption($){return Q(await this.client.properties.removeEntityPropertyOption({path:{...$.entity.propertyReference(),property_id:$.property.id,option_id:$.option.id}}))}async tags(){return Q(await this.client.properties.listTags({}))}}function L0($){return c($).with({type:"cron"},(O)=>O).with({type:"events"},(O)=>({type:"events",filters:O.filters.map(({entities:j,...x})=>({...x,ids:j?.map((S)=>S.entity.id)}))})).exhaustive()}function $7($){return c($).with({type:"multiple"},(O)=>({type:"multiple",triggers:O.triggers.map(L0)})).with({type:"cron"},L0).with({type:"events"},L0).exhaustive()}class jO extends A{static byId($,O){return new jO($,O)}static from($,O){if(!O.id)throw Error("Routine response has no id");return new jO($,O.id,O)}async fetch(){return Q(await this.client.scheduledAction.getScheduledAction({path:{id:this.id}}))}name=this.field("name");trigger=this.field("trigger");enabled=this.field("enabled");nextRunAt=this.field("next_run_at");revision=this.field("configuration_revision");owner=this.mappedField("owner",($)=>M.byId(this.client,$));async update($){await this.mutate((O)=>O.scheduledAction.updateScheduledAction({path:{id:this.id},body:U0($)}))}async setEnabled($){await this.mutate((O)=>O.scheduledAction.setScheduledActionEnabled({path:{id:this.id},body:{enabled:$}}))}async execute(){let $=Q(await this.client.scheduledAction.executeScheduledActionNow({path:{id:this.id}}));if($.resource)return c($.resource).with({type:"agent"},(O)=>i.byId(this.client,O.id)).with({type:"chat"},(O)=>Z$.byId(this.client,O.id)).exhaustive();return $.chat_id?Z$.byId(this.client,$.chat_id):void 0}async history(){return Q(await this.client.scheduledAction.listScheduledActionHistory({path:{id:this.id}})).map(($)=>new N0(this,$))}async delete(){await this.mutate(($)=>$.scheduledAction.deleteScheduledAction({path:{id:this.id}}))}}class N0{routine;record;constructor($,O){this.routine=$;this.record=O}get id(){return this.record.id??void 0}toJSON(){return{routine:this.routine.id,...this.record}}}function U0($){let O={prompt:$.prompt,user_prompt:$.userPrompt,model:$.model,agent:$.agent?{bot_id:$.agent.id}:void 0};return{kind:"Agent",name:$.name,enabled:$.enabled,trigger:$7($.trigger),task:{...O}}}class z0{client;constructor($){this.client=$}byId($){return jO.byId(this.client,$)}async create($){return jO.from(this.client,Q(await this.client.scheduledAction.createScheduledAction({body:{...U0($),enabled:$.enabled??!0}})))}async list($){return Q(await this.client.scheduledAction.listScheduledActions({query:{include_events:$?.includeEvents}})).map((O)=>jO.from(this.client,O))}}class I0{client;constructor($){this.client=$}byId($){return D$.byId(this.client,$)}create($){return D$.create(this.client,$)}forPullRequest($){return D$.forPullRequest(this.client,$)}search($,O){return D$.search(this.client,$,O)}}class T0{client;constructor($){this.client=$}byId($){return T$.byId(this.client,$)}current(){return T$.current(this.client)}list(){return T$.list(this.client)}}class H0{client;constructor($){this.client=$}async get($){return Q(await this.client.unfurl.getUnfurl({query:{url:$}}))}async bulk($){return Q(await this.client.unfurl.getUnfurlBulk({body:{url_list:$}}))}}class R0{client;constructor($){this.client=$}byId($){return M.byId(this.client,$)}me(){return M.me(this.client)}}class xO extends A{signingSecret;constructor($,O,j,x){super($,O,j);this.signingSecret=x}async fetch(){return Q(await this.client.storage.getWebhook({path:{webhook_id:this.id}}))}static async create($,O){let j=Q(await $.storage.createWebhook({body:{endpoint_url:O.url,namespace:O.namespace,name:O.name,filters:O.filters,scope:O.scope??"user",...O.headers!==void 0?{headers:O.headers}:{}}}));return new xO($,j.id,j,j.signing_secret)}static byId($,O){return new xO($,O)}static fromRecord($,O){return new xO($,O.id,O)}name=this.field("name");namespace=this.field("namespace");endpointUrl=this.field("endpoint_url");status=this.field("status");isValid=this.field("is_valid");filters=this.field("filters");createdAt=this.field("created_at");workspaceId=this.field("workspace_id");createdBy=this.mappedField("created_by_user_id",($)=>M.byId(this.client,$));async scope(){let $=await this.detail.get();return $.workspace_id===$.created_by_user_id?"user":"team"}async update($){await this.mutate((O)=>O.storage.patchWebhook({path:{webhook_id:this.id},body:$}))}async rename($){await this.update({name:$})}async setUrl($){await this.update({endpoint_url:$})}async setFilters($){await this.update({filters:$})}async pause(){await this.update({status:"paused"})}async resume(){await this.update({status:"active"})}async delete(){await this.mutate(($)=>$.storage.deleteWebhook({path:{webhook_id:this.id}}))}async validate(){return this.mutate(($)=>$.storage.validateWebhook({path:{webhook_id:this.id}}))}}class D0{client;constructor($){this.client=$}create($){return xO.create(this.client,$)}byId($){return xO.byId(this.client,$)}async list(){let{webhooks:$}=Q(await this.client.storage.listWebhooks());return $.map((O)=>xO.fromRecord(this.client,O))}}function C0($){if("properties"in $.data)return $.data.properties;if($.tag==="calendarEvent")return $.data.extra.properties;return[]}function y1($,O,j){let x=[];for(let S of C0(O)){if(S.definition.data_type!=="TAG"||S.value?.type!=="SelectOption")continue;for(let K of S.value.value){let Z=j.get(K);if(Z&&!x.some((X)=>X.label===Z.label&&X.scope===Z.scope))x.push(Z)}}switch(O.tag){case"document":return{type:"document",id:O.data.id,entity:q.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name,fileType:O.data.fileType,subType:O.data.subType?.type};case"chat":return{type:"ai_chat",id:O.data.id,entity:Z$.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name};case"project":return{type:"project",id:O.data.id,entity:n.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name};case"emailThread":return{type:"email",id:O.data.id,entity:H$.byId($,O.data.id),snapshot:O,tags:x,subject:O.data.name,snippet:O.data.snippet,senderName:O.data.senderName,senderEmail:O.data.senderEmail,inboxVisible:O.data.inboxVisible,isRead:O.data.isRead,isDraft:O.data.isDraft};case"channel":return{type:"channel",id:O.data.channel.id,entity:f.byId($,O.data.channel.id),snapshot:O,tags:x,name:O.data.channel.name};case"channelThread":return{type:"channel_thread",id:O.data.id,entity:new g$($,O.data.channel_id,O.data.id),snapshot:O,tags:x,channelId:O.data.channel_id};case"call":return{type:"call",id:O.data.callId,entity:Y$.byId($,O.data.callId),snapshot:O,tags:x,createdBy:O.data.createdBy};case"calendarEvent":return{type:"calendar_event",id:O.data.id,entity:K$.byId($,O.data.id),snapshot:O,tags:x,title:O.data.title,status:O.data.status,location:O.data.location,conferenceUrl:O.data.conferenceUrl,conferenceProvider:O.data.conferenceProvider,time:O.data.time};case"foreignEntity":return{type:"foreign_entity",id:O.data.id,entity:o$.byId($,O.data.id),snapshot:O,tags:x,foreignEntityId:O.data.foreignEntityId,foreignEntitySource:O.data.foreignEntitySource,metadata:O.data.metadata};default:throw Error(`Unexpected workspace entity type: ${O.tag}`)}}var v1="00000000-0000-0000-0000-000000000000",_0={document:["df","id"],project:["pf","pid"],ai_chat:["cf","cid"],email:["ef","ThreadId"],channel:["chanf","ChannelId"],channel_thread:["cthf","ThreadId"],call:["callf","CallId"],calendar_event:["calf","id"],foreign_entity:["fef","id"]},Hj=($)=>$.replace(/[A-Z]/g,(O)=>O.toLowerCase()),h1=($,O)=>$==null?O:{"&":[$,O]};function M0($,O){if(!$||typeof $!=="object"||Array.isArray($))throw Error(`Invalid workspace ${O}: expected a filter expression.`);let j=Object.entries($),x=j[0];if(j.length!==1||x===void 0)throw Error(`Invalid workspace ${O}: use exactly one of l, &, |, !.`);let[S,K]=x;if(S==="l")return;if(S==="!"){M0(K,`${O}.!`);return}if(S!=="&"&&S!=="|")throw Error(`Invalid workspace ${O}: use l, &, | or !.`);if(!Array.isArray(K)||K.length!==2)throw Error(`Invalid workspace ${O}.${S}: expected exactly two expressions. Use {l: {...}} for a single condition; nest binary operators for three or more.`);K.forEach((Z,X)=>{M0(Z,`${O}.${S}[${X}]`)})}class Rj{client;tagSets;constructor($){this.client=$}sets(){return this.tagSets??=this.client.properties.listTags({}).then(Q),this.tagSets}async tagMap(){let $=new Map;for(let O of await this.sets())for(let j of O.options)if(j.value.type==="string")$.set(j.id,{label:j.value.value,scope:O.scope==="user"?"personal":"team"});return $}async body($){for(let[S,K,Z]of[["sortBy",$.sortBy,["recently_viewed","recently_updated","recently_created"]],["emailPreset",$.emailPreset,["signal"]],["tagsMatch",$.tagsMatch,["any","all"]]])if(K!==void 0&&!Z.includes(K))throw Error(`Invalid workspace ${S}: ${K}`);if($.includeTypes!==void 0&&(!Array.isArray($.includeTypes)||$.includeTypes.some((S)=>!Object.hasOwn(_0,S))))throw Error(`Invalid workspace includeTypes. Supported values: ${Object.keys(_0).join(", ")}. Tasks use document with df: {l: {dst: 'task'}}.`);for(let S of["df","pf","cf","ef","chanf","cthf","callf","fef","calf","propf"])if($[S]!=null)M0($[S],S);if($.tags?.some((S)=>S.scope!==void 0&&S.scope!=="personal"&&S.scope!=="team"))throw Error("Invalid workspace tag scope");if($.limit!==void 0&&!Number.isFinite($.limit))throw Error("Workspace limit must be finite");let O={df:$.df,pf:$.pf,cf:$.cf,ef:$.ef,chanf:$.chanf,cthf:$.cthf,callf:$.callf,fef:$.fef,calf:$.calf,propf:$.propf,ccf:{l:{id:v1}},favorites_only:$.favoritesOnly,expand:!0,limit:Math.max(1,Math.min(500,Math.trunc($.limit??50))),sort_method:$.sortBy==="recently_viewed"?"viewed_at":$.sortBy==="recently_created"?"created_at":"updated_at",sort_direction:"desc",emailView:$.emailView??"inbox"};if($.emailPreset==="signal")O.ef={"&":[{l:{Importance:!0}},{l:{Shared:"exclude"}}]};let j=$.inbox?.trim();if(j){let{links:S}=Q(await this.client.email.listLinks()),K=S.filter((X)=>Hj(X.email_address)===Hj(j)),Z=K[0];if(!Z)throw Error(`No connected inbox matches "${j}". Connected inboxes: ${S.map((X)=>X.email_address).join(", ")}.`);if(K.length>1)throw Error(`Multiple connected inboxes match "${j}"; cannot pick one.`);O.ef=h1(O.ef,{l:{Owner:Z.id}})}let x=$.includeTypes??($.emailPreset==="signal"?["email"]:void 0);if(x?.length){for(let[S,[K,Z]]of Object.entries(_0))if(!x.includes(S))O[K]={l:{[Z]:v1}}}if($.tags?.length){let S=(await this.sets()).flatMap((G)=>{let L=G.definition;if(!L)return[];return G.options.flatMap((Y)=>Y.value.type==="string"?[{id:Y.id,definitionId:L.id,label:Y.value.value,scope:G.scope==="user"?"personal":"team"}]:[])}),K=new Map;for(let G of $.tags){let L=S.filter((Y)=>Hj(Y.label)===Hj(G.label.trim())&&(!G.scope||Y.scope===G.scope));if(!L.length)throw Error(`Unknown tag "${G.label}". Available tags: ${S.map((Y)=>`${Y.label} (${Y.scope})`).join(", ")}.`);if($.tagsMatch==="all"&&L.length>1)throw Error(`Tag "${G.label}" is ambiguous; specify personal or team scope.`);for(let Y of L)K.set(Y.id,Y)}let X=[...K.values()].map((G)=>({l:{pd:G.definitionId,v:{so:G.id}}})).reduce((G,L)=>G===void 0?L:{[$.tagsMatch==="all"?"&":"|"]:[G,L]},void 0);O.propf=h1(O.propf,X)}return O}}class A0{client;constructor($){this.client=$}async page($={}){let O=new Rj(this.client);return this.fetch(O,await O.body($),$.cursor)}async*list($={}){let O=new Rj(this.client),j=await O.body($);yield*a((x)=>this.fetch(O,j,x))}async fetch($,O,j){let x=Q(await this.client.storage.postItemsSoupAst({body:O,query:j?{cursor:j}:void 0})),K=x.items.some((Z)=>C0(Z).some((X)=>X.definition.data_type==="TAG"))?await $.tagMap():new Map;return{items:x.items.map((Z)=>y1(this.client,Z,K)),nextCursor:x.next_cursor,hasMore:x.next_cursor!=null}}}function m1({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:G,url:L,...Y}){let J,T=G??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,I=Y.signal??new AbortController().signal;while(!0){if(I.aborted)break;B++;let P=Y.headers instanceof Headers?Y.headers:new Headers(Y.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...Y,body:Y.serializedBody,headers:P,signal:I},C=new Request(L,D);if($)C=await $(L,D);let N=await(Y.fetch??globalThis.fetch)(C);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let H=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",k=()=>{try{H.cancel()}catch{}};I.addEventListener("abort",k);try{while(!0){let{done:d,value:l}=await H.read();if(d)break;U+=l,U=U.replace(/\r\n?/g,``);let g=U.split(``);U=g.pop()??"";for(let r of g){let p=r.split(`diff --git a/crates/email_api_client/src/outbound/outlook/calendar.rs b/crates/email_api_client/src/outbound/outlook/calendar.rsindex 19323beefc..32f4fb6133 100644--- a/crates/email_api_client/src/outbound/outlook/calendar.rs+++ b/crates/email_api_client/src/outbound/outlook/calendar.rs@@ -639,6 +639,8 @@ impl CalendarMutationProvider for OutlookApiClientRepository {})),conference: draft.conference,out_of_office: draft.out_of_office.clone(),+ // Outlook has no guest policy; the domain refuses one first.+ guest_policy: None,};let mut body = patch_body(&patch, None)?;let key = creation_provider_id(diff --git a/crates/email_api_client/src/outbound/outlook/calendar/test.rs b/crates/email_api_client/src/outbound/outlook/calendar/test.rsindex 2ef3433c75..1b09ad901b 100644--- a/crates/email_api_client/src/outbound/outlook/calendar/test.rs+++ b/crates/email_api_client/src/outbound/outlook/calendar/test.rs@@ -342,6 +342,7 @@ async fn retrying_an_acknowledged_creation_adopts_the_assigned_id_without_reinvireminders: None,conference: None,out_of_office: None,+ guest_policy: None,};let first = api.create_event("token", &target, &draft).await.unwrap();let replay = api.create_event("token", &target, &draft).await.unwrap();diff --git a/crates/graphql_calendar/src/mutation.rs b/crates/graphql_calendar/src/mutation.rsindex b969be8227..0e7b47a091 100644--- a/crates/graphql_calendar/src/mutation.rs+++ b/crates/graphql_calendar/src/mutation.rs@@ -223,6 +223,10 @@ pub(crate) fn mutation_error(error: CalendarMutationError) -> async_graphql::Err"not_attendee","the connected account is not an attendee of this event".into(),),+ CalendarMutationError::NotOrganizer => (+ "not_organizer",+ "Only the organizer can change guest permissions.".into(),+ ),CalendarMutationError::GuestsCannotInvite => ("guests_cannot_invite","Only the organizer can invite guests to this event.".into(),diff --git a/crates/graphql_calendar/src/mutation/inputs.rs b/crates/graphql_calendar/src/mutation/inputs.rsindex 4be9af7cf7..4431dd6d1c 100644--- a/crates/graphql_calendar/src/mutation/inputs.rs+++ b/crates/graphql_calendar/src/mutation/inputs.rs@@ -3,7 +3,7 @@ use calendar_events::domain::{models::{AttendeeResponseStatus, CalendarAttendeeInput, CalendarEventDraft, CalendarEventPatch,ConferenceChange, EventReminderOverride, EventReminders, EventTime, EventTransparency,- EventVisibility, OutOfOfficeAutoDeclineMode, OutOfOfficeProperties,+ EventVisibility, GuestPolicy, OutOfOfficeAutoDeclineMode, OutOfOfficeProperties,},ports::{CalendarDeletionScope, CalendarRsvpScope, CalendarUpdateScope},};@@ -181,6 +181,27 @@ pub struct CalendarOutOfOfficeInput {pub decline_message: Option<String>,}+/// What guests may do with an event; Google calendars only.+#[derive(InputObject, Clone, Copy, Debug)]+pub struct CalendarGuestPolicyInput {+ /// Whether guests may change the event; implies inviting others.+ pub can_modify: bool,+ /// Whether guests may invite others.+ pub can_invite_others: bool,+ /// Whether guests may see the guest list.+ pub can_see_other_guests: bool,+}++impl From<CalendarGuestPolicyInput> for GuestPolicy {+ fn from(input: CalendarGuestPolicyInput) -> Self {+ Self {+ can_modify: input.can_modify,+ can_invite_others: input.can_invite_others,+ can_see_other_guests: input.can_see_other_guests,+ }+ }+}+impl From<CalendarOutOfOfficeInput> for OutOfOfficeProperties {fn from(input: CalendarOutOfOfficeInput) -> Self {Self {@@ -262,6 +283,8 @@ pub struct CreateCalendarEventInput {/// Present to create an out-of-office status event (primary calendar/// only, timed, no attendees).pub out_of_office: Option<CalendarOutOfOfficeInput>,+ /// What guests may do; omit for Google's defaults.+ pub guest_policy: Option<CalendarGuestPolicyInput>,}pub(crate) struct CreateRequest {@@ -293,6 +316,7 @@ impl CreateCalendarEventInput {.transpose()?,conference: self.conference.map(Into::into),out_of_office: self.out_of_office.map(Into::into),+ guest_policy: self.guest_policy.map(Into::into),},})}@@ -338,6 +362,9 @@ pub struct UpdateCalendarEventInput {/// Replacement out-of-office properties, applied only to an event that is/// already out-of-office.pub out_of_office: Option<CalendarOutOfOfficeInput>,+ /// Replacement guest policy; only the organizer of a Google event may+ /// change it, for the whole event or series.+ pub guest_policy: Option<CalendarGuestPolicyInput>,/// How much of a recurring series the update covers. Omit to let/// `recurrenceId` decide: the identified occurrence alone when one is/// supplied, otherwise the whole event or series.@@ -393,6 +420,7 @@ impl UpdateCalendarEventInput {.transpose()?,conference: self.conference.map(Into::into),out_of_office: self.out_of_office.map(Into::into),+ guest_policy: self.guest_policy.map(Into::into),},scope,})diff --git a/crates/graphql_calendar/src/mutation/test.rs b/crates/graphql_calendar/src/mutation/test.rsindex 121ad05a55..909590748e 100644--- a/crates/graphql_calendar/src/mutation/test.rs+++ b/crates/graphql_calendar/src/mutation/test.rs@@ -787,6 +787,7 @@ async fn every_failure_carries_its_rest_code_and_hides_provider_details() {false,),(CalendarMutationError::NotAttendee, "not_attendee", false),+ (CalendarMutationError::NotOrganizer, "not_organizer", false),(CalendarMutationError::GuestsCannotInvite,"guests_cannot_invite",diff --git a/crates/graphql_calendar/src/objects.rs b/crates/graphql_calendar/src/objects.rsindex b3cf0bfc8c..c161916537 100644--- a/crates/graphql_calendar/src/objects.rs+++ b/crates/graphql_calendar/src/objects.rs@@ -327,10 +327,13 @@ pub struct GraphqlCalendarViewerCapabilities {invite_guests: bool,/// Remove guests.remove_guests: bool,- /// Change the event's guest policy.+ /// Change the event's guest policy, which only Google calendars have.set_guest_policy: bool,/// Answer the invitation.rsvp: bool,+ /// Act as the event's organizer: replace its whole guest list and manage+ /// its conferencing.+ organize: bool,}impl From<ViewerCapabilities> for GraphqlCalendarViewerCapabilities {@@ -341,6 +344,7 @@ impl From<ViewerCapabilities> for GraphqlCalendarViewerCapabilities {remove_guests: capabilities.remove_guests,set_guest_policy: capabilities.set_guest_policy,rsvp: capabilities.rsvp,+ organize: capabilities.organize,}}}@@ -619,6 +623,8 @@ pub struct GraphqlCalendarCapabilities {remove_conference: bool,/// Whether an attendee can reset their RSVP to unanswered.reset_rsvp: bool,+ /// Whether the organizer can set what guests may do.+ guest_policy: bool,}impl From<CalendarCapabilities> for GraphqlCalendarCapabilities {@@ -630,6 +636,7 @@ impl From<CalendarCapabilities> for GraphqlCalendarCapabilities {email_reminders: capabilities.email_reminders,remove_conference: capabilities.remove_conference,reset_rsvp: capabilities.reset_rsvp,+ guest_policy: capabilities.guest_policy,}}}diff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.mdindex 0d33c1b404..dc5ecaebea 100644--- a/docs/agent-guide/calendar.md+++ b/docs/agent-guide/calendar.md@@ -472,9 +472,25 @@ calendar access allows. The update refuses a detail change from such a guest witpass them); the editor then shows the line in a toast and locks its details, and a refuseddrag snaps back with the same toast. The refusal covers a stale `viewerCan`, an event theviewer still sees as editable after the organizer turned modifying off, so check it without a-Google account by answering `PATCH /events/{id}` (or the GraphQL `updateCalendarEvent`-mutation) with HTTP 403 and code `guests_cannot_modify` on an event whose-`viewerCan.editDetails` is still true: only there does the editor send a detail change at all.+Google account on an event whose `viewerCan.editDetails` is still true, the only case where+the editor sends a detail change at all: answer `PATCH /events/{id}` with HTTP 403 and code+`guests_cannot_modify`, or the GraphQL `updateCalendarEvent` mutation with an error whose+`extensions.code` is `guests_cannot_modify`.+With the `enable-calendar-guest-invites` flag on, the organizer sets what guests may do in the+composer's `Guest permissions` row, under the pills on desktop and phones alike:+`Modify event`, `Invite others` and `See guest list`, in Google Calendar's order, with Google's+defaults (invite others and see the guest list) preselected on a new event and the stored+`guestPolicy` on an edit. As in Google, checking `Modify event` also checks `Invite others` and+locks it. The row shows on a new event and on an edit whose `viewerCan.setGuestPolicy` is true,+on Google calendars only (the calendar's `capabilities.guestPolicy`); Outlook calendars and+out-of-office events have none. Like the repeat rule, it is disabled while a recurring edit+targets `This event`, since the policy belongs to the whole series, and choosing `This event`+returns it to the stored values. Save sends `guestPolicy` only when it changed, and the guests'+`viewerCan` follows once their copies sync: turning `Invite others` off replaces a guest's+`Add guests` with `Only the organizer can invite guests.` The update refuses a policy change+from anyone but the organizer with 403 `not_organizer`, and on an Outlook event with+`provider_rejected`. `viewerCan.organize` marks the organizer of the displayed copy, including+on Outlook, where `setGuestPolicy` is false.The details header's `Download .ics` icon button, beside `Copy event`, saves the event as aniCalendar file named after its title, so it can be passed on or added to another calendar. Thefile holds the series (its repeat rule, in the event's original time zone), title, descriptiondiff --git a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarCapabilities.md b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarCapabilities.mdindex af51bd82c7..3e8685658f 100644--- a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarCapabilities.md+++ b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarCapabilities.md@@ -1,6 +1,6 @@# Type Alias: CalendarCapabilities-> **CalendarCapabilities** = \{ `autoDecline`: `boolean`; `conferenceProvider?`: `null` \| [`ConferenceProvider`](ConferenceProvider.md); `customRecurrence`: `boolean`; `emailReminders`: `boolean`; `removeConference`: `boolean`; `resetRsvp`: `boolean`; \}+> **CalendarCapabilities** = \{ `autoDecline`: `boolean`; `conferenceProvider?`: `null` \| [`ConferenceProvider`](ConferenceProvider.md); `customRecurrence`: `boolean`; `emailReminders`: `boolean`; `guestPolicy`: `boolean`; `removeConference`: `boolean`; `resetRsvp`: `boolean`; \}Actual provider capabilities used by calendar editors.@@ -12,5 +12,6 @@ Actual provider capabilities used by calendar editors.| <a id="property-conferenceprovider"></a> `conferenceProvider?` | `null` \| [`ConferenceProvider`](ConferenceProvider.md) | - || <a id="property-customrecurrence"></a> `customRecurrence` | `boolean` | Whether arbitrary RFC 5545 recurrence properties can be written. || <a id="property-emailreminders"></a> `emailReminders` | `boolean` | Whether email reminders are delivered by the provider or Macro. |+| <a id="property-guestpolicy"></a> `guestPolicy` | `boolean` | Whether the organizer can set what guests may do. || <a id="property-removeconference"></a> `removeConference` | `boolean` | Whether an existing conference can be detached. || <a id="property-resetrsvp"></a> `resetRsvp` | `boolean` | Whether an attendee can reset their RSVP to unanswered. |diff --git a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarMutationErrorCode.md b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarMutationErrorCode.mdindex 57c937bd52..e70d4d84eb 100644--- a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarMutationErrorCode.md+++ b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CalendarMutationErrorCode.md@@ -1,5 +1,5 @@# Type Alias: CalendarMutationErrorCode-> **CalendarMutationErrorCode** = `"not_found"` \| `"occurrence_not_found"` \| `"read_only"` \| `"no_writable_calendar"` \| `"not_attendee"` \| `"guests_cannot_invite"` \| `"guest_list_hidden"` \| `"guests_cannot_modify"` \| `"already_on_calendar"` \| `"copy_refused"` \| `"snapshot"` \| `"invalid_input"` \| `"reauth_required"` \| `"provider_rejected"` \| `"retryable"` \| `"persist_failed"` \| `"macro_call_failed"`+> **CalendarMutationErrorCode** = `"not_found"` \| `"occurrence_not_found"` \| `"read_only"` \| `"no_writable_calendar"` \| `"not_attendee"` \| `"not_organizer"` \| `"guests_cannot_invite"` \| `"guest_list_hidden"` \| `"guests_cannot_modify"` \| `"already_on_calendar"` \| `"copy_refused"` \| `"snapshot"` \| `"invalid_input"` \| `"reauth_required"` \| `"provider_rejected"` \| `"retryable"` \| `"persist_failed"` \| `"macro_call_failed"`Machine-readable failure category for calendar mutations.diff --git a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CreateCalendarEventRequest.md b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CreateCalendarEventRequest.mdindex 4b53902287..c843fcef80 100644--- a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CreateCalendarEventRequest.md+++ b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/CreateCalendarEventRequest.md@@ -1,6 +1,6 @@# Type Alias: CreateCalendarEventRequest-> **CreateCalendarEventRequest** = \{ `attendees?`: [`CalendarAttendeeInputBody`](CalendarAttendeeInputBody.md)[]; `calendarId?`: `string` \| `null`; `conference?`: `null` \| [`ConferenceChange`](ConferenceChange.md); `description?`: `string` \| `null`; `emailLinkId?`: `string` \| `null`; `idempotencyKey?`: `string` \| `null`; `location?`: `string` \| `null`; `macroCall?`: `boolean`; `outOfOffice?`: `null` \| [`OutOfOfficeProperties`](OutOfOfficeProperties.md); `recurrenceLines?`: `string`[]; `reminders?`: `null` \| [`EventReminders`](EventReminders.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency?`: `null` \| [`EventTransparency`](EventTransparency.md); `visibility?`: `null` \| [`EventVisibility`](EventVisibility.md); \}+> **CreateCalendarEventRequest** = \{ `attendees?`: [`CalendarAttendeeInputBody`](CalendarAttendeeInputBody.md)[]; `calendarId?`: `string` \| `null`; `conference?`: `null` \| [`ConferenceChange`](ConferenceChange.md); `description?`: `string` \| `null`; `emailLinkId?`: `string` \| `null`; `guestPolicy?`: `null` \| [`GuestPolicy`](GuestPolicy.md); `idempotencyKey?`: `string` \| `null`; `location?`: `string` \| `null`; `macroCall?`: `boolean`; `outOfOffice?`: `null` \| [`OutOfOfficeProperties`](OutOfOfficeProperties.md); `recurrenceLines?`: `string`[]; `reminders?`: `null` \| [`EventReminders`](EventReminders.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency?`: `null` \| [`EventTransparency`](EventTransparency.md); `visibility?`: `null` \| [`EventVisibility`](EventVisibility.md); \}Request body creating a calendar event on the requester's calendar.@@ -13,6 +13,7 @@ Request body creating a calendar event on the requester's calendar.| <a id="property-conference"></a> `conference?` | `null` \| [`ConferenceChange`](ConferenceChange.md) | - || <a id="property-description"></a> `description?` | `string` \| `null` | Optional event body. || <a id="property-emaillinkid"></a> `emailLinkId?` | `string` \| `null` | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |+| <a id="property-guestpolicy"></a> `guestPolicy?` | `null` \| [`GuestPolicy`](GuestPolicy.md) | - || <a id="property-idempotencykey"></a> `idempotencyKey?` | `string` \| `null` | Stable retry identity, scoped to the authenticated organizer. || <a id="property-location"></a> `location?` | `string` \| `null` | Optional location label. || <a id="property-macrocall"></a> `macroCall?` | `boolean` | Mint a Macro call and write its join link into the description and location before creating the event, so the invitation carries it. Cannot be combined with `conference`. |diff --git a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/UpdateCalendarEventRequest.md b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/UpdateCalendarEventRequest.mdindex 598ae8d6f2..bcfa2f4b12 100644--- a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/UpdateCalendarEventRequest.md+++ b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/UpdateCalendarEventRequest.md@@ -1,6 +1,6 @@# Type Alias: UpdateCalendarEventRequest-> **UpdateCalendarEventRequest** = \{ `attendees?`: [`CalendarAttendeeInputBody`](CalendarAttendeeInputBody.md)[] \| `null`; `calendarId?`: `string` \| `null`; `conference?`: `null` \| [`ConferenceChange`](ConferenceChange.md); `description?`: `string` \| `null`; `location?`: `string` \| `null`; `outOfOffice?`: `null` \| [`OutOfOfficeProperties`](OutOfOfficeProperties.md); `recurrenceId?`: `string` \| `null`; `recurrenceLines?`: `string`[] \| `null`; `reminders?`: `null` \| [`EventReminders`](EventReminders.md); `scope?`: `null` \| [`CalendarUpdateScopeParam`](CalendarUpdateScopeParam.md); `time?`: `null` \| [`EventTime`](EventTime.md); `title?`: `string` \| `null`; `transparency?`: `null` \| [`EventTransparency`](EventTransparency.md); `visibility?`: `null` \| [`EventVisibility`](EventVisibility.md); \}+> **UpdateCalendarEventRequest** = \{ `attendees?`: [`CalendarAttendeeInputBody`](CalendarAttendeeInputBody.md)[] \| `null`; `calendarId?`: `string` \| `null`; `conference?`: `null` \| [`ConferenceChange`](ConferenceChange.md); `description?`: `string` \| `null`; `guestPolicy?`: `null` \| [`GuestPolicy`](GuestPolicy.md); `location?`: `string` \| `null`; `outOfOffice?`: `null` \| [`OutOfOfficeProperties`](OutOfOfficeProperties.md); `recurrenceId?`: `string` \| `null`; `recurrenceLines?`: `string`[] \| `null`; `reminders?`: `null` \| [`EventReminders`](EventReminders.md); `scope?`: `null` \| [`CalendarUpdateScopeParam`](CalendarUpdateScopeParam.md); `time?`: `null` \| [`EventTime`](EventTime.md); `title?`: `string` \| `null`; `transparency?`: `null` \| [`EventTransparency`](EventTransparency.md); `visibility?`: `null` \| [`EventVisibility`](EventVisibility.md); \}Request body patching an event; omitted fields are left untouched.@@ -12,6 +12,7 @@ Request body patching an event; omitted fields are left untouched.| <a id="property-calendarid"></a> `calendarId?` | `string` \| `null` | Calendar whose copy of the event is patched, for an event synced from more than one calendar. Omit to patch the canonical copy. || <a id="property-conference"></a> `conference?` | `null` \| [`ConferenceChange`](ConferenceChange.md) | - || <a id="property-description"></a> `description?` | `string` \| `null` | Replacement description; an empty string clears it. |+| <a id="property-guestpolicy"></a> `guestPolicy?` | `null` \| [`GuestPolicy`](GuestPolicy.md) | - || <a id="property-location"></a> `location?` | `string` \| `null` | Replacement location; an empty string clears it. || <a id="property-outofoffice"></a> `outOfOffice?` | `null` \| [`OutOfOfficeProperties`](OutOfOfficeProperties.md) | - || <a id="property-recurrenceid"></a> `recurrenceId?` | `string` \| `null` | Original-start key of the occurrence the update targets. |diff --git a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/ViewerCapabilities.md b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/ViewerCapabilities.mdindex d7f139ae7a..7bc6d0ddf4 100644--- a/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/ViewerCapabilities.md+++ b/packages/sdk-docs/reference/generated/calendar/types.gen/type-aliases/ViewerCapabilities.md@@ -1,6 +1,6 @@# Type Alias: ViewerCapabilities-> **ViewerCapabilities** = \{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \}+> **ViewerCapabilities** = \{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \}What the viewing requester may do with an event.@@ -10,6 +10,7 @@ What the viewing requester may do with an event.| ------ | ------ | ------ || <a id="property-editdetails"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). || <a id="property-inviteguests"></a> `inviteGuests` | `boolean` | Add guests. |+| <a id="property-organize"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. || <a id="property-removeguests"></a> `removeGuests` | `boolean` | Remove guests. || <a id="property-rsvp"></a> `rsvp` | `boolean` | Answer the invitation. |-| <a id="property-setguestpolicy"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy. |+| <a id="property-setguestpolicy"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |diff --git a/packages/sdk-docs/reference/generated/email/types.gen/type-aliases/ViewerCapabilities.md b/packages/sdk-docs/reference/generated/email/types.gen/type-aliases/ViewerCapabilities.mdindex d7f139ae7a..7bc6d0ddf4 100644--- a/packages/sdk-docs/reference/generated/email/types.gen/type-aliases/ViewerCapabilities.md+++ b/packages/sdk-docs/reference/generated/email/types.gen/type-aliases/ViewerCapabilities.md@@ -1,6 +1,6 @@# Type Alias: ViewerCapabilities-> **ViewerCapabilities** = \{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \}+> **ViewerCapabilities** = \{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \}What the viewing requester may do with an event.@@ -10,6 +10,7 @@ What the viewing requester may do with an event.| ------ | ------ | ------ || <a id="property-editdetails"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). || <a id="property-inviteguests"></a> `inviteGuests` | `boolean` | Add guests. |+| <a id="property-organize"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. || <a id="property-removeguests"></a> `removeGuests` | `boolean` | Remove guests. || <a id="property-rsvp"></a> `rsvp` | `boolean` | Answer the invitation. |-| <a id="property-setguestpolicy"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy. |+| <a id="property-setguestpolicy"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/ViewerCapabilities.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/ViewerCapabilities.mdindex d7f139ae7a..7bc6d0ddf4 100644--- a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/ViewerCapabilities.md+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/ViewerCapabilities.md@@ -1,6 +1,6 @@# Type Alias: ViewerCapabilities-> **ViewerCapabilities** = \{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \}+> **ViewerCapabilities** = \{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \}What the viewing requester may do with an event.@@ -10,6 +10,7 @@ What the viewing requester may do with an event.| ------ | ------ | ------ || <a id="property-editdetails"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). || <a id="property-inviteguests"></a> `inviteGuests` | `boolean` | Add guests. |+| <a id="property-organize"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. || <a id="property-removeguests"></a> `removeGuests` | `boolean` | Remove guests. || <a id="property-rsvp"></a> `rsvp` | `boolean` | Answer the invitation. |-| <a id="property-setguestpolicy"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy. |+| <a id="property-setguestpolicy"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |diff --git a/packages/sdk-docs/reference/src/entities/calendar/event/interfaces/UpdateEventOptions.md b/packages/sdk-docs/reference/src/entities/calendar/event/interfaces/UpdateEventOptions.mdindex 9d86212805..a631f9e09c 100644--- a/packages/sdk-docs/reference/src/entities/calendar/event/interfaces/UpdateEventOptions.md+++ b/packages/sdk-docs/reference/src/entities/calendar/event/interfaces/UpdateEventOptions.md@@ -10,6 +10,7 @@ Fields to change on an event; omitted fields are left untouched.| <a id="property-calendar"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is patched, for a multi-calendar event. Omit to patch the canonical copy. || <a id="property-conference"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Provider conference change; omit to retain it. Outlook removal requires a separately confirmed replacement via prepareReplacement(). || <a id="property-description"></a> `description?` | `string` | Replacement description; an empty string clears it. |+| <a id="property-guestpolicy"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | Replacement guest policy; only the organizer of a Google event may change it (`viewerCan.setGuestPolicy`). It applies to the whole series, so an update scoped to one occurrence (`scope: 'this_event'`, or a `recurrenceId`) that changes it is rejected; use scope `'all'`. || <a id="property-location"></a> `location?` | `string` | Replacement location; an empty string clears it. || <a id="property-outofoffice"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Replacement out-of-office properties, applied only to an event that is already out-of-office. || <a id="property-recurrenceid"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the update targets. |diff --git a/packages/sdk-docs/reference/src/entities/calendar/namespace/interfaces/CreateEventOptions.md b/packages/sdk-docs/reference/src/entities/calendar/namespace/interfaces/CreateEventOptions.mdindex 1d7002c041..79ae868187 100644--- a/packages/sdk-docs/reference/src/entities/calendar/namespace/interfaces/CreateEventOptions.md+++ b/packages/sdk-docs/reference/src/entities/calendar/namespace/interfaces/CreateEventOptions.md@@ -11,6 +11,7 @@ Fields for a new calendar event.| <a id="property-conference"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Conference to attach; omit to create the event without one. || <a id="property-description"></a> `description?` | `string` | Optional event body. || <a id="property-emaillink"></a> `emailLink?` | [`Link`](../../../email/link/classes/Link.md) | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |+| <a id="property-guestpolicy"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | What guests may do; omit for Google's defaults. Google calendars only. || <a id="property-location"></a> `location?` | `string` | Optional location label. || <a id="property-macrocall"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. || <a id="property-outofoffice"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Out-of-office properties; present to create an out-of-office event. |diff --git a/packages/sdk/generated/calendar/types.gen.ts b/packages/sdk/generated/calendar/types.gen.tsindex eb08d5dcd1..f9040f24f7 100644--- a/packages/sdk/generated/calendar/types.gen.ts+++ b/packages/sdk/generated/calendar/types.gen.ts@@ -116,6 +116,10 @@ export type CalendarCapabilities = {* Whether email reminders are delivered by the provider or Macro.*/emailReminders: boolean;+ /**+ * Whether the organizer can set what guests may do.+ */+ guestPolicy: boolean;/*** Whether an existing conference can be detached.*/@@ -366,7 +370,7 @@ export type CalendarMutationApiError = {/*** Machine-readable failure category for calendar mutations.*/-export type CalendarMutationErrorCode = 'not_found' | 'occurrence_not_found' | 'read_only' | 'no_writable_calendar' | 'not_attendee' | 'guests_cannot_invite' | 'guest_list_hidden' | 'guests_cannot_modify' | 'already_on_calendar' | 'copy_refused' | 'snapshot' | 'invalid_input' | 'reauth_required' | 'provider_rejected' | 'retryable' | 'persist_failed' | 'macro_call_failed';+export type CalendarMutationErrorCode = 'not_found' | 'occurrence_not_found' | 'read_only' | 'no_writable_calendar' | 'not_attendee' | 'not_organizer' | 'guests_cannot_invite' | 'guest_list_hidden' | 'guests_cannot_modify' | 'already_on_calendar' | 'copy_refused' | 'snapshot' | 'invalid_input' | 'reauth_required' | 'provider_rejected' | 'retryable' | 'persist_failed' | 'macro_call_failed';/*** Provider selected from the persisted calendar account and email binding.@@ -494,6 +498,7 @@ export type CreateCalendarEventRequest = {* to the requester's primary inbox.*/emailLinkId?: string | null;+ guestPolicy?: null | GuestPolicy;/*** Stable retry identity, scoped to the authenticated organizer.*/@@ -787,6 +792,7 @@ export type UpdateCalendarEventRequest = {* Replacement description; an empty string clears it.*/description?: string | null;+ guestPolicy?: null | GuestPolicy;/*** Replacement location; an empty string clears it.*/@@ -823,6 +829,11 @@ export type ViewerCapabilities = {* Add guests.*/inviteGuests: boolean;+ /**+ * Act as the event's organizer: replace its whole guest list and manage+ * its conferencing.+ */+ organize: boolean;/*** Remove guests.*/@@ -832,7 +843,7 @@ export type ViewerCapabilities = {*/rsvp: boolean;/**- * Change the event's guest policy.+ * Change the event's guest policy, which only Google calendars have.*/setGuestPolicy: boolean;};diff --git a/packages/sdk/generated/email/types.gen.ts b/packages/sdk/generated/email/types.gen.tsindex 3b824bd8d2..8e5aa44f56 100644--- a/packages/sdk/generated/email/types.gen.ts+++ b/packages/sdk/generated/email/types.gen.ts@@ -1900,6 +1900,11 @@ export type ViewerCapabilities = {* Add guests.*/inviteGuests: boolean;+ /**+ * Act as the event's organizer: replace its whole guest list and manage+ * its conferencing.+ */+ organize: boolean;/*** Remove guests.*/@@ -1909,7 +1914,7 @@ export type ViewerCapabilities = {*/rsvp: boolean;/**- * Change the event's guest policy.+ * Change the event's guest policy, which only Google calendars have.*/setGuestPolicy: boolean;};diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.tsindex 4e76363ca4..4e1678e9b1 100644--- a/packages/sdk/generated/storage/types.gen.ts+++ b/packages/sdk/generated/storage/types.gen.ts@@ -15179,6 +15179,11 @@ export type ViewerCapabilities = {* Add guests.*/inviteGuests: boolean;+ /**+ * Act as the event's organizer: replace its whole guest list and manage+ * its conferencing.+ */+ organize: boolean;/*** Remove guests.*/@@ -15188,7 +15193,7 @@ export type ViewerCapabilities = {*/rsvp: boolean;/**- * Change the event's guest policy.+ * Change the event's guest policy, which only Google calendars have.*/setGuestPolicy: boolean;};diff --git a/packages/sdk/specs/calendar.json b/packages/sdk/specs/calendar.jsonindex 8c7aed8da3..f1796165e5 100644--- a/packages/sdk/specs/calendar.json+++ b/packages/sdk/specs/calendar.json@@ -1035,7 +1035,8 @@"autoDecline","emailReminders","customRecurrence",- "resetRsvp"+ "resetRsvp",+ "guestPolicy"],"properties": {"autoDecline": {@@ -1061,6 +1062,10 @@"type": "boolean","description": "Whether email reminders are delivered by the provider or Macro."},+ "guestPolicy": {+ "type": "boolean",+ "description": "Whether the organizer can set what guests may do."+ },"removeConference": {"type": "boolean","description": "Whether an existing conference can be detached."@@ -1348,6 +1353,7 @@"read_only","no_writable_calendar","not_attendee",+ "not_organizer","guests_cannot_invite","guest_list_hidden","guests_cannot_modify",@@ -1511,6 +1517,17 @@"format": "uuid","description": "Connected inbox whose primary calendar receives the event; defaults\nto the requester's primary inbox."},+ "guestPolicy": {+ "oneOf": [+ {+ "type": "null"+ },+ {+ "$ref": "#/components/schemas/GuestPolicy",+ "description": "What guests may do; omit for Google's defaults (guests may invite\nothers and see the guest list, not modify the event). Google\ncalendars only."+ }+ ]+ },"idempotencyKey": {"type": ["string", "null"],"format": "uuid",@@ -1935,6 +1952,17 @@"type": ["string", "null"],"description": "Replacement description; an empty string clears it."},+ "guestPolicy": {+ "oneOf": [+ {+ "type": "null"+ },+ {+ "$ref": "#/components/schemas/GuestPolicy",+ "description": "Replacement guest policy; only the organizer of a Google event may\nchange it, for the whole event or series. Omit to leave it untouched."+ }+ ]+ },"location": {"type": ["string", "null"],"description": "Replacement location; an empty string clears it."@@ -2030,7 +2058,8 @@"inviteGuests","removeGuests","setGuestPolicy",- "rsvp"+ "rsvp",+ "organize"],"properties": {"editDetails": {@@ -2041,6 +2070,10 @@"type": "boolean","description": "Add guests."},+ "organize": {+ "type": "boolean",+ "description": "Act as the event's organizer: replace its whole guest list and manage\nits conferencing."+ },"removeGuests": {"type": "boolean","description": "Remove guests."@@ -2051,7 +2084,7 @@},"setGuestPolicy": {"type": "boolean",- "description": "Change the event's guest policy."+ "description": "Change the event's guest policy, which only Google calendars have."}}},diff --git a/packages/sdk/specs/email.json b/packages/sdk/specs/email.jsonindex f4a93fb134..e68f73aaa3 100644--- a/packages/sdk/specs/email.json+++ b/packages/sdk/specs/email.json@@ -7230,7 +7230,8 @@"inviteGuests","removeGuests","setGuestPolicy",- "rsvp"+ "rsvp",+ "organize"],"properties": {"editDetails": {@@ -7241,6 +7242,10 @@"type": "boolean","description": "Add guests."},+ "organize": {+ "type": "boolean",+ "description": "Act as the event's organizer: replace its whole guest list and manage\nits conferencing."+ },"removeGuests": {"type": "boolean","description": "Remove guests."@@ -7251,7 +7256,7 @@},"setGuestPolicy": {"type": "boolean",- "description": "Change the event's guest policy."+ "description": "Change the event's guest policy, which only Google calendars have."}}}diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.jsonindex 7cd03cffdb..41fdc11a5e 100644--- a/packages/sdk/specs/storage.json+++ b/packages/sdk/specs/storage.json@@ -42468,7 +42468,8 @@"inviteGuests","removeGuests","setGuestPolicy",- "rsvp"+ "rsvp",+ "organize"],"properties": {"editDetails": {@@ -42479,6 +42480,10 @@"type": "boolean","description": "Add guests."},+ "organize": {+ "type": "boolean",+ "description": "Act as the event's organizer: replace its whole guest list and manage\nits conferencing."+ },"removeGuests": {"type": "boolean","description": "Remove guests."@@ -42489,7 +42494,7 @@},"setGuestPolicy": {"type": "boolean",- "description": "Change the event's guest policy."+ "description": "Change the event's guest policy, which only Google calendars have."}}},diff --git a/packages/sdk/src/entities/calendar/event.test.ts b/packages/sdk/src/entities/calendar/event.test.tsindex ed2bfc66ed..297918c45f 100644--- a/packages/sdk/src/entities/calendar/event.test.ts+++ b/packages/sdk/src/entities/calendar/event.test.ts@@ -42,6 +42,7 @@ const record: CalendarEventRecord = {removeGuests: true,setGuestPolicy: true,rsvp: false,+ organize: true,},createdAt: '2026-01-01T00:00:00Z',updatedAt: '2026-01-01T00:00:00Z',diff --git a/packages/sdk/src/entities/calendar/event.ts b/packages/sdk/src/entities/calendar/event.tsindex a4f5836989..db992df1d2 100644--- a/packages/sdk/src/entities/calendar/event.ts+++ b/packages/sdk/src/entities/calendar/event.ts@@ -11,6 +11,7 @@ import type {EventTime,EventTransparency,EventVisibility,+ GuestPolicy,OutOfOfficeProperties,UpdateCalendarEventRequest,} from '../../../generated/calendar/types.gen';@@ -46,6 +47,11 @@ export interface UpdateEventOptions {/** Replacement out-of-office properties, applied only to an event that is* already out-of-office. */outOfOffice?: OutOfOfficeProperties;+ /** Replacement guest policy; only the organizer of a Google event may change+ * it (`viewerCan.setGuestPolicy`). It applies to the whole series, so an+ * update scoped to one occurrence (`scope: 'this_event'`, or a `recurrenceId`)+ * that changes it is rejected; use scope `'all'`. */+ guestPolicy?: GuestPolicy;/** How much of a recurring series the update covers. Omit to let* `recurrenceId` decide. */scope?: CalendarUpdateScopeParam;@@ -311,6 +317,7 @@ function toUpdateBody(options: UpdateEventOptions): UpdateCalendarEventRequest {reminders: options.reminders,conference: options.conference,outOfOffice: options.outOfOffice,+ guestPolicy: options.guestPolicy,scope: options.scope,recurrenceId: options.recurrenceId,calendarId: options.calendar?.id,diff --git a/packages/sdk/src/entities/calendar/namespace.ts b/packages/sdk/src/entities/calendar/namespace.tsindex e475c54227..1e79566bff 100644--- a/packages/sdk/src/entities/calendar/namespace.ts+++ b/packages/sdk/src/entities/calendar/namespace.ts@@ -6,6 +6,7 @@ import type {EventTime,EventTransparency,EventVisibility,+ GuestPolicy,OutOfOfficeProperties,TeamCalendarSharing,} from '../../../generated/calendar/types.gen';@@ -49,6 +50,8 @@ export interface CreateEventOptions {macroCall?: boolean;/** Out-of-office properties; present to create an out-of-office event. */outOfOffice?: OutOfOfficeProperties;+ /** What guests may do; omit for Google's defaults. Google calendars only. */+ guestPolicy?: GuestPolicy;/** Exact calendar to create the event on; takes precedence over the inbox* default. */calendar?: Calendar;@@ -192,6 +195,7 @@ function toCreateBody(options: CreateEventOptions): CreateCalendarEventRequest {conference: options.conference,macroCall: options.macroCall,outOfOffice: options.outOfOffice,+ guestPolicy: options.guestPolicy,calendarId: options.calendar?.id,emailLinkId: options.emailLink?.id,};diff --git a/static_assets/schema.graphql b/static_assets/schema.graphqlindex 11ffcb6650..60dbf71bc9 100644--- a/static_assets/schema.graphql+++ b/static_assets/schema.graphql@@ -90,6 +90,24 @@ input CalendarGuestInput {optional: Boolean! = false}+"""+What guests may do with an event; Google calendars only.+"""+input CalendarGuestPolicyInput {+ """+ Whether guests may change the event; implies inviting others.+ """+ canModify: Boolean!+ """+ Whether guests may invite others.+ """+ canInviteOthers: Boolean!+ """+ Whether guests may see the guest list.+ """+ canSeeOtherGuests: Boolean!+}+"""How far the client has applied one connected inbox's change log."""@@ -492,6 +510,10 @@ input CreateCalendarEventInput {only, timed, no attendees)."""outOfOffice: CalendarOutOfOfficeInput+ """+ What guests may do; omit for Google's defaults.+ """+ guestPolicy: CalendarGuestPolicyInput}"""@@ -1670,6 +1692,10 @@ type GraphqlCalendarCapabilities {Whether an attendee can reset their RSVP to unanswered."""resetRsvp: Boolean!+ """+ Whether the organizer can set what guests may do.+ """+ guestPolicy: Boolean!}"""@@ -2411,13 +2437,18 @@ type GraphqlCalendarViewerCapabilities {"""removeGuests: Boolean!"""- Change the event's guest policy.+ Change the event's guest policy, which only Google calendars have."""setGuestPolicy: Boolean!"""Answer the invitation."""rsvp: Boolean!+ """+ Act as the event's organizer: replace its whole guest list and manage+ its conferencing.+ """+ organize: Boolean!}"""@@ -10247,6 +10278,11 @@ input UpdateCalendarEventInput {"""outOfOffice: CalendarOutOfOfficeInput"""+ Replacement guest policy; only the organizer of a Google event may+ change it, for the whole event or series.+ """+ guestPolicy: CalendarGuestPolicyInput+ """How much of a recurring series the update covers. Omit to let`recurrenceId` decide: the identified occurrence alone when one issupplied, otherwise the whole event or series.