gohl
Version:
Go Highlevel Node Js ease of use library implementation to their API
84 lines (83 loc) • 2.96 kB
TypeScript
import { AuthData } from "../interfaces/auth/authdata";
import { ICalendar } from "../interfaces/calendar";
import { CalendarAppointmentNote } from "./calendars.appointmentsnotes";
import { CalendarEvent } from "./calendars.events";
import { CalendarGroup } from "./calendars.groups";
import { CalendarNotification } from "./calendars.notifcations";
import { CalendarResource } from "./calendars.resources";
export declare class Calendar {
private authData?;
appointmentnotes: CalendarAppointmentNote;
events: CalendarEvent;
groups: CalendarGroup;
notifications: CalendarNotification;
resources: CalendarResource;
/**
* Endpoints For Calendars
* https://highlevel.stoplight.io/docs/integrations/db572d519b209-get-all-tasks
*/
constructor(authData?: AuthData);
/**
*
* Documentation - https://highlevel.stoplight.io/docs/integrations/e55dec1be7bee-get-calendars
* @param locationId
*/
getAll(locationId: string, showDrafted?: boolean): Promise<ICalendar[]>;
/**
* Get Calendar by calendar id
* Documentation - https://highlevel.stoplight.io/docs/integrations/946f5e91e2532-get-calendar
* @param calendarId
* @returns
*/
get(calendarId: string): Promise<ICalendar>;
/**
* Get Calendar Free Slots by calendar id
* Documentation - https://highlevel.stoplight.io/docs/integrations/7f694ee8bd969-get-free-slots
* @param calendarId
* @returns
*/
getFreeslots(calendarId: string, startDate: number, endDate: number, timezone?: string, userId?: string): Promise<ICalendar>;
/**
* Create Calendar
* Documentation - https://highlevel.stoplight.io/docs/integrations/db6affea7570b-create-calendar
* @param calendar
* @returns
*/
add(calendar: ICalendar): Promise<ICalendar>;
/**
* Create Block Slot
* Documentation - https://highlevel.stoplight.io/docs/integrations/5a52896a68879-create-block-slot
* @param locationId
* @param startTime
* @param endTime
* @param extra
* @returns
*/
createBlockSlot(locationId: String, startTime: string, endTime: string, extra?: {
calendarId?: string;
title?: string;
assignedUserId?: string;
}): Promise<{
locationId: String;
startTime: string;
endTime: string;
calendarId?: string;
title?: string;
assignedUserId?: string;
}>;
/**
* Update Calendar
* Documentation - https://highlevel.stoplight.io/docs/integrations/cf683b1696d31-update-calendar
* @param calendarId
* @param calendar
* @returns
*/
update(calendarId: string, calendar: ICalendar): Promise<ICalendar>;
/**
* Delete Calendar
* Documentation - https://highlevel.stoplight.io/docs/integrations/57177f7074647-delete-calendar
* @param calendarId
* @returns
*/
remove(calendarId: string): Promise<boolean>;
}