@starsched/sdk
Version:
ABA clinic control and management service API SDK
29 lines (28 loc) • 892 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Appointments = void 0;
class Appointments {
httpClient;
constructor(httpClient) {
this.httpClient = httpClient;
}
async list(input, options) {
const { company_id, patient_id, ...inputQueryParams } = input;
const queryParams = {};
if (typeof inputQueryParams.month) {
queryParams.month = inputQueryParams.month.toJSON();
}
const response = await this.httpClient.get(`/v1/companies/${company_id}/patients/${patient_id}/appointments`, { queryParams, ...options });
if (!response.ok) {
return {
data: null,
error: response.body
};
}
return {
data: response.body,
error: null
};
}
}
exports.Appointments = Appointments;