feat: update embedded web API parity - #33
Merged
Morten Barklund (barklund) merged 6 commits intoJul 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the embedded-web package’s public types and demos to match the latest embedded Assistant API surface (template sources/inline templates, forced first-document generation, document generation limits), and adds a missing showDeviceLinkQR wrapper so the component API matches the generated embedded API.
Changes:
- Synced/expanded embedded payload + response types (inline templates, template source options,
maxGenerated, device-link response/status). - Added
showDeviceLinkQRaction/type wiring and a new publicCortiEmbedded.showDeviceLinkQR()wrapper. - Updated the HTML + React demos to showcase the new configuration and template capabilities.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/responses.ts | Adds companionApp to ConfigureAppResponse and introduces ShowDeviceLinkQRResponse. |
| src/types/protocol.ts | Adds showDeviceLinkQR to the protocol action/request unions and formats unions consistently. |
| src/types/payloads.ts | Adds inline template structures, expands template source options, and adds maxGenerated. |
| src/types/generated/interview-details.ts | Reformats the state union type (no behavior change). |
| src/types/config.ts | Introduces CompanionAppConfig and wires it into ConfigureAppPayload. |
| src/types/api.ts | Exposes showDeviceLinkQR on the public API typing surface. |
| src/public-types.ts | Re-exports/extends public types to include device-link types and showDeviceLinkQR. |
| src/CortiEmbedded.ts | Implements the new showDeviceLinkQR public wrapper via postMessage. |
| demo/typescript-demo.html | Expands demo payload examples to cover new config/template/document options. |
| demo/react-demo.tsx | Adds richer demo payload examples and minor formatting updates. |
| demo/index.html | Expands demo payload examples to cover new config/template/document options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Zoltan Hricz (hriczzoli)
previously approved these changes
Jul 13, 2026
Zoltan Hricz (hriczzoli)
left a comment
Contributor
There was a problem hiding this comment.
Looks great I just think some of the types have drifted a bit, probably due to the automatic PR:
- types/api
navigateis defined to accept astringbut in CortiEmbedded we do still accept an object as well. But the main thing is the in/public-typeswe have the correct interface - here we say setInteractionOptions PATCHES, but here the DOCSTRING is slightly contradictory
Zoltan Hricz (hriczzoli)
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
showDeviceLinkQRpublic wrapper and expose it through the React API hook so component APIs match the generated embedded API.Replaces #31 because
sync/embedded-typesis an automation-owned branch that gets reused.Fixes DXA-3696