@healthcloudai/hc-sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +0 -3
- package/dist/index.js +0 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ const patient = await sdk.patient.getProfile("patient-id");
|
|
|
89
89
|
```ts
|
|
90
90
|
const sdk = new HCSDK({
|
|
91
91
|
environment: "dev", // required
|
|
92
|
-
tenantId: "eclinicapi", // optional — injected
|
|
92
|
+
tenantId: "eclinicapi", // optional — injected into /auth/* request bodies only; never sent as a header
|
|
93
93
|
accessToken: "existing-token", // optional — skip login if you already have a token
|
|
94
94
|
});
|
|
95
95
|
```
|
|
@@ -150,7 +150,7 @@ All groups share one HTTP client, one token store, one error handler, the same U
|
|
|
150
150
|
await sdk.auth.register({
|
|
151
151
|
email: "patient@example.com",
|
|
152
152
|
password: "SecurePassword123!",
|
|
153
|
-
tenant_id
|
|
153
|
+
// no tenant_id here — the SDK injects it from the `tenantId` passed to the HCSDK constructor
|
|
154
154
|
first_name: "Jane",
|
|
155
155
|
last_name: "Doe",
|
|
156
156
|
date_of_birth: "1990-06-15",
|
package/dist/index.cjs
CHANGED
|
@@ -118,9 +118,6 @@ var HttpClient = class {
|
|
|
118
118
|
Accept: "application/json",
|
|
119
119
|
...(_a = options.headers) != null ? _a : {}
|
|
120
120
|
};
|
|
121
|
-
if (this.state.tenantId) {
|
|
122
|
-
headers["X-Tenant-ID"] = this.state.tenantId;
|
|
123
|
-
}
|
|
124
121
|
if (options.auth !== false) {
|
|
125
122
|
if (!this.state.accessToken) {
|
|
126
123
|
throw new SDKError({
|
package/dist/index.js
CHANGED
|
@@ -83,9 +83,6 @@ var HttpClient = class {
|
|
|
83
83
|
Accept: "application/json",
|
|
84
84
|
...(_a = options.headers) != null ? _a : {}
|
|
85
85
|
};
|
|
86
|
-
if (this.state.tenantId) {
|
|
87
|
-
headers["X-Tenant-ID"] = this.state.tenantId;
|
|
88
|
-
}
|
|
89
86
|
if (options.auth !== false) {
|
|
90
87
|
if (!this.state.accessToken) {
|
|
91
88
|
throw new SDKError({
|