@crvouga/mockingbird-service-medplum 1.0.0 → 1.0.2
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/CHANGELOG.md +14 -4
- package/dist/{chunk-JUSS65V7.js → chunk-DBGXYVBX.js} +5 -3
- package/dist/chunk-DBGXYVBX.js.map +7 -0
- package/dist/{chunk-VOCCUVES.js → chunk-REW7RCV4.js} +13 -4
- package/dist/chunk-REW7RCV4.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +104 -76
- package/dist/index.js +1 -1
- package/dist/server.d.ts +208 -152
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-JUSS65V7.js.map +0 -7
- package/dist/chunk-VOCCUVES.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-medplum
|
|
2
2
|
|
|
3
|
+
## 1.0.2 (2026-09-26)
|
|
4
|
+
|
|
5
|
+
### Fixes and improvements
|
|
6
|
+
|
|
7
|
+
- the Patient response contract admits what the server echoes in name slots ([7306cca](https://github.com/crvouga/mockingbird/commit/7306ccac2a9d6b4f45f0916827ed8287d76dbd98))
|
|
8
|
+
- treat enum [""] branches as unset markers in form coercion ([7177835](https://github.com/crvouga/mockingbird/commit/7177835cc510e14245d6648ad2821daa694bb80c))
|
|
9
|
+
|
|
10
|
+
## 1.0.1 (2026-09-25)
|
|
11
|
+
|
|
12
|
+
### Fixes and improvements
|
|
13
|
+
|
|
14
|
+
- take the rejected-request byte count from content-length, never by reading the body ([a0e5fb2](https://github.com/crvouga/mockingbird/commit/a0e5fb2fc80ab725c3552b612f3f091fd6c857fb))
|
|
15
|
+
- reject a present body by media type, and log what a rejected request sent ([12e351a](https://github.com/crvouga/mockingbird/commit/12e351aba53cfb7b41e31a7809419455fc2902eb))
|
|
16
|
+
|
|
3
17
|
## 1.0.0 (2026-09-24)
|
|
4
18
|
|
|
5
19
|
### ⚠️ Breaking changes
|
|
6
20
|
|
|
7
21
|
- vendor branding for every service; purge internal mocks and consumer names ([f689534](https://github.com/crvouga/mockingbird/commit/f6895343543550dafcb7d76b426cae7635e03226))
|
|
8
22
|
|
|
9
|
-
### Dependencies
|
|
10
|
-
|
|
11
|
-
- `@crvouga/mockingbird-service-sqlite`
|
|
12
|
-
|
|
13
23
|
## 0.4.1 (2026-09-23)
|
|
14
24
|
|
|
15
25
|
### Fixes and improvements
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-REW7RCV4.js";
|
|
4
4
|
|
|
5
5
|
// ../../adapters/node/dist/cli.js
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
@@ -208,7 +208,9 @@ var formatLog = (format) => {
|
|
|
208
208
|
const ns = entry.namespace === "default" ? "" : ` [${entry.namespace}]`;
|
|
209
209
|
const fault = entry.faultId ? ` fault=${entry.faultId}` : "";
|
|
210
210
|
const adopted = entry.adopted ? " adopted" : "";
|
|
211
|
-
|
|
211
|
+
const received = entry.request ? ` received=${entry.request.bodyBytes === null ? "?" : `${entry.request.bodyBytes}B`} ct=${entry.request.contentType ?? "-"}${entry.request.transferEncoding ? ` te=${entry.request.transferEncoding}` : ""}` : "";
|
|
212
|
+
const issues = entry.issues?.length ? ` issues=${entry.issues.slice(0, 3).map((issue) => `${issue.path || "$"}: ${issue.message}`).join("; ")}${entry.issues.length > 3 ? ` (+${entry.issues.length - 3})` : ""}` : "";
|
|
213
|
+
console.log(`${entry.service} ${entry.method} ${entry.path} ${entry.status} ${op} ${entry.durationMs}ms${ns}${fault}${adopted}${received}${issues}`);
|
|
212
214
|
};
|
|
213
215
|
};
|
|
214
216
|
var asString = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -386,4 +388,4 @@ export {
|
|
|
386
388
|
createServer2 as createServer,
|
|
387
389
|
serveTarget
|
|
388
390
|
};
|
|
389
|
-
//# sourceMappingURL=chunk-
|
|
391
|
+
//# sourceMappingURL=chunk-DBGXYVBX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../adapters/node/src/cli.ts", "../../../adapters/node/src/serve.ts", "../../../adapters/node/src/listen.ts", "../src/server.ts"],
|
|
4
|
+
"sourcesContent": ["import { readFile } from \"node:fs/promises\"\nimport { type ParseArgsConfig, parseArgs } from \"node:util\"\nimport type { RequestLog, ServiceInstance, ServiceRuntime } from \"@crvouga/mockingbird-service\"\nimport { type Listening, listen } from \"./listen.js\"\n\nexport type CliOption = {\n type: \"string\" | \"boolean\"\n description: string\n /** Shown in help; the value placeholder, e.g. `<port>`. */\n value?: string\n default?: string | boolean\n}\n\nexport type CliValues = Record<string, string | boolean | undefined>\n\nexport type CliCommand = {\n summary: string\n usage?: string\n options?: Record<string, CliOption>\n /** Resolves to an exit code; a server command resolves only when it stops. */\n run(values: CliValues, positionals: string[]): Promise<number>\n}\n\nexport type CliSpec = {\n bin: string\n description: string\n commands: Record<string, CliCommand>\n}\n\nconst optionHelp = (options: Record<string, CliOption>): string[] =>\n Object.entries(options).map(([name, option]) => {\n const flag = `--${name}${option.type === \"string\" ? ` ${option.value ?? \"<value>\"}` : \"\"}`\n const fallback = option.default !== undefined ? ` (default: ${String(option.default)})` : \"\"\n return ` ${flag.padEnd(30)} ${option.description}${fallback}`\n })\n\nconst help = (spec: CliSpec): string =>\n [\n `${spec.bin} \u2014 ${spec.description}`,\n \"\",\n \"Usage:\",\n ` ${spec.bin} <command> [options]`,\n \"\",\n \"Commands:\",\n ...Object.entries(spec.commands).map(([name, c]) => ` ${name.padEnd(30)} ${c.summary}`),\n \"\",\n `Run \\`${spec.bin} <command> --help\\` for a command's options.`,\n ].join(\"\\n\")\n\nconst commandHelp = (spec: CliSpec, name: string, command: CliCommand): string =>\n [\n `${spec.bin} ${name} \u2014 ${command.summary}`,\n \"\",\n \"Usage:\",\n ` ${command.usage ?? `${spec.bin} ${name} [options]`}`,\n ...(command.options ? [\"\", \"Options:\", ...optionHelp(command.options)] : []),\n ].join(\"\\n\")\n\n/** Parse `argv` against `spec` and run the chosen command. Resolves to an exit code. */\nexport const runCli = async (spec: CliSpec, argv: string[]): Promise<number> => {\n // Two-word commands (`corpus pull`) win over one-word ones.\n const pair = argv.length >= 2 ? `${argv[0]} ${argv[1]}` : undefined\n const words = pair !== undefined && spec.commands[pair] ? 2 : 1\n const name = words === 2 ? pair : argv[0]\n const rest = argv.slice(words)\n if (name === undefined || name === \"--help\" || name === \"-h\" || name === \"help\") {\n console.log(help(spec))\n return 0\n }\n const command = spec.commands[name]\n if (!command) {\n console.error(`${spec.bin}: unknown command ${JSON.stringify(name)}\\n\\n${help(spec)}`)\n return 2\n }\n if (rest.includes(\"--help\") || rest.includes(\"-h\")) {\n console.log(commandHelp(spec, name, command))\n return 0\n }\n let parsed: { values: CliValues; positionals: string[] }\n try {\n parsed = parseArgs({\n args: rest,\n allowPositionals: true,\n strict: true,\n options: Object.fromEntries(\n Object.entries(command.options ?? {}).map(([key, option]) => [\n key,\n {\n type: option.type,\n ...(option.default !== undefined ? { default: option.default } : {}),\n },\n ]),\n ) as ParseArgsConfig[\"options\"],\n }) as { values: CliValues; positionals: string[] }\n } catch (error) {\n console.error(\n `${spec.bin} ${name}: ${error instanceof Error ? error.message : String(error)}\\n\\n${commandHelp(spec, name, command)}`,\n )\n return 2\n }\n return command.run(parsed.values, parsed.positionals)\n}\n\n// \u2500\u2500 serve \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type LogFormat = \"pretty\" | \"json\" | \"off\"\n\nexport type CommonServeOptions = {\n adminKey: string | undefined\n seed: string | undefined\n onLog: ((entry: RequestLog) => void) | undefined\n}\n\n/**\n * What a service contributes to `serve`: how to build its runtime from CLI flags,\n * and what to say at startup. Every service's `./server` entry exports one as\n * `serveTarget`, which is also how `serve --config` finds services by name.\n */\nexport type ServeTarget = {\n name: string\n defaultPort: number\n /** Serve flags beyond the common ones. */\n options?: Record<string, CliOption>\n create(\n values: CliValues,\n common: CommonServeOptions,\n ): Promise<ServiceRuntime<ServiceInstance>> | ServiceRuntime<ServiceInstance>\n /** Startup lines after the listen address, e.g. the loaded corpus version. */\n banner?(runtime: ServiceRuntime<ServiceInstance>): string[]\n}\n\nconst COMMON_SERVE_OPTIONS: Record<string, CliOption> = {\n port: { type: \"string\", value: \"<port>\", description: \"Port to listen on\" },\n host: { type: \"string\", value: \"<host>\", description: \"Interface to bind\", default: \"127.0.0.1\" },\n \"admin-key\": {\n type: \"string\",\n value: \"<key>\",\n description: \"Require x-mockingbird-admin-key on /__admin/* (env MOCKINGBIRD_ADMIN_KEY)\",\n },\n seed: { type: \"string\", value: \"<seed>\", description: \"Seed for every random choice\" },\n log: {\n type: \"string\",\n value: \"<pretty|json|off>\",\n description: \"Request log format\",\n default: \"pretty\",\n },\n \"log-requests\": {\n type: \"boolean\",\n description:\n \"One JSON line per request: namespace, operationId, status, ids touched (never bodies). Same as --log json\",\n },\n config: {\n type: \"string\",\n value: \"<file>\",\n description: \"Serve every service in a mockingbird.json config instead\",\n },\n}\n\nconst formatLog = (format: LogFormat) => {\n if (format === \"off\") return undefined\n if (format === \"json\") return (entry: RequestLog) => console.log(JSON.stringify(entry))\n return (entry: RequestLog) => {\n const op = entry.operationId ?? (entry.unmatched ? \"UNMATCHED\" : \"-\")\n const ns = entry.namespace === \"default\" ? \"\" : ` [${entry.namespace}]`\n const fault = entry.faultId ? ` fault=${entry.faultId}` : \"\"\n const adopted = entry.adopted ? \" adopted\" : \"\"\n // A rejection says what arrived (never the body) and why the service refused it.\n const received = entry.request\n ? ` received=${entry.request.bodyBytes === null ? \"?\" : `${entry.request.bodyBytes}B`} ct=${entry.request.contentType ?? \"-\"}${\n entry.request.transferEncoding ? ` te=${entry.request.transferEncoding}` : \"\"\n }`\n : \"\"\n const issues = entry.issues?.length\n ? ` issues=${entry.issues\n .slice(0, 3)\n .map((issue) => `${issue.path || \"$\"}: ${issue.message}`)\n .join(\"; \")}${entry.issues.length > 3 ? ` (+${entry.issues.length - 3})` : \"\"}`\n : \"\"\n console.log(\n `${entry.service} ${entry.method} ${entry.path} ${entry.status} ${op} ${entry.durationMs}ms${ns}${fault}${adopted}${received}${issues}`,\n )\n }\n}\n\nconst asString = (value: string | boolean | undefined): string | undefined =>\n typeof value === \"string\" ? value : undefined\n\n/** A service entry in `mockingbird.json`. */\nexport type ConfigService = {\n port?: number\n host?: string\n adminKey?: string\n seed?: string\n /** Service-specific serve flags, by long name: `{ \"webhook-url\": \"\u2026\" }`. */\n options?: Record<string, string | boolean>\n}\n\nexport type MockingbirdConfig = {\n /** Keyed by service name: `junction` loads `@crvouga/mockingbird-service-junction`. */\n services: Record<string, ConfigService>\n log?: LogFormat\n}\n\nconst loadTarget = async (name: string, own: ServeTarget): Promise<ServeTarget> => {\n if (name === own.name) return own\n const specifier = `@crvouga/mockingbird-service-${name}/server`\n try {\n const mod = (await import(specifier)) as { serveTarget?: ServeTarget }\n if (!mod.serveTarget) throw new Error(`${specifier} exports no serveTarget`)\n return mod.serveTarget\n } catch (error) {\n const reason = error instanceof Error ? error.message : String(error)\n throw new Error(\n `cannot load service \"${name}\": ${reason}. Install @crvouga/mockingbird-service-${name}.`,\n )\n }\n}\n\nconst start = async (\n target: ServeTarget,\n values: CliValues,\n config: { port: number; host: string; adminKey?: string; seed?: string; log: LogFormat },\n): Promise<Listening> => {\n const runtime = await target.create(values, {\n adminKey: config.adminKey,\n seed: config.seed,\n onLog: formatLog(config.log),\n })\n const listening = await listen(runtime, { port: config.port, host: config.host })\n console.log(`${target.name} mock listening on ${listening.url}`)\n console.log(`${target.name} health: GET ${listening.url}/health`)\n console.log(\n `${target.name} admin: ${listening.url}/__admin (${config.adminKey ? \"x-mockingbird-admin-key required\" : \"open \u2014 pass --admin-key to lock\"})`,\n )\n for (const line of target.banner?.(runtime) ?? []) console.log(`${target.name} ${line}`)\n return listening\n}\n\nconst untilSignal = async (servers: Listening[]): Promise<number> =>\n new Promise((resolve) => {\n const stop = async () => {\n await Promise.allSettled(servers.map((s) => s.close()))\n resolve(0)\n }\n process.once(\"SIGINT\", stop)\n process.once(\"SIGTERM\", stop)\n })\n\n/** The standard `serve` command for a service, including multi-service `--config`. */\nexport const serveCommand = (target: ServeTarget): CliCommand => ({\n summary: `Serve the ${target.name} mock over HTTP`,\n options: { ...COMMON_SERVE_OPTIONS, ...target.options },\n async run(values) {\n const log = (\n values[\"log-requests\"] === true ? \"json\" : (asString(values.log) ?? \"pretty\")\n ) as LogFormat\n if (![\"pretty\", \"json\", \"off\"].includes(log)) {\n console.error(`--log must be pretty, json or off (got ${log})`)\n return 2\n }\n const configPath = asString(values.config)\n if (configPath !== undefined) {\n const config = JSON.parse(await readFile(configPath, \"utf8\")) as MockingbirdConfig\n const servers: Listening[] = []\n try {\n for (const [name, entry] of Object.entries(config.services ?? {})) {\n const each = await loadTarget(name, target)\n servers.push(\n await start(each, entry.options ?? {}, {\n port: entry.port ?? each.defaultPort,\n host: entry.host ?? \"127.0.0.1\",\n ...(entry.adminKey !== undefined ? { adminKey: entry.adminKey } : {}),\n ...(entry.seed !== undefined ? { seed: entry.seed } : {}),\n log: config.log ?? log,\n }),\n )\n }\n } catch (error) {\n await Promise.allSettled(servers.map((s) => s.close()))\n console.error(error instanceof Error ? error.message : String(error))\n return 1\n }\n return untilSignal(servers)\n }\n const port = asString(values.port)\n const adminKey = asString(values[\"admin-key\"]) ?? process.env.MOCKINGBIRD_ADMIN_KEY\n const seed = asString(values.seed)\n let listening: Listening\n try {\n listening = await start(target, values, {\n port: port === undefined ? target.defaultPort : Number.parseInt(port, 10),\n host: asString(values.host) ?? \"127.0.0.1\",\n ...(adminKey !== undefined ? { adminKey } : {}),\n ...(seed !== undefined ? { seed } : {}),\n log,\n })\n } catch (error) {\n console.error(error instanceof Error ? error.message : String(error))\n return 1\n }\n return untilSignal([listening])\n },\n})\n", "import { createServer } from \"node:http\"\nimport type { FetchAPI } from \"@crvouga/mockingbird-core\"\n\n/** Options for {@link serve}. */\nexport type NodeServeOptions = {\n port?: number\n host?: string\n}\n\n/**\n * Serve any Mockingbird {@link FetchAPI} over `node:http`.\n * Port defaults to `0`, so the OS assigns an ephemeral port (read from `server.address()`).\n */\nexport const serve = async (api: FetchAPI, options: NodeServeOptions = {}) => {\n const server = createServer(async (req, res) => {\n const chunks: Buffer[] = []\n for await (const chunk of req) {\n chunks.push(Buffer.from(chunk))\n }\n const body = Buffer.concat(chunks)\n const address = server.address()\n const port = typeof address === \"object\" && address !== null ? address.port : undefined\n const base = `http://${req.headers.host ?? `localhost:${port ?? 80}`}`\n const raw = req.url ?? \"/\"\n const url = new URL(raw.replace(/^\\/+/, \"/\"), base)\n const method = req.method ?? \"GET\"\n const init: RequestInit = { method, headers: req.headers as Record<string, string> }\n if (method !== \"GET\" && method !== \"HEAD\" && body.length > 0) {\n init.body = body\n }\n const aborted = new AbortController()\n res.once(\"close\", () => {\n if (!res.writableFinished) aborted.abort()\n })\n init.signal = aborted.signal\n const request = new Request(url, init)\n let response: Response\n try {\n response = await api.fetch(request)\n } catch (error) {\n // A `drop` fault: destroy the socket so the client sees the connection die.\n if ((error as { code?: string }).code === \"MOCKINGBIRD_DROP\") {\n req.socket.destroy()\n return\n }\n res.writeHead(500, { \"content-type\": \"application/json\" })\n res.end(\n JSON.stringify({\n error: {\n type: \"mockingbird_internal\",\n message: error instanceof Error ? error.message : String(error),\n },\n }),\n )\n return\n }\n // Headers#entries() joins repeated headers; Set-Cookie must stay one header per cookie.\n const headers: Record<string, string | string[]> = Object.fromEntries(response.headers)\n const cookies = response.headers.getSetCookie()\n if (cookies.length > 0) headers[\"set-cookie\"] = cookies\n if (!response.body) {\n res.writeHead(response.status, headers)\n res.end()\n return\n }\n // Stream the body chunk by chunk: event streams and long-polls must not be buffered.\n res.writeHead(response.status, headers)\n res.flushHeaders()\n const reader = response.body.getReader()\n try {\n for (;;) {\n const { done, value } = await reader.read()\n if (done) break\n if (!res.write(value)) await new Promise<void>((resolve) => res.once(\"drain\", resolve))\n }\n res.end()\n } catch {\n res.destroy()\n } finally {\n reader.releaseLock()\n }\n })\n await new Promise<void>((resolve, reject) => {\n server.once(\"error\", reject)\n server.listen(options.port ?? 0, options.host, resolve)\n })\n return server\n}\n", "import type { Server } from \"node:http\"\nimport type { FetchAPI } from \"@crvouga/mockingbird-core\"\nimport { serve } from \"./serve.js\"\n\nexport type ListenOptions = {\n /** Default `0`: the OS picks a free port. */\n port?: number\n /** Default `127.0.0.1`: a mock should not be reachable off the machine by accident. */\n host?: string\n}\n\n/** A running server, with the address it actually bound. */\nexport type Listening = {\n url: string\n port: number\n host: string\n server: Server\n close(): Promise<void>\n}\n\nexport const listen = async (api: FetchAPI, options: ListenOptions = {}): Promise<Listening> => {\n const host = options.host ?? \"127.0.0.1\"\n const server = await serve(api, { port: options.port ?? 0, host })\n const address = server.address()\n const port = typeof address === \"object\" && address !== null ? address.port : (options.port ?? 0)\n const shown = host.includes(\":\") ? `[${host}]` : host\n return {\n url: `http://${shown}:${port}`,\n port,\n host,\n server,\n close: () =>\n new Promise<void>((resolve, reject) => {\n // Stop accepting first, then drop keep-alive sockets so close() can finish.\n server.close((error) => {\n if (error && (error as { code?: string }).code !== \"ERR_SERVER_NOT_RUNNING\") reject(error)\n else resolve()\n })\n server.closeAllConnections?.()\n }),\n }\n}\n", "/// <reference types=\"node\" />\nimport { type Listening, listen, type ServeTarget } from \"@crvouga/mockingbird-adapter-node\"\nimport { createRuntime, type MedplumRuntime, type MedplumRuntimeOptions } from \"./runtime.js\"\n\n/** Port `mockingbird-medplum serve` listens on when none is given (Medplum's own default). */\nexport const DEFAULT_PORT = 8103\n\nexport type MedplumServerOptions = Omit<MedplumRuntimeOptions, \"baseUrl\"> & {\n /** Default `0`: the OS picks a free port (read it from `url` / `port`). */\n port?: number\n /** Default `127.0.0.1`. */\n host?: string\n /**\n * The public base URL the server answers as (`fullUrl`s, `Location`, token issuer).\n * Default: the listening address.\n */\n baseUrl?: string\n}\n\nexport type MedplumServer = Listening & { runtime: MedplumRuntime }\n\n/**\n * Serve the Medplum mock over `node:http`. Resolves once it is listening.\n *\n * const server = await createServer()\n * const medplum = new MedplumClient({ baseUrl: `${server.url}/` })\n */\nexport const createServer = async (options: MedplumServerOptions = {}): Promise<MedplumServer> => {\n const { port, host, baseUrl, ...rest } = options\n let runtime: MedplumRuntime | undefined\n let resolvedBase = baseUrl\n const listening = await listen(\n { fetch: (request) => (runtime as MedplumRuntime).fetch(request) },\n { port: port ?? 0, ...(host !== undefined ? { host } : {}) },\n )\n resolvedBase ??= `${listening.url}/`\n runtime = createRuntime({ ...rest, baseUrl: resolvedBase })\n return { ...listening, runtime }\n}\n\nconst text = (value: string | boolean | undefined) =>\n typeof value === \"string\" && value !== \"\" ? value : undefined\n\n/** How `serve` (and `serve --config`) builds the Medplum mock from flags. */\nexport const serveTarget: ServeTarget = {\n name: \"medplum\",\n defaultPort: DEFAULT_PORT,\n options: {\n \"base-url\": {\n type: \"string\",\n value: \"<url>\",\n description: \"Public base URL the server answers as (default http://127.0.0.1:<port>/)\",\n },\n \"client-id\": {\n type: \"string\",\n value: \"<uuid>\",\n description: \"The default project's ClientApplication id\",\n },\n \"client-secret\": {\n type: \"string\",\n value: \"<secret>\",\n description: \"The default project's ClientApplication secret\",\n },\n \"project-id\": { type: \"string\", value: \"<uuid>\", description: \"The default project's id\" },\n \"super-admin-email\": {\n type: \"string\",\n value: \"<email>\",\n description: \"The seeded super admin's email\",\n },\n \"super-admin-password\": {\n type: \"string\",\n value: \"<password>\",\n description: \"The seeded super admin's password\",\n },\n },\n create: (values, common) => {\n const port = text(values.port) ?? String(DEFAULT_PORT)\n const host = text(values.host) ?? \"127.0.0.1\"\n const clientId = text(values[\"client-id\"])\n const clientSecret = text(values[\"client-secret\"])\n const projectId = text(values[\"project-id\"])\n const email = text(values[\"super-admin-email\"])\n const password = text(values[\"super-admin-password\"])\n return createRuntime({\n baseUrl: text(values[\"base-url\"]) ?? `http://${host}:${port}/`,\n ...(clientId || clientSecret || projectId\n ? {\n project: {\n ...(clientId ? { clientId } : {}),\n ...(clientSecret ? { clientSecret } : {}),\n ...(projectId ? { id: projectId } : {}),\n },\n }\n : {}),\n ...(email || password\n ? { superAdmin: { ...(email ? { email } : {}), ...(password ? { password } : {}) } }\n : {}),\n ...(common.adminKey !== undefined ? { adminKey: common.adminKey } : {}),\n ...(common.seed !== undefined ? { seed: common.seed } : {}),\n ...(common.onLog ? { onLog: common.onLog } : {}),\n })\n },\n banner: (runtime) => {\n const info = (runtime as MedplumRuntime).instance().describe()\n return [\n \"routes: /fhir/R4/\u2026, /oauth2/token, /auth/login, /auth/me, /admin/projects/\u2026, /healthcheck\",\n `client credentials: ${info.project?.clientId} / ${info.project?.clientSecret} (project ${info.project?.id})`,\n `super admin: ${info.superAdmin.email} / ${info.superAdmin.password}`,\n \"namespaces: x-mockingbird-namespace, /ns/<name>/\u2026, or PUT /__admin/credentials {<clientId>: <ns>}\",\n ]\n },\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA,SAAS,gBAAgB;AACzB,SAA+B,iBAAiB;;;ACDhD,SAAS,oBAAoB;AAatB,IAAM,QAAQ,OAAO,KAAe,UAA4B,CAAA,MAAM;AAC3E,QAAM,SAAS,aAAa,OAAO,KAAK,QAAO;AAC7C,UAAM,SAAmB,CAAA;AACzB,qBAAiB,SAAS,KAAK;AAC7B,aAAO,KAAK,OAAO,KAAK,KAAK,CAAC;IAChC;AACA,UAAM,OAAO,OAAO,OAAO,MAAM;AAC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SAAS,QAAQ,MAAM,KAAK,SAAS,YAAY,aAAa,KAAK,SAAS,EAAE;AAAA,MAC1G,gBAAgB,KAAK,WAAW,KAAK,MAAM,KAAK,WAAW,QAAQ;AAAA,MACnE;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["createServer"]
|
|
7
|
+
}
|
|
@@ -1423,7 +1423,7 @@ var withNamespaceRollback = async (sqlite, namespace, run) => {
|
|
|
1423
1423
|
};
|
|
1424
1424
|
|
|
1425
1425
|
// ../core/dist/version.js
|
|
1426
|
-
var PACKAGE_VERSION = true ? "1.0.
|
|
1426
|
+
var PACKAGE_VERSION = true ? "1.0.2" : UNRELEASED_VERSION;
|
|
1427
1427
|
|
|
1428
1428
|
// ../core/dist/webhooks.js
|
|
1429
1429
|
var json2 = (status, body) => new Response(JSON.stringify(body), { status, headers: { "content-type": "application/json" } });
|
|
@@ -1861,8 +1861,15 @@ var createRuntime = (options) => {
|
|
|
1861
1861
|
const started = monotonicNow();
|
|
1862
1862
|
const url = new URL(request.url);
|
|
1863
1863
|
const operationId = operationIdFor(request, url.pathname);
|
|
1864
|
+
const contentLength = request.headers.get("content-length");
|
|
1865
|
+
const received = {
|
|
1866
|
+
contentType: request.headers.get("content-type"),
|
|
1867
|
+
bodyBytes: contentLength !== null && /^\d+$/.test(contentLength) ? Number(contentLength) : null,
|
|
1868
|
+
transferEncoding: request.headers.get("transfer-encoding")
|
|
1869
|
+
};
|
|
1864
1870
|
const log = (status, faultId, response2) => {
|
|
1865
1871
|
const noted = response2 ? responseNotes(response2) : void 0;
|
|
1872
|
+
const rejected = status >= 400 && faultId === void 0;
|
|
1866
1873
|
const entry = {
|
|
1867
1874
|
service: options.name,
|
|
1868
1875
|
namespace,
|
|
@@ -1874,7 +1881,9 @@ var createRuntime = (options) => {
|
|
|
1874
1881
|
unmatched: options.document !== void 0 && operationId === void 0,
|
|
1875
1882
|
...faultId !== void 0 ? { faultId } : {},
|
|
1876
1883
|
...noted?.ids && Object.keys(noted.ids).length > 0 ? { ids: noted.ids } : {},
|
|
1877
|
-
...noted?.adopted ? { adopted: true } : {}
|
|
1884
|
+
...noted?.adopted ? { adopted: true } : {},
|
|
1885
|
+
...rejected ? { request: { ...received } } : {},
|
|
1886
|
+
...rejected && noted?.issues && noted.issues.length > 0 ? { issues: noted.issues.map((issue) => ({ ...issue })) } : {}
|
|
1878
1887
|
};
|
|
1879
1888
|
metrics.record(entry);
|
|
1880
1889
|
journal.record({ ...entry, at: new Date(clock.now()).toISOString() });
|
|
@@ -9232,7 +9241,7 @@ var userConfigurationMenu = (project, membership) => {
|
|
|
9232
9241
|
};
|
|
9233
9242
|
|
|
9234
9243
|
// src/generated/openapi.ts
|
|
9235
|
-
var document = JSON.parse(`{"openapi":"3.1.0","info":{"title":"Medplum API (Mockingbird contract)","description":"The surface of a self-hosted Medplum server (v5.1.37) that the mock implements: FHIR R4 REST\\n(every resource type, through Medplum's own FHIR router), OAuth2 and the auth API, the project\\nadmin API, Binary storage and the unauthenticated server endpoints.\\n\\nFHIR operations are generic over \`{resourceType}\`; the Patient paths are the same routes with a\\ntyped schema, used by the random parity walks. Behaviour is proven against a real self-hosted\\nserver by the scenario recordings and random differential walks in \`scripts/parity.ts\`.\\n","version":"5.1.37","x-mockingbird-upstream":{"docs":"https://www.medplum.com/docs/api","selfHosting":"https://www.medplum.com/docs/self-hosting/install-from-scratch","source":"https://github.com/medplum/medplum/tree/v5.1.37/packages/server"}},"servers":[{"url":"http://localhost:8103"}],"security":[{"bearerAuth":[]},{"basicAuth":[]}],"paths":{"/":{"get":{"operationId":"GetRoot","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Static server root; covered by the server scenarios."}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/healthcheck":{"get":{"operationId":"GetHealthcheck","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Reports the host (platform, runtime) the server runs on."}},"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/robots.txt":{"get":{"operationId":"GetRobots","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Static text; covered by the server scenarios."}},"responses":{"200":{"description":"robots.txt","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/jwks.json":{"get":{"operationId":"GetJwks","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Signing keys are generated per server."}},"responses":{"200":{"description":"The public keys that verify issued tokens","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/openid-configuration":{"get":{"operationId":"GetOpenIdConfiguration","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Discovery document; endpoints are the server's own."}},"responses":{"200":{"description":"OpenID discovery","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/smart-configuration":{"get":{"operationId":"GetSmartConfiguration","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Discovery document; endpoints are the server's own."}},"responses":{"200":{"description":"SMART discovery","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/auth/login":{"post":{"operationId":"PostAuthLogin","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Password flows are covered by the auth scenarios."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"A login code (or the memberships to choose from)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Invalid credentials or request","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"404":{"description":"Unknown client","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/auth/profile":{"post":{"operationId":"PostAuthProfile","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Multi-membership login step."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"login":{"type":"string"},"profile":{"type":"string"}}}}}},"responses":{"200":{"description":"A login code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Invalid login or profile","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/auth/me":{"get":{"operationId":"GetAuthMe","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth and admin scenarios."}},"responses":{"200":{"description":"The caller's user","project":null,"membership":null,"profile and access policy":null,"content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/oauth2/token":{"post":{"operationId":"PostOauth2Token","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Tokens are minted per call; covered by the auth scenarios."}},"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/oauth2/userinfo":{"get":{"operationId":"GetOauth2UserInfo","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth scenarios."}},"responses":{"200":{"description":"OpenID claims","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"PostOauth2UserInfo","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth scenarios."}},"responses":{"200":{"description":"OpenID claims","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/oauth2/logout":{"get":{"operationId":"GetOauth2Logout","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Revokes the caller's login."}},"responses":{"200":{"description":"Logged out","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"PostOauth2Logout","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Revokes the caller's login."}},"responses":{"200":{"description":"Logged out","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}":{"get":{"operationId":"GetAdminProject","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Project admins only; covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The caller's project","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Not a project admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}/client":{"post":{"operationId":"PostAdminProjectClient","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Creates credentials; covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"201":{"description":"The ClientApplication (with its secret)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not a project admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}/invite":{"post":{"operationId":"PostAdminProjectInvite","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Creates users; covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"200":{"description":"The new ProjectMembership","content":{"application/fhir+json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not a project admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"409":{"description":"Already a member","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}/settings":{"post":{"operationId":"PostAdminProjectSettings","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites the caller's project."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The updated Project","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/admin/projects/{projectId}/secrets":{"post":{"operationId":"PostAdminProjectSecrets","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites the caller's project."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The updated Project","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/admin/projects/{projectId}/sites":{"post":{"operationId":"PostAdminProjectSites","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites the caller's project."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The updated Project","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/admin/projects/{projectId}/members/{membershipId}":{"get":{"operationId":"GetAdminProjectMember","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"},{"$ref":"#/components/parameters/membershipId"}],"responses":{"200":{"description":"The ProjectMembership","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Not in the caller's project","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"PostAdminProjectMember","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites a membership."}},"parameters":[{"$ref":"#/components/parameters/projectId"},{"$ref":"#/components/parameters/membershipId"}],"responses":{"200":{"description":"The updated ProjectMembership","content":{"application/json":{"schema":{"type":"object"}}}}}},"delete":{"operationId":"DeleteAdminProjectMember","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Removes a member (and a project-scoped user)."}},"parameters":[{"$ref":"#/components/parameters/projectId"},{"$ref":"#/components/parameters/membershipId"}],"responses":{"200":{"description":"Removed","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/storage/{binaryId}/{versionId}":{"get":{"operationId":"GetStorageBinary","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Presigned URLs carry a per-server signature; covered by the binary scenario."}},"parameters":[{"name":"binaryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The Binary content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or invalid signature","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Expired URL","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/fhir/R4":{"get":{"operationId":"FhirSearchSystem","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the search scenarios."}},"responses":{"200":{"description":"Searchset across \`_type\`","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"400":{"description":"Bad search","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"FhirBatch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the batch and transaction scenarios."}},"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"responses":{"200":{"description":"batch-response or transaction-response Bundle","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"400":{"description":"Not a batch or transaction","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/metadata":{"get":{"operationId":"FhirCapabilities","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth scenarios (compared in full)."}},"responses":{"200":{"description":"CapabilityStatement","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/fhir/R4/$graphql":{"post":{"operationId":"FhirGraphql","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the graphql scenario."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"}}}}}},"responses":{"200":{"description":"GraphQL result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid query","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Binary":{"post":{"operationId":"FhirBinaryUpload","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the binary scenario."}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The Binary","with a presigned \`url\`":null,"content":{"application/fhir+json":{"schema":{"type":"object"}}}}}}},"/fhir/R4/Binary/{id}":{"get":{"operationId":"FhirBinaryRead","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the binary scenario."}},"parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Raw content","or the Binary with \`Accept":"application/fhir+json\`","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"FhirBinaryReplace","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the binary scenario."}},"parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The Binary","with a presigned \`url\`":null,"content":{"application/fhir+json":{"schema":{"type":"object"}}}}}}},"/fhir/R4/Patient":{"get":{"operationId":"SearchPatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","enum":["ada","lovelace","turing","zola","gra"]}},{"name":"gender","in":"query","required":false,"schema":{"type":"string","enum":["male","female","other","unknown"]}},{"name":"birthdate","in":"query","required":false,"schema":{"type":"string","enum":["ge1900-01-01","lt1950-06-01","1815-12-10"]}},{"name":"_count","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"_sort","in":"query","required":false,"schema":{"type":"string","enum":["birthdate","-birthdate","family"]}}],"responses":{"200":{"description":"Searchset","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/PatientBundle"}}}},"400":{"description":"Bad search","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"CreatePatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/PatientInput"}}}},"responses":{"201":{"description":"Created","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Patient"}}}},"400":{"description":"Invalid resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Patient/{id}":{"get":{"operationId":"ReadPatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"responses":{"200":{"description":"The Patient","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Patient"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"410":{"description":"Deleted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"UpdatePatient","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"The body must carry the id from the path; covered by the random differential walks."}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/PatientInput"}}}},"responses":{"200":{"description":"Updated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Patient"}}}},"400":{"description":"Invalid resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"delete":{"operationId":"DeletePatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"responses":{"200":{"description":"Deleted (or already deleted)","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Patient/{id}/_history":{"get":{"operationId":"ReadPatientHistory","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"responses":{"200":{"description":"History Bundle","newest first":null,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Patient/{id}/$everything":{"get":{"operationId":"PatientEverything","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the resource variety scenario."}},"parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"The patient compartment","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}":{"get":{"operationId":"FhirSearch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Every resource type; covered by the search scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"responses":{"200":{"description":"Searchset","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"400":{"description":"Bad search","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not permitted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"FhirCreate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Every resource type; covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Conditional create matched an existing resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"201":{"description":"Created","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"400":{"description":"Invalid resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"412":{"description":"Conditional create matched several","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"FhirConditionalUpdate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the conditional scenario."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Updated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"201":{"description":"Created","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"412":{"description":"Matched several","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"patch":{"operationId":"FhirConditionalPatch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the conditional scenario."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"object"}}}}},"responses":{"200":{"description":"Patched","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"404":{"description":"Nothing matched","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"delete":{"operationId":"FhirConditionalDelete","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the conditional scenario."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"responses":{"200":{"description":"Deleted (or nothing matched)","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"412":{"description":"Matched several","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/_search":{"post":{"operationId":"FhirSearchPost","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the search scenarios."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Searchset","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}}}}},"/fhir/R4/{resourceType}/$validate":{"post":{"operationId":"FhirValidate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the server scenarios."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Valid","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"400":{"description":"Invalid","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/{id}":{"get":{"operationId":"FhirRead","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Every resource type; covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"The resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"410":{"description":"Deleted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"FhirUpdate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Updated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"400":{"description":"Invalid","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"412":{"description":"If-Match mismatch","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"patch":{"operationId":"FhirPatch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the patch scenario and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"requestBody":{"required":true,"content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"object"}}}}},"responses":{"200":{"description":"Patched","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"400":{"description":"Invalid patch","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"delete":{"operationId":"FhirDelete","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Deleted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/{id}/_history":{"get":{"operationId":"FhirHistory","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"History Bundle","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}}}}},"/fhir/R4/{resourceType}/{id}/_history/{versionId}":{"get":{"operationId":"FhirVersionRead","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the CRUD scenarios."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"That version","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"410":{"description":"A delete version","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/{id}/$expunge":{"post":{"operationId":"FhirExpunge","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Super admin only; erases history."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Expunged","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not a super admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"basicAuth":{"type":"http","scheme":"basic","description":"ClientApplication id and secret"}},"parameters":{"projectId":{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},"membershipId":{"name":"membershipId","in":"path","required":true,"schema":{"type":"string"}},"resourceType":{"name":"resourceType","in":"path","required":true,"schema":{"type":"string"}},"id":{"name":"id","in":"path","required":true,"schema":{"type":"string"}},"patientId":{"name":"id","in":"path","required":true,"schema":{"type":"string","x-mockingbird-resource-ref":{"type":"patient","missing":"not_found"}}}},"schemas":{"HealthStatus":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"version":{"type":"string"},"postgres":{"type":"boolean"},"redis":{"type":"boolean"}}},"LoginRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"clientId":{"type":"string"},"projectId":{"type":"string"},"scope":{"type":"string"},"codeChallenge":{"type":"string"},"codeChallengeMethod":{"type":"string","enum":["plain","S256"]}}},"LoginResponse":{"type":"object","required":["login"],"properties":{"login":{"type":"string"},"code":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"memberships":{"type":"array","items":{"type":"object"}}}},"TokenRequest":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["client_credentials","authorization_code","refresh_token"]},"client_id":{"type":"string"},"client_secret":{"type":"string"},"code":{"type":"string"},"code_verifier":{"type":"string"},"refresh_token":{"type":"string"},"scope":{"type":"string"}}},"TokenResponse":{"type":"object","required":["token_type","expires_in","access_token"],"properties":{"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer"},"scope":{"type":"string"},"access_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"id_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"refresh_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"project":{"type":"object"},"profile":{"type":"object"}}},"OAuthError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"InviteRequest":{"type":"object","required":["resourceType","firstName","lastName"],"properties":{"resourceType":{"type":"string","enum":["Patient","Practitioner","RelatedPerson"]},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"externalId":{"type":"string"},"password":{"type":"string"},"scope":{"type":"string","enum":["project","server"]},"admin":{"type":"boolean"},"sendEmail":{"type":"boolean"}}},"Resource":{"type":"object","required":["resourceType"],"properties":{"resourceType":{"type":"string"},"id":{"type":"string"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true},"Meta":{"type":"object","properties":{"versionId":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"lastUpdated":{"type":"string","format":"date-time","x-mockingbird-volatile":{"kind":"timestamp"}}}},"HumanName":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"family":{"type":"string","enum":["Lovelace","Turing","Zola","Hopper"]},"given":{"type":"array","minItems":1,"maxItems":2,"items":{"type":"string","enum":["Ada","Alan","Grace","Emile"]}}}},"PatientInput":{"type":"object","required":["resourceType"],"additionalProperties":false,"properties":{"resourceType":{"type":"string","enum":["Patient"]},"active":{"type":"boolean"},"gender":{"type":"string","enum":["male","female","other","unknown"]},"birthDate":{"type":"string","enum":["1815-12-10","1912-06-23","1906-12-09","1950-01-01"]},"name":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/HumanName"}}}},"Patient":{"type":"object","required":["resourceType","id","meta"],"properties":{"resourceType":{"type":"string","enum":["Patient"]},"id":{"type":"string","x-mockingbird-resource":{"type":"patient","identity":true}},"meta":{"$ref":"#/components/schemas/Meta"},"active":{"type":"boolean"},"gender":{"type":"string"},"birthDate":{"type":"string"},"name":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/HumanName"},{"type":"null"}]}}}},"PatientBundle":{"type":"object","required":["resourceType","type"],"properties":{"resourceType":{"type":"string","enum":["Bundle"]},"type":{"type":"string","enum":["searchset"]},"total":{"type":"integer"},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"type":"object"},"resource":{"$ref":"#/components/schemas/Patient"}}}},"link":{"type":"array","items":{"type":"object"}}}},"Bundle":{"type":"object","required":["resourceType","type"],"properties":{"resourceType":{"type":"string","enum":["Bundle"]},"type":{"type":"string"},"total":{"type":"integer"},"entry":{"type":"array","items":{"type":"object"}},"link":{"type":"array","items":{"type":"object"}}}},"OperationOutcome":{"type":"object","required":["resourceType","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"]},"id":{"type":"string"},"issue":{"type":"array","items":{"type":"object"}},"extension":{"type":"array","items":{"type":"object"}}}}}}}`);
|
|
9244
|
+
var document = JSON.parse(`{"openapi":"3.1.0","info":{"title":"Medplum API (Mockingbird contract)","description":"The surface of a self-hosted Medplum server (v5.1.37) that the mock implements: FHIR R4 REST\\n(every resource type, through Medplum's own FHIR router), OAuth2 and the auth API, the project\\nadmin API, Binary storage and the unauthenticated server endpoints.\\n\\nFHIR operations are generic over \`{resourceType}\`; the Patient paths are the same routes with a\\ntyped schema, used by the random parity walks. Behaviour is proven against a real self-hosted\\nserver by the scenario recordings and random differential walks in \`scripts/parity.ts\`.\\n","version":"5.1.37","x-mockingbird-upstream":{"docs":"https://www.medplum.com/docs/api","selfHosting":"https://www.medplum.com/docs/self-hosting/install-from-scratch","source":"https://github.com/medplum/medplum/tree/v5.1.37/packages/server"}},"servers":[{"url":"http://localhost:8103"}],"security":[{"bearerAuth":[]},{"basicAuth":[]}],"paths":{"/":{"get":{"operationId":"GetRoot","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Static server root; covered by the server scenarios."}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/healthcheck":{"get":{"operationId":"GetHealthcheck","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Reports the host (platform, runtime) the server runs on."}},"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/robots.txt":{"get":{"operationId":"GetRobots","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Static text; covered by the server scenarios."}},"responses":{"200":{"description":"robots.txt","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/jwks.json":{"get":{"operationId":"GetJwks","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Signing keys are generated per server."}},"responses":{"200":{"description":"The public keys that verify issued tokens","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/openid-configuration":{"get":{"operationId":"GetOpenIdConfiguration","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Discovery document; endpoints are the server's own."}},"responses":{"200":{"description":"OpenID discovery","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/smart-configuration":{"get":{"operationId":"GetSmartConfiguration","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Discovery document; endpoints are the server's own."}},"responses":{"200":{"description":"SMART discovery","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/auth/login":{"post":{"operationId":"PostAuthLogin","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Password flows are covered by the auth scenarios."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"A login code (or the memberships to choose from)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Invalid credentials or request","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"404":{"description":"Unknown client","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/auth/profile":{"post":{"operationId":"PostAuthProfile","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Multi-membership login step."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"login":{"type":"string"},"profile":{"type":"string"}}}}}},"responses":{"200":{"description":"A login code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Invalid login or profile","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/auth/me":{"get":{"operationId":"GetAuthMe","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth and admin scenarios."}},"responses":{"200":{"description":"The caller's user","project":null,"membership":null,"profile and access policy":null,"content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/oauth2/token":{"post":{"operationId":"PostOauth2Token","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Tokens are minted per call; covered by the auth scenarios."}},"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/oauth2/userinfo":{"get":{"operationId":"GetOauth2UserInfo","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth scenarios."}},"responses":{"200":{"description":"OpenID claims","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"PostOauth2UserInfo","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth scenarios."}},"responses":{"200":{"description":"OpenID claims","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/oauth2/logout":{"get":{"operationId":"GetOauth2Logout","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Revokes the caller's login."}},"responses":{"200":{"description":"Logged out","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"PostOauth2Logout","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Revokes the caller's login."}},"responses":{"200":{"description":"Logged out","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}":{"get":{"operationId":"GetAdminProject","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Project admins only; covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The caller's project","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Not a project admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}/client":{"post":{"operationId":"PostAdminProjectClient","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Creates credentials; covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"201":{"description":"The ClientApplication (with its secret)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not a project admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}/invite":{"post":{"operationId":"PostAdminProjectInvite","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Creates users; covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"200":{"description":"The new ProjectMembership","content":{"application/fhir+json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not a project admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"409":{"description":"Already a member","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/admin/projects/{projectId}/settings":{"post":{"operationId":"PostAdminProjectSettings","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites the caller's project."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The updated Project","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/admin/projects/{projectId}/secrets":{"post":{"operationId":"PostAdminProjectSecrets","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites the caller's project."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The updated Project","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/admin/projects/{projectId}/sites":{"post":{"operationId":"PostAdminProjectSites","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites the caller's project."}},"parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"description":"The updated Project","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/admin/projects/{projectId}/members/{membershipId}":{"get":{"operationId":"GetAdminProjectMember","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the admin scenarios."}},"parameters":[{"$ref":"#/components/parameters/projectId"},{"$ref":"#/components/parameters/membershipId"}],"responses":{"200":{"description":"The ProjectMembership","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Not in the caller's project","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"PostAdminProjectMember","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Rewrites a membership."}},"parameters":[{"$ref":"#/components/parameters/projectId"},{"$ref":"#/components/parameters/membershipId"}],"responses":{"200":{"description":"The updated ProjectMembership","content":{"application/json":{"schema":{"type":"object"}}}}}},"delete":{"operationId":"DeleteAdminProjectMember","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Removes a member (and a project-scoped user)."}},"parameters":[{"$ref":"#/components/parameters/projectId"},{"$ref":"#/components/parameters/membershipId"}],"responses":{"200":{"description":"Removed","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/storage/{binaryId}/{versionId}":{"get":{"operationId":"GetStorageBinary","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Presigned URLs carry a per-server signature; covered by the binary scenario."}},"parameters":[{"name":"binaryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The Binary content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or invalid signature","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Expired URL","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/fhir/R4":{"get":{"operationId":"FhirSearchSystem","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the search scenarios."}},"responses":{"200":{"description":"Searchset across \`_type\`","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"400":{"description":"Bad search","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"FhirBatch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the batch and transaction scenarios."}},"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"responses":{"200":{"description":"batch-response or transaction-response Bundle","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"400":{"description":"Not a batch or transaction","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/metadata":{"get":{"operationId":"FhirCapabilities","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the auth scenarios (compared in full)."}},"responses":{"200":{"description":"CapabilityStatement","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/fhir/R4/$graphql":{"post":{"operationId":"FhirGraphql","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the graphql scenario."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"}}}}}},"responses":{"200":{"description":"GraphQL result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid query","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Binary":{"post":{"operationId":"FhirBinaryUpload","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the binary scenario."}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The Binary","with a presigned \`url\`":null,"content":{"application/fhir+json":{"schema":{"type":"object"}}}}}}},"/fhir/R4/Binary/{id}":{"get":{"operationId":"FhirBinaryRead","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the binary scenario."}},"parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Raw content","or the Binary with \`Accept":"application/fhir+json\`","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"FhirBinaryReplace","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the binary scenario."}},"parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The Binary","with a presigned \`url\`":null,"content":{"application/fhir+json":{"schema":{"type":"object"}}}}}}},"/fhir/R4/Patient":{"get":{"operationId":"SearchPatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","enum":["ada","lovelace","turing","zola","gra"]}},{"name":"gender","in":"query","required":false,"schema":{"type":"string","enum":["male","female","other","unknown"]}},{"name":"birthdate","in":"query","required":false,"schema":{"type":"string","enum":["ge1900-01-01","lt1950-06-01","1815-12-10"]}},{"name":"_count","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"_sort","in":"query","required":false,"schema":{"type":"string","enum":["birthdate","-birthdate","family"]}}],"responses":{"200":{"description":"Searchset","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/PatientBundle"}}}},"400":{"description":"Bad search","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"CreatePatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/PatientInput"}}}},"responses":{"201":{"description":"Created","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Patient"}}}},"400":{"description":"Invalid resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Patient/{id}":{"get":{"operationId":"ReadPatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"responses":{"200":{"description":"The Patient","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Patient"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"410":{"description":"Deleted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"UpdatePatient","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"The body must carry the id from the path; covered by the random differential walks."}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/PatientInput"}}}},"responses":{"200":{"description":"Updated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Patient"}}}},"400":{"description":"Invalid resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"delete":{"operationId":"DeletePatient","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"responses":{"200":{"description":"Deleted (or already deleted)","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Patient/{id}/_history":{"get":{"operationId":"ReadPatientHistory","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"$ref":"#/components/parameters/patientId"}],"responses":{"200":{"description":"History Bundle","newest first":null,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/Patient/{id}/$everything":{"get":{"operationId":"PatientEverything","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the resource variety scenario."}},"parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"The patient compartment","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}":{"get":{"operationId":"FhirSearch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Every resource type; covered by the search scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"responses":{"200":{"description":"Searchset","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"400":{"description":"Bad search","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not permitted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"post":{"operationId":"FhirCreate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Every resource type; covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Conditional create matched an existing resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"201":{"description":"Created","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"400":{"description":"Invalid resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"412":{"description":"Conditional create matched several","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"FhirConditionalUpdate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the conditional scenario."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Updated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"201":{"description":"Created","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"412":{"description":"Matched several","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"patch":{"operationId":"FhirConditionalPatch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the conditional scenario."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"object"}}}}},"responses":{"200":{"description":"Patched","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"404":{"description":"Nothing matched","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"delete":{"operationId":"FhirConditionalDelete","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the conditional scenario."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"responses":{"200":{"description":"Deleted (or nothing matched)","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"412":{"description":"Matched several","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/_search":{"post":{"operationId":"FhirSearchPost","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the search scenarios."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Searchset","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}}}}},"/fhir/R4/{resourceType}/$validate":{"post":{"operationId":"FhirValidate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the server scenarios."}},"parameters":[{"$ref":"#/components/parameters/resourceType"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Valid","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"400":{"description":"Invalid","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/{id}":{"get":{"operationId":"FhirRead","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Every resource type; covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"The resource","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"404":{"description":"Not found","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"410":{"description":"Deleted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"put":{"operationId":"FhirUpdate","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"requestBody":{"required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"responses":{"200":{"description":"Updated","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"400":{"description":"Invalid","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"412":{"description":"If-Match mismatch","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"patch":{"operationId":"FhirPatch","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the patch scenario and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"requestBody":{"required":true,"content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"object"}}}}},"responses":{"200":{"description":"Patched","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"400":{"description":"Invalid patch","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"delete":{"operationId":"FhirDelete","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Deleted","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/{id}/_history":{"get":{"operationId":"FhirHistory","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the scenarios and random walks."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"History Bundle","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}}}}},"/fhir/R4/{resourceType}/{id}/_history/{versionId}":{"get":{"operationId":"FhirVersionRead","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":true,"reason":"Covered by the CRUD scenarios."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"That version","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Resource"}}}},"410":{"description":"A delete version","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}},"/fhir/R4/{resourceType}/{id}/$expunge":{"post":{"operationId":"FhirExpunge","x-mockingbird":{"supported":true,"parity":{"enabled":false,"safe":false,"reason":"Super admin only; erases history."}},"parameters":[{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Expunged","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"403":{"description":"Not a super admin","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"basicAuth":{"type":"http","scheme":"basic","description":"ClientApplication id and secret"}},"parameters":{"projectId":{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},"membershipId":{"name":"membershipId","in":"path","required":true,"schema":{"type":"string"}},"resourceType":{"name":"resourceType","in":"path","required":true,"schema":{"type":"string"}},"id":{"name":"id","in":"path","required":true,"schema":{"type":"string"}},"patientId":{"name":"id","in":"path","required":true,"schema":{"type":"string","x-mockingbird-resource-ref":{"type":"patient","missing":"not_found"}}}},"schemas":{"HealthStatus":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"version":{"type":"string"},"postgres":{"type":"boolean"},"redis":{"type":"boolean"}}},"LoginRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"clientId":{"type":"string"},"projectId":{"type":"string"},"scope":{"type":"string"},"codeChallenge":{"type":"string"},"codeChallengeMethod":{"type":"string","enum":["plain","S256"]}}},"LoginResponse":{"type":"object","required":["login"],"properties":{"login":{"type":"string"},"code":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"memberships":{"type":"array","items":{"type":"object"}}}},"TokenRequest":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["client_credentials","authorization_code","refresh_token"]},"client_id":{"type":"string"},"client_secret":{"type":"string"},"code":{"type":"string"},"code_verifier":{"type":"string"},"refresh_token":{"type":"string"},"scope":{"type":"string"}}},"TokenResponse":{"type":"object","required":["token_type","expires_in","access_token"],"properties":{"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer"},"scope":{"type":"string"},"access_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"id_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"refresh_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"project":{"type":"object"},"profile":{"type":"object"}}},"OAuthError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"InviteRequest":{"type":"object","required":["resourceType","firstName","lastName"],"properties":{"resourceType":{"type":"string","enum":["Patient","Practitioner","RelatedPerson"]},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"externalId":{"type":"string"},"password":{"type":"string"},"scope":{"type":"string","enum":["project","server"]},"admin":{"type":"boolean"},"sendEmail":{"type":"boolean"}}},"Resource":{"type":"object","required":["resourceType"],"properties":{"resourceType":{"type":"string"},"id":{"type":"string"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true},"Meta":{"type":"object","properties":{"versionId":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"lastUpdated":{"type":"string","format":"date-time","x-mockingbird-volatile":{"kind":"timestamp"}}}},"HumanName":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"family":{"type":"string","enum":["Lovelace","Turing","Zola","Hopper"]},"given":{"type":"array","minItems":1,"maxItems":2,"items":{"type":"string","enum":["Ada","Alan","Grace","Emile"]}}}},"HumanNameOutput":{"type":"object","additionalProperties":false,"properties":{"family":{"type":"string"},"given":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"PatientInput":{"type":"object","required":["resourceType"],"additionalProperties":false,"properties":{"resourceType":{"type":"string","enum":["Patient"]},"active":{"type":"boolean"},"gender":{"type":"string","enum":["male","female","other","unknown"]},"birthDate":{"type":"string","enum":["1815-12-10","1912-06-23","1906-12-09","1950-01-01"]},"name":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/HumanName"}}}},"Patient":{"type":"object","required":["resourceType","id","meta"],"properties":{"resourceType":{"type":"string","enum":["Patient"]},"id":{"type":"string","x-mockingbird-resource":{"type":"patient","identity":true}},"meta":{"$ref":"#/components/schemas/Meta"},"active":{"type":"boolean"},"gender":{"type":"string"},"birthDate":{"type":"string"},"name":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/HumanNameOutput"},{"type":"null"},{"type":"boolean"},{"type":"number"}]}}}},"PatientBundle":{"type":"object","required":["resourceType","type"],"properties":{"resourceType":{"type":"string","enum":["Bundle"]},"type":{"type":"string","enum":["searchset"]},"total":{"type":"integer"},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"type":"object"},"resource":{"$ref":"#/components/schemas/Patient"}}}},"link":{"type":"array","items":{"type":"object"}}}},"Bundle":{"type":"object","required":["resourceType","type"],"properties":{"resourceType":{"type":"string","enum":["Bundle"]},"type":{"type":"string"},"total":{"type":"integer"},"entry":{"type":"array","items":{"type":"object"}},"link":{"type":"array","items":{"type":"object"}}}},"OperationOutcome":{"type":"object","required":["resourceType","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"]},"id":{"type":"string"},"issue":{"type":"array","items":{"type":"object"}},"extension":{"type":"array","items":{"type":"object"}}}}}}}`);
|
|
9236
9245
|
var operationIds = ["GetRoot", "GetHealthcheck", "GetRobots", "GetJwks", "GetOpenIdConfiguration", "GetSmartConfiguration", "PostAuthLogin", "PostAuthProfile", "GetAuthMe", "PostOauth2Token", "GetOauth2UserInfo", "PostOauth2UserInfo", "GetOauth2Logout", "PostOauth2Logout", "GetAdminProject", "PostAdminProjectClient", "PostAdminProjectInvite", "PostAdminProjectSettings", "PostAdminProjectSecrets", "PostAdminProjectSites", "GetAdminProjectMember", "PostAdminProjectMember", "DeleteAdminProjectMember", "GetStorageBinary", "FhirSearchSystem", "FhirBatch", "FhirCapabilities", "FhirGraphql", "FhirBinaryUpload", "FhirBinaryRead", "FhirBinaryReplace", "SearchPatient", "CreatePatient", "ReadPatient", "UpdatePatient", "DeletePatient", "ReadPatientHistory", "PatientEverything", "FhirSearch", "FhirConditionalUpdate", "FhirCreate", "FhirConditionalDelete", "FhirConditionalPatch", "FhirSearchPost", "FhirValidate", "FhirRead", "FhirUpdate", "FhirDelete", "FhirPatch", "FhirHistory", "FhirVersionRead", "FhirExpunge"];
|
|
9237
9246
|
var supportedOperationIds = ["GetRoot", "GetHealthcheck", "GetRobots", "GetJwks", "GetOpenIdConfiguration", "GetSmartConfiguration", "PostAuthLogin", "PostAuthProfile", "GetAuthMe", "PostOauth2Token", "GetOauth2UserInfo", "PostOauth2UserInfo", "GetOauth2Logout", "PostOauth2Logout", "GetAdminProject", "PostAdminProjectClient", "PostAdminProjectInvite", "PostAdminProjectSettings", "PostAdminProjectSecrets", "PostAdminProjectSites", "GetAdminProjectMember", "PostAdminProjectMember", "DeleteAdminProjectMember", "GetStorageBinary", "FhirSearchSystem", "FhirBatch", "FhirCapabilities", "FhirGraphql", "FhirBinaryUpload", "FhirBinaryRead", "FhirBinaryReplace", "SearchPatient", "CreatePatient", "ReadPatient", "UpdatePatient", "DeletePatient", "ReadPatientHistory", "PatientEverything", "FhirSearch", "FhirConditionalUpdate", "FhirCreate", "FhirConditionalDelete", "FhirConditionalPatch", "FhirSearchPost", "FhirValidate", "FhirRead", "FhirUpdate", "FhirDelete", "FhirPatch", "FhirHistory", "FhirVersionRead", "FhirExpunge"];
|
|
9238
9247
|
|
|
@@ -9457,4 +9466,4 @@ export {
|
|
|
9457
9466
|
MEDPLUM_PRESETS,
|
|
9458
9467
|
createRuntime2 as createRuntime
|
|
9459
9468
|
};
|
|
9460
|
-
//# sourceMappingURL=chunk-
|
|
9469
|
+
//# sourceMappingURL=chunk-REW7RCV4.js.map
|