Skip to content

calendarSyncStore

This interface describes a Zustand store, an advanced state management React solution. This is intended for advanced use only – the Notetaker components will work without using this store directly.

The interface for the CalendarSync component state store. calendarSyncStore manages all form data and UI state information for the component.

import { calendarSyncStore, CalendarSync } from "@nylas/react";
export default function App() {
const store = calendarSyncStore();
useEffect(() => {
store.setName("ExampleName");
}, []);
return (
<div>
<CalendarSync />
</div>
);
}
DescriptionDisplay the Advanced Settings section.
Typeboolean
Defaultfalse

DescriptionThe synced calendar.
Typenull | Calendar

DescriptionFetches calendar data from the Nylas Calendar API.
Type(calendarId: string, grantId: string, fallbackNotetakerName?: string) => Promise<void>

DescriptionCancels changes and resets to original values.
Type(notetakerName?: string, onCancelCallback?: () => ...) => void

DescriptionDisables Notetaker for the synced calendar.
Type(calendarId: string, grantId: string, fallbackNotetakerName?: string,
onUpdate?: (data: ...) => ..., onError?: (error: ...) => ...,
onCancel?: () => ...) => Promise<void>

DescriptionSaves Notetaker settings for the synced calendar.
Type(calendarId: string, grantId: string, onUpdate?: (data: ...) => ...,
onError?: (error: ...) => ...) => Promise<void>

DescriptionIndicates that the user made changes.
Typeboolean
Defaultfalse

DescriptionIndicates that the component is loading.
Typeboolean
Defaultfalse

DescriptionThe name for the calendar sync.
Typestring

DescriptionResets the store and all form fields to their default values.
Type() => void

DescriptionA list of selected meeting filters.
TypeMeetingFilter[]

DescriptionA list of selected recording types (video, audio, or transcript).
TypeRecordingType[]

DescriptionSets the visibility of the Advanced Settings section.
Type(show: boolean) => void

DescriptionSets the calendar.
Type(calendar: null | Calendar) => void

DescriptionSets whether the user made changes.
Type(hasChanges: boolean) => void

DescriptionSets the loading state.
Type(isLoading: boolean) => void

DescriptionSets the name for the calendar sync.
Type(name: string) => void

DescriptionSets the selected meeting filters.
Type(filters: MeetingFilter[]) => void

DescriptionSets the selected recording types.
Type(types: RecordingType[]) => void

DescriptionToggles the specified meeting filter on or off.
Type(filter: MeetingFilter) => void

DescriptionToggles the specified recording type on or off.
Type(type: RecordingType) => void