Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BambooHRClient

Hierarchy

  • BambooHRClient

Index

Constructors

constructor

  • new BambooHRClient(apiKey: string, apiSecret: string): BambooHRClient

Properties

Private apiKey

apiKey: string

Private apiSecret

apiSecret: string

Private authHeader

authHeader: string = ""

Private baseUrl

baseUrl: string = "https://api.bamboohr.com/api/gateway.php/firstfactory"

Methods

endPoint

  • endPoint(path: string): string
  • Parameters

    • path: string

    Returns string

getCompanyHolidays

  • getCompanyHolidays(startDate: string, endDate: string): Promise<string[]>

getCompanyTimeOff

  • getCompanyTimeOff(startDate: string, endDate: string): Promise<TimeOffRequest[]>
  • Get a list of the company's time off requests. The request ids are hardcoded, to include holidays, holiday swap, vacations and sick days.

    Parameters

    • startDate: string
    • endDate: string

    Returns Promise<TimeOffRequest[]>

getCompensation

getCompleteEmployeeDirectory

  • getCompleteEmployeeDirectory(): Promise<Employee[]>
  • Gets the company employee's directory, but also fetch project info for each employee. NOTE: due to restrictions on the api endpoint, this method schedules the API calls in groups of 15 request every 500ms.

    Returns Promise<Employee[]>

getDirectory

getEmployee

  • getEmployee(employeeId: number): Promise<Employee>

getEmployeeIndex

  • getEmployeeIndex(): Promise<any>
  • Builds the employees index. The index is an object containing the employee numbers (company assigned) as keys and their Record Id (object identifier in BambooHR) as values. This is useful to be able to query employees by their employee number.

    deprecated

    Should not call this method.

    Returns Promise<any>

getEmployeeInfo

  • getEmployeeInfo(employeeId: number): Promise<Employee>

getEmployeeTimeOff

  • getEmployeeTimeOff(employeeId: number, startDate: string, endDate: string): Promise<TimeOffRequest[]>

getEmployees

  • getEmployees(employeeIds: number[]): Promise<Employee[]>
  • Fetch a list of employees given their ids.

    Parameters

    • employeeIds: number[]

      list of employee ids.

    Returns Promise<Employee[]>

getPerformanceReviews

getProjectsInfo

getWhosOut

  • getWhosOut(startDate: string, endDate: string): Promise<TimeOff[]>

Private sendRequest

  • sendRequest(url: string, method: string, data: any): any
  • Parameters

    • url: string
    • method: string
    • data: any

    Returns any

Generated using TypeDoc