Skip to main content

Calendar API

Calendar API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
completeEventMarks a specific calendar event as complete.
completeEventsBulk-completes multiple calendar events.
completeTriggeredMarks triggered events as complete.
createEventCreates a new calendar event.
deleteEventDeletes a calendar event.
getEventRetrieves a specific calendar event by ID.
getIndexRetrieves the calendar index.
getRangeRetrieves calendar events within a date range.
getStatusRetrieves the calendar service status.
getTriggeredRetrieves triggered calendar events.
getUpcomingRetrieves upcoming calendar events.
listEventsRetrieves all calendar events as summaries.
rsvpSends an RSVP response to a calendar event.
updateEventUpdates a calendar event.

Methods


completeEvent

client.calendar.completeEvent(id: string, data?: CompleteEventRequest): Promise<void>

Marks a specific calendar event as complete.

Records the completion of an event, optionally with completion details such as outcome or notes.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the event to complete
dataCompleteEventRequestNoOptional completion details

Returns: Promise<void> — A promise that resolves when the event has been marked complete

Full reference →


completeEvents

client.calendar.completeEvents(data: BulkCompleteEventsRequest): Promise<void>

Bulk-completes multiple calendar events.

Marks multiple events as complete in a single operation, useful for batch processing of finished events.

ParameterTypeRequiredDescription
dataBulkCompleteEventsRequestYesThe bulk completion payload

Returns: Promise<void> — A promise that resolves when all specified events have been completed

Full reference →


completeTriggered

client.calendar.completeTriggered(data: CompleteTriggeredRequest): Promise<void>

Marks triggered events as complete.

Acknowledges and completes triggered events, removing them from the pending triggered events list.

ParameterTypeRequiredDescription
dataCompleteTriggeredRequestYesThe completion payload identifying which triggered events to complete

Returns: Promise<void> — A promise that resolves when the events have been marked complete

Full reference →


createEvent

client.calendar.createEvent(data: CreateCalendarEventRequest): Promise<CalendarEvent>

Creates a new calendar event.

Schedules a new event that can trigger agent actions or serve as a coordination point for workflows.

ParameterTypeRequiredDescription
dataCreateCalendarEventRequestYesThe event creation payload

Returns: Promise<CalendarEvent> — A promise that resolves to the newly created CalendarEvent

Full reference →


deleteEvent

client.calendar.deleteEvent(id: string): Promise<void>

Deletes a calendar event.

Permanently removes the specified calendar event.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the event to delete

Returns: Promise<void> — A promise that resolves when the event has been deleted

Full reference →


getEvent

client.calendar.getEvent(id: string): Promise<CalendarEvent>

Retrieves a specific calendar event by ID.

Returns the full event details including all metadata, participants, and configuration.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the calendar event

Returns: Promise<CalendarEvent> — A promise that resolves to the CalendarEvent object

Full reference →


getIndex

client.calendar.getIndex(params?: CalendarFilterOptions): Promise<CalendarIndexEntry[]>

Retrieves the calendar index.

Returns an indexed view of calendar events, optimized for fast lookups and navigation across large numbers of events.

ParameterTypeRequiredDescription
paramsCalendarFilterOptionsNoOptional filter options

Returns: Promise<CalendarIndexEntry[]> — A promise that resolves to an array of CalendarIndexEntry objects

Full reference →


getRange

client.calendar.getRange(params?: CalendarFilterOptions): Promise<CalendarEvent[]>

Retrieves calendar events within a date range.

Returns full event objects for all events that overlap with the specified date range.

ParameterTypeRequiredDescription
paramsCalendarFilterOptionsNoOptional filter options including date range boundaries

Returns: Promise<CalendarEvent[]> — A promise that resolves to an array of CalendarEvent objects in the range

Full reference →


getStatus

client.calendar.getStatus(): Promise<CalendarStatus>

Retrieves the calendar service status.

Returns health and configuration information about the calendar subsystem, including whether triggers are active.

No parameters.

Returns: Promise<CalendarStatus> — A promise that resolves to the CalendarStatus object

Full reference →


getTriggered

client.calendar.getTriggered(params?: CalendarFilterOptions): Promise<CalendarEvent[]>

Retrieves triggered calendar events.

Returns events whose trigger conditions have been met and are pending action or acknowledgment.

ParameterTypeRequiredDescription
paramsCalendarFilterOptionsNoOptional filter options

Returns: Promise<CalendarEvent[]> — A promise that resolves to an array of triggered CalendarEvent objects

Full reference →


getUpcoming

client.calendar.getUpcoming(params?: CalendarFilterOptions): Promise<CalendarEvent[]>

Retrieves upcoming calendar events.

Returns events scheduled in the near future, sorted chronologically. Useful for displaying "what's next" views.

ParameterTypeRequiredDescription
paramsCalendarFilterOptionsNoOptional filter options to customize the results

Returns: Promise<CalendarEvent[]> — A promise that resolves to an array of upcoming CalendarEvent objects

Full reference →


listEvents

client.calendar.listEvents(params?: CalendarFilterOptions): Promise<CalendarEventSummary[]>

Retrieves all calendar events as summaries.

Returns lightweight summary representations of all events, suitable for calendar overview displays.

ParameterTypeRequiredDescription
paramsCalendarFilterOptionsNoOptional filter options for narrowing results

Returns: Promise<CalendarEventSummary[]> — A promise that resolves to an array of CalendarEventSummary objects

Full reference →


rsvp

client.calendar.rsvp(id: string, data: CalendarRSVPRequest): Promise<void>

Sends an RSVP response to a calendar event.

Records a participant's attendance response (accept, decline, tentative) for the specified event.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the calendar event
dataCalendarRSVPRequestYesThe RSVP payload

Returns: Promise<void> — A promise that resolves when the RSVP has been recorded

Full reference →


updateEvent

client.calendar.updateEvent(id: string, data: UpdateCalendarEventRequest): Promise<CalendarEvent>

Updates a calendar event.

Modifies the properties of an existing calendar event such as its title, time, or configuration.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the event to update
dataUpdateCalendarEventRequestYesThe fields to update on the event

Returns: Promise<CalendarEvent> — A promise that resolves to the updated CalendarEvent

Full reference →