Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Employees

Index

Methods

  • createField(field: EmployeeFieldCreate): Promise<any>
  • Create a custom field in employee form

    Parameters

    • field: EmployeeFieldCreate

      Request body

    Returns Promise<any>

  • fields(): Promise<any>
  • List all employee fields in employee form

    Returns Promise<any>

    • Response with list of employee fields
  • get(id: number, query?: any): Promise<any>
  • Find the details of an employee by ID

    Parameters

    • id: number

      Employee ID

    • query: any = {}

    Returns Promise<any>

    • Response with an employee object in the response body, if found
  • List all employees

    // Get the first page of list of employees with default sort order
    const empList = await ft.employees.list().json();

    // Set sort key and sort type and paginate
    // Get list of employees sorted by first_name in ascending order
    const page1 = await ft.employees.list({
    sort: "first_name",
    sort_type: "asc",
    page: 1
    });

    // Get page 2 of the same query as above
    const page2 = await ft.employees.list({
    sort: "first_name",
    sort_type: "asc",
    page: 2
    });

    Parameters

    Returns Promise<any>

    • Response with array of employees in the response body
  • update(id: number, employee: Employee): Promise<any>
  • Update an existing employee data

    Parameters

    • id: number

      Employee ID

    • employee: Employee

      Employee to update

    Returns Promise<any>

    • Response with updated employee object in the response body, if found

Generated using TypeDoc