@ovok/core 0.3.24 → 0.4.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 +29 -0
- package/dist/client/auth/methods/register.d.ts +2 -2
- package/dist/client/auth/methods/register.js +3 -0
- package/dist/client/auth/types/RegisterBody.d.ts +1 -0
- package/dist/client/auth/types/RegisterResponse.d.ts +5 -0
- package/dist/client/auth/types/RegisterResponse.js +2 -0
- package/dist/client/platform/types.d.ts +1 -1
- package/dist/client/platform/types.js +1 -0
- package/dist/conformance/capability-requirements.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -282,6 +282,35 @@ if ("nextStep" in result && result.nextStep === "mfa") {
|
|
|
282
282
|
}
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
+
## Patient registration invitations
|
|
286
|
+
|
|
287
|
+
When a project invites people with a business email address to join as clinicians,
|
|
288
|
+
`register()` can return a clinician-invite step instead of an authenticated session. Check
|
|
289
|
+
`nextStep` before reading tokens or setting the active login:
|
|
290
|
+
|
|
291
|
+
```typescript
|
|
292
|
+
const result = await client.register(registerBody);
|
|
293
|
+
|
|
294
|
+
if ("nextStep" in result && result.nextStep === "clinician-invite") {
|
|
295
|
+
showCheckYourEmailMessage();
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
await client.setActiveLogin(result);
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
The invitation email's “continue as patient” link includes a
|
|
303
|
+
`continueAsPatientToken` query parameter. The host app owns its deep-link and universal-link
|
|
304
|
+
configuration: read that parameter from the incoming URL and pass it to `register()` to finish
|
|
305
|
+
registration as a patient:
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
await client.register({ ...registerBody, continueAsPatientToken });
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
The token is optional and is sent only when provided. An invalid or expired token is rejected
|
|
312
|
+
with HTTP 400 and the message “The continue-as-patient link is invalid or has expired.”
|
|
313
|
+
|
|
285
314
|
## Large measurements
|
|
286
315
|
|
|
287
316
|
`saveMeasurement` and `saveObservations` use conditional creates for idempotent saves. Medplum
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { OvokClient } from "../../ovok-client";
|
|
2
|
-
import { AuthResponse } from "../types/AuthResponse";
|
|
3
2
|
import { RegisterBody } from "../types/RegisterBody";
|
|
4
|
-
|
|
3
|
+
import { RegisterResponse } from "../types/RegisterResponse";
|
|
4
|
+
export declare function register(this: OvokClient, body: RegisterBody): Promise<RegisterResponse>;
|
|
@@ -11,5 +11,8 @@ async function register(body) {
|
|
|
11
11
|
name: body.name,
|
|
12
12
|
surname: body.surname,
|
|
13
13
|
tenantCode: body.tenantCode,
|
|
14
|
+
...(body.continueAsPatientToken !== undefined
|
|
15
|
+
? { continueAsPatientToken: body.continueAsPatientToken }
|
|
16
|
+
: {}),
|
|
14
17
|
}, "application/json");
|
|
15
18
|
}
|
|
@@ -68,7 +68,7 @@ export type OvokProjectFeatures = {
|
|
|
68
68
|
export type OvokProjectFeaturesUpdate = {
|
|
69
69
|
features: OvokProjectFeature[];
|
|
70
70
|
};
|
|
71
|
-
export declare const OVOK_PROJECT_SETTING_KEYS: readonly ["CONTENT_ENABLED", "MAILING_ENABLED", "PATIENT_INVITATION_ENABLED", "PATIENT_REGISTRATION_ENABLED", "PATIENT_LOGIN_ENABLED", "PRACTITIONER_INVITATION_ENABLED", "PRACTITIONER_REGISTRATION_ENABLED", "PRACTITIONER_LOGIN_ENABLED", "IOT_ENABLED"];
|
|
71
|
+
export declare const OVOK_PROJECT_SETTING_KEYS: readonly ["CONTENT_ENABLED", "MAILING_ENABLED", "PATIENT_INVITATION_ENABLED", "PATIENT_REGISTRATION_ENABLED", "PATIENT_LOGIN_ENABLED", "PRACTITIONER_INVITATION_ENABLED", "PRACTITIONER_REGISTRATION_ENABLED", "PRACTITIONER_LOGIN_ENABLED", "IOT_ENABLED", "CLINICIAN_INVITE_ON_BUSINESS_EMAIL"];
|
|
72
72
|
export type OvokProjectSettingKey = (typeof OVOK_PROJECT_SETTING_KEYS)[number];
|
|
73
73
|
export type OvokProjectSettings = {
|
|
74
74
|
projectId: string;
|
|
@@ -48,7 +48,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
|
|
|
48
48
|
description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
|
|
49
49
|
software: {
|
|
50
50
|
name: "@ovok/core",
|
|
51
|
-
version: "0.
|
|
51
|
+
version: "0.4.0",
|
|
52
52
|
},
|
|
53
53
|
fhirVersion: "4.0.1",
|
|
54
54
|
format: ["json"],
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "../client/auth/types/AuthResponse";
|
|
|
2
2
|
export * from "../client/auth/types/LoginResponse";
|
|
3
3
|
export * from "../client/auth/types/LoginBody";
|
|
4
4
|
export * from "../client/auth/types/RegisterBody";
|
|
5
|
+
export * from "../client/auth/types/RegisterResponse";
|
|
5
6
|
export * from "../client/auth/types/ChangePasswordBody";
|
|
6
7
|
export * from "../client/auth/types/ChangePasswordResponse";
|
|
7
8
|
export * from "../client/auth/types/RequestDeleteUserBody";
|
package/dist/types/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("../client/auth/types/AuthResponse"), exports);
|
|
|
19
19
|
__exportStar(require("../client/auth/types/LoginResponse"), exports);
|
|
20
20
|
__exportStar(require("../client/auth/types/LoginBody"), exports);
|
|
21
21
|
__exportStar(require("../client/auth/types/RegisterBody"), exports);
|
|
22
|
+
__exportStar(require("../client/auth/types/RegisterResponse"), exports);
|
|
22
23
|
__exportStar(require("../client/auth/types/ChangePasswordBody"), exports);
|
|
23
24
|
__exportStar(require("../client/auth/types/ChangePasswordResponse"), exports);
|
|
24
25
|
__exportStar(require("../client/auth/types/RequestDeleteUserBody"), exports);
|