import { ApiResponse , RequestOptions } from '../core' ; import { ListEmployeesResponse , listEmployeesResponseSchema , } from '../models/listEmployeesResponse' ; import { RetrieveEmployeeResponse , retrieveEmployeeResponseSchema , } from '../models/retrieveEmployeeResponse' ; import { number , optional , string } from '../schema' ; import { BaseApi } from './baseApi' ; export class EmployeesApi extends BaseApi { param locationId param status param limit param cursor return deprecated async listEmployees ( locationId ? , status ? , limit ? , cursor ? , requestOptions ? ) { const req = this . createRequest ( 'GET' , '/v2/employees' ) ; const mapped = req . prepareArgs ( { locationId : [ locationId , optional ( string ( ) ) ] , status : [ status , optional ( string ( ) ) ] , limit : [ limit , optional ( number ( ) ) ] , cursor : [ cursor , optional ( string ( ) ) ] , } ) ; req . query ( 'location_id' , mapped . locationId ) ; req . query ( 'status' , mapped . status ) ; req . query ( 'limit' , mapped . limit ) ; req . query ( 'cursor' , mapped . cursor ) ; req . deprecated ( 'EmployeesApi.listEmployees' ) ; return req . callAsJson ( listEmployeesResponseSchema , requestOptions ) ; } param id return deprecated async retrieveEmployee ( id , requestOptions ? ) { const req = this . createRequest ( 'GET' ) ; const mapped = req . prepareArgs ( { id : [ id , string ( ) ] } ) ; req . appendTemplatePath `/v2/employees/${ mapped . id }` ; req . deprecated ( 'EmployeesApi.retrieveEmployee' ) ; return req . callAsJson ( retrieveEmployeeResponseSchema , requestOptions ) ; } }