@healthcloudai/hc-settings-connector
v0.0.2
Published
Healthcheck Settings SDK with TypeScript
Maintainers
Readme
Healthcheck Settings Connector
This library provides a client for accessing user settings and profile-related data
from the Healthcheck API.
It is built on top of the shared Healthcheck HTTP and Login connectors.
Features
- Retrieve authenticated user information
- Centralized access to user profile and settings data
- Built on shared Healthcheck HttpClient and authentication layer
Installation
npm install @healthcloudai/hc-settings-connector \
@healthcloudai/hc-login-connector \
@healthcloudai/hc-httpImport
import { HCSettingsClient } from "@healthcloudai/hc-settings-connector";
import { HCLoginClient } from "@healthcloudai/hc-login-connector";
import { HttpClient } from "@healthcloudai/hc-http";Usage
Configuration
const httpClient = new HttpClient();
const authClient = new HCLoginClient(/* auth configuration */);
const settingsClient = new HCSettingsClient(
httpClient,
authClient
);Methods
Get User Info
Retrieves information about the authenticated user, including profile and settings data.
await settingsClient.getUserInfo();Generates a pre-signed upload URL for uploading a user profile image.
const image = await settingsClient.uploadUserImage({
extension: "jpg"
});How It Works
HCLoginClient
- Handles authentication
- Resolves base API URL
- Provides authorization headers
HttpClient
- Performs all HTTP requests
HCSettingsClient
- Exposes user settings and profile-related endpoints
