@ovok/core 0.4.14 → 0.4.16

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 CHANGED
@@ -41,13 +41,21 @@ const client = new OvokClient({
41
41
  });
42
42
  ```
43
43
 
44
- `baseUrl` is the Ovok API origin. `fhirUrlPath` selects the FHIR version path for
45
- the inherited Medplum client; `apiUrl` is not a supported client option.
44
+ `baseUrl` is the Ovok API origin. `fhirUrlPath` selects the FHIR version path
45
+ used by the client; `apiUrl` is not a supported client option.
46
46
 
47
47
  ## Documentation
48
48
 
49
49
  Full documentation and examples available at **[sdk.ovok.com](https://sdk.ovok.com/)**
50
50
 
51
+ SDK-specific guides are maintained in [`/docs`](./docs/index.mdx) and are written to complement the platform documentation at [docs.ovok.com](https://docs.ovok.com/). The Docusaurus-compatible navigation is in [`docs/sidebars.cjs`](./docs/sidebars.cjs); the package repository does not bundle a docs-site runtime.
52
+
53
+ ### Publish the SDK docs into Ovok Docs
54
+
55
+ The [sync workflow](./.github/workflows/sync-core-docs.yml) mirrors these pages into `Actimi/ovok-docs` under `docs/production/web-sdk` and updates its production sidebar after changes reach this repository's `main` branch. It pushes a bot commit to the docs repository's `dev` branch.
56
+
57
+ The workflow requires a dedicated write-enabled deploy key for `Actimi/ovok-docs`: register its public key on that repository with write access, then save the private key in this repository's Actions secrets as `OVOK_DOCS_DEPLOY_KEY`. This key is separate from `DEPLOY_KEY`, which only authenticates this SDK repository.
58
+
51
59
  ## Backend capability discovery
52
60
 
53
61
  `@ovok/core` can read the capability statement composed by `../ovok-core` and expose the
@@ -102,7 +110,7 @@ The server can return `INVALID_SETTING_VALUE` (422), `APP_URL_NOT_ALLOWED`
102
110
  (400), or `UNKNOWN_SETTING` (400; the response lists accepted keys). A code-less
103
111
  409 means settings changed and the screen should reload before retrying. A 403
104
112
  means the caller is not a project admin. `readOvokError(error)` reads the status,
105
- code, user-facing message, and validation field errors from a Medplum error.
113
+ code, user-facing message, and validation field errors from an API error.
106
114
  `IOT_ENABLED` is not a supported project setting.
107
115
 
108
116
  The email-template catalog is available to authenticated project practitioners:
@@ -281,7 +289,7 @@ worklist with `acknowledged: false` rather than `status: "ACTIVE"`. Acknowledgin
281
289
  alert, and the next breaching reading opens a new one. It is idempotent: an acknowledged alert keeps
282
290
  its first `acknowledgedAt` and `acknowledgedActor`.
283
291
 
284
- Filters: `status`, `acknowledged`, `patientId` (a Medplum Patient id), `codes` (LOINC codes), and
292
+ Filters: `status`, `acknowledged`, `patientId` (a FHIR Patient id), `codes` (LOINC codes), and
285
293
  `since` (inclusive) and `until` (exclusive) on `createdAt`, as date-times with `Z` or an offset.
286
294
  Pages hold at most 50 alerts. As with episodes, a page can be short or empty and still have a
287
295
  `nextCursor`, because alerts of residents the caller can't read are left out; page until
@@ -323,7 +331,7 @@ and any missing-baseline details. In particular, reload the affected record befo
323
331
  do not automatically replay a stale assignment. A 409 `signals_project_migrating` should be shown
324
332
  as a temporary home-migration conflict, not retried in a loop. Threshold writes can return 422
325
333
  validation errors or 424 when the baseline has not been collected. Hooks never replay a write with
326
- a stale body; transient 503 transport retries, when enabled by Medplum, do not clear the session.
334
+ a stale body; transient 503 transport retries do not clear the session.
327
335
  The unconfirmed-limit list and repush routes require project-admin access; a 403 remains an error.
328
336
 
329
337
  `getLegalConsent()` returns the signed-in practitioner's own terms status. If
@@ -420,9 +428,9 @@ The backend allows three kinds of read:
420
428
  Signed out, a read rejects with `SignInRequiredError` (`isSignInRequiredError(error)`) before
421
429
  any request is sent, unless it passes `allowSignedOut: true` and a `tenantCode`. `getLegalPage`,
422
430
  `getTranslations` and their hooks turn `allowSignedOut` on by default; pass it yourself only for
423
- another collection the backend serves without a key or session. This matters because
424
- `MedplumClient` answers any 401 by clearing its storage and calling `onUnauthenticated`. A hook
425
- that rendered before sign-in needs `reload()` once the session exists.
431
+ another collection the backend serves without a key or session. A request that returns 401 can
432
+ clear the session storage and call `onUnauthenticated`. A hook that rendered before sign-in needs
433
+ `reload()` once the session exists.
426
434
 
427
435
  `locale` takes an app language or a CMS locale (`en`, `de`, `fr`, `es`). `toCmsLocale` maps
428
436
  `de-CH` to `de`, and a language the CMS does not carry to `en`. The hooks default to the
@@ -451,13 +459,13 @@ SDK version.
451
459
 
452
460
  ## Offline measurements
453
461
 
454
- Pass a durable Medplum storage adapter and opt in to queue measurements while offline:
462
+ Pass a durable client storage adapter and opt in to queue measurements while offline:
455
463
 
456
464
  ```typescript
457
465
  const client = new OvokClient({
458
466
  storage,
459
467
  offlineQueue: { enabled: true },
460
- // other Medplum configuration
468
+ // other Ovok client configuration
461
469
  });
462
470
 
463
471
  const result = await client.saveMeasurement({
@@ -497,8 +505,8 @@ const sessions = await client.getSessions();
497
505
  await client.revokeSessions("other");
498
506
  ```
499
507
 
500
- Pass `onUnauthenticated` in the normal Medplum client options to react when a request can no
501
- longer refresh its session.
508
+ Pass `onUnauthenticated` in the client options to react when a request can no longer refresh its
509
+ session.
502
510
 
503
511
  ## Multi-factor authentication
504
512
 
@@ -667,7 +675,7 @@ Render accept failures without attempting to distinguish private cases:
667
675
 
668
676
  ## Large measurements
669
677
 
670
- `saveMeasurement` and `saveObservations` use conditional creates for idempotent saves. Medplum
678
+ `saveMeasurement` and `saveObservations` use conditional creates for idempotent saves. The API
671
679
  limits a serializable transaction with conditional operations to eight entries, so the SDK keeps
672
680
  the first observation in a transaction and sends additional observations in a FHIR batch request.
673
681
  This supports measurements such as urine strips and long ECG recordings without changing retry
@@ -676,5 +684,5 @@ behavior. The first observation should remain first when supplying observations
676
684
  The offline queue applies the same split when it flushes a measurement. A partial retry is safe:
677
685
  the first conditional create finds the existing observation and the batch only creates missing
678
686
  members. Applications building their own bundles can use the exported
679
- `MAX_CONDITIONAL_OBSERVATION_ENTRIES` limit. See [FHIR batch requests](https://www.medplum.com/docs/fhir-datastore/fhir-batch-requests)
680
- for the transaction and batch semantics.
687
+ `MAX_CONDITIONAL_OBSERVATION_ENTRIES` limit. See the [Ovok FHIR documentation](https://docs.ovok.com/api/fhir/r4)
688
+ for the transaction and batch semantics supported by the API.
@@ -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.4.14",
51
+ version: "0.4.16",
52
52
  },
53
53
  fhirVersion: "4.0.1",
54
54
  format: ["json"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.4.14",
3
+ "version": "0.4.16",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",