[ML] Typescripting client side endpoint functions#59928
Conversation
|
Pinging @elastic/ml-ui (:ml) |
8344c47 to
59e7c79
Compare
walterra
left a comment
There was a problem hiding this comment.
LGTM, just added suggestion about adding types for data frame analytics endpoints.
There was a problem hiding this comment.
You could use DataFrameAnalyticsConfig from data_frame_analytics/common/analytics.ts maybe?
There was a problem hiding this comment.
the places where createDataFrameAnalytics is called aren't supplying a DataFrameAnalyticsConfig object.
It looks like a DeepPartial<DataFrameAnalyticsConfig>.
I've updated the expected type to be DeepPartial<DataFrameAnalyticsConfig>.
There was a problem hiding this comment.
You could use DataFrameAnalyticsConfig from data_frame_analytics/common/analytics.ts maybe?
There was a problem hiding this comment.
this also needs to be a DeepPartial<DataFrameAnalyticsConfig>
There was a problem hiding this comment.
You could use DataFrameAnalyticsConfig from data_frame_analytics/common/analytics.ts maybe?
There was a problem hiding this comment.
it looks the evaluate config is something different altogether. without wanting to create a new type here, i'm going to leave this as any
060b9a0 to
3ecbba2
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* [ML] Typescripting client side endpoint functions * type clean up * cleaning up http requests * remove http generics * better use of generics and type clean up * removes some generics * update comment * updating data frame analytics types * fixing type errors
* master: (45 commits) skip flaky suite (elastic#59717) UI Metrics use findAll to retrieve all Saved Objects (elastic#59891) [Discover] Migrate Context mocha tests to use Jest (elastic#59658) [Maps] Move redux reducers and store logic to NP (elastic#58294) rebalance x-pack groups (elastic#58930) [Discover] Reimplement $route.reload when index pattern changes (elastic#59877) [Upgrade Assistant Meta] Breaking changes issue template (elastic#59745) Skip CI based on changes in PR (elastic#59939) [ML] Transforms: Replace KqlFilterBar with QueryStringInput. (elastic#59723) [ML] Functional tests - stabilize date_nanos test (elastic#59986) [ML] Typescripting client side endpoint functions (elastic#59928) a11y tests on adding columns to discover table (elastic#59375) fix graph plugin config path (elastic#59540) fix vega config issues (elastic#59737) [Upgrade Assistant] Open And Close Slight Refactor (elastic#59890) [ML] Adding shared services to ml setup contract (elastic#59730) [Visualize] Fix linked search behavior (elastic#59690) [ML] Register NP ML plugin for Kibana management section. (elastic#59762) [Lens] Adds using queries/filters for field existence endpoint (elastic#59033) Delete FilterStateManager and QueryFilter :-D (elastic#59872) ...
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
* [ML] Typescripting client side endpoint functions * type clean up * cleaning up http requests * remove http generics * better use of generics and type clean up * removes some generics * update comment * updating data frame analytics types * fixing type errors Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Most endpoint functions either return
Promise<any>orPromise<specific type>where the type is defined in or imported into the file.Future work is needed to complete these missing types so none of the functions return an
any.It would also be good to restructure the index.ts file to split it up into smaller files. It was the original endpoint file and so has grown to be very large and contains a variety of functions which could go into separate sub sections.