const employeesApi = client.employeesApi;
EmployeesApi
This endpoint is deprecated.
ListEmployees
async listEmployees(
locationId?: string,
status?: string,
limit?: number,
cursor?: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<ListEmployeesResponse>>
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. |
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;
}
}
This endpoint is deprecated.
RetrieveEmployee
async retrieveEmployee(
id: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<RetrieveEmployeeResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
id |
string |
Template, Required | UUID for the employee that was requested. |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
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;
}
}