Interfazhost
CalendarService
Calendario del usuario (CALENDAR_READ / CALENDAR_WRITE).
Firma
export interface CalendarService {
listCalendars(): Promise<any>;
listEvents(args: { from: string; to: string; limit?: number; calendarId?: string; }): Promise<any>;
getEvent(args: { eventId: string; }): Promise<any>;
findFreeSlots(args: { from: string; to: string; durationMinutes: number; limit?: number; timeZone?: string; workdayStart?: string; workdayEnd?: string; stepMinutes?: number; calendarId?: string; }): Promise<any>;
createEvent(args: { title: string; startsAt: string; endsAt: string; calendarId?: string; description?: string; location?: string; allDay?: boolean; attendees?: CalendarAttendee[]; }): Promise<any>;
updateEvent(args: { eventId: string; title?: string; description?: string; location?: string; startsAt?: string; endsAt?: string; allDay?: boolean; }): Promise<any>;
deleteEvent(args: { eventId: string; }): Promise<any>;
addInvite(args: { eventId: string; attendees: CalendarAttendee[]; }): Promise<any>;
respondInvite(args: { eventId: string; response: "accepted" | "tentative" | "declined"; }): Promise<any>;
}Miembros (9)
| Nombre | Tipo | Descripción |
|---|---|---|
| listCalendars | listCalendars(): Promise<any> | CALENDAR_READ |
| listEvents | listEvents(args: { from: string; to: string; limit?: number; calendarId?: string; }): Promise<any> | CALENDAR_READ. Rango maximo 92 dias; ISO 8601. limit 1..200 (def. 50). |
| getEvent | getEvent(args: { eventId: string; }): Promise<any> | CALENDAR_READ |
| findFreeSlots | findFreeSlots(args: { from: string; to: string; durationMinutes: number; limit?: number; timeZone?: string; workdayStart?: string; workdayEnd?: string; stepMinutes?: number; calendarId?: string; }): Promise<any> | CALENDAR_READ. Rango maximo 31 dias; durationMinutes 5..480; HH:MM en workdayStart/End (def. 09:00-18:00); timeZone IANA (def. UTC). |
| createEvent | createEvent(args: { title: string; startsAt: string; endsAt: string; calendarId?: string; description?: string; location?: string; allDay?: boolean; attendees?: CalendarAttendee[]; }): Promise<any> | CALENDAR_WRITE |
| updateEvent | updateEvent(args: { eventId: string; title?: string; description?: string; location?: string; startsAt?: string; endsAt?: string; allDay?: boolean; }): Promise<any> | CALENDAR_WRITE. Al menos un campo ademas de eventId. |
| deleteEvent | deleteEvent(args: { eventId: string; }): Promise<any> | CALENDAR_WRITE |
| addInvite | addInvite(args: { eventId: string; attendees: CalendarAttendee[]; }): Promise<any> | CALENDAR_WRITE. 1..20 asistentes. |
| respondInvite | respondInvite(args: { eventId: string; response: "accepted" | "tentative" | "declined"; }): Promise<any> | CALENDAR_WRITE |
Ejemplos
const slots = await ctx.services.calendar.findFreeSlots({ from: "2026-10-01T00:00:00Z", to: "2026-10-03T00:00:00Z", durationMinutes: 30, timeZone: "Europe/Madrid" });Usado en / Referenciado por
Referencia a
Fuente: bloomx-extensions/_shared/sdk/ctx.d.ts:379 · ctx.d.ts