{"_id":"doxy.me","_rev":"4-e66b00d1c032e80cb6fa26c85ee6438b","name":"doxy.me","dist-tags":{"latest":"1.2.1","alpha":"1.2.0-alpha.0"},"versions":{"1.0.0":{"name":"doxy.me","version":"1.0.0","keywords":["doxy.me","telemedicine","video","iframe","embed","sdk"],"author":"","license":"MIT","_id":"doxy.me@1.0.0","maintainers":[{"name":"dylntrnr","email":"dylan@doxy.me"}],"dist":{"shasum":"73ba3aea818b027830c3043e28dc82435a04ae6f","tarball":"https://registry.npmjs.org/doxy.me/-/doxy.me-1.0.0.tgz","fileCount":8,"integrity":"sha512-hk961RqWOXgsP5MAjfWLCWidmo6j1EHC+ByZqj9H7TM+1n3epOs82wweNYBGXk7j/wmBHIwyWxuTTCscbZx7cg==","signatures":[{"sig":"MEUCIF8TaPofz/EmlaLcw+6twd600Qj6AjtoDzR4IXLgZqq8AiEAwLvsTvg7MBGhwuB6BvIIAqQIZoGmvazfMqRtF3Pa3hU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34382},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","scripts":{"build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"dylntrnr","email":"dylan@doxy.me"},"repository":{"url":"","type":"git"},"_npmVersion":"10.8.2","description":"Embeddable SDK for easily iframing doxy.me into your application","directories":{},"_nodeVersion":"22.5.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.6.0","typescript":"^5.3.0","@types/node":"^20.10.0","@rollup/plugin-typescript":"^11.1.5"},"_npmOperationalInternal":{"tmp":"tmp/doxy.me_1.0.0_1762275464742_0.9557912132311086","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"doxy.me","version":"1.1.0","keywords":["doxy.me","telemedicine","video","iframe","embed","sdk"],"author":"","license":"MIT","_id":"doxy.me@1.1.0","maintainers":[{"name":"dylntrnr","email":"dylan@doxy.me"}],"dist":{"shasum":"244632c9e0c0a4097c5cc67bfe2113b6ca1ffe8d","tarball":"https://registry.npmjs.org/doxy.me/-/doxy.me-1.1.0.tgz","fileCount":8,"integrity":"sha512-4XtseCiR3eUbt7ArLpcRMJD9Kbpm5yU5OTuMXomD6aInT9ZcXjqlWOjBOMph9BR/DmllQR+0f/DthOiIBvYSAg==","signatures":[{"sig":"MEUCIQCjDSgcQ5Fc2qlGaizDF0+2xgyB5S6eVE6jpun6WN6AkgIgbrzAI67ElsT4b2RHw2EWNBx10Nl1FL3+cCZ1mD1D+t0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27428},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"c75a7c1d501fe7d2311cf906bb17f236832d3736","scripts":{"build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"dylntrnr","email":"dylan@doxy.me"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.4","description":"Embeddable SDK for easily iframing doxy.me into your application","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.6.0","typescript":"^5.3.0","@types/node":"^20.10.0","@rollup/plugin-typescript":"^11.1.5"},"_npmOperationalInternal":{"tmp":"tmp/doxy.me_1.1.0_1778087643466_0.6261723837888766","host":"s3://npm-registry-packages-npm-production"}},"1.2.0-alpha.0":{"name":"doxy.me","version":"1.2.0-alpha.0","keywords":["doxy.me","telemedicine","video","iframe","embed","sdk"],"author":"","license":"MIT","_id":"doxy.me@1.2.0-alpha.0","maintainers":[{"name":"dylntrnr","email":"dylan@doxy.me"},{"name":"mylesan","email":"myles@doxy.me"}],"homepage":"https://gitlab.com/doxyme/code/doxyme-embedded-npm#readme","bugs":{"url":"https://gitlab.com/doxyme/code/doxyme-embedded-npm/issues"},"dist":{"shasum":"65f84341dce79acf1f8ebb96717a52c1715f01a3","tarball":"https://registry.npmjs.org/doxy.me/-/doxy.me-1.2.0-alpha.0.tgz","fileCount":8,"integrity":"sha512-xzqMhLODSofDMKG02R/CLPYBZ7ZUQnyO3b2neAWpnTyuR66xq1YIuSKVNHZHpMNIlt/pSWHdgXedRA+4WxsW9A==","signatures":[{"sig":"MEQCIHiCcCvZNF6rcHAXb/gta+Di7kEqla/aLkQhIf/wu+5jAiBHGec1/ZOL+s0iR+Gbe/FsYjyODCE5crCquE44vmLwmw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":83797},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"8bed74d7b8de24f35f225ece4ce121b33f40220e","scripts":{"build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"mylesan","email":"myles@doxy.me"},"repository":{"url":"git+https://gitlab.com/doxyme/code/doxyme-embedded-npm.git","type":"git"},"_npmVersion":"10.9.4","description":"Embeddable SDK for easily iframing doxy.me into your application","directories":{},"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tslib":"^2.6.2","rollup":"^4.6.0","typescript":"^5.3.0","@types/node":"^20.10.0","@rollup/plugin-typescript":"^11.1.5"},"_npmOperationalInternal":{"tmp":"tmp/doxy.me_1.2.0-alpha.0_1778159189196_0.4262820131198699","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"doxy.me","version":"1.2.1","description":"Embeddable SDK for easily iframing doxy.me into your application","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"build":"rollup -c","prepublishOnly":"npm run build"},"keywords":["doxy.me","telemedicine","video","iframe","embed","sdk"],"author":"","license":"MIT","devDependencies":{"@rollup/plugin-typescript":"^11.1.5","@types/node":"^20.10.0","rollup":"^4.6.0","tslib":"^2.6.2","typescript":"^5.3.0"},"repository":{"type":"git","url":"git+https://gitlab.com/doxyme/code/doxyme-embedded-npm.git"},"_id":"doxy.me@1.2.1","gitHead":"8bed74d7b8de24f35f225ece4ce121b33f40220e","bugs":{"url":"https://gitlab.com/doxyme/code/doxyme-embedded-npm/issues"},"homepage":"https://gitlab.com/doxyme/code/doxyme-embedded-npm#readme","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-XX6mX8mCpTXnpsOtE/UD9nf84T/Yk4COctFOIiyrVSKCISSgs8bF9Bs2Vr5Bcg0rwodGfG/iQcwTkTKFbe6LrA==","shasum":"7657741f9a653938578ec36abfccc3452f7912cd","tarball":"https://registry.npmjs.org/doxy.me/-/doxy.me-1.2.1.tgz","fileCount":8,"unpackedSize":87306,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCH0qpQzh8fNLwhiWE9+X9L9NsRlX/vvE7HbImypkRGYYCIQDKeBXnDhsaUdpzglV91OMzXVqW85ObhRHYVV/kkbVZvQ=="}]},"_npmUser":{"name":"mylesan","email":"myles@doxy.me"},"directories":{},"maintainers":[{"name":"dylntrnr","email":"dylan@doxy.me"},{"name":"mylesan","email":"myles@doxy.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/doxy.me_1.2.1_1778263795823_0.9243161267967221"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-04T16:57:44.741Z","modified":"2026-05-08T18:09:56.065Z","1.0.0":"2025-11-04T16:57:44.933Z","1.1.0":"2026-05-06T17:14:03.643Z","1.2.0-alpha.0":"2026-05-07T13:06:29.356Z","1.2.1":"2026-05-08T18:09:55.952Z"},"license":"MIT","keywords":["doxy.me","telemedicine","video","iframe","embed","sdk"],"repository":{"type":"git","url":"git+https://gitlab.com/doxyme/code/doxyme-embedded-npm.git"},"description":"Embeddable SDK for easily iframing doxy.me into your application","maintainers":[{"name":"dylntrnr","email":"dylan@doxy.me"},{"name":"mylesan","email":"myles@doxy.me"}],"readme":"# Doxy.me Embeddable SDK\n\nEasily embed doxy.me into your application using iframes.\n\n```bash\nnpm install doxy.me\n```\n\n> **What's new in 1.2.x**\n>\n> - **1.2.1** — **`patientId`** on `embedPatientRoom` — forwarded as `?pid=…` for EHR / external correlation (V1 + V2). See [Patient identifier (`pid`)](#patient-identifier-pid).\n> - **1.2.0** — `version: 'v1' | 'v2'` on the helpers — opt into the new V2 frontend (`/v2/sign-in`, `/v2/check-in/{slug}`)\n> - **1.2.0** — `baseUrl` override — point at staging / QA / ephemeral environments\n> - **1.2.0** — `username`, `autoCheckIn`, `passcode` first-class options on `embedPatientRoom` for headless patient flows\n> - Patch releases remain **fully backwards compatible** — defaults match 1.1.0 behaviour\n\n## Usage\n\n### Basic\n\nEmbed any doxy.me URL:\n\n```javascript\nimport { embedDoxyMe } from 'doxy.me';\n\nconst { iframe, destroy } = embedDoxyMe('#doxy-container', {\n  url: 'https://doxy.me/sign-in',\n  width: '100%',\n  height: '600px',\n});\n\n// destroy(); // when done\n```\n\n### Provider sign-in\n\n```javascript\nimport { embedProviderSignIn } from 'doxy.me';\n\nembedProviderSignIn('#doxy-container', {\n  width: '100%',\n  height: '700px',\n});\n```\n\nBy default this embeds the **legacy V1 frontend** (`/sign-in`). To embed the new V2 frontend instead:\n\n```javascript\nembedProviderSignIn('#doxy-container', {\n  version: 'v2',          // → https://doxy.me/v2/sign-in\n  width: '100%',\n  height: '700px',\n});\n```\n\n### Patient room\n\n```javascript\nimport { embedPatientRoom } from 'doxy.me';\n\nembedPatientRoom('#doxy-container', 'patient-room-123', {\n  width: '100%',\n  height: '800px',\n});\n```\n\nV2 supports nested room slugs (e.g. `clinic/room`):\n\n```javascript\nembedPatientRoom('#doxy-container', 'ourclinic/myles', {\n  version: 'v2',          // → https://doxy.me/v2/check-in/ourclinic/myles\n});\n```\n\n### Headless / auto check-in\n\nPre-fill the patient's name and skip the manual check-in steps entirely. The patient lands directly in the provider's waiting room:\n\n```javascript\nembedPatientRoom('#doxy-container', 'ourclinic/myles', {\n  version: 'v2',\n  username: 'Jane Doe',\n  autoCheckIn: true,\n});\n```\n\nURL produced:\n`https://doxy.me/v2/check-in/ourclinic/myles?utm_source=embed-sdk&sdk_version=1.2.1&username=Jane%20Doe&autocheckin=true`\n\n> Auto check-in on V1 is supported today. On V2 it requires the autocheckin feature shipped via doxyme-core MR !12913 (post-deploy to QA2 / production).\n\n### Patient identifier (`pid`)\n\nPass an external patient identifier from your system — typically an EHR record ID — that doxy.me keeps available alongside the session for correlation purposes:\n\n```javascript\nembedPatientRoom('#consult', 'clinic/room', {\n  version: 'v2',\n  username: 'Jane Doe',\n  patientId: 'ehr-9876',\n  autoCheckIn: true,\n});\n```\n\nThe value is forwarded as `?pid=…` and is opaque to doxy.me. It is not pushed into the realtime channel and never logged in PHI-sensitive contexts. Works on both V1 (legacy OG) and V2 frontends.\n\n### Passcode-protected rooms\n\nIf a provider has gated their room with a passcode, pass it alongside `autoCheckIn`. The passcode is auto-validated server-side; if the URL value is wrong (or absent for a passcode-required room), the patient sees the standard passcode-entry UX as a graceful fallback. Provider passcode intent is never bypassed.\n\n```javascript\nembedPatientRoom('#doxy-container', 'ourclinic/myles', {\n  version: 'v2',\n  username: 'Jane Doe',\n  autoCheckIn: true,\n  passcode: 'secret123',\n});\n```\n\n### Targeting non-production environments\n\nFor staging, QA, or ephemeral environments, override the origin with `baseUrl`.\n\nMR **!12913** (V2 autocheckin) ephemeral with a known-good room (`/mylesanclinic/triage`):\n\n```javascript\nembedPatientRoom('#doxy-container', 'mylesanclinic/triage', {\n  version: 'v2',\n  baseUrl: 'https://core-12913.doxy-ephemeral.me',\n  username: 'Jane Doe',\n  autoCheckIn: true,\n});\n```\n\nOther hosts (QA2/CDN Basic Auth often blocks localhost iframes):\n\n```javascript\nembedPatientRoom('#doxy-container', 'my-room-slug', {\n  version: 'v2',\n  baseUrl: 'https://doxy-qa2.me',\n  username: 'Jane Doe',\n  autoCheckIn: true,\n});\n```\n\n### Using a CSS selector\n\n```javascript\nembedDoxyMe('#doxy-container', { url: 'https://doxy.me/sign-in' });\n```\n\n### Advanced options\n\n```javascript\nembedDoxyMe('#doxy-container', {\n  url: 'https://doxy.me/sign-in',\n  width: '100%',\n  height: '600px',\n  allow: 'camera; microphone; fullscreen',\n  className: 'doxy-iframe',\n  id: 'doxy-iframe-1',\n  style: {\n    borderRadius: '8px',\n    boxShadow: '0 2px 8px rgba(0,0,0,0.1)',\n  },\n  onLoad: () => console.log('Doxy.me iframe loaded'),\n  onError: (error) => console.error('Error loading doxy.me:', error),\n});\n```\n\n## Analytics\n\nEvery iframe URL includes `utm_source=embed-sdk` and `sdk_version=<version>` automatically. No additional network requests are made — these flow through doxy.me's existing analytics.\n\nYou can append your own tracking params via `trackingParams`:\n\n```javascript\nembedDoxyMe('#doxy-container', {\n  url: 'https://doxy.me/sign-in',\n  trackingParams: {\n    utm_campaign: 'my-app',\n    utm_medium: 'embed',\n  },\n});\n```\n\n`trackingParams` wins on conflicts with built-in keys, so an explicit `utm_source` will override the default.\n\n## API reference\n\n### `embedDoxyMe(container, options)`\n\nGeneric iframe embedder.\n\n- `container` (`HTMLElement | string`): DOM element or CSS selector\n- `options.url` (string, required): URL to embed\n- `options.width` / `options.height` (`string | number`, optional): iframe dimensions (defaults: `'100%'` × `'600px'`)\n- `options.allow` (string, optional): iframe `allow` attribute (default: `'camera; microphone; fullscreen'`)\n- `options.sandbox` (string, optional): iframe `sandbox` attribute\n- `options.className`, `options.id`, `options.style` (optional): standard HTML attributes\n- `options.onLoad`, `options.onError` (optional): event callbacks\n- `options.trackingParams` (`Record<string, string>`, optional): extra URL params\n\nReturns: `{ iframe: HTMLIFrameElement, destroy: () => void }`\n\n### `embedProviderSignIn(container, options?)`\n\nEmbeds the provider sign-in page.\n\n- All `embedDoxyMe` options except `url`\n- `options.version` (`'v1' | 'v2'`, optional, default `'v1'`)\n- `options.baseUrl` (string, optional, default `'https://doxy.me'`)\n\n### `embedPatientRoom(container, roomSlug, options?)`\n\nEmbeds a patient room (waiting room / check-in flow).\n\n- `roomSlug` (string, required): room identifier. V2 supports nested slugs (`clinic/room`).\n- All `embedDoxyMe` options except `url`\n- `options.version` (`'v1' | 'v2'`, optional, default `'v1'`)\n- `options.baseUrl` (string, optional, default `'https://doxy.me'`)\n- `options.username` (string, optional): pre-fills the patient's name\n- `options.autoCheckIn` (boolean, optional): adds `?autocheckin=true`\n- `options.passcode` (string, optional): adds `?passcode=…`\n- `options.patientId` (string, optional): adds `?pid=…` (external / EHR correlation id)\n\n## React example\n\n```jsx\nimport { useEffect, useRef } from 'react';\nimport { embedPatientRoom } from 'doxy.me';\n\nfunction PatientEmbed({ roomSlug, patientName }) {\n  const ref = useRef(null);\n\n  useEffect(() => {\n    if (!ref.current) return;\n    const { destroy } = embedPatientRoom(ref.current, roomSlug, {\n      version: 'v2',\n      username: patientName,\n      autoCheckIn: true,\n      width: '100%',\n      height: '100%',\n    });\n    return () => destroy();\n  }, [roomSlug, patientName]);\n\n  return <div ref={ref} style={{ height: 800 }} />;\n}\n```\n\n## Vanilla JS example\n\n```html\n<!doctype html>\n<html>\n  <head><title>Doxy.me Embed</title></head>\n  <body>\n    <div id=\"doxy-container\" style=\"height: 800px\"></div>\n    <script type=\"module\">\n      import { embedPatientRoom } from 'doxy.me';\n      embedPatientRoom('#doxy-container', 'patient-room-123', {\n        version: 'v2',\n        autoCheckIn: true,\n        username: 'Jane Doe',\n      });\n    </script>\n  </body>\n</html>\n```\n\n## Demo\n\nA runnable Vite + React reference app lives under [`demo/`](./demo). It shows both the provider sign-in and patient autocheckin flows end-to-end against any environment (production, QA2, staging, ephemeral).\n\n```bash\ncd demo\ncp .env.example .env.local  # then edit VITE_DOXY_BASE_URL\nnpm install\nnpm run dev\n```\n\n## Development\n\n```bash\nnpm install\nnpm run build  # produces dist/index.js, dist/index.esm.js, dist/index.d.ts\n```\n\nThe package publishes the contents of `dist/` and `README.md` only.\n\n## License\n\nMIT\n","readmeFilename":"README.md","homepage":"https://gitlab.com/doxyme/code/doxyme-embedded-npm#readme","bugs":{"url":"https://gitlab.com/doxyme/code/doxyme-embedded-npm/issues"}}