calendarSyncStore
Section titled “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> );}calendarSyncStore properties
Section titled “calendarSyncStore properties”advancedSettings
Section titled “advancedSettings”| Description | Display the Advanced Settings section. |
| Type | boolean |
| Default | false |
calendar
Section titled “calendar”| Description | The synced calendar. |
| Type | null | Calendar |
getCalendar
Section titled “getCalendar”| Description | Fetches calendar data from the Nylas Calendar API. |
| Type | (calendarId: string, grantId: string, fallbackNotetakerName?: string) => Promise<void> |
handleCancel
Section titled “handleCancel”| Description | Cancels changes and resets to original values. |
| Type | (notetakerName?: string, onCancelCallback?: () => ...) => void |
handleDisable
Section titled “handleDisable”| Description | Disables Notetaker for the synced calendar. |
| Type | (calendarId: string, grantId: string, fallbackNotetakerName?: string,onUpdate?: (data: ...) => ..., onError?: (error: ...) => ...,onCancel?: () => ...) => Promise<void> |
handleSave
Section titled “handleSave”| Description | Saves Notetaker settings for the synced calendar. |
| Type | (calendarId: string, grantId: string, onUpdate?: (data: ...) => ...,onError?: (error: ...) => ...) => Promise<void> |
hasChanges
Section titled “hasChanges”| Description | Indicates that the user made changes. |
| Type | boolean |
| Default | false |
isLoading
Section titled “isLoading”| Description | Indicates that the component is loading. |
| Type | boolean |
| Default | false |
| Description | The name for the calendar sync. |
| Type | string |
| Description | Resets the store and all form fields to their default values. |
| Type | () => void |
selectedFilters
Section titled “selectedFilters”| Description | A list of selected meeting filters. |
| Type | MeetingFilter[] |
selectedRecordingTypes
Section titled “selectedRecordingTypes”| Description | A list of selected recording types (video, audio, or transcript). |
| Type | RecordingType[] |
setAdvancedSettings
Section titled “setAdvancedSettings”| Description | Sets the visibility of the Advanced Settings section. |
| Type | (show: boolean) => void |
setCalendar
Section titled “setCalendar”| Description | Sets the calendar. |
| Type | (calendar: null | Calendar) => void |
setHasChanges
Section titled “setHasChanges”| Description | Sets whether the user made changes. |
| Type | (hasChanges: boolean) => void |
setIsLoading
Section titled “setIsLoading”| Description | Sets the loading state. |
| Type | (isLoading: boolean) => void |
setName
Section titled “setName”| Description | Sets the name for the calendar sync. |
| Type | (name: string) => void |
setSelectedFilters
Section titled “setSelectedFilters”| Description | Sets the selected meeting filters. |
| Type | (filters: MeetingFilter[]) => void |
setSelectedRecordingTypes
Section titled “setSelectedRecordingTypes”| Description | Sets the selected recording types. |
| Type | (types: RecordingType[]) => void |
toggleMeetingFilter
Section titled “toggleMeetingFilter”| Description | Toggles the specified meeting filter on or off. |
| Type | (filter: MeetingFilter) => void |
toggleRecordingType
Section titled “toggleRecordingType”| Description | Toggles the specified recording type on or off. |
| Type | (type: RecordingType) => void |