Skip to content

Latest commit

 

History

History
102 lines (74 loc) · 2.41 KB

employees.md

File metadata and controls

102 lines (74 loc) · 2.41 KB

Employees

const employeesApi = client.employeesApi;

Class Name

EmployeesApi

Methods

List Employees

This endpoint is deprecated.

ListEmployees

async listEmployees(
  locationId?: string,
  status?: string,
  limit?: number,
  cursor?: string,
  requestOptions?: RequestOptions
): Promise<ApiResponse<ListEmployeesResponse>>

Parameters

Parameter Type Tags Description
locationId string | undefined Query, Optional -
status string | undefined Query, Optional Specifies the EmployeeStatus to filter the employee by.
limit number | undefined Query, Optional The number of employees to be returned on each page.
cursor string | undefined Query, Optional The token required to retrieve the specified page of results.
requestOptions RequestOptions | undefined Optional Pass additional request options.

Response Type

ListEmployeesResponse

Example Usage

try {
  const { result, ...httpResponse } = await employeesApi.listEmployees();
  // Get more response info...
  // const { statusCode, headers } = httpResponse;
} catch(error) {
  if (error instanceof ApiError) {
    const errors = error.result;
    // const { statusCode, headers } = error;
  }
}

Retrieve Employee

This endpoint is deprecated.

RetrieveEmployee

async retrieveEmployee(
  id: string,
  requestOptions?: RequestOptions
): Promise<ApiResponse<RetrieveEmployeeResponse>>

Parameters

Parameter Type Tags Description
id string Template, Required UUID for the employee that was requested.
requestOptions RequestOptions | undefined Optional Pass additional request options.

Response Type

RetrieveEmployeeResponse

Example Usage

const id = 'id0';
try {
  const { result, ...httpResponse } = await employeesApi.retrieveEmployee(id);
  // Get more response info...
  // const { statusCode, headers } = httpResponse;
} catch(error) {
  if (error instanceof ApiError) {
    const errors = error.result;
    // const { statusCode, headers } = error;
  }
}