Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Employees

Index

Methods

  • Find the details of an employee by ID

    Parameters

    • id: number

      Employee ID

    • query: any = {}

    Returns Promise<EmployeeDetail>

    • 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()

    // 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<Employee[]>

    • Response with array of employees in the response body
  • Update an existing employee data

    Parameters

    • id: number

      Employee ID

    • employee: Employee

      Employee to update

    Returns Promise<Employee>

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

Generated using TypeDoc