@healthcloudai/hc-appointments-connector
v0.0.2
Published
Healthcheck Appointments SDK with TypeScript
Maintainers
Readme
Healthcheck Appointments Connector
This library provides a client for interacting with Healthcheck appointment and scheduling APIs. It is built on top of the shared Healthcheck HTTP and Login connectors and can be used from TypeScript or JavaScript.
Features
- Appointment scheduling
- Available time slots retrieval
- User visits
- Appointment creation
- Built on shared HttpClient and authentication layer
Installation
npm install @healthcloudai/hc-appointments-connector \
@healthcloudai/hc-login-connector \
@healthcloudai/hc-http
Import
import { HCAppointmentsClient } from "@healthcloudai/hc-appointments-connector";
import { HCLoginClient } from "@healthcloudai/hc-login-connector";
import { HttpClient } from "@healthcloudai/hc-http";
Usage
Configuration
import { HCAppointmentsClient } from "@healthcloudai/hc-appointments-connector";
import { HCLoginClient } from "@healthcloudai/hc-login-connector";
import { HttpClient } from "@healthcloudai/hc-http";
const httpClient = new HttpClient();
const authClient = new HCLoginClient(/* auth configuration */);
const appointmentsClient = new HCAppointmentsClient(
httpClient,
authClient
);
Get Available Slots
await appointmentsClient.getAvailableSlots();
Get User Visits
await appointmentsClient.getUserVisits("health-service-id");
Create Appointment
await appointmentsClient.createAppointment({
slotId: "slot-id",
providerId: "provider-id",
appointmentTypeId: "appointment-type-is",
date: "date",
startDateTime: "2025-12-22T01:00:00.000Z",
endDateTime: "2025-12-23T01:00:00.000Z",
timeZone: "time-zone",
durationMinutes: 1440,
rawSlot: {
id: "slot-id",
time: "10:00 - 10:15",
appointmenttypeid: "appointment-type-id",
providerid: "provider-id"
}
});
How It Works
- HCLoginClient handles authentication and authorization headers
- HttpClient is responsible for all HTTP communication
- HCAppointmentsClient combines both clients to provide appointment-related API calls
- Base URL and auth headers are resolved internally via the login connector
