emuhealth 0.2.0 → 0.3.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 CHANGED
@@ -37,6 +37,8 @@ All services listen on IPv4 loopback (`127.0.0.1`) by default. No config file ne
37
37
 
38
38
  Health and life science services use a fixed range starting at `http://localhost:4100`. Each health service keeps its port no matter which other services run or how many upstream services exist.
39
39
 
40
+ - **FHIR R4** on `http://localhost:4100` (create, read, update, JSON Patch, delete, versioning, `_history`, search, batch and transaction Bundles, and a CapabilityStatement at `/metadata`; SMART on FHIR is on the roadmap)
41
+
40
42
  Stripe webhooks configured with a secret include a `Stripe-Signature` header signed over the timestamp and raw request body.
41
43
 
42
44
  Slack event callbacks use `X-Slack-Request-Timestamp` and `X-Slack-Signature` when `slack.signing_secret` is configured. The signature is an HMAC-SHA256 over `v0:<timestamp>:<raw-body>`; configure the receiver with the same secret and verify against the unparsed request body. Existing event subscriptions remain unsigned when the secret is absent or empty.
package/dist/api.d.ts CHANGED
@@ -249,7 +249,7 @@ declare function defineConfig<Definitions extends Record<string, EmulatorDefinit
249
249
  tokens?: EmulateConfig["tokens"];
250
250
  }): typeof config;
251
251
 
252
- declare const HEALTH_SERVICE_NAME_LIST: readonly [];
252
+ declare const HEALTH_SERVICE_NAME_LIST: readonly ["fhir"];
253
253
  type HealthServiceName = (typeof HEALTH_SERVICE_NAME_LIST)[number];
254
254
 
255
255
  declare const SERVICE_NAME_LIST: readonly ["vercel", "github", "google", "slack", "apple", "microsoft", "okta", "aws", "resend", "stripe", "mongoatlas", "clerk", "linear", "twilio"];
package/dist/api.js CHANGED
@@ -1940,9 +1940,34 @@ function defineConfig(config) {
1940
1940
  }
1941
1941
 
1942
1942
  // src/registry-health.ts
1943
- var HEALTH_SERVICE_NAME_LIST = [];
1943
+ var HEALTH_SERVICE_NAME_LIST = ["fhir"];
1944
1944
  var HEALTH_SERVICE_NAMES = HEALTH_SERVICE_NAME_LIST;
1945
- var HEALTH_SERVICE_REGISTRY = {};
1945
+ var HEALTH_SERVICE_REGISTRY = {
1946
+ fhir: {
1947
+ label: "FHIR R4 server emulator",
1948
+ endpoints: "create, read, vread, update (including create on update), JSON Patch, logical delete, _history, search with includes and chaining, batch and transaction Bundles, CapabilityStatement at /metadata, ETag and If-Match",
1949
+ async load() {
1950
+ const mod = await import("./dist-WLTGCLZF.js");
1951
+ return { plugin: mod.fhirPlugin, seedFromConfig: mod.seedFromConfig };
1952
+ },
1953
+ defaultFallback() {
1954
+ return { login: "fhir-user", id: 1, scopes: [] };
1955
+ },
1956
+ initConfig: {
1957
+ fhir: {
1958
+ resources: [
1959
+ {
1960
+ resourceType: "Patient",
1961
+ id: "synthetic-patient-1",
1962
+ name: [{ family: "Example", given: ["Jamie"] }],
1963
+ gender: "female",
1964
+ birthDate: "1980-01-01"
1965
+ }
1966
+ ]
1967
+ }
1968
+ }
1969
+ }
1970
+ };
1946
1971
  var HEALTH_PORT_OFFSET = 100;
1947
1972
  function defaultServicePort(service, basePort, index, healthNames = HEALTH_SERVICE_NAMES) {
1948
1973
  const healthIndex = healthNames.indexOf(service);