Add ContextWithMetadata to IntentResult - #2020
Conversation
✅ Deploy Preview for fdc3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
kriswest
left a comment
There was a problem hiding this comment.
Apparently fixing this causing an example app to blow up as its expecting a type property on a non-void result (both channel and context have type). So a legitimate build fail apparently.
See the netlify build log: server-apps/security-demo-app1/src/app1.ts
…h-metadata-to-intent-result
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2020 +/- ##
=======================================
Coverage 95.10% 95.11%
=======================================
Files 73 73
Lines 4190 4196 +6
Branches 670 581 -89
=======================================
+ Hits 3985 3991 +6
Misses 205 205 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Apologies this has picked up a couple of conflicts in need of manual resolution |
…h-metadata-to-intent-result # Conflicts: # website/docs/api/ref/Metadata.md # website/docs/api/ref/Types.md
|
RE-review after rebase so we can read the docs |
|
Need to address go and .NET type defintions to deal with IntentResolutionResult. Their definitions will be different... |
…h-metadata-to-intent-result
kriswest
left a comment
There was a problem hiding this comment.
LGTM, but doesn't address the .NET and go binding updates fully. We can deal with that during the final pass for .NET and Go to sync them with FDC3 3.0 (@kemerava @bingenito)
What changed
ContextWithMetadatato the TypeScriptIntentResultunion.Why
The
IntentResultdocumentation explains that intent handlers may returnContextWithMetadata, but the documented and exported TypeScript union omitted it. This made the type declaration inconsistent with the supported handler result described immediately below it.Impact
TypeScript consumers can now use
ContextWithMetadataas anIntentResult, and the published API reference accurately reflects the union.Validation
npm test --workspace packages/fdc3-standard— 5 test files passed, 14 tests passed.git diff --check