@starsched/sdk
Version:
ABA clinic control and management service API SDK
35 lines (34 loc) • 1.13 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Companyprofessionals = void 0;
class Companyprofessionals {
httpClient;
constructor(httpClient) {
this.httpClient = httpClient;
}
async list(input, options) {
const { company_id, ...inputQueryParams } = input;
const queryParams = {};
if (typeof inputQueryParams.limit === 'number') {
queryParams.limit = inputQueryParams.limit;
}
if (typeof inputQueryParams.offset === 'number') {
queryParams.offset = inputQueryParams.offset;
}
if (inputQueryParams.order_by) {
queryParams.order_by = inputQueryParams.order_by;
}
const response = await this.httpClient.get(`/v1/companies/${company_id}/professionals`, { queryParams, ...options });
if (!response.ok) {
return {
data: null,
error: response.body
};
}
return {
data: response.body,
error: null
};
}
}
exports.Companyprofessionals = Companyprofessionals;