Hierarchy

  • WorkCalendars

Methods

create

  • Creates a new business calendar.

    Returns WorkCalendar

getById

  • Get business calendar by its ID.

    If the calendar cannot be found (for example, it has been deleted), the method returns undefined.

    Parameters

    • id: string

      Business calendar ID.

    Returns Promise<WorkCalendar | undefined>

getDefault

  • Returns the default business calendar, that is, the basic calendar of the company.

    Returns Promise<DefaultWorkCalendar>

getForUser

  • Get business calendar associated with the passed user.

    Parameters

    Returns Promise<WorkCalendar>

list

  • list(size?: undefined | number, from?: undefined | number): Promise<WorkCalendar[]>
  • Get a list of business calendars of the company.

    When working with a large number of calendarrs, you can get them in portions and set the start of the selection dynamically.

    Parameters

    • Optional size: undefined | number

      Number of calendars to get. The default value is 10.

    • Optional from: undefined | number

      Number of entries to skip. The default value is 0.

    Returns Promise<WorkCalendar[]>

setToUsers

  • Assign a business calendar to users.

    Parameters

    Returns Promise<void>