kibana/x-pack/plugins/ml/common/index.ts
Walter Rafelsberger bc2bb0d77a
[8.x] [ML] Move FieldStatsFlyout, parseInterval, validators to packages. (#193657) (#193859)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)](https://github.com/elastic/kibana/pull/193657)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2024-09-24T12:00:55Z","message":"[ML]
Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)\n\n## Summary\r\n\r\nPart of #159917.\r\n\r\nMoves code from
`plugins/ml/common|public` to packages that is used by\r\ntransforms
too.\r\n\r\nWhile the transforms plugin is maintained by the ML team
too, the\r\ntransform plugin itself is independently available from the
ML UI in the\r\nKibana management section. We should try to avoid that
the transform\r\nplugin is directly depending on the `ml` plugin. This
PR moves some code\r\nfrom `plugins/ml/common|public` to packages so
that we can remove `ml`\r\nfrom the list of `requiredBundles` of the
`transform` plugin.\r\n\r\nThe packages were created with these
commands:\r\n\r\n```\r\nnode scripts/generate package
@kbn/ml-field-stats-flyout --dir
./x-pack/packages/ml/field_stats_flyout\r\nnode scripts/generate package
@kbn/ml-parse-interval --dir ./x-pack/packages/ml/parse_interval\r\nnode
scripts/generate package @kbn/ml-validators --dir
./x-pack/packages/ml/validators\r\n```\r\n\r\nThe following commands
were used to check missing jsdoc comments
and\r\nexports:\r\n\r\n```\r\nnode scripts/build_api_docs --plugin
@kbn/ml-field-stats-flyout --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats
exports\r\nnode scripts/build_api_docs --plugin @kbn/ml-parse-interval
--stats comments\r\nnode scripts/build_api_docs --plugin
@kbn/ml-parse-interval --stats exports\r\nnode scripts/build_api_docs
--plugin @kbn/ml-validators --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-validators --stats
exports\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b2d85d5f8f10f7c460c3a3b732844a19c8b20d7b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Feature:Transforms","v9.0.0","backport:prev-minor","v8.16.0"],"number":193657,"url":"https://github.com/elastic/kibana/pull/193657","mergeCommit":{"message":"[ML]
Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)\n\n## Summary\r\n\r\nPart of #159917.\r\n\r\nMoves code from
`plugins/ml/common|public` to packages that is used by\r\ntransforms
too.\r\n\r\nWhile the transforms plugin is maintained by the ML team
too, the\r\ntransform plugin itself is independently available from the
ML UI in the\r\nKibana management section. We should try to avoid that
the transform\r\nplugin is directly depending on the `ml` plugin. This
PR moves some code\r\nfrom `plugins/ml/common|public` to packages so
that we can remove `ml`\r\nfrom the list of `requiredBundles` of the
`transform` plugin.\r\n\r\nThe packages were created with these
commands:\r\n\r\n```\r\nnode scripts/generate package
@kbn/ml-field-stats-flyout --dir
./x-pack/packages/ml/field_stats_flyout\r\nnode scripts/generate package
@kbn/ml-parse-interval --dir ./x-pack/packages/ml/parse_interval\r\nnode
scripts/generate package @kbn/ml-validators --dir
./x-pack/packages/ml/validators\r\n```\r\n\r\nThe following commands
were used to check missing jsdoc comments
and\r\nexports:\r\n\r\n```\r\nnode scripts/build_api_docs --plugin
@kbn/ml-field-stats-flyout --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats
exports\r\nnode scripts/build_api_docs --plugin @kbn/ml-parse-interval
--stats comments\r\nnode scripts/build_api_docs --plugin
@kbn/ml-parse-interval --stats exports\r\nnode scripts/build_api_docs
--plugin @kbn/ml-validators --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-validators --stats
exports\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b2d85d5f8f10f7c460c3a3b732844a19c8b20d7b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193657","number":193657,"mergeCommit":{"message":"[ML]
Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)\n\n## Summary\r\n\r\nPart of #159917.\r\n\r\nMoves code from
`plugins/ml/common|public` to packages that is used by\r\ntransforms
too.\r\n\r\nWhile the transforms plugin is maintained by the ML team
too, the\r\ntransform plugin itself is independently available from the
ML UI in the\r\nKibana management section. We should try to avoid that
the transform\r\nplugin is directly depending on the `ml` plugin. This
PR moves some code\r\nfrom `plugins/ml/common|public` to packages so
that we can remove `ml`\r\nfrom the list of `requiredBundles` of the
`transform` plugin.\r\n\r\nThe packages were created with these
commands:\r\n\r\n```\r\nnode scripts/generate package
@kbn/ml-field-stats-flyout --dir
./x-pack/packages/ml/field_stats_flyout\r\nnode scripts/generate package
@kbn/ml-parse-interval --dir ./x-pack/packages/ml/parse_interval\r\nnode
scripts/generate package @kbn/ml-validators --dir
./x-pack/packages/ml/validators\r\n```\r\n\r\nThe following commands
were used to check missing jsdoc comments
and\r\nexports:\r\n\r\n```\r\nnode scripts/build_api_docs --plugin
@kbn/ml-field-stats-flyout --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats
exports\r\nnode scripts/build_api_docs --plugin @kbn/ml-parse-interval
--stats comments\r\nnode scripts/build_api_docs --plugin
@kbn/ml-parse-interval --stats exports\r\nnode scripts/build_api_docs
--plugin @kbn/ml-validators --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-validators --stats
exports\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b2d85d5f8f10f7c460c3a3b732844a19c8b20d7b"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2024-09-24 08:44:26 -05:00

12 lines
616 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
export { getDefaultCapabilities as getDefaultMlCapabilities } from './types/capabilities';
export { DATAFEED_STATE, JOB_STATE } from './constants/states';
export type { MlSummaryJob, SummaryJobState } from './types/anomaly_detection_jobs';
export { ML_ALERT_TYPES } from './constants/alerts';
export type { Job, Datafeed } from './types/anomaly_detection_jobs';