fix(comms): adds back some interfaces to wsDFUXRef#4465
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR restores missing interfaces and extends functionality in the wsDFUXRef service. The WSDL appears to be incomplete, missing several interface definitions that were previously defined manually, so this change adds them back and provides extended versions of functions where the WSDL incorrectly defines return types as strings instead of objects.
- Adds back manually defined interfaces that are missing from the WSDL
- Provides extended versions of DFUXRefDirectories and DFUXRefList functions with proper object return types
- Updates test to use the new extended function
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/comms/src/services/wsDFUXRef.ts | Adds missing interface definitions and extends two functions with proper return types |
| packages/comms/tests/dfuXRef.spec.ts | Updates test to use DFUXRefListEx instead of DFUXRefList |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
9c7351b to
daa2db5
Compare
|
@GordonSmith I don't think there's been situation like this one, where so many types were missing from the WSDL. The only thing similar I saw was ws_machine, where it has a WsMachineEx namespace; but everything in there is extending existing interfaces. But do you think these should be wrapped up in a namespace also? |
there are apparently several interfaces that were previously defined manually in the wsDFUXRef service file, but are missing from the WSDL. this adds back any such interfaces & extends two functions where the WSDL defines the return type as a string instead of an object. Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com>
daa2db5 to
b4f166f
Compare
|
@GordonSmith regarding merging namespaces - with "isolatedModules" enabled (https://github.com/hpcc-systems/Visualization/blob/trunk/packages/comms/tsconfig.json#L14) merging across files evidently isn't possible. At one point copilot had recommended creating an "augmentation file (eg packages/comms/src/services/wsDFUXRef.augment.d.ts)" with something like: declare module "./wsdl/WsDFUXRef/v1.04/WsDFUXRef.ts" {
export namespace WsDFUXRef {
//interfaces...
}
}I just opted for using a "WsDFUXRefEx" naming convention as had been done for ws_machine. |
3213c34 to
14ebe8b
Compare
there are apparently several interfaces that were previously defined manually in the wsDFUXRef service file, but are missing from the WSDL. this adds back any such interfaces & extends two functions where the WSDL defines the return type as a string instead of an object.
Checklist:
Testing: