Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(calendar): read the calendar from the local cache behind enable-graphql-calendar (#7688)

gbirman655a071524f4
diff --git a/apps/web/src/features/calendar/utils/calendar-supported-range.ts b/apps/web/src/features/calendar/utils/calendar-supported-range.ts
index b3a537d464..555fdf3d16 100644
--- a/apps/web/src/features/calendar/utils/calendar-supported-range.ts
+++ b/apps/web/src/features/calendar/utils/calendar-supported-range.ts
@@ -9,7 +9,9 @@ interface CalendarSupportedRange {
}
/** Returns a safely inset version of the backend's rolling materialized range. */
-function getCalendarSupportedRange(now = new Date()): CalendarSupportedRange {
+export function getCalendarSupportedRange(
+ now = new Date()
+): CalendarSupportedRange {
const start = new Date(now);
start.setDate(start.getDate() - CALENDAR_HISTORY_DAYS);
start.setHours(0, 0, 0, 0);
diff --git a/apps/web/src/features/meetings/queries/upcoming-calendar-events.test.ts b/apps/web/src/features/meetings/queries/upcoming-calendar-events.test.ts
index e6ab623503..f32ce15265 100644
--- a/apps/web/src/features/meetings/queries/upcoming-calendar-events.test.ts
+++ b/apps/web/src/features/meetings/queries/upcoming-calendar-events.test.ts
@@ -12,6 +12,11 @@ vi.mock('@service-storage/client', () => ({
storageServiceClient: { listCalendarOccurrences: vi.fn() },
}));
+vi.mock('@queries/calendar/graphql/flag', () => ({
+ useGraphqlCalendarHost: () => () => undefined,
+ markCalendarCacheUnsupported: vi.fn(),
+}));
+
let client: QueryClient;
vi.mock('@queries/client', () => ({
get queryClient() {
diff --git a/apps/web/src/lib/core/constant/featureFlags.ts b/apps/web/src/lib/core/constant/featureFlags.ts
index d128186c2e..e679fc4f20 100644
--- a/apps/web/src/lib/core/constant/featureFlags.ts
+++ b/apps/web/src/lib/core/constant/featureFlags.ts
@@ -560,6 +560,13 @@ export const enableGraphqlSoup = defineFlag({
env: 'ENABLE_GRAPHQL_SOUP',
});
+/** Serves calendar reads from the normalized cache; requires GraphQL Soup. */
+export const enableGraphqlCalendar = defineFlag({
+ key: 'enable-graphql-calendar',
+ env: 'ENABLE_GRAPHQL_CALENDAR',
+ default: DEV_MODE_ENV || undefined,
+});
+
/** Independent emergency stop. Any true env/PostHog source wins. */
export const disableBrowserTursoCache = defineFlag({
key: 'disable-browser-turso-cache',
diff --git a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts
index 55dffdb0ad..60e907cba0 100644
--- a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts
+++ b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts
@@ -1253,6 +1253,24 @@ describe('normalizedCacheExchange', () => {
}
});
+ it('keeps the persistence acknowledgement when the global Promise is patched', async () => {
+ const { ops, results } = harness(host);
+ ops.next(makeOp(1, 'network-only'));
+ await tick();
+ class PatchedPromise<T> extends Promise<T> {}
+ vi.stubGlobal('Promise', PatchedPromise);
+ let metadata: ReturnType<typeof normalizedCacheResultMetadata>;
+ try {
+ metadata = normalizedCacheResultMetadata(results[0]!);
+ } finally {
+ vi.unstubAllGlobals();
+ }
+ expect(metadata?.source).toBe('live-network');
+ if (metadata?.source !== 'live-network') return;
+ expect(metadata.persistence).toBeDefined();
+ await expect(metadata.persistence).resolves.toBe(INITIAL_CACHE_REVISION);
+ });
+
it('settles persistence even when its diagnostic callback throws', async () => {
host.writeQuery = vi.fn().mockRejectedValue(new Error('disk full'));
const { ops, results } = harness(host, undefined, {
diff --git a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts
index 37538356ad..7437c79ef1 100644
--- a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts
+++ b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts
@@ -166,12 +166,22 @@ export function normalizedCacheResultMetadata(
? { cacheEffectsApplied }
: {}),
...(isCacheRevision(revision) ? { revision } : {}),
- ...(persistence instanceof Promise
+ ...(isThenable(persistence)
? { persistence: persistence as Promise<CacheRevision | undefined> }
: {}),
};
}
+// zone.js replaces the global Promise, so a native async function's promise
+// fails `instanceof Promise` in the app.
+function isThenable(value: unknown): value is PromiseLike<unknown> {
+ return (
+ typeof value === 'object' &&
+ value !== null &&
+ typeof (value as { then?: unknown }).then === 'function'
+ );
+}
+
function withResultMetadata(
result: OperationResult,
metadata: NormalizedCacheResultMetadata
diff --git a/apps/web/src/lib/queries/calendar/calendars.ts b/apps/web/src/lib/queries/calendar/calendars.ts
index 72e7072e48..508a1bebda 100644
--- a/apps/web/src/lib/queries/calendar/calendars.ts
+++ b/apps/web/src/lib/queries/calendar/calendars.ts
@@ -1,10 +1,16 @@
import { throwOnErr } from '@core/util/result';
+import { subscribeToVisibleCacheChanges } from '@queries/subscribe-to-visible-cache-changes';
+import type { VisibleCalendar } from '@service-calendar/generated/schemas/visibleCalendar';
import { emailClient } from '@service-email/client';
-import { useQuery } from '@tanstack/solid-query';
-import type { Accessor } from 'solid-js';
+import { CalendarsDocument } from '@service-storage/graphql/generated/graphql';
+import { getGraphqlSoupClient } from '@service-storage/graphql-soup';
+import { useQuery, useQueryClient } from '@tanstack/solid-query';
+import { type Accessor, createEffect, onCleanup } from 'solid-js';
+import { useGraphqlCalendarHost } from './graphql/flag';
+import { mapVisibleCalendar } from './graphql/map';
import { calendarKeys } from './keys';
-export type { VisibleCalendar } from '@service-calendar/generated/schemas/visibleCalendar';
+export type { VisibleCalendar };
const CALENDAR_LIST_STALE_TIME = 5 * 60_000;
@@ -15,11 +21,55 @@ const CALENDAR_LIST_STALE_TIME = 5 * 60_000;
export function useVisibleCalendarsQuery(
options?: Accessor<{ enabled?: boolean }>
) {
- return useQuery(() => ({
- queryKey: calendarKeys.visibleCalendars.queryKey,
- queryFn: async () =>
- (await throwOnErr(() => emailClient.listCalendars())).calendars,
- staleTime: CALENDAR_LIST_STALE_TIME,
- enabled: options?.().enabled !== false,
- }));
+ const cacheHost = useGraphqlCalendarHost();
+ const activeQueryClient = useQueryClient();
+
+ createEffect(() => {
+ const host = cacheHost();
+ if (!host) return;
+ onCleanup(
+ subscribeToVisibleCacheChanges(host, () =>
+ activeQueryClient.invalidateQueries(
+ { queryKey: calendarKeys.visibleCalendars._ctx.graphql.queryKey },
+ { cancelRefetch: false }
+ )
+ )
+ );
+ });
+
+ return useQuery<
+ VisibleCalendar[],
+ Error,
+ VisibleCalendar[],
+ | typeof calendarKeys.visibleCalendars.queryKey
+ | typeof calendarKeys.visibleCalendars._ctx.graphql.queryKey
+ >(() => {
+ const host = cacheHost();
+ if (host) {
+ return {
+ queryKey: calendarKeys.visibleCalendars._ctx.graphql.queryKey,
+ queryFn: readCachedCalendars,
+ staleTime: Infinity,
+ networkMode: 'offlineFirst' as const,
+ enabled: options?.().enabled !== false,
+ };
+ }
+ return {
+ queryKey: calendarKeys.visibleCalendars.queryKey,
+ queryFn: async () =>
+ (await throwOnErr(() => emailClient.listCalendars())).calendars,
+ staleTime: CALENDAR_LIST_STALE_TIME,
+ enabled: options?.().enabled !== false,
+ };
+ });
+}
+
+/** Reads the calendar list from the cache, fetching it once when absent. */
+async function readCachedCalendars() {
+ const result = await getGraphqlSoupClient()
+ .query(CalendarsDocument, {}, { requestPolicy: 'cache-first' })
+ .toPromise();
+ if (result.error) throw result.error;
+ if (!result.data) throw new Error('Calendars returned no data');
+ return result.data.user.calendars.map(mapVisibleCalendar);
}
diff --git a/apps/web/src/lib/queries/calendar/graphql/backfill.ts b/apps/web/src/lib/queries/calendar/graphql/backfill.ts
new file mode 100644
index 0000000000..e6f65ca3ab
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/backfill.ts
@@ -0,0 +1,84 @@
+import { getCalendarSupportedRange } from '@app/features/calendar/utils/calendar-supported-range';
+import type { CacheHost } from '@graphql-cache/index';
+import type { CalendarOccurrenceQueryRange } from '../keys';
+import { createCalendarOccurrenceQueryRange } from '../occurrences';
+import {
+ calendarGapWindows,
+ type FetchCalendarOccurrencePage,
+ fetchCalendarWindow,
+ hydrateCalendarOccurrencePage,
+ toCalendarRangeArgs,
+} from './range';
+
+const BACKFILL_MONTHS = 12;
+const CHUNK_DELAY_MS = 2_000;
+
+/**
+ * Months to cover, nearest first: this month, then alternating forward and
+ * back to twelve months each way, clamped to the range the server serves.
+ */
+export function calendarBackfillMonths(
+ now = new Date(),
+ months = BACKFILL_MONTHS
+): CalendarOccurrenceQueryRange[] {
+ const supported = getCalendarSupportedRange(now);
+ const offsets = [0];
+ for (let offset = 1; offset <= months; offset += 1) {
+ offsets.push(offset, -offset);
+ }
+ return offsets.flatMap((offset) => {
+ const start = new Date(now.getFullYear(), now.getMonth() + offset, 1);
+ const end = new Date(now.getFullYear(), now.getMonth() + offset + 1, 1);
+ const clampedStart = start < supported.start ? supported.start : start;
+ const clampedEnd = end > supported.end ? supported.end : end;
+ return clampedStart < clampedEnd
+ ? [createCalendarOccurrenceQueryRange(clampedStart, clampedEnd)]
+ : [];
+ });
+}
+
+const sleep = (ms: number, signal: AbortSignal) =>
+ new Promise<void>((resolve) => {
+ const timer = setTimeout(resolve, ms);
+ signal.addEventListener(
+ 'abort',
+ () => {
+ clearTimeout(timer);
+ resolve();
+ },
+ { once: true }
+ );
+ });
+
+/**
+ * Widens calendar coverage month by month in the background. Coverage is the
+ * checkpoint: a month with no gaps costs one local read, so a restarted lane
+ * resumes where the last one stopped.
+ */
+export async function runCalendarBackfill(
+ host: Pick<CacheHost, 'calendarRange' | 'calendarCommit'>,
+ options: {
+ signal: AbortSignal;
+ now?: Date;
+ fetchPage?: FetchCalendarOccurrencePage;
+ delayMs?: number;
+ }
+): Promise<void> {
+ const { signal } = options;
+ for (const range of calendarBackfillMonths(options.now)) {
+ if (signal.aborted) return;
+ const result = await host.calendarRange(toCalendarRangeArgs(range));
+ if (result.kind === 'unsupported') return;
+ if (result.gaps.length === 0) continue;
+ for (const window of calendarGapWindows(result.gaps)) {
+ if (signal.aborted) return;
+ await fetchCalendarWindow(
+ host,
+ window,
+ options.fetchPage ?? hydrateCalendarOccurrencePage,
+ signal
+ );
+ }
+ await sleep(options.delayMs ?? CHUNK_DELAY_MS, signal);
+ }
+}
diff --git a/apps/web/src/lib/queries/calendar/graphql/flag.ts b/apps/web/src/lib/queries/calendar/graphql/flag.ts
new file mode 100644
index 0000000000..86215ffeb1
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/flag.ts
@@ -0,0 +1,49 @@
+import { useFeatureFlag } from '@app/lib/analytics/posthog';
+import {
+ enableGraphqlCalendar,
+ enableGraphqlSoup,
+ isFeatureEnabled,
+} from '@core/constant/featureFlags';
+import type { CacheHost } from '@graphql-cache/index';
+import {
+ getGraphqlSoupCacheHost,
+ graphqlCacheEnabled,
+} from '@service-storage/graphql-soup';
+import { type Accessor, createSignal } from 'solid-js';
+
+// Hosts whose native engine predates calendar ranges stay on REST.
+const [unsupportedHosts, setUnsupportedHosts] = createSignal(
+ new WeakSet<CacheHost>(),
+ { equals: false }
+);
+
+export function markCalendarCacheUnsupported(host: CacheHost): void {
+ setUnsupportedHosts((hosts) => hosts.add(host));
+}
+
+function calendarCacheHost(enabled: boolean): CacheHost | undefined {
+ if (!enabled || !graphqlCacheEnabled()) return undefined;
+ const host = getGraphqlSoupCacheHost();
+ if (!host || host.disabled || unsupportedHosts().has(host)) return undefined;
+ return host;
+}
+
+/**
+ * The cache host serving calendar reads, or `undefined` when calendars read
+ * from REST: either flag is off, the cache is unavailable, or the native
+ * engine cannot serve calendar ranges.
+ */
+export function useGraphqlCalendarHost(): Accessor<CacheHost | undefined> {
+ const graphqlSoup = useFeatureFlag(enableGraphqlSoup);
+ const graphqlCalendar = useFeatureFlag(enableGraphqlCalendar);
+ return () =>
+ calendarCacheHost(graphqlSoup().enabled && graphqlCalendar().enabled);
+}
+
+/** Non-reactive read of the same decision for imperative callers. */
+export function graphqlCalendarHost(): CacheHost | undefined {
+ return calendarCacheHost(
+ isFeatureEnabled(enableGraphqlSoup) &&
+ isFeatureEnabled(enableGraphqlCalendar)
+ );
+}
diff --git a/apps/web/src/lib/queries/calendar/graphql/map.ts b/apps/web/src/lib/queries/calendar/graphql/map.ts
new file mode 100644
index 0000000000..f785b142fb
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/map.ts
@@ -0,0 +1,181 @@
+import type { VisibleCalendar } from '@service-calendar/generated/schemas/visibleCalendar';
+import type { AttendeeResponseStatus } from '@service-storage/generated/schemas/attendeeResponseStatus';
+import type { CalendarAttendee } from '@service-storage/generated/schemas/calendarAttendee';
+import type { CalendarEvent } from '@service-storage/generated/schemas/calendarEvent';
+import type { CalendarOccurrenceItem } from '@service-storage/generated/schemas/calendarOccurrenceItem';
+import type { CalendarSyncStatus } from '@service-storage/generated/schemas/calendarSyncStatus';
+import type { ConferenceProvider } from '@service-storage/generated/schemas/conferenceProvider';
+import type { EventReminders } from '@service-storage/generated/schemas/eventReminders';
+import type { EventStatus } from '@service-storage/generated/schemas/eventStatus';
+import type { EventTime } from '@service-storage/generated/schemas/eventTime';
+import type { EventTransparency } from '@service-storage/generated/schemas/eventTransparency';
+import type { EventType } from '@service-storage/generated/schemas/eventType';
+import type { EventVisibility } from '@service-storage/generated/schemas/eventVisibility';
+import type {
+ CalendarAttendeeFieldsFragment,
+ CalendarEventFieldsFragment,
+ CalendarEventTimeFieldsFragment,
+ CalendarFieldsFragment,
+ CalendarOccurrenceItemFieldsFragment,
+ CalendarReminderFieldsFragment,
+} from '@service-storage/graphql/generated/graphql';
+
+/** GraphQL enums are the SCREAMING_CASE spelling of the REST snake_case values. */
+const restEnum = <T extends string>(value: string): T =>
+ value.toLowerCase() as T;
+
+/** RFC 3339 instants in the REST spelling, which writes UTC as `Z`. */
+const restInstant = (value: string): string =>
+ value.endsWith('+00:00') ? `${value.slice(0, -'+00:00'.length)}Z` : value;
+
+export function mapCalendarSyncStatus(status: string): CalendarSyncStatus {
+ return restEnum<CalendarSyncStatus>(status);
+}
+
+function mapEventTime(time: CalendarEventTimeFieldsFragment): EventTime {
+ return time.__typename === 'GraphqlTimedEventTime'
+ ? {
+ kind: 'timed',
+ startsAt: restInstant(time.startsAt),
+ endsAt: restInstant(time.endsAt),
+ timeZone: time.timeZone,
+ }
+ : { kind: 'allDay', startDate: time.startDate, endDate: time.endDate };
+}
+
+function mapAttendee(
+ attendee: CalendarAttendeeFieldsFragment
+): CalendarAttendee {
+ return {
+ email: attendee.email,
+ displayName: attendee.displayName,
+ responseStatus: restEnum<AttendeeResponseStatus>(attendee.responseStatus),
+ isOrganizer: attendee.isOrganizer,
+ isOptional: attendee.isOptional,
+ isSelf: attendee.isSelf,
+ comment: attendee.comment,
+ };
+}
+
+function mapReminders(
+ reminders: CalendarReminderFieldsFragment
+): EventReminders {
+ return {
+ useDefault: reminders.useDefault,
+ overrides: reminders.overrides.map(({ method, minutes }) => ({
+ method,
+ minutes,
+ })),
+ };
+}
+
+/** Maps the series event to the REST `CalendarEvent` shape. */
+export function mapCalendarEvent(
+ event: CalendarEventFieldsFragment
+): CalendarEvent {
+ return {
+ id: event.id,
+ ownerId: event.ownerId,
+ icalUid: event.icalUid,
+ calendarId: event.calendarId,
+ sources: event.sources.map((source) => ({
+ calendarId: source.calendarId,
+ title: source.title,
+ description: source.description,
+ location: source.location,
+ eventType: restEnum<EventType>(source.eventType),
+ visibility: restEnum<EventVisibility>(source.visibility),
+ transparency: restEnum<EventTransparency>(source.transparency),
+ isReadOnly: source.isReadOnly,
+ reminders: mapReminders(source.reminders),
+ creatorEmail: source.creatorEmail,
+ creatorName: source.creatorName,
+ })),
+ title: event.title,
+ description: event.description,
+ location: event.location,
+ status: restEnum<EventStatus>(event.status),
+ visibility: restEnum<EventVisibility>(event.visibility),
+ transparency: restEnum<EventTransparency>(event.transparency),
+ eventType: restEnum<EventType>(event.eventType),
+ time: mapEventTime(event.time),
+ recurrenceLines: event.recurrenceLines,
+ organizerEmail: event.organizerEmail,
+ organizerName: event.organizerName,
+ creatorEmail: event.creatorEmail,
+ creatorName: event.creatorName,
+ conferenceUrl: event.conferenceUrl,
+ conferenceProvider:
+ event.conferenceProvider === null
+ ? null
+ : restEnum<ConferenceProvider>(event.conferenceProvider),
+ sequence: event.sequence,
+ isReadOnly: event.isReadOnly,
+ attendees: event.attendees.map(mapAttendee),
+ reminders: mapReminders(event.reminders),
+ createdAt: restInstant(event.createdAt),
+ updatedAt: restInstant(event.updatedAt),
+ };
+}
+
+/**
+ * Maps an occurrence to the REST item. Like the REST listing, `event` is the
+ * series event with this occurrence's exception applied: an overridden
+ * title, description, or location replaces the event's and every copy's,
+ * an overridden status replaces the status, and instance attendees replace
+ * the attendee list.
+ */
+export function mapCalendarOccurrence(
+ occurrence: CalendarOccurrenceItemFieldsFragment
+): CalendarOccurrenceItem {
+ const event = mapCalendarEvent(occurrence.event);
+ const { overrideTitle, overrideDescription, overrideLocation } = occurrence;
+ if (overrideTitle !== null) event.title = overrideTitle;
+ if (overrideDescription !== null) event.description = overrideDescription;
+ if (overrideLocation !== null) event.location = overrideLocation;
+ event.sources = event.sources?.map((source) => ({
+ ...source,
+ ...(overrideTitle !== null ? { title: overrideTitle } : {}),
+ ...(overrideDescription !== null
+ ? { description: overrideDescription }
+ : {}),
+ ...(overrideLocation !== null ? { location: overrideLocation } : {}),
+ }));
+ if (occurrence.overrideStatus !== null) {
+ event.status = restEnum<EventStatus>(occurrence.overrideStatus);
+ }
+ if (occurrence.overrideAttendees !== null) {
+ event.attendees = occurrence.overrideAttendees.map(mapAttendee);
+ }
+ return {
+ event,
+ occurrence: {
+ eventId: occurrence.eventId,
+ occurrenceKey: occurrence.occurrenceKey,
+ recurrenceId: occurrence.recurrenceId,
+ time: mapEventTime(occurrence.time),
+ isCancelled: occurrence.isCancelled,
+ },
+ };
+}
+
+/** Maps a visible calendar to the REST `VisibleCalendar` shape. */
+export function mapVisibleCalendar(
+ calendar: CalendarFieldsFragment
+): VisibleCalendar {
+ return {
+ id: calendar.id,
+ emailLinkId: calendar.linkId,
+ emailAddress: calendar.emailAddress,
+ name: calendar.name,
+ color: calendar.color,
+ isPrimary: calendar.isPrimary,
+ isWritable: calendar.isWritable,
+ isSubscription: calendar.isSubscription,
+ syncError: calendar.syncError,
+ defaultReminders: calendar.defaultReminders.map(({ method, minutes }) => ({
+ method,
+ minutes,
+ })),
+ };
+}
diff --git a/apps/web/src/lib/queries/calendar/graphql/network.ts b/apps/web/src/lib/queries/calendar/graphql/network.ts
new file mode 100644
index 0000000000..df081008b0
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/network.ts
@@ -0,0 +1,40 @@
+import {
+ HYDRATE_ONLY_CONTEXT_KEY,
+ normalizedCacheResultMetadata,
+} from '@graphql-cache/exchange/normalized-cache-exchange';
+import { getGraphqlSoupClient } from '@service-storage/graphql-soup';
+import type { AnyVariables, DocumentInput } from '@urql/core';
+
+/**
+ * Runs a network query and resolves only once its response is in the cache,
+ * so a following coverage or delta commit never precedes the records it
+ * describes. A response the cache cannot confirm rejects instead.
+ */
+export async function fetchCached<Data, Variables extends AnyVariables>(
+ document: DocumentInput<Data, Variables>,
+ variables: Variables,
+ options: { hydrateOnly?: boolean; signal?: AbortSignal } = {}
+): Promise<Data> {
+ const result = await getGraphqlSoupClient()
+ .query(document, variables, {
+ requestPolicy: 'network-only',
+ ...(options.hydrateOnly ? { [HYDRATE_ONLY_CONTEXT_KEY]: true } : {}),
+ ...(options.signal ? { fetchOptions: { signal: options.signal } } : {}),
+ })
+ .toPromise();
+ if (result.error) throw result.error;
+ if (!result.data) throw new Error('Calendar query returned no data');
+ const metadata = normalizedCacheResultMetadata(result);
+ // Hydration writes before publishing and reports its revision; a foreground
+ // response publishes first and acknowledges its write later.
+ const revision =
+ metadata?.source !== 'live-network'
+ ? undefined
+ : metadata.persistence
+ ? await metadata.persistence
+ : metadata.revision;
+ if (revision === undefined) {
+ throw new Error('Calendar query response could not be cached');
+ }
+ return result.data;
+}
diff --git a/apps/web/src/lib/queries/calendar/graphql/range.ts b/apps/web/src/lib/queries/calendar/graphql/range.ts
new file mode 100644
index 0000000000..9f607051b4
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/range.ts
@@ -0,0 +1,302 @@
+import {
+ type CacheHost,
+ type CalendarLinkWatermarkWire,
+ type CalendarRangeCacheArgs,
+ type CalendarSpanWire,
+ MAX_RECORD_SELECTION_PAGE_SIZE,
+ readRecordsByKeys,
+ selectRecords,
+} from '@graphql-cache/index';
+import { CalendarSyncStatus } from '@service-storage/generated/schemas/calendarSyncStatus';
+import {
+ CalendarOccurrenceItemFieldsFragmentDoc,
+ CalendarOccurrencesDocument,
+ type CalendarOccurrencesQuery,
+ type CalendarRangeInput,
+} from '@service-storage/graphql/generated/graphql';
+import type { CalendarOccurrenceQueryRange } from '../keys';
+import type { CalendarOccurrencesData } from '../occurrences';
+import { mapCalendarOccurrence, mapCalendarSyncStatus } from './map';
+import { fetchCached } from './network';
+
+const MS_PER_DAY = 86_400_000;
+const OCCURRENCE_PAGE_SIZE = 2000;
+
+export type CalendarOccurrencePage =
+ CalendarOccurrencesQuery['user']['calendarOccurrences'];
+
+/** Fetches one occurrence page and resolves once it is written to the cache. */
+export type FetchCalendarOccurrencePage = (
+ input: CalendarRangeInput,
+ signal?: AbortSignal
+) => Promise<CalendarOccurrencePage>;
+
+/** One server fetch and the coverage it proves for both span kinds. */
+export interface CalendarFetchWindow {
+ input: Pick<CalendarRangeInput, 'start' | 'end' | 'startDate' | 'endDate'>;
+ coverage: CalendarSpanWire[];
+}
+
+let latestSyncStatus: CalendarSyncStatus = CalendarSyncStatus.ready;
+let startedSyncStatusSamples = 0;
+let recordedSyncStatusSample = 0;
+
+/** The last ingestion state the server reported; ready until a page says otherwise. */
+export function latestCalendarSyncStatus(): CalendarSyncStatus {
+ return latestSyncStatus;
+}
+
+/**
+ * Starts sampling the viewer-wide sync status. Requests can finish out of
+ * order, so a status records only if no later-started sample already did.
+ */
+export function beginCalendarSyncStatusSample(): number {
+ startedSyncStatusSamples += 1;
+ return startedSyncStatusSamples;
+}
+
+/** Records a sampled status; returns false when a newer sample superseded it. */
+export function recordCalendarSyncStatus(
+ status: CalendarSyncStatus,
+ sample: number
+): boolean {
+ if (sample < recordedSyncStatusSample) return false;
+ recordedSyncStatusSample = sample;
+ latestSyncStatus = status;
+ return true;
+}
+
+const pad = (value: number) => String(value).padStart(2, '0');
+
+const formatLocalDate = (date: Date) =>
+ `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
+
+/** Days since 1970-01-01 of a `YYYY-MM-DD` calendar date. */
+export function epochDay(date: string): number {
+ const [year, month, day] = date.split('-').map(Number);
+ return Date.UTC(year ?? 1970, (month ?? 1) - 1, day ?? 1) / MS_PER_DAY;
+}
+
+/** The `YYYY-MM-DD` calendar date of an epoch day. */
+export function epochDayDate(day: number): string {
+ return new Date(day * MS_PER_DAY).toISOString().slice(0, 10);
+}
+
+const localMidnight = (day: number): number => {
+ const [year, month, date] = epochDayDate(day).split('-').map(Number);
+ return new Date(year ?? 1970, (month ?? 1) - 1, date ?? 1).getTime();
+};
+
+/** The first local date at or after an instant. */
+const localDateCeil = (ms: number): string => {
+ const date = new Date(ms);
+ const floor = formatLocalDate(date);
+ return localMidnight(epochDay(floor)) === ms
+ ? floor
+ : epochDayDate(epochDay(floor) + 1);
+};
+
+export function toCalendarRangeArgs(
+ range: CalendarOccurrenceQueryRange,
+ eventKey?: string
+): CalendarRangeCacheArgs {
+ return {
+ startMs: Date.parse(range.start),
+ endMs: Date.parse(range.end),
+ startDay: epochDay(range.startDate),
+ endDay: epochDay(range.endDate),
+ ...(eventKey ? { eventKey } : {}),
+ };
+}
+
+/**
+ * Turns uncovered spans into server fetches. A timed gap fetches its local
+ * dates too; an all-day gap no timed fetch already spans fetches its own
+ * local midnights. Each window proves coverage of everything it fetched.
+ */
+export function calendarGapWindows(
+ gaps: readonly CalendarSpanWire[]
+): CalendarFetchWindow[] {
+ const windows: CalendarFetchWindow[] = [];
+ for (const gap of gaps) {
+ if (gap.kind !== 'timed') continue;
+ const startDate = formatLocalDate(new Date(gap.start));
+ const endDate = localDateCeil(gap.end);
+ windows.push({
+ input: {
+ start: new Date(gap.start).toISOString(),
+ end: new Date(gap.end).toISOString(),
+ startDate,
+ endDate,
+ },
+ coverage: [
+ { kind: 'timed', start: gap.start, end: gap.end },
+ { kind: 'allDay', start: epochDay(startDate), end: epochDay(endDate) },
+ ],
+ });
+ }
+ const fetchedDays = windows.map((window) => window.coverage[1]);
+ for (const gap of gaps) {
+ if (gap.kind !== 'allDay') continue;
+ if (
+ fetchedDays.some(
+ (days) => days && days.start <= gap.start && days.end >= gap.end
+ )
+ ) {
+ continue;
+ }
+ const start = localMidnight(gap.start);
+ const end = localMidnight(gap.end);
+ windows.push({
+ input: {
+ start: new Date(start).toISOString(),
+ end: new Date(end).toISOString(),
+ startDate: epochDayDate(gap.start),
+ endDate: epochDayDate(gap.end),
+ },
+ coverage: [
+ { kind: 'timed', start, end },
+ { kind: 'allDay', start: gap.start, end: gap.end },
+ ],
+ });
+ }
+ return windows;
+}
+
+/** Per-link minimum: a page can only vouch for changes all of its reads saw. */
+export function lowestWatermark(
+ pages: ReadonlyArray<readonly CalendarLinkWatermarkWire[]>
+): CalendarLinkWatermarkWire[] {
+ const lowest = new Map<string, bigint>();
+ for (const page of pages) {
+ for (const { linkId, seq } of page) {
+ const value = BigInt(seq);
+ const current = lowest.get(linkId);
+ if (current === undefined || value < current) lowest.set(linkId, value);
+ }
+ }
+ return [...lowest].map(([linkId, seq]) => ({ linkId, seq: String(seq) }));
+}
+
+/** Foreground page fetches written like any query response. */
+export const fetchCalendarOccurrencePage: FetchCalendarOccurrencePage = async (
+ input,
+ signal
+) =>
+ (await fetchCached(CalendarOccurrencesDocument, { input }, { signal })).user
+ .calendarOccurrences;
+
+/** Background page fetches that hydrate without re-executing foreground queries. */
+export const hydrateCalendarOccurrencePage: FetchCalendarOccurrencePage =
+ async (input, signal) =>
+ (
+ await fetchCached(
+ CalendarOccurrencesDocument,
+ { input },
+ { hydrateOnly: true, signal }
+ )
+ ).user.calendarOccurrences;
+
+/**
+ * Fetches every page of one window and commits its coverage with the lowest
+ * watermark any page captured, so later deltas replay what a page predates.
+ */
+export async function fetchCalendarWindow(
+ host: Pick<CacheHost, 'calendarCommit'>,
+ window: CalendarFetchWindow,
+ fetchPage: FetchCalendarOccurrencePage,
+ signal?: AbortSignal
+): Promise<void> {
+ const watermarks: CalendarLinkWatermarkWire[][] = [];
+ const sample = beginCalendarSyncStatusSample();
+ let syncStatus: CalendarSyncStatus = CalendarSyncStatus.ready;
+ let after: string | undefined;
+ const seenCursors = new Set<string>();
+ for (;;) {
+ const page = await fetchPage(
+ {
+ ...window.input,
+ first: OCCURRENCE_PAGE_SIZE,
+ ...(after ? { after } : {}),
+ },
+ signal
+ );
+ watermarks.push(page.watermark);
+ if (mapCalendarSyncStatus(page.syncStatus) === CalendarSyncStatus.syncing) {
+ syncStatus = CalendarSyncStatus.syncing;
+ }
+ if (!page.hasNextPage) break;
+ if (!page.endCursor || seenCursors.has(page.endCursor)) {
+ throw new Error(
+ 'Calendar occurrence pagination returned an invalid cursor'
+ );
+ }
+ seenCursors.add(page.endCursor);
+ after = page.endCursor;
+ }
+ recordCalendarSyncStatus(syncStatus, sample);
+ await host.calendarCommit({
+ coverage: window.coverage,
+ watermark: { kind: 'merge', links: lowestWatermark(watermarks) },
+ });
+}
+
+const occurrenceSelection = selectRecords(
+ CalendarOccurrenceItemFieldsFragmentDoc
+);
+
+async function readOccurrenceItems(
+ host: Pick<CacheHost, 'readRecordsByKeys'>,
+ keys: readonly string[]
+) {
+ const items = [];
+ for (
+ let index = 0;
+ index < keys.length;
+ index += MAX_RECORD_SELECTION_PAGE_SIZE
+ ) {
+ const { records } = await readRecordsByKeys(
+ host,
+ occurrenceSelection,
+ keys.slice(index, index + MAX_RECORD_SELECTION_PAGE_SIZE)
+ );
+ for (const { record } of records) items.push(mapCalendarOccurrence(record));
+ }
+ return items;
+}
+
+/**
+ * Answers a viewport from the cache, fetching only spans never fetched.
+ * Resolves `undefined` when the host cannot serve calendar ranges.
+ */
+export async function readCalendarRange(
+ host: Pick<
+ CacheHost,
+ 'calendarRange' | 'calendarCommit' | 'readRecordsByKeys'
+ >,
+ range: CalendarOccurrenceQueryRange,
+ options: {
+ fetchPage?: FetchCalendarOccurrencePage;
+ signal?: AbortSignal;
+ } = {}
+): Promise<CalendarOccurrencesData | undefined> {
+ const args = toCalendarRangeArgs(range);
+ let result = await host.calendarRange(args);
+ if (result.kind === 'unsupported') return undefined;
+ if (result.gaps.length > 0) {
+ for (const window of calendarGapWindows(result.gaps)) {
+ await fetchCalendarWindow(
+ host,
+ window,
+ options.fetchPage ?? fetchCalendarOccurrencePage,
+ options.signal
+ );
+ }
+ result = await host.calendarRange(args);
+ if (result.kind === 'unsupported') return undefined;
+ }
+ return {
+ items: await readOccurrenceItems(host, result.occurrenceKeys),
+ syncStatus: latestSyncStatus,
+ };
+}
diff --git a/apps/web/src/lib/queries/calendar/graphql/sync-controller.ts b/apps/web/src/lib/queries/calendar/graphql/sync-controller.ts
new file mode 100644
index 0000000000..e9024d0579
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/sync-controller.ts
@@ -0,0 +1,185 @@
+import type {
+ CacheHost,
+ CalendarLinkWatermarkWire,
+} from '@graphql-cache/index';
+import {
+ CalendarChangesDocument,
+ type CalendarChangesQuery,
+ CalendarsDocument,
+} from '@service-storage/graphql/generated/graphql';
+import { fetchCached } from './network';
+
+export type CalendarChangesPage =
+ CalendarChangesQuery['user']['calendarChanges'];
+
+/** Fetches one delta page and resolves once its records are cached. */
+export type FetchCalendarChanges = (
+ since: CalendarLinkWatermarkWire[]
+) => Promise<CalendarChangesPage>;
+
+export type CalendarStaleReason =
+ | 'poke'
+ | 'start'
+ | 'reconnect'
+ | 'online'
+ | 'visible'
+ | 'generation'
+ | 'syncing'
+ | 'continue';
+
+export interface CalendarSyncControllerOptions {
+ fetchChanges?: FetchCalendarChanges;
+ /** Refetches the calendar list after calendars or links change. */
+ refetchCalendars?: () => Promise<unknown>;
+ debounceMs?: number;
+}
+
+/** An empty viewport reads only the stored watermark and freshness. */
+const SYNC_STATE_RANGE = { startMs: 0, endMs: 0, startDay: 0, endDay: 0 };
+const DEFAULT_DEBOUNCE_MS = 250;
+/** Bounds one run; a scheduled run continues from the advanced watermark. */
+const MAX_DELTA_PAGES = 50;
+
+const eventKey = (id: string) => `GraphqlCalendarEvent:${id}`;
+const occurrenceKey = (id: string) => `GraphqlCalendarOccurrence:${id}`;
+const calendarKey = (id: string) => `GraphqlCalendar:${id}`;
+
+export const fetchCalendarChanges: FetchCalendarChanges = async (since) =>
+ (await fetchCached(CalendarChangesDocument, { input: { since } })).user
+ .calendarChanges;
+
+export const refetchCalendarList = () => fetchCached(CalendarsDocument, {});
+
+/**
+ * Keeps cached calendar data current. Every poke, reconnect, or other
+ * staleness signal runs `calendarChanges` from the stored watermark: each
+ * page's records are written, then one commit replaces the changed events'
+ * occurrence sets, deletes what the server deleted, and advances the
+ * watermark. Without a stored watermark there is nothing to bring forward;
+ * page fetches establish it.
+ */
+export class CalendarSyncController {
+ private running: Promise<void> | undefined;
+ private rerun = false;
+ private timer: ReturnType<typeof setTimeout> | undefined;
+ private disposed = false;
+ private readonly fetchChanges: FetchCalendarChanges;
+ private readonly refetchCalendars: () => Promise<unknown>;
+ private readonly debounceMs: number;
+
+ constructor(
+ private readonly host: Pick<CacheHost, 'calendarRange' | 'calendarCommit'>,
+ options: CalendarSyncControllerOptions = {}
+ ) {
+ this.fetchChanges = options.fetchChanges ?? fetchCalendarChanges;
+ this.refetchCalendars = options.refetchCalendars ?? refetchCalendarList;
+ this.debounceMs = options.debounceMs ?? DEFAULT_DEBOUNCE_MS;
+ }
+
+ /** Schedules one debounced delta run. */
+ markStale(_reason: CalendarStaleReason): void {
+ if (this.disposed) return;
+ if (this.timer !== undefined) clearTimeout(this.timer);
+ this.timer = setTimeout(() => {
+ this.timer = undefined;
+ this.runDelta().catch((error) => {
+ console.warn('Calendar delta sync failed', error);
+ });
+ }, this.debounceMs);
+ }
+
+ /**
+ * Applies every change after the stored watermark. A call during a run
+ * joins it and makes it run once more, so the caller sees its change.
+ */
+ runDelta(): Promise<void> {
+ if (this.disposed) return Promise.resolve();
+ if (this.running) {
+ this.rerun = true;
+ return this.running;
+ }
+ const run = (async () => {
+ try {
+ do {
+ this.rerun = false;
+ await this.applyChanges();
+ } while (this.rerun && !this.disposed);
+ } finally {
+ this.running = undefined;
+ }
+ })();
+ this.running = run;
+ return run;
+ }
+
+ dispose(): void {
+ this.disposed = true;
+ if (this.timer !== undefined) clearTimeout(this.timer);
+ this.timer = undefined;
+ }
+
+ private async applyChanges(): Promise<void> {
+ const state = await this.host.calendarRange(SYNC_STATE_RANGE);
+ if (state.kind === 'unsupported' || !state.watermark?.length) return;
+ let since = state.watermark;
+ let calendarsChanged = false;
+ let hasMore = false;
+ for (let page = 0; page < MAX_DELTA_PAGES && !this.disposed; page += 1) {
+ const changes = await this.fetchChanges(since);
+ const to = changes.newWatermark.map(({ linkId, seq }) => ({
+ linkId,
+ seq,
+ }));
+ if (changes.resetRequired) {
+ // Visible ranges observe the cleared coverage and refetch.
+ await this.host.calendarCommit({
+ reset: true,
+ watermark: { kind: 'merge', links: to },
+ });
+ await this.refetchCalendars();
+ return;
+ }
+ const visible = new Set(to.map((link) => link.linkId));
+ const removedLinkIds = since
+ .map((link) => link.linkId)
+ .filter((linkId) => !visible.has(linkId));
+ await this.host.calendarCommit({
+ replacedEvents: changes.events.map((change) => ({
+ eventKey: eventKey(change.event.id),
+ occurrenceKeys: change.occurrences.map((occurrence) =>
+ occurrenceKey(occurrence.id)
+ ),
+ })),
+ deletedEventKeys: changes.deletedEventIds.map(eventKey),
+ deletedCalendarKeys: changes.deletedCalendarIds.map(calendarKey),
+ removedLinkIds,
+ watermark: { kind: 'advance', since, to },
+ ...(changes.hasMore ? {} : { freshness: 'fresh' as const }),
+ });
+ calendarsChanged ||=
+ changes.calendars.length > 0 ||
+ changes.deletedCalendarIds.length > 0 ||
+ removedLinkIds.length > 0;
+ hasMore = changes.hasMore;
+ if (!hasMore) break;
+ since = to;
+ }
+ if (calendarsChanged) await this.refetchCalendars();
+ if (hasMore) this.markStale('continue');
+ }
+}
+
+let activeController: CalendarSyncController | undefined;
+
+/** The controller of the mounted calendar cache, if any. */
+export function activeCalendarSyncController():
+ | CalendarSyncController
+ | undefined {
+ return activeController;
+}
+
+export function setActiveCalendarSyncController(
+ controller: CalendarSyncController | undefined
+): void {
+ activeController = controller;
+}
diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/backfill.test.ts b/apps/web/src/lib/queries/calendar/graphql/tests/backfill.test.ts
new file mode 100644
index 0000000000..90d8770224
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/tests/backfill.test.ts
@@ -0,0 +1,106 @@
+import type { CalendarRangeCacheResult } from '@graphql-cache/index';
+import type { CalendarRangeInput } from '@service-storage/graphql/generated/graphql';
+import { describe, expect, it, vi } from 'vitest';
+import { calendarBackfillMonths, runCalendarBackfill } from '../backfill';
+
+vi.mock('@service-storage/graphql-soup', () => ({
+ getGraphqlSoupClient: vi.fn(),
+}));
+
+const covered: CalendarRangeCacheResult = {
+ kind: 'range',
+ revision: '1' as never,
+ occurrenceKeys: [],
+ gaps: [],
+ freshness: 'fresh',
+ uncertainEventKeys: [],
+ optimistic: false,
+ watermark: [{ linkId: 'link-1', seq: '1' }],
+};
+
+describe('calendarBackfillMonths', () => {
+ it('starts at this month and alternates outward within the served range', () => {
+ const now = new Date(2026, 9, 7, 15);
+ const months = calendarBackfillMonths(now, 2);
+ expect(months.map((range) => range.startDate)).toEqual([
+ '2026-10-01',
+ '2026-11-01',
+ '2026-09-01',
+ '2026-12-01',
+ '2026-08-01',
+ ]);
+ expect(months[0]?.endDate).toBe('2026-11-01');
+ });
+
+ it('clamps the oldest month to the served history', () => {
+ const now = new Date(2026, 9, 7, 15);
+ const oldest = calendarBackfillMonths(now).at(-1);
+ expect(oldest?.startDate).toBe('2025-10-08');
+ expect(oldest?.endDate).toBe('2025-11-01');
+ });
+});
+
+describe('runCalendarBackfill', () => {
+ it('skips covered months and fetches gaps through hydration', async () => {
+ const now = new Date(2026, 9, 7, 15);
+ const months = calendarBackfillMonths(now, 1);
+ const gapStart = Date.parse(months[1]?.start ?? '');
+ const gapEnd = Date.parse(months[1]?.end ?? '');
+ const host = {
+ calendarRange: vi
+ .fn()
+ .mockResolvedValue(covered)
+ .mockResolvedValueOnce(covered)
+ .mockResolvedValueOnce({
+ ...covered,
+ gaps: [{ kind: 'timed', start: gapStart, end: gapEnd }],
+ }),
+ calendarCommit: vi.fn(async () => ({
+ kind: 'committed' as const,
+ revision: '2' as never,
+ changed: [],
+ })),
+ };
+ const fetchPage = vi.fn(async (_input: CalendarRangeInput) => ({
+ nodes: [],
+ hasNextPage: false,
+ endCursor: null,
+ syncStatus: 'READY' as const,
+ watermark: [{ linkId: 'link-1', seq: '3' }],
+ }));
+
+ await runCalendarBackfill(host, {
+ signal: new AbortController().signal,
+ now,
+ fetchPage,
+ delayMs: 0,
+ });
+
+ // Twenty-five months, each read once; only the gap month fetched.
+ expect(host.calendarRange).toHaveBeenCalledTimes(25);
+ expect(fetchPage).toHaveBeenCalledTimes(1);
+ expect(fetchPage.mock.calls[0]?.[0]).toMatchObject({
+ start: new Date(gapStart).toISOString(),
+ end: new Date(gapEnd).toISOString(),
+ });
+ expect(host.calendarCommit).toHaveBeenCalledTimes(1);
+ });
+
+ it('stops when aborted or when the host cannot serve ranges', async () => {
+ const abort = new AbortController();
+ abort.abort();
+ const host = {
+ calendarRange: vi.fn(),
+ calendarCommit: vi.fn(),
+ };
+ await runCalendarBackfill(host, { signal: abort.signal, delayMs: 0 });
+ expect(host.calendarRange).not.toHaveBeenCalled();
+
+ host.calendarRange.mockResolvedValue({ kind: 'unsupported' });
+ await runCalendarBackfill(host, {
+ signal: new AbortController().signal,
+ delayMs: 0,
+ });
+ expect(host.calendarRange).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/fixtures.ts b/apps/web/src/lib/queries/calendar/graphql/tests/fixtures.ts
new file mode 100644
index 0000000000..434a8fabb1
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/tests/fixtures.ts
@@ -0,0 +1,117 @@
+import type {
+ CalendarEventFieldsFragment,
+ CalendarOccurrenceItemFieldsFragment,
+} from '@service-storage/graphql/generated/graphql';
+
+export const attendee = (
+ email: string,
+ responseStatus: 'ACCEPTED' | 'NEEDS_ACTION' | 'DECLINED' | 'TENTATIVE'
+) => ({
+ email,
+ displayName: null,
+ responseStatus,
+ isOrganizer: false,
+ isOptional: false,
+ isSelf: email === '[email protected]',
+ comment: null,
+});
+
+export const reminders = {
+ useDefault: false,
+ overrides: [{ method: 'popup', minutes: 10 }],
+};
+
+export function graphqlEvent(
+ overrides: Partial<CalendarEventFieldsFragment> = {}
+): CalendarEventFieldsFragment {
+ return {
+ __typename: 'GraphqlCalendarEvent',
+ id: 'event-1',
+ ownerId: 'user-1',
+ linkId: 'link-1',
+ icalUid: 'uid-1',
+ calendarId: 'calendar-1',
+ sources: [
+ {
+ calendarId: 'calendar-1',
+ title: 'Standup',
+ description: 'Daily',
+ location: 'Room 1',
+ eventType: 'DEFAULT',
+ visibility: 'DEFAULT',
+ transparency: 'OPAQUE',
+ isReadOnly: false,
+ reminders,
+ creatorEmail: null,
+ creatorName: null,
+ },
+ {
+ calendarId: 'calendar-2',
+ title: 'Team standup',
+ description: null,
+ location: null,
+ eventType: 'DEFAULT',
+ visibility: 'PRIVATE',
+ transparency: 'TRANSPARENT',
+ isReadOnly: true,
+ reminders,
+ creatorEmail: null,
+ creatorName: null,
+ },
+ ],
+ title: 'Standup',
+ description: 'Daily',
+ location: 'Room 1',
+ status: 'CONFIRMED',
+ visibility: 'DEFAULT',
+ transparency: 'OPAQUE',
+ eventType: 'OUT_OF_OFFICE',
+ time: {
+ __typename: 'GraphqlTimedEventTime',
+ startsAt: '2026-10-05T09:00:00+00:00',
+ endsAt: '2026-10-05T09:30:00+00:00',
+ timeZone: 'America/New_York',
+ },
+ recurrenceLines: ['RRULE:FREQ=DAILY'],
+ organizerEmail: '[email protected]',
+ organizerName: 'Boss',
+ creatorEmail: null,
+ creatorName: null,
+ conferenceUrl: 'https://meet.example.com/x',
+ conferenceProvider: 'GOOGLE_MEET',
+ sequence: 3,
+ isReadOnly: false,
+ attendees: [attendee('[email protected]', 'NEEDS_ACTION')],
+ reminders,
+ createdAt: '2026-09-01T12:00:00+00:00',
+ updatedAt: '2026-09-02T12:00:00.250+00:00',
+ ...overrides,
+ };
+}
+
+export function graphqlOccurrence(
+ overrides: Partial<CalendarOccurrenceItemFieldsFragment> = {}
+): CalendarOccurrenceItemFieldsFragment {
+ return {
+ __typename: 'GraphqlCalendarOccurrence',
+ id: 'event-1:2026-10-06T09:00:00+00:00',
+ eventId: 'event-1',
+ linkId: 'link-1',
+ occurrenceKey: '2026-10-06T09:00:00+00:00',
+ recurrenceId: null,
+ isCancelled: false,
+ time: {
+ __typename: 'GraphqlTimedEventTime',
+ startsAt: '2026-10-06T09:00:00+00:00',
+ endsAt: '2026-10-06T09:30:00+00:00',
+ timeZone: null,
+ },
+ overrideTitle: null,
+ overrideDescription: null,
+ overrideLocation: null,
+ overrideStatus: null,
+ overrideAttendees: null,
+ event: graphqlEvent(),
+ ...overrides,
+ };
+}
diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/invalidation.test.ts b/apps/web/src/lib/queries/calendar/graphql/tests/invalidation.test.ts
new file mode 100644
index 0000000000..a1dedda7cf
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/tests/invalidation.test.ts
@@ -0,0 +1,74 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import { calendarKeys } from '../../keys';
+import { invalidateCalendarOccurrences } from '../../occurrences';
+import {
+ type CalendarSyncController,
+ setActiveCalendarSyncController,
+} from '../sync-controller';
+
+const invalidateQueriesMock = vi.hoisted(() => vi.fn());
+
+vi.mock('@queries/client', () => ({
+ queryClient: { invalidateQueries: invalidateQueriesMock },
+}));
+
+vi.mock('@service-storage/graphql-soup', () => ({
+ getGraphqlSoupClient: vi.fn(),
+ getGraphqlSoupCacheHost: vi.fn(),
+ graphqlCacheEnabled: () => false,
+}));
+
+describe('invalidateCalendarOccurrences', () => {
+ afterEach(() => {
+ setActiveCalendarSyncController(undefined);
+ vi.clearAllMocks();
+ });
+
+ it('applies the delta before cache-backed viewports reread', async () => {
+ const order: string[] = [];
+ const runDelta = vi.fn(async () => {
+ order.push('delta');
+ });
+ invalidateQueriesMock.mockImplementation(async () => {
+ order.push('invalidate');
+ });
+ setActiveCalendarSyncController({
+ runDelta,
+ } as unknown as CalendarSyncController);
+
+ await invalidateCalendarOccurrences();
+
+ expect(order).toEqual(['delta', 'invalidate']);
+ expect(invalidateQueriesMock).toHaveBeenCalledWith({
+ queryKey: calendarKeys.occurrences._def,
+ });
+ });
+
+ it('still refetches when the delta fails', async () => {
+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ setActiveCalendarSyncController({
+ runDelta: vi.fn().mockRejectedValue(new Error('offline')),
+ } as unknown as CalendarSyncController);
+
+ await invalidateCalendarOccurrences();
+
+ expect(invalidateQueriesMock).toHaveBeenCalledTimes(1);
+ warn.mockRestore();
+ });
+
+ it('nests cache-backed keys under the REST prefix', () => {
+ const range = {
+ start: '2026-10-05T00:00:00.000Z',
+ end: '2026-10-12T00:00:00.000Z',
+ startDate: '2026-10-05',
+ endDate: '2026-10-12',
+ };
+ const rest = calendarKeys.occurrences('user-1', range).queryKey;
+ const graphql = calendarKeys.occurrences('user-1', range)._ctx.graphql
+ .queryKey;
+ expect(graphql.slice(0, rest.length)).toEqual([...rest]);
+ expect(
+ calendarKeys.visibleCalendars._ctx.graphql.queryKey.slice(0, 2)
+ ).toEqual([...calendarKeys.visibleCalendars.queryKey]);
+ });
+});
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.ts
new file mode 100644
index 0000000000..256e09ff51
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/tests/map.test.ts
@@ -0,0 +1,164 @@
+import { describe, expect, it } from 'vitest';
+import {
+ mapCalendarEvent,
+ mapCalendarOccurrence,
+ mapVisibleCalendar,
+} from '../map';
+import { attendee, graphqlEvent, graphqlOccurrence } from './fixtures';
+
+describe('mapCalendarEvent', () => {
+ it('maps the series event to the REST shape', () => {
+ const event = mapCalendarEvent(graphqlEvent());
+ expect(event).toMatchObject({
+ id: 'event-1',
+ ownerId: 'user-1',
+ icalUid: 'uid-1',
+ calendarId: 'calendar-1',
+ status: 'confirmed',
+ visibility: 'default',
+ transparency: 'opaque',
+ eventType: 'out_of_office',
+ conferenceProvider: 'google_meet',
+ time: {
+ kind: 'timed',
+ startsAt: '2026-10-05T09:00:00Z',
+ endsAt: '2026-10-05T09:30:00Z',
+ timeZone: 'America/New_York',
+ },
+ attendees: [
+ {
+ email: '[email protected]',
+ responseStatus: 'needs_action',
+ isSelf: true,
+ },
+ ],
+ reminders: {
+ useDefault: false,
+ overrides: [{ method: 'popup', minutes: 10 }],
+ },
+ createdAt: '2026-09-01T12:00:00Z',
+ updatedAt: '2026-09-02T12:00:00.250Z',
+ });
+ expect(event.sources?.[1]).toMatchObject({
+ calendarId: 'calendar-2',
+ visibility: 'private',
+ transparency: 'transparent',
+ isReadOnly: true,
+ });
+ });
+
+ it('keeps an absent conference provider and maps all-day spans', () => {
+ const event = mapCalendarEvent(
+ graphqlEvent({
+ conferenceProvider: null,
+ time: {
+ __typename: 'GraphqlAllDayEventTime',
+ startDate: '2026-10-05',
+ endDate: '2026-10-06',
+ },
+ })
+ );
+ expect(event.conferenceProvider).toBeNull();
+ expect(event.time).toEqual({
+ kind: 'allDay',
+ startDate: '2026-10-05',
+ endDate: '2026-10-06',
+ });
+ });
+});
+
+describe('mapCalendarOccurrence', () => {
+ it('returns the series event unchanged without an exception', () => {
+ const item = mapCalendarOccurrence(graphqlOccurrence());
+ expect(item.occurrence).toEqual({
+ eventId: 'event-1',
+ occurrenceKey: '2026-10-06T09:00:00+00:00',
+ recurrenceId: null,
+ isCancelled: false,
+ time: {
+ kind: 'timed',
+ startsAt: '2026-10-06T09:00:00Z',
+ endsAt: '2026-10-06T09:30:00Z',
+ timeZone: null,
+ },
+ });
+ expect(item.event).toEqual(mapCalendarEvent(graphqlEvent()));
+ });
+
+ it('applies the occurrence exception to the event and every copy', () => {
+ const item = mapCalendarOccurrence(
+ graphqlOccurrence({
+ overrideTitle: 'Moved standup',
+ overrideDescription: 'Only today',
+ overrideLocation: 'Room 2',
+ overrideStatus: 'TENTATIVE',
+ overrideAttendees: [attendee('[email protected]', 'ACCEPTED')],
+ })
+ );
+ expect(item.event).toMatchObject({
+ title: 'Moved standup',
+ description: 'Only today',
+ location: 'Room 2',
+ status: 'tentative',
+ attendees: [{ email: '[email protected]', responseStatus: 'accepted' }],
+ });
+ expect(
+ item.event.sources?.map(({ title, description, location }) => ({
+ title,
+ description,
+ location,
+ }))
+ ).toEqual([
+ { title: 'Moved standup', description: 'Only today', location: 'Room 2' },
+ { title: 'Moved standup', description: 'Only today', location: 'Room 2' },
+ ]);
+ });
+
+ it('applies only the fields an exception overrides', () => {
+ const item = mapCalendarOccurrence(
+ graphqlOccurrence({ overrideLocation: 'Room 9' })
+ );
+ expect(item.event.title).toBe('Standup');
+ expect(item.event.status).toBe('confirmed');
+ expect(item.event.sources?.map((source) => source.title)).toEqual([
+ 'Standup',
+ 'Team standup',
+ ]);
+ expect(item.event.sources?.map((source) => source.location)).toEqual([
+ 'Room 9',
+ 'Room 9',
+ ]);
+ expect(item.event.attendees[0]?.responseStatus).toBe('needs_action');
+ });
+});
+
+describe('mapVisibleCalendar', () => {
+ it('maps the link id to the REST field name', () => {
+ expect(
+ mapVisibleCalendar({
+ __typename: 'GraphqlCalendar',
+ id: 'calendar-1',
+ linkId: 'link-1',
+ emailAddress: '[email protected]',
+ name: 'Me',
+ color: '#ff0000',
+ isPrimary: true,
+ isWritable: true,
+ isSubscription: false,
+ syncError: null,
+ defaultReminders: [{ method: 'popup', minutes: 30 }],
+ })
+ ).toEqual({
+ id: 'calendar-1',
+ emailLinkId: 'link-1',
+ emailAddress: '[email protected]',
+ name: 'Me',
+ color: '#ff0000',
+ isPrimary: true,
+ isWritable: true,
+ isSubscription: false,
+ syncError: null,
+ defaultReminders: [{ method: 'popup', minutes: 30 }],
+ });
+ });
+});
diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/network.test.ts b/apps/web/src/lib/queries/calendar/graphql/tests/network.test.ts
new file mode 100644
index 0000000000..f427b1a8f0
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/tests/network.test.ts
@@ -0,0 +1,65 @@
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { fetchCached } from '../network';
+
+const query = vi.fn();
+const metadata = vi.fn();
+
+vi.mock('@service-storage/graphql-soup', () => ({
+ getGraphqlSoupClient: () => ({ query }),
+}));
+
+vi.mock('@graphql-cache/exchange/normalized-cache-exchange', () => ({
+ HYDRATE_ONLY_CONTEXT_KEY: 'hydrateOnly',
+ normalizedCacheResultMetadata: () => metadata(),
+}));
+
+const respond = (result: object) =>
+ query.mockReturnValue({ toPromise: () => Promise.resolve(result) });
+
+describe('fetchCached', () => {
+ beforeEach(() => {
+ query.mockReset();
+ metadata.mockReset();
+ respond({ data: { ok: true } });
+ });
+
+ it('resolves once a foreground write is acknowledged', async () => {
+ metadata.mockReturnValue({
+ source: 'live-network',
+ persistence: Promise.resolve('7'),
+ });
+ await expect(fetchCached({} as never, {})).resolves.toEqual({ ok: true });
+ });
+
+ it('resolves a hydration that reports its revision', async () => {
+ metadata.mockReturnValue({ source: 'live-network', revision: '7' });
+ await expect(
+ fetchCached({} as never, {}, { hydrateOnly: true })
+ ).resolves.toEqual({ ok: true });
+ expect(query.mock.calls[0]?.[2]).toMatchObject({ hydrateOnly: true });
+ });
+
+ it('rejects when the write fails', async () => {
+ metadata.mockReturnValue({
+ source: 'live-network',
+ persistence: Promise.resolve(undefined),
+ });
+ await expect(fetchCached({} as never, {})).rejects.toThrow(
+ 'could not be cached'
+ );
+ });
+
+ it('rejects a response the cache never saw', async () => {
+ metadata.mockReturnValue(undefined);
+ await expect(fetchCached({} as never, {})).rejects.toThrow(
+ 'could not be cached'
+ );
+ });
+
+ it('rejects network errors before reading cache metadata', async () => {
+ const error = new Error('offline');
+ respond({ error });
+ await expect(fetchCached({} as never, {})).rejects.toBe(error);
+ expect(metadata).not.toHaveBeenCalled();
+ });
+});
diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/range.test.ts b/apps/web/src/lib/queries/calendar/graphql/tests/range.test.ts
new file mode 100644
index 0000000000..ed0539001f
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/tests/range.test.ts
@@ -0,0 +1,284 @@
+import type { CalendarRangeCacheResult } from '@graphql-cache/index';
+import { CalendarSyncStatus } from '@service-storage/generated/schemas/calendarSyncStatus';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { createCalendarOccurrenceQueryRange } from '../../occurrences';
+import {
+ beginCalendarSyncStatusSample,
+ type CalendarOccurrencePage,
+ calendarGapWindows,
+ epochDay,
+ fetchCalendarWindow,
+ latestCalendarSyncStatus,
+ lowestWatermark,
+ readCalendarRange,
+ recordCalendarSyncStatus,
+ toCalendarRangeArgs,
+} from '../range';
+import { graphqlOccurrence } from './fixtures';
+
+vi.mock('@service-storage/graphql-soup', () => ({
+ getGraphqlSoupClient: vi.fn(),
+}));
+
+const DAY_MS = 86_400_000;
+const weekStart = new Date(2026, 9, 5);
+const weekEnd = new Date(2026, 9, 12);
+const week = createCalendarOccurrenceQueryRange(weekStart, weekEnd);
+
+const range = (
+ overrides: Partial<Extract<CalendarRangeCacheResult, { kind: 'range' }>>
+): CalendarRangeCacheResult => ({
+ kind: 'range',
+ revision: '1' as never,
+ occurrenceKeys: [],
+ gaps: [],
+ freshness: 'fresh',
+ uncertainEventKeys: [],
+ optimistic: false,
+ watermark: null,
+ ...overrides,
+});
+
+const page = (
+ overrides: Partial<CalendarOccurrencePage> = {}
+): CalendarOccurrencePage => ({
+ nodes: [],
+ hasNextPage: false,
+ endCursor: null,
+ syncStatus: 'READY',
+ watermark: [{ linkId: 'link-1', seq: '9' }],
+ ...overrides,
+});
+
+function fakeHost(results: CalendarRangeCacheResult[]) {
+ return {
+ calendarRange: vi.fn(async () => {
+ const next = results.shift();
+ if (!next) throw new Error('unexpected calendarRange');
+ return next;
+ }),
+ calendarCommit: vi.fn(async () => ({
+ kind: 'committed' as const,
+ revision: '2' as never,
+ changed: [],
+ })),
+ readRecordsByKeys: vi.fn(async ({ keys }: { keys: string[] }) => ({
+ revision: '2' as never,
+ records: keys.map((recordKey) => ({
+ recordKey,
+ record: graphqlOccurrence({
+ id: recordKey.slice('GraphqlCalendarOccurrence:'.length),
+ }),
+ })),
+ })),
+ };
+}
+
+describe('readCalendarRange', () => {
+ beforeEach(() =>
+ recordCalendarSyncStatus(
+ CalendarSyncStatus.ready,
+ beginCalendarSyncStatusSample()
+ )
+ );
+
+ it('answers a covered viewport without the network', async () => {
+ const host = fakeHost([
+ range({
+ occurrenceKeys: ['GraphqlCalendarOccurrence:event-1:a'],
+ }),
+ ]);
+ const fetchPage = vi.fn();
+ const data = await readCalendarRange(host, week, { fetchPage });
+ expect(fetchPage).not.toHaveBeenCalled();
+ expect(host.calendarCommit).not.toHaveBeenCalled();
+ expect(host.calendarRange).toHaveBeenCalledWith(toCalendarRangeArgs(week));
+ expect(data?.items).toHaveLength(1);
+ expect(data?.items[0]?.event.title).toBe('Standup');
+ expect(data?.syncStatus).toBe(CalendarSyncStatus.ready);
+ });
+
+ it('fetches only the gaps, commits their coverage, and rereads', async () => {
+ const args = toCalendarRangeArgs(week);
+ const gapStart = args.startMs + 3 * DAY_MS;
+ const host = fakeHost([
+ range({
+ gaps: [
+ { kind: 'timed', start: gapStart, end: args.endMs },
+ { kind: 'allDay', start: args.startDay + 3, end: args.endDay },
+ ],
+ }),
+ range({ occurrenceKeys: ['GraphqlCalendarOccurrence:event-1:b'] }),
+ ]);
+ const fetchPage = vi
+ .fn()
+ .mockResolvedValueOnce(
+ page({
+ hasNextPage: true,
+ endCursor: 'next',
+ watermark: [
+ { linkId: 'link-1', seq: '9' },
+ { linkId: 'link-2', seq: '4' },
+ ],
+ })
+ )
+ .mockResolvedValueOnce(
+ page({
+ syncStatus: 'SYNCING',
+ watermark: [
+ { linkId: 'link-1', seq: '7' },
+ { linkId: 'link-2', seq: '5' },
+ ],
+ })
+ );
+
+ const data = await readCalendarRange(host, week, { fetchPage });
+
+ expect(fetchPage).toHaveBeenCalledTimes(2);
+ expect(fetchPage.mock.calls[0]?.[0]).toEqual({
+ start: new Date(gapStart).toISOString(),
+ end: new Date(args.endMs).toISOString(),
+ startDate: '2026-10-08',
+ endDate: '2026-10-12',
+ first: 2000,
+ });
+ expect(fetchPage.mock.calls[1]?.[0]).toMatchObject({ after: 'next' });
+ expect(host.calendarCommit).toHaveBeenCalledTimes(1);
+ expect(host.calendarCommit).toHaveBeenCalledWith({
+ coverage: [
+ { kind: 'timed', start: gapStart, end: args.endMs },
+ {
+ kind: 'allDay',
+ start: epochDay('2026-10-08'),
+ end: epochDay('2026-10-12'),
+ },
+ ],
+ watermark: {
+ kind: 'merge',
+ links: [
+ { linkId: 'link-1', seq: '7' },
+ { linkId: 'link-2', seq: '4' },
+ ],
+ },
+ });
+ expect(host.calendarRange).toHaveBeenCalledTimes(2);
+ expect(data?.items).toHaveLength(1);
+ expect(data?.syncStatus).toBe(CalendarSyncStatus.syncing);
+ expect(latestCalendarSyncStatus()).toBe(CalendarSyncStatus.syncing);
+ });
+
+ it('does not commit coverage when a page fails', async () => {
+ const host = fakeHost([
+ range({
+ gaps: [{ kind: 'timed', start: 0, end: DAY_MS }],
+ }),
+ ]);
+ const fetchPage = vi.fn().mockRejectedValue(new Error('offline'));
+ await expect(readCalendarRange(host, week, { fetchPage })).rejects.toThrow(
+ 'offline'
+ );
+ expect(host.calendarCommit).not.toHaveBeenCalled();
+ });
+
+ it('reports an unsupported host so the caller reads from REST', async () => {
+ const host = fakeHost([{ kind: 'unsupported' }]);
+ await expect(readCalendarRange(host, week)).resolves.toBeUndefined();
+ });
+});
+
+describe('calendarGapWindows', () => {
+ it('fetches timed gaps with their local dates', () => {
+ const start = new Date(2026, 9, 5, 10).getTime();
+ const end = new Date(2026, 9, 5, 14).getTime();
+ expect(calendarGapWindows([{ kind: 'timed', start, end }])).toEqual([
+ {
+ input: {
+ start: new Date(start).toISOString(),
+ end: new Date(end).toISOString(),
+ startDate: '2026-10-05',
+ endDate: '2026-10-06',
+ },
+ coverage: [
+ { kind: 'timed', start, end },
+ {
+ kind: 'allDay',
+ start: epochDay('2026-10-05'),
+ end: epochDay('2026-10-06'),
+ },
+ ],
+ },
+ ]);
+ });
+
+ it('fetches all-day gaps no timed window spans at local midnight', () => {
+ const day = epochDay('2026-10-20');
+ const windows = calendarGapWindows([
+ { kind: 'allDay', start: day, end: day + 2 },
+ ]);
+ expect(windows).toEqual([
+ {
+ input: {
+ start: new Date(2026, 9, 20).toISOString(),
+ end: new Date(2026, 9, 22).toISOString(),
+ startDate: '2026-10-20',
+ endDate: '2026-10-22',
+ },
+ coverage: [
+ {
+ kind: 'timed',
+ start: new Date(2026, 9, 20).getTime(),
+ end: new Date(2026, 9, 22).getTime(),
+ },
+ { kind: 'allDay', start: day, end: day + 2 },
+ ],
+ },
+ ]);
+ const timedStart = new Date(2026, 9, 20).getTime();
+ expect(
+ calendarGapWindows([
+ { kind: 'timed', start: timedStart, end: timedStart + 2 * DAY_MS },
+ { kind: 'allDay', start: day, end: day + 2 },
+ ])
+ ).toHaveLength(1);
+ });
+});
+
+describe('lowestWatermark', () => {
+ it('keeps the lowest sequence each link reported', () => {
+ expect(
+ lowestWatermark([
+ [{ linkId: 'a', seq: '18446744073709551' }],
+ [
+ { linkId: 'a', seq: '9' },
+ { linkId: 'b', seq: '3' },
+ ],
+ ])
+ ).toEqual([
+ { linkId: 'a', seq: '9' },
+ { linkId: 'b', seq: '3' },
+ ]);
+ });
+});
+
+describe('fetchCalendarWindow', () => {
+ it('keeps the status of the later request when an earlier one finishes last', async () => {
+ const host = fakeHost([]);
+ const window = calendarGapWindows([
+ { kind: 'timed', start: weekStart.getTime(), end: weekEnd.getTime() },
+ ])[0]!;
+ let finishEarlier!: () => void;
+ const earlierDone = new Promise<void>((resolve) => {
+ finishEarlier = resolve;
+ });
+ const earlier = fetchCalendarWindow(host, window, async () => {
+ await earlierDone;
+ return page({ syncStatus: 'READY' });
+ });
+ await fetchCalendarWindow(host, window, async () =>
+ page({ syncStatus: 'SYNCING' })
+ );
+ finishEarlier();
+ await earlier;
+ expect(latestCalendarSyncStatus()).toBe(CalendarSyncStatus.syncing);
+ });
+});
diff --git a/apps/web/src/lib/queries/calendar/graphql/tests/sync-controller.test.ts b/apps/web/src/lib/queries/calendar/graphql/tests/sync-controller.test.ts
new file mode 100644
index 0000000000..50fed209ed
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/tests/sync-controller.test.ts
@@ -0,0 +1,247 @@
+import type {
+ CalendarCommitArgs,
+ CalendarRangeCacheResult,
+} from '@graphql-cache/index';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import {
+ type CalendarChangesPage,
+ CalendarSyncController,
+} from '../sync-controller';
+import { graphqlEvent, graphqlOccurrence } from './fixtures';
+
+vi.mock('@service-storage/graphql-soup', () => ({
+ getGraphqlSoupClient: vi.fn(),
+}));
+
+const syncState = (
+ watermark: Array<{ linkId: string; seq: string }> | null
+): CalendarRangeCacheResult => ({
+ kind: 'range',
+ revision: '1' as never,
+ occurrenceKeys: [],
+ gaps: [],
+ freshness: 'fresh',
+ uncertainEventKeys: [],
+ optimistic: false,
+ watermark,
+});
+
+const changes = (
+ overrides: Partial<CalendarChangesPage> = {}
+): CalendarChangesPage => ({
+ events: [],
+ deletedEventIds: [],
+ calendars: [],
+ deletedCalendarIds: [],
+ newWatermark: [{ linkId: 'link-1', seq: '5' }],
+ hasMore: false,
+ resetRequired: false,
+ ...overrides,
+});
+
+function setup(
+ pages: CalendarChangesPage[],
+ watermark: Array<{ linkId: string; seq: string }> | null = [
+ { linkId: 'link-1', seq: '1' },
+ { linkId: 'link-2', seq: '7' },
+ ]
+) {
+ const host = {
+ calendarRange: vi.fn(async () => syncState(watermark)),
+ calendarCommit: vi.fn(async (_commit: CalendarCommitArgs) => ({
+ kind: 'committed' as const,
+ revision: '2' as never,
+ changed: [],
+ })),
+ };
+ const fetchChanges = vi.fn(async () => {
+ const page = pages.shift();
+ if (!page) throw new Error('unexpected delta page');
+ return page;
+ });
+ const refetchCalendars = vi.fn(async () => undefined);
+ const controller = new CalendarSyncController(host, {
+ fetchChanges,
+ refetchCalendars,
+ debounceMs: 50,
+ });
+ return { host, fetchChanges, refetchCalendars, controller };
+}
+
+describe('CalendarSyncController', () => {
+ beforeEach(() => vi.useFakeTimers());
+ afterEach(() => vi.useRealTimers());
+
+ it('replaces changed events, deletes removals, and advances the watermark', async () => {
+ const { host, fetchChanges, refetchCalendars, controller } = setup([
+ changes({
+ events: [
+ {
+ event: graphqlEvent(),
+ occurrences: [graphqlOccurrence()],
+ },
+ ],
+ deletedEventIds: ['event-2'],
+ deletedCalendarIds: ['calendar-9'],
+ }),
+ ]);
+
+ await controller.runDelta();
+
+ expect(fetchChanges).toHaveBeenCalledWith([
+ { linkId: 'link-1', seq: '1' },
+ { linkId: 'link-2', seq: '7' },
+ ]);
+ expect(host.calendarCommit).toHaveBeenCalledWith({
+ replacedEvents: [
+ {
+ eventKey: 'GraphqlCalendarEvent:event-1',
+ occurrenceKeys: [
+ 'GraphqlCalendarOccurrence:event-1:2026-10-06T09:00:00+00:00',
+ ],
+ },
+ ],
+ deletedEventKeys: ['GraphqlCalendarEvent:event-2'],
+ deletedCalendarKeys: ['GraphqlCalendar:calendar-9'],
+ removedLinkIds: ['link-2'],
+ watermark: {
+ kind: 'advance',
+ since: [
+ { linkId: 'link-1', seq: '1' },
+ { linkId: 'link-2', seq: '7' },
+ ],
+ to: [{ linkId: 'link-1', seq: '5' }],
+ },
+ freshness: 'fresh',
+ });
+ expect(refetchCalendars).toHaveBeenCalledTimes(1);
+ });
+
+ it('follows hasMore from each page watermark and marks fresh at the end', async () => {
+ const { host, fetchChanges, refetchCalendars, controller } = setup(
+ [
+ changes({
+ hasMore: true,
+ newWatermark: [{ linkId: 'link-1', seq: '3' }],
+ }),
+ changes({ newWatermark: [{ linkId: 'link-1', seq: '6' }] }),
+ ],
+ [{ linkId: 'link-1', seq: '1' }]
+ );
+
+ await controller.runDelta();
+
+ expect(fetchChanges.mock.calls).toEqual([
+ [[{ linkId: 'link-1', seq: '1' }]],
+ [[{ linkId: 'link-1', seq: '3' }]],
+ ]);
+ const commits = host.calendarCommit.mock.calls.map(([commit]) => commit);
+ expect(commits[0]).not.toHaveProperty('freshness');
+ expect(commits[0]?.watermark).toEqual({
+ kind: 'advance',
+ since: [{ linkId: 'link-1', seq: '1' }],
+ to: [{ linkId: 'link-1', seq: '3' }],
+ });
+ expect(commits[1]).toMatchObject({
+ freshness: 'fresh',
+ watermark: {
+ kind: 'advance',
+ since: [{ linkId: 'link-1', seq: '3' }],
+ to: [{ linkId: 'link-1', seq: '6' }],
+ },
+ });
+ expect(refetchCalendars).not.toHaveBeenCalled();
+ });
+
+ it('resets the cache with the server watermark when required', async () => {
+ const { host, refetchCalendars, controller } = setup([
+ changes({
+ resetRequired: true,
+ newWatermark: [{ linkId: 'link-3', seq: '40' }],
+ }),
+ ]);
+
+ await controller.runDelta();
+
+ expect(host.calendarCommit).toHaveBeenCalledTimes(1);
+ expect(host.calendarCommit).toHaveBeenCalledWith({
+ reset: true,
+ watermark: { kind: 'merge', links: [{ linkId: 'link-3', seq: '40' }] },
+ });
+ expect(refetchCalendars).toHaveBeenCalledTimes(1);
+ });
+
+ it('skips the delta until a page fetch establishes a watermark', async () => {
+ for (const watermark of [null, []]) {
+ const { host, fetchChanges, controller } = setup([], watermark);
+ await controller.runDelta();
+ expect(fetchChanges).not.toHaveBeenCalled();
+ expect(host.calendarCommit).not.toHaveBeenCalled();
+ }
+ });
+
+ it('debounces pokes into one run', async () => {
+ const { fetchChanges, controller } = setup([changes()]);
+ controller.markStale('poke');
+ controller.markStale('poke');
+ controller.markStale('reconnect');
+ await vi.advanceTimersByTimeAsync(49);
+ expect(fetchChanges).not.toHaveBeenCalled();
+ await vi.advanceTimersByTimeAsync(1);
+ await vi.runAllTimersAsync();
+ expect(fetchChanges).toHaveBeenCalledTimes(1);
+ });
+
+ it('runs once more for a request made during a run', async () => {
+ let release!: () => void;
+ const gate = new Promise<void>((resolve) => {
+ release = resolve;
+ });
+ const { fetchChanges, controller } = setup([changes(), changes()]);
+ fetchChanges.mockImplementationOnce(async () => {
+ await gate;
+ return changes();
+ });
+ const first = controller.runDelta();
+ const second = controller.runDelta();
+ expect(second).toBe(first);
+ release();
+ await first;
+ expect(fetchChanges).toHaveBeenCalledTimes(2);
+ });
+
+ it('schedules another run when the page cap leaves changes behind', async () => {
+ const pages = Array.from({ length: 51 }, (_, index) =>
+ changes({
+ newWatermark: [{ linkId: 'link-1', seq: String(index + 2) }],
+ hasMore: index < 50,
+ })
+ );
+ const { host, fetchChanges, controller } = setup(pages, [
+ { linkId: 'link-1', seq: '1' },
+ ]);
+ await controller.runDelta();
+ expect(fetchChanges).toHaveBeenCalledTimes(50);
+ expect(
+ host.calendarCommit.mock.calls.at(-1)?.[0].freshness
+ ).toBeUndefined();
+ await vi.runAllTimersAsync();
+ expect(fetchChanges).toHaveBeenCalledTimes(51);
+ expect(host.calendarCommit.mock.calls.at(-1)?.[0]).toMatchObject({
+ watermark: {
+ kind: 'advance',
+ to: [{ linkId: 'link-1', seq: '52' }],
+ },
+ freshness: 'fresh',
+ });
+ });
+
+ it('stops scheduling after disposal', async () => {
+ const { fetchChanges, controller } = setup([changes()]);
+ controller.markStale('poke');
+ controller.dispose();
+ await vi.runAllTimersAsync();
+ await controller.runDelta();
+ expect(fetchChanges).not.toHaveBeenCalled();
+ });
+});
diff --git a/apps/web/src/lib/queries/calendar/graphql/use-calendar-cache.ts b/apps/web/src/lib/queries/calendar/graphql/use-calendar-cache.ts
new file mode 100644
index 0000000000..b74d95b356
--- /dev/null
+++ b/apps/web/src/lib/queries/calendar/graphql/use-calendar-cache.ts
@@ -0,0 +1,113 @@
+import { createTabLeaderSignal } from '@core/cross-tab/tab-leader';
+import { queryClient } from '@queries/client';
+import { CalendarSyncStatus } from '@service-storage/generated/schemas/calendarSyncStatus';
+import { subscribeGraphqlSoupReconnected } from '@service-storage/graphql-soup';
+import { makeEventListener } from '@solid-primitives/event-listener';
+import { createEffect, createSignal, onCleanup } from 'solid-js';
+import { calendarKeys } from '../keys';
+import { createCalendarOccurrenceQueryRange } from '../occurrences';
+import { runCalendarBackfill } from './backfill';
+import { useGraphqlCalendarHost } from './flag';
+import { mapCalendarSyncStatus } from './map';
+import {
+ beginCalendarSyncStatusSample,
+ fetchCalendarOccurrencePage,
+ latestCalendarSyncStatus,
+ recordCalendarSyncStatus,
+} from './range';
+import {
+ activeCalendarSyncController,
+ CalendarSyncController,
+ setActiveCalendarSyncController,
+} from './sync-controller';
+
+const SYNCING_POLL_MS = 60_000;
+const DAY_MS = 86_400_000;
+
+/** Re-reads ingestion state while syncing; covered views would never ask. */
+async function refreshSyncStatus(): Promise<void> {
+ const now = Date.now();
+ const range = createCalendarOccurrenceQueryRange(
+ new Date(now),
+ new Date(now + DAY_MS)
+ );
+ const sample = beginCalendarSyncStatusSample();
+ const page = await fetchCalendarOccurrencePage({ ...range, first: 1 });
+ const status = mapCalendarSyncStatus(page.syncStatus);
+ const previous = latestCalendarSyncStatus();
+ if (!recordCalendarSyncStatus(status, sample) || status === previous) return;
+ await queryClient.invalidateQueries({
+ queryKey: calendarKeys.occurrences._def,
+ });
+}
+
+/**
+ * Keeps the cached calendar current while calendar reads use the cache:
+ * pokes (`refresh_calendar`), reconnects, coming online, becoming visible,
+ * and cache generation changes run a delta, with a slow poll while the
+ * server is still syncing. The cross-tab leader also widens coverage in the
+ * background.
+ */
+export function useCalendarCache(): void {
+ const host = useGraphqlCalendarHost();
+ const isLeader = createTabLeaderSignal('graphql-calendar-backfill:v1');
+ const [generation, setGeneration] = createSignal(0);
+
+ createEffect(() => {
+ const cacheHost = host();
+ if (!cacheHost) return;
+ const controller = new CalendarSyncController(cacheHost);
+ setActiveCalendarSyncController(controller);
+ controller.markStale('start');
+ const unsubscribeReconnect = subscribeGraphqlSoupReconnected(() =>
+ controller.markStale('reconnect')
+ );
+ const unsubscribeGeneration = cacheHost.onCacheGenerationChanged(() => {
+ controller.markStale('generation');
+ setGeneration((value) => value + 1);
+ });
+ const removeOnline = makeEventListener(window, 'online', () =>
+ controller.markStale('online')
+ );
+ const removeVisibility = makeEventListener(
+ document,
+ 'visibilitychange',
+ () => {
+ if (document.visibilityState === 'visible') {
+ controller.markStale('visible');
+ }
+ }
+ );
+ const poll = setInterval(() => {
+ if (latestCalendarSyncStatus() !== CalendarSyncStatus.syncing) return;
+ controller.markStale('syncing');
+ refreshSyncStatus().catch((error) => {
+ console.warn('Calendar sync status refresh failed', error);
+ });
+ }, SYNCING_POLL_MS);
+ onCleanup(() => {
+ clearInterval(poll);
+ removeVisibility();
+ removeOnline();
+ unsubscribeGeneration();
+ unsubscribeReconnect();
+ controller.dispose();
+ if (activeCalendarSyncController() === controller) {
+ setActiveCalendarSyncController(undefined);
+ }
+ });
+ });
+
+ createEffect(() => {
+ const cacheHost = host();
+ if (!cacheHost || !isLeader()) return;
+ generation();
+ const abort = new AbortController();
+ runCalendarBackfill(cacheHost, { signal: abort.signal }).catch((error) => {
+ if (!abort.signal.aborted) {
+ console.warn('Calendar backfill stopped', error);
+ }
+ });
+ onCleanup(() => abort.abort());
+ });
+}
diff --git a/apps/web/src/lib/queries/calendar/keys.ts b/apps/web/src/lib/queries/calendar/keys.ts
index a127752201..85ecb2a4ee 100644
--- a/apps/web/src/lib/queries/calendar/keys.ts
+++ b/apps/web/src/lib/queries/calendar/keys.ts
@@ -12,8 +12,15 @@ export interface CalendarOccurrenceQueryRange {
* RSVP state. */
export const RSVP_MUTATION_KEY = ['calendar', 'rsvp'] as const;
+/**
+ * Cache-backed reads nest under the REST keys, so invalidations and the
+ * optimistic patches applied to `occurrences._def` reach both.
+ */
export const calendarKeys = createQueryKeys('calendar', {
- visibleCalendars: null,
+ visibleCalendars: {
+ queryKey: null,
+ contextQueries: { graphql: null },
+ },
invitations: (threadId: string) => ({
queryKey: [threadId],
}),
@@ -22,6 +29,7 @@ export const calendarKeys = createQueryKeys('calendar', {
range: CalendarOccurrenceQueryRange | undefined
) => ({
queryKey: [userId, range],
+ contextQueries: { graphql: null },
}),
teamOutOfOffice: (
userId: string,
diff --git a/apps/web/src/lib/queries/calendar/occurrences.ts b/apps/web/src/lib/queries/calendar/occurrences.ts
index c3113f7ce3..d55e6c2238 100644
--- a/apps/web/src/lib/queries/calendar/occurrences.ts
+++ b/apps/web/src/lib/queries/calendar/occurrences.ts
@@ -1,11 +1,18 @@
import { throwOnErr } from '@core/util/result';
import { queryClient } from '@queries/client';
+import { subscribeToVisibleCacheChanges } from '@queries/subscribe-to-visible-cache-changes';
import { storageServiceClient } from '@service-storage/client';
import type { CalendarOccurrenceItem } from '@service-storage/generated/schemas/calendarOccurrenceItem';
import type { CalendarOccurrenceResponse } from '@service-storage/generated/schemas/calendarOccurrenceResponse';
import { CalendarSyncStatus } from '@service-storage/generated/schemas/calendarSyncStatus';
-import { useQuery } from '@tanstack/solid-query';
-import type { Accessor } from 'solid-js';
+import { useQuery, useQueryClient } from '@tanstack/solid-query';
+import { type Accessor, createEffect, onCleanup } from 'solid-js';
+import {
+ markCalendarCacheUnsupported,
+ useGraphqlCalendarHost,
+} from './graphql/flag';
+import { readCalendarRange } from './graphql/range';
+import { activeCalendarSyncController } from './graphql/sync-controller';
import { type CalendarOccurrenceQueryRange, calendarKeys } from './keys';
export type { CalendarOccurrenceQueryRange } from './keys';
@@ -25,6 +32,10 @@ export interface CalendarOccurrencesQueryOptions {
refetchOnWindowFocus?: boolean;
}
+type CalendarOccurrencesQueryKey =
+ | ReturnType<typeof calendarKeys.occurrences>['queryKey']
+ | ReturnType<typeof calendarKeys.occurrences>['_ctx']['graphql']['queryKey'];
+
export interface CalendarOccurrencesData {
items: CalendarOccurrenceItem[];
syncStatus: CalendarOccurrenceResponse['syncStatus'];
@@ -101,8 +112,57 @@ export function useCalendarOccurrencesQuery(
input: Accessor<CalendarOccurrencesQueryInput>,
options?: Accessor<CalendarOccurrencesQueryOptions>
) {
- return useQuery(() => {
+ const cacheHost = useGraphqlCalendarHost();
+ const activeQueryClient = useQueryClient();
+
+ createEffect(() => {
+ const host = cacheHost();
+ if (!host) return;
const { userId, range } = input();
+ const queryKey = calendarKeys.occurrences(userId ?? '', range)._ctx.graphql
+ .queryKey;
+ onCleanup(
+ subscribeToVisibleCacheChanges(host, () =>
+ activeQueryClient.invalidateQueries(
+ { queryKey },
+ { cancelRefetch: false }
+ )
+ )
+ );
+ });
+
+ return useQuery<
+ CalendarOccurrencesData,
+ Error,
+ CalendarOccurrencesData,
+ CalendarOccurrencesQueryKey
+ >(() => {
+ const { userId, range } = input();
+ const enabled =
+ Boolean(userId) && range !== undefined && options?.().enabled !== false;
+ const host = cacheHost();
+
+ if (host) {
+ return {
+ queryKey: calendarKeys.occurrences(userId ?? '', range)._ctx.graphql
+ .queryKey,
+ queryFn: async ({ signal }: { signal: AbortSignal }) => {
+ if (!range) {
+ throw new Error('Calendar occurrence range is unavailable');
+ }
+ const cached = await readCalendarRange(host, range, { signal });
+ if (cached) return cached;
+ markCalendarCacheUnsupported(host);
+ return fetchCalendarOccurrences(range, signal);
+ },
+ enabled,
+ staleTime: Infinity,
+ // Covered viewports never touch the network, so offline reads run.
+ networkMode: 'offlineFirst' as const,
+ placeholderData: (p: CalendarOccurrencesData | undefined) => p,
+ refetchOnWindowFocus: false,
+ };
+ }
return {
queryKey: calendarKeys.occurrences(userId ?? '', range).queryKey,
@@ -127,7 +187,18 @@ export function useCalendarOccurrencesQuery(
});
}
-export function invalidateCalendarOccurrences() {
+/**
+ * Refetches every mounted occurrence viewport. With calendar reads on the
+ * cache, the delta runs first so the viewports see the change that prompted
+ * the refresh rather than the cache from before it.
+ */
+export async function invalidateCalendarOccurrences() {
+ const controller = activeCalendarSyncController();
+ if (controller) {
+ await controller.runDelta().catch((error) => {
+ console.warn('Calendar delta sync failed', error);
+ });
+ }
return queryClient.invalidateQueries({
queryKey: calendarKeys.occurrences._def,
});
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/calendar.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/calendar.graphql
new file mode 100644
index 0000000000..435e9c6d3b
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/calendar.graphql
@@ -0,0 +1,175 @@
+fragment CalendarAttendeeFields on GraphqlCalendarAttendee {
+ email
+ displayName
+ responseStatus
+ isOrganizer
+ isOptional
+ isSelf
+ comment
+}
+
+fragment CalendarReminderFields on GraphqlCalendarReminders {
+ useDefault
+ overrides {
+ method
+ minutes
+ }
+}
+
+fragment CalendarEventTimeFields on GraphqlEventTime {
+ __typename
+ ... on GraphqlTimedEventTime {
+ startsAt
+ endsAt
+ timeZone
+ }
+ ... on GraphqlAllDayEventTime {
+ startDate
+ endDate
+ }
+}
+
+fragment CalendarEventFields on GraphqlCalendarEvent {
+ __typename
+ id
+ ownerId
+ linkId
+ icalUid
+ calendarId
+ sources {
+ calendarId
+ title
+ description
+ location
+ eventType
+ visibility
+ transparency
+ isReadOnly
+ reminders {
+ ...CalendarReminderFields
+ }
+ creatorEmail
+ creatorName
+ }
+ title
+ description
+ location
+ status
+ visibility
+ transparency
+ eventType
+ time {
+ ...CalendarEventTimeFields
+ }
+ recurrenceLines
+ organizerEmail
+ organizerName
+ creatorEmail
+ creatorName
+ conferenceUrl
+ conferenceProvider
+ sequence
+ isReadOnly
+ attendees {
+ ...CalendarAttendeeFields
+ }
+ reminders {
+ ...CalendarReminderFields
+ }
+ createdAt
+ updatedAt
+}
+
+fragment CalendarOccurrenceItemFields on GraphqlCalendarOccurrence {
+ __typename
+ id
+ eventId
+ linkId
+ occurrenceKey
+ recurrenceId
+ isCancelled
+ time {
+ ...CalendarEventTimeFields
+ }
+ overrideTitle
+ overrideDescription
+ overrideLocation
+ overrideStatus
+ overrideAttendees {
+ ...CalendarAttendeeFields
+ }
+ event {
+ ...CalendarEventFields
+ }
+}
+
+fragment CalendarFields on GraphqlCalendar {
+ __typename
+ id
+ linkId
+ emailAddress
+ name
+ color
+ isPrimary
+ isWritable
+ isSubscription
+ syncError
+ defaultReminders {
+ method
+ minutes
+ }
+}
+
+query CalendarOccurrences($input: CalendarRangeInput!) {
+ user {
+ id
+ calendarOccurrences(input: $input) {
+ nodes {
+ ...CalendarOccurrenceItemFields
+ }
+ hasNextPage
+ endCursor
+ syncStatus
+ watermark {
+ linkId
+ seq
+ }
+ }
+ }
+}
+
+query Calendars {
+ user {
+ id
+ calendars {
+ ...CalendarFields
+ }
+ }
+}
+
+query CalendarChanges($input: CalendarChangesInput!) {
+ user {
+ id
+ calendarChanges(input: $input) {
+ events {
+ event {
+ ...CalendarEventFields
+ }
+ occurrences {
+ ...CalendarOccurrenceItemFields
+ }
+ }
+ deletedEventIds
+ calendars {
+ ...CalendarFields
+ }
+ deletedCalendarIds
+ newWatermark {
+ linkId
+ seq
+ }
+ hasMore
+ resetRequired
+ }
+ }
+}
diff --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.ts
index 8d7a64c49a..55743d0fac 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
@@ -20,6 +20,45 @@ export type ActivityOverviewInput = {
timeZone?: string | null | undefined;
};
+/** A request for calendar changes after a watermark. */
+export type CalendarChangesInput = {
+ /**
+ * The client's watermark, one entry per tracked connected inbox. Empty
+ * returns only the current watermark.
+ */
+ since: Array<CalendarLinkWatermarkInput>;
+};
+
+/** How far the client has applied one connected inbox's change log. */
+export type CalendarLinkWatermarkInput = {
+ /** Connected inbox identifier. */
+ linkId: string | number;
+ /** Last applied sequence, as the decimal string the server returned. */
+ seq: string;
+};
+
+/** A bounded occurrence viewport and page request. */
+export type CalendarRangeInput = {
+ /** `endCursor` of the previous page. */
+ after?: string | null | undefined;
+ /** Exclusive UTC viewport end in RFC 3339 format. */
+ end: string;
+ /**
+ * Exclusive local date boundary for all-day events (`YYYY-MM-DD`).
+ * Defaults to the first date at or after `end`.
+ */
+ endDate?: string | null | undefined;
+ /** Page size, from 1 through 2,000. Defaults to 1,000. */
+ first?: number | null | undefined;
+ /** Inclusive UTC viewport start in RFC 3339 format. */
+ start: string;
+ /**
+ * Inclusive local date boundary for all-day events (`YYYY-MM-DD`).
+ * Defaults to the date of `start`.
+ */
+ startDate?: string | null | undefined;
+};
+
/** Channel activity operation exposed by GraphQL. */
export type ChannelActivityType =
/** Record that the user interacted with the channel. */
@@ -169,6 +208,24 @@ export type GraphqlAgentSessionLiteral =
*/
owner: string; };
+/** An attendee's RSVP. */
+export type GraphqlCalendarAttendeeResponseStatus =
+ /** The attendee accepted. */
+ | 'ACCEPTED'
+ /** The attendee declined. */
+ | 'DECLINED'
+ /** The attendee has not responded. */
+ | 'NEEDS_ACTION'
+ /** The attendee tentatively accepted. */
+ | 'TENTATIVE';
+
+/** Conferencing system backing an event's join URL. */
+export type GraphqlCalendarConferenceProvider =
+ /** Google Meet. */
+ | 'GOOGLE_MEET'
+ /** Any other conferencing system. */
+ | 'OTHER';
+
/** The two operands of a recursive `CalendarEventFilterExpr` binary expression. */
export type GraphqlCalendarEventBinaryExpr = {
/** Left expression. */
@@ -205,6 +262,58 @@ export type GraphqlCalendarEventLiteral =
| { attendee?: never; endsAfter?: never; id?: never; notificationState?: never; organizer?: never; startsBefore?: never; /** Event status. */
status: string; };
+/** Event status. */
+export type GraphqlCalendarEventStatus =
+ /** The event was cancelled. */
+ | 'CANCELLED'
+ /** The event is confirmed. */
+ | 'CONFIRMED'
+ /** The event is tentatively confirmed. */
+ | 'TENTATIVE';
+
+/** Whether the event blocks time on the calendar. */
+export type GraphqlCalendarEventTransparency =
+ /** The event blocks time. */
+ | 'OPAQUE'
+ /** The event does not block time. */
+ | 'TRANSPARENT';
+
+/** Provider event type. */
+export type GraphqlCalendarEventType =
+ /** A contact's birthday. */
+ | 'BIRTHDAY'
+ /** A regular event. */
+ | 'DEFAULT'
+ /** A focus-time block. */
+ | 'FOCUS_TIME'
+ /** An event Gmail created from an email. */
+ | 'FROM_GMAIL'
+ /** An out-of-office block. */
+ | 'OUT_OF_OFFICE'
+ /** A working-location marker. */
+ | 'WORKING_LOCATION';
+
+/** Event visibility. */
+export type GraphqlCalendarEventVisibility =
+ /** Treated as private. */
+ | 'CONFIDENTIAL'
+ /** The calendar's default visibility. */
+ | 'DEFAULT'
+ /** Details visible only to attendees. */
+ | 'PRIVATE'
+ /** Visible to everyone with access to the calendar. */
+ | 'PUBLIC';
+
+/**
+ * Aggregate ingestion state across every calendar account visible to the
+ * viewer.
+ */
+export type GraphqlCalendarSyncStatus =
+ /** Every visible calendar account has finished its latest sync. */
+ | 'READY'
+ /** At least one visible calendar account is still ingesting. */
+ | 'SYNCING';
+
/** The two operands of a recursive `CallFilterExpr` binary expression. */
export type GraphqlCallBinaryExpr = {
/** Left expression. */
@@ -2190,6 +2299,68 @@ export type AgentSessionMentionsQuery = { user: { id: string, soup: { items: Arr
| { __typename: 'GraphqlSoupProject', id: string }
> } } };
+export type CalendarAttendeeFieldsFragment = { email: string, displayName: string | null, responseStatus: GraphqlCalendarAttendeeResponseStatus, isOrganizer: boolean, isOptional: boolean, isSelf: boolean, comment: string | null };
+
+export type CalendarReminderFieldsFragment = { useDefault: boolean, overrides: Array<{ method: string, minutes: number }> };
+
+type CalendarEventTimeFields_GraphqlAllDayEventTime_Fragment = { __typename: 'GraphqlAllDayEventTime', startDate: string, endDate: string };
+
+type CalendarEventTimeFields_GraphqlTimedEventTime_Fragment = { __typename: 'GraphqlTimedEventTime', startsAt: string, endsAt: string, timeZone: string | null };
+
+export type CalendarEventTimeFieldsFragment =
+ | CalendarEventTimeFields_GraphqlAllDayEventTime_Fragment
+ | CalendarEventTimeFields_GraphqlTimedEventTime_Fragment
+;
+
+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, 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 }> } };
+
+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 }
+ | { __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, 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 }> } } };
+
+export type CalendarFieldsFragment = { __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, defaultReminders: Array<{ method: string, minutes: number }> };
+
+export type CalendarOccurrencesQueryVariables = Exact<{
+ input: CalendarRangeInput;
+}>;
+
+
+export type CalendarOccurrencesQuery = { user: { id: string, calendarOccurrences: { hasNextPage: boolean, endCursor: string | null, syncStatus: GraphqlCalendarSyncStatus, nodes: 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, 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 }> } } }>, 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, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, defaultReminders: Array<{ method: string, minutes: number }> }> } };
+
+export type CalendarChangesQueryVariables = Exact<{
+ input: CalendarChangesInput;
+}>;
+
+
+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, 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 }> } }, 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, 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 }> } } }> }>, calendars: Array<{ __typename: 'GraphqlCalendar', id: string, linkId: string, emailAddress: string, name: string, color: string | null, isPrimary: boolean, isWritable: boolean, isSubscription: boolean, syncError: string | null, defaultReminders: Array<{ method: string, minutes: number }> }>, newWatermark: Array<{ linkId: string, seq: string }> } } };
+
export type RecordChannelActivityMutationVariables = Exact<{
input: RecordChannelActivityInput;
}>;
@@ -15627,6 +15798,12 @@ export type SoupNotificationsEntityFieldsFragment =
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 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 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 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":"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<CalendarOccurrenceItemFieldsFragment, 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":"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 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>;
@@ -15679,6 +15856,9 @@ export const DatabaseActivityDocument = {"kind":"Document","definitions":[{"kind
export 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":"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":"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":"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":"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 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":"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":"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":"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":"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/routes/Root.tsx b/apps/web/src/routes/Root.tsx
index 9fab47d2ca..f143a5862a 100644
--- a/apps/web/src/routes/Root.tsx
+++ b/apps/web/src/routes/Root.tsx
@@ -11,6 +11,7 @@ import {
} from '@app/lib/analytics/analytics-context';
import { PosthogProvider, usePosthog } from '@app/lib/analytics/posthog';
import { trackSignupCompletion } from '@app/lib/analytics/signupCompletion';
+import { useCalendarCache } from '@app/lib/queries/calendar/graphql/use-calendar-cache';
import { useInvalidateQueriesOnReconnect } from '@app/lib/queries/invalidate-on-reconnect';
import { useSoupBackfills } from '@app/lib/queries/soup/backfill';
import { setHotkeyRoot } from '@app/signal/hotkeyRoot';
@@ -220,6 +221,11 @@ function SoupBackfillSideEffect(props: { userId: string }) {
return null;
}
+function CalendarCacheSideEffect() {
+ useCalendarCache();
+ return null;
+}
+
/** Sets user info for observability, analytics, and login cookie. Must be inside QueryClientProvider. */
function UserInfoSideEffects() {
const analytics = useAnalytics();
@@ -279,7 +285,12 @@ function UserInfoSideEffects() {
return (
<Show when={userInfo()?.id} keyed>
- {(userId) => <SoupBackfillSideEffect userId={userId} />}
+ {(userId) => (
+ <>
+ <SoupBackfillSideEffect userId={userId} />
+ <CalendarCacheSideEffect />
+ </>
+ )}
</Show>
);
}