diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index 9a73a5a00e8d6..052f6623dc1a6 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -322,6 +322,7 @@ enabled: - x-pack/test/functional/apps/saved_query_management/config.ts - x-pack/test/functional/apps/security/config.ts - x-pack/test/functional/apps/slo/embeddables/config.ts + - x-pack/test/functional/apps/search_playground/config.ts - x-pack/test/functional/apps/snapshot_restore/config.ts - x-pack/test/functional/apps/spaces/config.ts - x-pack/test/functional/apps/spaces/in_solution_navigation/config.ts diff --git a/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml b/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml index 32f78b24e8d23..6679e3006bb00 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml @@ -19,7 +19,7 @@ spec: description: Run Kibana FIPS smoke tests spec: env: - SLACK_NOTIFICATIONS_CHANNEL: "#kibana-operations-alerts" + SLACK_NOTIFICATIONS_CHANNEL: "#kibana-fips-ftr-errors" ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true" repository: elastic/kibana branch_configuration: main @@ -30,7 +30,7 @@ spec: schedules: daily: branch: main - cronline: 0 9 * * * America/New_York + cronline: 0 5 * * * America/New_York teams: kibana-operations: access_level: MANAGE_BUILD_AND_READ diff --git a/.github/workflows/alert-failed-test.yml b/.github/workflows/alert-failed-test.yml new file mode 100644 index 0000000000000..03d46cb65fcfd --- /dev/null +++ b/.github/workflows/alert-failed-test.yml @@ -0,0 +1,28 @@ +on: + issue_comment: + types: [created] + +jobs: + issue_alert: + name: Alert on failed test + if: | + !github.event.issue.pull_request + && github.event.comment.user.login == 'kibanamachine' + runs-on: ubuntu-latest + steps: + - name: Checkout kibana-operations + uses: actions/checkout@v4 + with: + repository: 'elastic/kibana-operations' + ref: main + path: ./kibana-operations + token: ${{secrets.KIBANAMACHINE_TOKEN}} + + - name: Label failed test issue + working-directory: ./kibana-operations/triage + env: + GITHUB_TOKEN: ${{secrets.KIBANAMACHINE_TOKEN}} + SLACK_TOKEN: ${{secrets.SLACK_TOKEN_FAILED_TEST_NOTIFIER}} + run: | + npm ci --omit=dev + node failed-test-alert ${{github.event.issue.number}} || true diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 0d8591b85a84c..3ba234b98bbcb 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index e9a421e888be2..8336441b9f9af 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index e02245146f91b..6685b071320f1 100644 --- a/api_docs/ai_assistant_management_selection.mdx +++ b/api_docs/ai_assistant_management_selection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection title: "aiAssistantManagementSelection" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementSelection plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 7ecce04ce1e65..1a335060d4c1b 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index b28eb1bfdaf88..fe1caf5bed1bb 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index 6931292f8d133..84ad7ebed719e 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -144,7 +144,7 @@ "section": "def-common.NonEmptyStringBrand", "text": "NonEmptyStringBrand" }, - ">; }; })>; }" + ">; } & { kuery?: string | undefined; rangeFrom?: string | undefined; rangeTo?: string | undefined; }; })>; }" ], "path": "x-pack/plugins/observability_solution/apm/public/plugin.ts", "deprecated": false, diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 2c3da0893ff2a..765707f572888 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index f50b0eea77370..2a57372e37479 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx index b0ff0227b6d01..c85c92d8cc279 100644 --- a/api_docs/asset_manager.mdx +++ b/api_docs/asset_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager title: "assetManager" image: https://source.unsplash.com/400x175/?github description: API docs for the assetManager plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx index 401513ef27e18..986740b48784d 100644 --- a/api_docs/assets_data_access.mdx +++ b/api_docs/assets_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess title: "assetsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the assetsDataAccess plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess'] --- import assetsDataAccessObj from './assets_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 31fbbf7e94578..931af986b5143 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index bba0e4c29bab6..3a1fcdb56c0d4 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 24ed742c77f02..6cee45110a267 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 1c3da2e8f7236..83ea6810a8a8e 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 1307d78b19c43..0374ab0494cc8 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index ae1f4c9893e4f..6b9217bd04591 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index 3c32678ea6a9d..6745793c454e4 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 8de28a174848f..5a2b7696074f7 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index e6e64081f4816..f46a01bc6c79b 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index d3be4f1ecfc58..0dbe0774fb1b5 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index c8c436075e006..8c0c47f1336d3 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index 3d97d8d324d82..59b293bd5ec6a 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 4bb2d4f5b695e..609d39dd79547 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index d20c0d817bad2..1abe7d23506b4 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index ebc2ca136d543..d081fe81ca480 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index ed8a799c2e890..9d269b4688230 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 1a5d1f793c624..4b2df0a95ff64 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 72ec9098d970b..eb502463b92f8 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index f9e1313b825b5..e442ef8638e71 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index e14fbb84c8c3e..c5ea0b034a429 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 47f679b648687..259ff61fdab8d 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index dc854eb2bc307..ade400cbafe2c 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index be2d13723e34b..89f51b914ebaf 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 0ce9929024c75..ee20462caa503 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 5cc8ac5c6b11b..f9b500c0537a8 100644 --- a/api_docs/dataset_quality.mdx +++ b/api_docs/dataset_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality title: "datasetQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the datasetQuality plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 7fdfb650df82d..f9d6ff0d62153 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 18390038fa500..c9a6228b657e6 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 919da7d93a174..499661402ab00 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index fe61ae6d29a50..796e4ba0bad3b 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 14de89d8f6e4b..05fdd00439054 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 653c09fe0385f..239c249d26bf0 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx index 97c75e0d7949e..0418f3237d1fc 100644 --- a/api_docs/discover_shared.mdx +++ b/api_docs/discover_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverShared title: "discoverShared" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverShared plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared'] --- import discoverSharedObj from './discover_shared.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 4c6d8f24223ab..369a51bfc9721 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index c1d9e7f1f3dab..4bc8321f96848 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index 24e5f07f0453a..1322b23c1e5da 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -443,37 +443,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.Container.lastSavedState", - "type": "Object", - "tags": [], - "label": "lastSavedState", - "description": [], - "signature": [ - "Subject", - "" - ], - "path": "src/plugins/embeddable/public/lib/containers/container.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.Container.getLastSavedStateForChild", - "type": "Function", - "tags": [], - "label": "getLastSavedStateForChild", - "description": [], - "signature": [ - "() => undefined" - ], - "path": "src/plugins/embeddable/public/lib/containers/container.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, { "parentPluginId": "embeddable", "id": "def-public.Container.Unnamed", @@ -8929,7 +8898,7 @@ "\nRenders a component from the React Embeddable registry into a Presentation Panel.\n\nTODO: Rename this to simply `Embeddable` when the legacy Embeddable system is removed." ], "signature": [ - " = ", + " = ", { "pluginId": "embeddable", "scope": "public", @@ -8945,15 +8914,23 @@ "section": "def-public.DefaultEmbeddableApi", "text": "DefaultEmbeddableApi" }, - ">({ maybeId, type, state, parentApi, onApiAvailable, panelProps, onAnyStateChange, hidePanelChrome, }: { maybeId?: string | undefined; type: string; state: ", + ", RuntimeState extends object = SerializedState, ParentApi extends ", { "pluginId": "@kbn/presentation-containers", "scope": "common", "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" + "section": "def-common.HasSerializedChildState", + "text": "HasSerializedChildState" }, - "; parentApi?: unknown; onApiAvailable?: ((api: ApiType) => void) | undefined; panelProps?: Pick<", + " = ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasSerializedChildState", + "text": "HasSerializedChildState" + }, + ">({ type, maybeId, getParentApi, panelProps, onAnyStateChange, onApiAvailable, hidePanelChrome, }: { type: string; maybeId?: string | undefined; getParentApi: () => ParentApi; onApiAvailable?: ((api: Api) => void) | undefined; panelProps?: Pick<", { "pluginId": "presentationPanel", "scope": "public", @@ -8961,7 +8938,7 @@ "section": "def-public.PresentationPanelProps", "text": "PresentationPanelProps" }, - ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideHeader\" | \"hideInspector\"> | undefined; hidePanelChrome?: boolean | undefined; onAnyStateChange?: ((state: ", + ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideHeader\" | \"hideInspector\"> | undefined; hidePanelChrome?: boolean | undefined; onAnyStateChange?: ((state: ", { "pluginId": "@kbn/presentation-containers", "scope": "common", @@ -8969,7 +8946,7 @@ "section": "def-common.SerializedPanelState", "text": "SerializedPanelState" }, - ") => void) | undefined; }) => JSX.Element" + ") => void) | undefined; }) => JSX.Element" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -8980,26 +8957,12 @@ "id": "def-public.ReactEmbeddableRenderer.$1", "type": "Object", "tags": [], - "label": "{\n maybeId,\n type,\n state,\n parentApi,\n onApiAvailable,\n panelProps,\n onAnyStateChange,\n hidePanelChrome,\n}", + "label": "{\n type,\n maybeId,\n getParentApi,\n panelProps,\n onAnyStateChange,\n onApiAvailable,\n hidePanelChrome,\n}", "description": [], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableRenderer.$1.maybeId", - "type": "string", - "tags": [], - "label": "maybeId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "embeddable", "id": "def-public.ReactEmbeddableRenderer.$1.type", @@ -9013,20 +8976,13 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableRenderer.$1.state", - "type": "Object", + "id": "def-public.ReactEmbeddableRenderer.$1.maybeId", + "type": "string", "tags": [], - "label": "state", + "label": "maybeId", "description": [], "signature": [ - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" - }, - "" + "string | undefined" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -9034,17 +8990,19 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableRenderer.$1.parentApi", - "type": "Unknown", + "id": "def-public.ReactEmbeddableRenderer.$1.getParentApi", + "type": "Function", "tags": [], - "label": "parentApi", + "label": "getParentApi", "description": [], "signature": [ - "unknown" + "() => ParentApi" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [], + "returnComment": [] }, { "parentPluginId": "embeddable", @@ -9054,7 +9012,7 @@ "label": "onApiAvailable", "description": [], "signature": [ - "((api: ApiType) => void) | undefined" + "((api: Api) => void) | undefined" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -9068,7 +9026,7 @@ "label": "api", "description": [], "signature": [ - "ApiType" + "Api" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -9094,7 +9052,7 @@ "section": "def-public.PresentationPanelProps", "text": "PresentationPanelProps" }, - ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideHeader\" | \"hideInspector\"> | undefined" + ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideHeader\" | \"hideInspector\"> | undefined" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -9132,7 +9090,7 @@ "section": "def-common.SerializedPanelState", "text": "SerializedPanelState" }, - ") => void) | undefined" + ") => void) | undefined" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -9153,7 +9111,7 @@ "section": "def-common.SerializedPanelState", "text": "SerializedPanelState" }, - "" + "" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -9349,119 +9307,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.startTrackingEmbeddableUnsavedChanges", - "type": "Function", - "tags": [], - "label": "startTrackingEmbeddableUnsavedChanges", - "description": [], - "signature": [ - "(uuid: string, parentApi: unknown, comparators: ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.StateComparators", - "text": "StateComparators" - }, - ", deserializeState: (state: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" - }, - ") => RuntimeState) => { unsavedChanges: ", - "BehaviorSubject", - "; resetUnsavedChanges: () => void; cleanup: () => void; } | { unsavedChanges: ", - "BehaviorSubject", - " | undefined>; resetUnsavedChanges: () => void; cleanup: () => void; }" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.startTrackingEmbeddableUnsavedChanges.$1", - "type": "string", - "tags": [], - "label": "uuid", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "embeddable", - "id": "def-public.startTrackingEmbeddableUnsavedChanges.$2", - "type": "Unknown", - "tags": [], - "label": "parentApi", - "description": [], - "signature": [ - "unknown" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "embeddable", - "id": "def-public.startTrackingEmbeddableUnsavedChanges.$3", - "type": "Object", - "tags": [], - "label": "comparators", - "description": [], - "signature": [ - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.StateComparators", - "text": "StateComparators" - }, - "" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "embeddable", - "id": "def-public.startTrackingEmbeddableUnsavedChanges.$4", - "type": "Function", - "tags": [], - "label": "deserializeState", - "description": [], - "signature": [ - "(state: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" - }, - ") => RuntimeState" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.useEmbeddableFactory", @@ -9774,7 +9619,7 @@ "section": "def-public.DefaultEmbeddableApi", "text": "DefaultEmbeddableApi" }, - " extends ", + " extends ", "DefaultPresentationPanelApi", ",", { @@ -9800,7 +9645,15 @@ "section": "def-common.HasSerializableState", "text": "HasSerializableState" }, - "" + ",", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasSnapshottableState", + "text": "HasSnapshottableState" + }, + "" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, @@ -12887,7 +12740,7 @@ "section": "def-public.ReactEmbeddableFactory", "text": "ReactEmbeddableFactory" }, - "" + "" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, @@ -12913,10 +12766,10 @@ "tags": [], "label": "deserializeState", "description": [ - "\nA required synchronous function that transforms serialized state into runtime state.\nThis will be used twice - once for the parent state, and once for the last saved state\nfor comparison.\n\nThis can also be used to:\n\n- Inject references provided by the parent\n- Migrate the state to a newer version (this must be undone when serializing)" + "\nA required asynchronous function that transforms serialized state into runtime state.\n\nThis could be used to:\n- Load state from some external store\n- Inject references provided by the parent\n- Migrate the state to a newer version (this must be undone when serializing)" ], "signature": [ - "(state: ", + "(panelState: ", { "pluginId": "@kbn/presentation-containers", "scope": "common", @@ -12924,7 +12777,15 @@ "section": "def-common.SerializedPanelState", "text": "SerializedPanelState" }, - ") => RuntimeState" + ") => ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.MaybePromise", + "text": "MaybePromise" + }, + "" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, @@ -12935,7 +12796,7 @@ "id": "def-public.ReactEmbeddableFactory.deserializeState.$1", "type": "Object", "tags": [], - "label": "state", + "label": "panelState", "description": [], "signature": [ { @@ -12967,7 +12828,7 @@ "signature": [ "(initialState: RuntimeState, buildApi: (apiRegistration: ", "ReactEmbeddableApiRegistration", - ", comparators: ", + ", comparators: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -12975,7 +12836,7 @@ "section": "def-common.StateComparators", "text": "StateComparators" }, - ") => ApiType, uuid: string, parentApi?: unknown) => Promise<{ Component: React.FC<{}>; api: ApiType; }>" + ") => Api, uuid: string, parentApi?: unknown) => Promise<{ Component: React.FC<{}>; api: Api; }>" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, @@ -13006,7 +12867,7 @@ "signature": [ "(apiRegistration: ", "ReactEmbeddableApiRegistration", - ", comparators: ", + ", comparators: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -13014,7 +12875,7 @@ "section": "def-common.StateComparators", "text": "StateComparators" }, - ") => ApiType" + ") => Api" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, @@ -13586,38 +13447,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableRegistration", - "type": "Type", - "tags": [], - "label": "ReactEmbeddableRegistration", - "description": [], - "signature": [ - "(ref: React.ForwardedRef) => React.ReactElement> | null" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableRegistration.$1", - "type": "CompoundType", - "tags": [], - "label": "ref", - "description": [], - "signature": [ - "((instance: ApiType | null) => void) | React.MutableRefObject | null" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.ReactEmbeddableSavedObject", @@ -14197,7 +14026,7 @@ "\nRegisters an async {@link ReactEmbeddableFactory} getter." ], "signature": [ - " = ", + " = ", { "pluginId": "embeddable", "scope": "public", @@ -14213,7 +14042,7 @@ "section": "def-public.DefaultEmbeddableApi", "text": "DefaultEmbeddableApi" }, - ">(type: string, getFactory: () => Promise<", + ", RuntimeState extends object = SerializedState>(type: string, getFactory: () => Promise<", { "pluginId": "embeddable", "scope": "public", @@ -14221,11 +14050,12 @@ "section": "def-public.ReactEmbeddableFactory", "text": "ReactEmbeddableFactory" }, - ">) => void" + ">) => void" ], "path": "src/plugins/embeddable/public/plugin.tsx", "deprecated": false, "trackAdoption": false, + "returnComment": [], "children": [ { "parentPluginId": "embeddable", @@ -14234,13 +14064,9 @@ "tags": [], "label": "type", "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/embeddable/public/plugin.tsx", + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true + "trackAdoption": false }, { "parentPluginId": "embeddable", @@ -14258,15 +14084,15 @@ "section": "def-public.ReactEmbeddableFactory", "text": "ReactEmbeddableFactory" }, - ">" + ">" ], - "path": "src/plugins/embeddable/public/plugin.tsx", + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "returnComment": [], + "children": [] } - ], - "returnComment": [] + ] }, { "parentPluginId": "embeddable", diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 757f36c217e31..6faa7cbf91145 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 564 | 1 | 454 | 8 | +| 554 | 1 | 444 | 8 | ## Client diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 3bd9e45fbb55f..578ddf257efc6 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 0f027d6476aab..29b84b185a7ec 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index df612f3ba58c0..e26c0e8daac2c 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index bfbce14d2f28a..685df68a7084c 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index a143a6710e4fa..0a0a98a397192 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index 6305e112cb763..c4a04834c4210 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 67bf2d55c88ca..a10096a00b365 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index ea5ad4f14611c..f0a58586fb684 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 13ddadc0355f1..bc4a4049116ef 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 7b7e8b16fe3d9..16c409c397b5c 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 36a025e989bd6..bd7e759ee7977 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 2ed037401a5ee..d9763544ace12 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 0a2f7f52ae824..b5c58cac01ebc 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index de0d33b3fe139..40930bdb6bdcc 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 81552f2a71390..b2afbfba5b08b 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 0d361a1ef6ee5..4bf83b04e318e 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 3221b1bc91391..6d5605db8f2b5 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index c41d008ceab6d..6a9be51495b6f 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 857bb8256b2ec..14315213f38d3 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 36feeaee47c02..c59644b57e751 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 9a90063d9957a..09cb25eb565bd 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.devdocs.json b/api_docs/expressions.devdocs.json index 550863a9a75e6..9f91694efe0cf 100644 --- a/api_docs/expressions.devdocs.json +++ b/api_docs/expressions.devdocs.json @@ -270,6 +270,23 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "expressions", + "id": "def-public.Execution.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "functionCache", + "description": [], + "signature": [ + "Map" + ], + "path": "src/plugins/expressions/common/execution/execution.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -1271,6 +1288,23 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "expressions", + "id": "def-public.Executor.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "functionCache", + "description": [], + "signature": [ + "Map" + ], + "path": "src/plugins/expressions/common/executor/executor.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -2197,6 +2231,19 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-public.ExpressionFunction.allowCache", + "type": "boolean", + "tags": [], + "label": "allowCache", + "description": [ + "\nOpt-in to caching this function. By default function outputs are cached and given the same inputs cached result is returned." + ], + "path": "src/plugins/expressions/common/expression_functions/expression_function.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-public.ExpressionFunction.fn", @@ -7146,6 +7193,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-public.ExecutionContext.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [ + "\nAllow caching in the current execution." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/common/execution/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-public.ExecutionContext.abortSignal", @@ -8383,6 +8446,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-public.ExpressionFunctionDefinition.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [ + "\nOpt-in to caching this function. By default function outputs are cached and given the same inputs cached result is returned." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/common/expression_functions/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-public.ExpressionFunctionDefinition.inputTypes", @@ -10726,20 +10805,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "expressions", - "id": "def-public.IExpressionLoaderParams.disableCaching", - "type": "CompoundType", - "tags": [], - "label": "disableCaching", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/expressions/public/types/index.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "expressions", "id": "def-public.IExpressionLoaderParams.customFunctions", @@ -11011,6 +11076,20 @@ "path": "src/plugins/expressions/public/types/index.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "expressions", + "id": "def-public.IExpressionLoaderParams.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/public/types/index.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -13813,6 +13892,23 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "expressions", + "id": "def-server.Execution.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "functionCache", + "description": [], + "signature": [ + "Map" + ], + "path": "src/plugins/expressions/common/execution/execution.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -14595,6 +14691,23 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "expressions", + "id": "def-server.Executor.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "functionCache", + "description": [], + "signature": [ + "Map" + ], + "path": "src/plugins/expressions/common/executor/executor.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -15521,6 +15634,19 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-server.ExpressionFunction.allowCache", + "type": "boolean", + "tags": [], + "label": "allowCache", + "description": [ + "\nOpt-in to caching this function. By default function outputs are cached and given the same inputs cached result is returned." + ], + "path": "src/plugins/expressions/common/expression_functions/expression_function.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-server.ExpressionFunction.fn", @@ -18575,6 +18701,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-server.ExecutionContext.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [ + "\nAllow caching in the current execution." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/common/execution/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-server.ExecutionContext.abortSignal", @@ -19781,6 +19923,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-server.ExpressionFunctionDefinition.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [ + "\nOpt-in to caching this function. By default function outputs are cached and given the same inputs cached result is returned." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/common/expression_functions/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-server.ExpressionFunctionDefinition.inputTypes", @@ -22974,6 +23132,23 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "expressions", + "id": "def-common.Execution.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "functionCache", + "description": [], + "signature": [ + "Map" + ], + "path": "src/plugins/expressions/common/execution/execution.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -23975,6 +24150,23 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "expressions", + "id": "def-common.Executor.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "functionCache", + "description": [], + "signature": [ + "Map" + ], + "path": "src/plugins/expressions/common/executor/executor.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -24901,6 +25093,19 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-common.ExpressionFunction.allowCache", + "type": "boolean", + "tags": [], + "label": "allowCache", + "description": [ + "\nOpt-in to caching this function. By default function outputs are cached and given the same inputs cached result is returned." + ], + "path": "src/plugins/expressions/common/expression_functions/expression_function.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-common.ExpressionFunction.fn", @@ -30648,6 +30853,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-common.ExecutionContext.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [ + "\nAllow caching in the current execution." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/common/execution/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-common.ExecutionContext.abortSignal", @@ -32523,6 +32744,20 @@ "path": "src/plugins/expressions/common/service/expressions_services.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "expressions", + "id": "def-common.ExpressionExecutionParams.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/common/service/expressions_services.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -32675,6 +32910,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-common.ExpressionFunctionDefinition.allowCache", + "type": "CompoundType", + "tags": [], + "label": "allowCache", + "description": [ + "\nOpt-in to caching this function. By default function outputs are cached and given the same inputs cached result is returned." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/expressions/common/expression_functions/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-common.ExpressionFunctionDefinition.inputTypes", diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 8e952fd651860..5cd0457727083 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2217 | 17 | 1756 | 5 | +| 2233 | 17 | 1763 | 6 | ## Client diff --git a/api_docs/features.mdx b/api_docs/features.mdx index e06c1d1c23064..9a72517bfd94e 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index a693e34dcd748..e83fd08dc5e18 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 870212a3293ee..e7b15ff47b220 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 7bb838c05c90f..3daa1cc982643 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index ac9ae8788cf90..8a53899d5912a 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 9767c0c9487f8..cc485026a9c3e 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -23690,6 +23690,20 @@ "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.PackagePolicyPackage.requires_root", + "type": "CompoundType", + "tags": [], + "label": "requires_root", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -27389,6 +27403,17 @@ "path": "x-pack/plugins/fleet/common/constants/routes.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.AGENT_API_ROUTES.DELETE_UPLOAD_FILE_PATTERN", + "type": "string", + "tags": [], + "label": "DELETE_UPLOAD_FILE_PATTERN", + "description": [], + "path": "x-pack/plugins/fleet/common/constants/routes.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -28361,6 +28386,38 @@ ], "returnComment": [] }, + { + "parentPluginId": "fleet", + "id": "def-common.agentRouteService.getAgentFileDeletePath", + "type": "Function", + "tags": [], + "label": "getAgentFileDeletePath", + "description": [], + "signature": [ + "(fileId: string) => string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-common.agentRouteService.getAgentFileDeletePath.$1", + "type": "string", + "tags": [], + "label": "fileId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "fleet", "id": "def-common.agentRouteService.getAgentsByActionsPath", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 75ac3909b9408..44c8d14f84aa4 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1305 | 5 | 1184 | 66 | +| 1309 | 5 | 1188 | 66 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index ee0269cb007a6..b14b2ba12281b 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 3541f8296b9b6..22d1c0e924ad2 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 8f14b511df193..04afe38b36489 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 5f558f384c873..095da1f16aada 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 3f71772224b12..ff21047f396c6 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index ac72aa6d904f7..2411ced1b1181 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index d85f5f4552cb1..216b2a587eeb3 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index a72b9a6905658..91652ff4211c6 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index ce43a012265d9..114b16ddc66cd 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 5d01194336435..dbdc29d6d8486 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 75116cba2206b..449a411703985 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index 2218cc06aec6f..74a53f9f09dcb 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 37b1ce851614a..59576b117dea1 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index 6d2d3f466d0b7..7118fb705a619 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index a244910fe2af8..b45e05a6e13f5 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index bd3e35c910950..1b16ac6112522 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index f8a768273a666..17ea0b1338bca 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index f69d8259e7554..4a0d84229bbb0 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index a40a003ea3ad4..1dfcaa8277a27 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index 0ceaddc5d97c6..b748c4b4a5d0c 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index e6d44f5fc12af..ec231f48be5cb 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.devdocs.json b/api_docs/kbn_analytics_client.devdocs.json index 02f60c3586d6b..44ac84f58b11d 100644 --- a/api_docs/kbn_analytics_client.devdocs.json +++ b/api_docs/kbn_analytics_client.devdocs.json @@ -826,6 +826,10 @@ "plugin": "infra", "path": "x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_client.ts" }, + { + "plugin": "infra", + "path": "x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_client.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" @@ -1166,6 +1170,14 @@ "plugin": "infra", "path": "x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_service.test.ts" }, + { + "plugin": "infra", + "path": "x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_service.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_service.test.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_service.test.ts" diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 11475be46c8e8..b5d375021b5ed 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index a63f4e6cc0ff2..ff0fdb33bf11e 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 7d57f62f66383..5390561128359 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 2454fb1be5b45..fe996f9579153 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 3a6988d2f1083..238f2a516b9f2 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 2194b53b01c67..b7dbe09f82851 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index d24056e55af3a..4872a7962cb45 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 4ebcfcea51128..8d78c95f6efab 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 5a2b271647f7a..75d7830e8bdd2 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 33a7e8454d362..ce2d14ba979d9 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index b8771eaff3bb9..4932cf23656db 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index cd2250bbfe5ac..70ed8086627b5 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 18493c8dc8718..a69cd515f4353 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index d2b31ce98859c..77aaa7de43eed 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index 0eee9d95b4a8f..d17d13f655a0a 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 29518f89e5848..7d98b8019a376 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index 6188e8d4e4310..be970c4ac4e3c 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index d1060783d23e5..c49c0ea96e3c9 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 534410c9302da..e0ed57e28baa8 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index b0e473d635928..112b19bdd81fd 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 9f8ec810a0beb..2c5320f2c71f2 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index ce73f8f8cca07..e3988ab7bc941 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 69067a211490d..8e49be1785c33 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 6ab116495d9bb..17656aad08d96 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index e5a09418a4cf7..1098de619a422 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index 86fa8a1239df4..ebba771c06d92 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index cd38f5bf1a8d2..b8d96a7dbf987 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 3f71b281bebfe..83758deb07e35 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index b860f3d4dbb49..0cf2f7f5f2b25 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 99427ae691302..670776670de62 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 282e87f93cf19..f2cb6d3b4185e 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index f0730ac49dc9f..ff30706fec14a 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index e9dd9c590fe78..21578661ccfd6 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index 4ea257e9f4693..0fb82dc841e6d 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index eba7e73df28e3..ed69e10c53701 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index f5ad856df42f2..ac4cc0cd2430f 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 60a7faf24d75e..e4b0df5e07b41 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 52d781de782fc..7d185a3c3a05a 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index f1cf5126f992e..50c2d63ce68ac 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 2f4a695a3ed53..bbd6f7f697cf2 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index eff968fe20d2d..26491d6623726 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 185158860feee..075c12742bf4d 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 3d0ea8e3ec7d6..4c2dfb86763c7 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index ecc47ebaa0cfc..4db1b6902ebf1 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index c776bc132b635..d940fa2813755 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 9e4c892189ffa..33b4f71b1c8ee 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index c7cdaa131350d..da8335205412c 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 8b8ceb5dcdc30..4dd9805dd11c7 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 86c9e52e0e3f0..cb7dca2816c95 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 81f88c68b532c..e74f353c4bd63 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 119defe80e8d8..0bdf905e87ea1 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index c2898e2946b88..d57d692fa661c 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 5f13b1c5433d8..a7ac4fc9b4193 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index b52877a793a78..1be5f19ead44e 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 893d300a007c7..1ba74d6d7a0f6 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index a79edf2889cc0..295a5790328e4 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index af6110cdeb0d0..d8932d1a32f61 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 561f388dc4856..695a90d35402f 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 6b1c3c2669c58..3281ff7ac5e81 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 809ec82628dc2..a90d4dbdb5059 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 1888c71dc222e..b103dfb710a0c 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index d872ef0b244f0..96a9765231ec4 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 8dc1b7e7b1d64..aabab67696446 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index c71457189c7b0..ffad4225e2df8 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index cd134fe1ca899..7ae36fd146f6b 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index 30e01ce4f57fe..89889d04017e8 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index 3dd58bffce2a1..a7a0069ea43c6 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index bb4457182fb78..222e6b46d21db 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index b92742537b0cf..43ae174f5aceb 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 5a8c0b1d390ec..ebe19faca5a1a 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 11cbe6769aca8..7f678ee4d5740 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 4ebdebbcefc41..6dd7a8b13eca9 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index d1d60c1286e56..f947914094212 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 65ddf2ae2bfa3..62faf54e92850 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 21b4324465695..49b6c827c78cb 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 936e409ff66d3..c0351a865ba3e 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 8b86585b41685..989b3db4243b8 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 58cb78c71fe10..a250e1717f83b 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 8ac84befbf69c..1d3bf4c12a3eb 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 30511a404be73..6fcde157ec8d8 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index d0ff8f1de473f..35fe09b50d539 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index d7f6cc3720387..ce71cab8b91cf 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index fac72a013f43b..914c29bd3d24c 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 4127b49887220..8d4a428b8bbf2 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index cdeced5ebdd5f..279c2c7070f5a 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 013294e2d7622..17f26c6b483e8 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 8621e8d3c2e2e..0cf6ebf4dbe48 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 69587202b0f55..9f143a5ce82cb 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index 2c43e99c5be70..2d6f317a2038f 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 650c2c5883b56..0ca0075218ab8 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 58ee74f837063..f5214fc353125 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index a1a31922adb06..07a40adfcbe13 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 81ffc36c9db11..10f31c334ac70 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index d79fa0cc8cb87..0b76211bf96fb 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 2ffc1dac97282..7ce43ecdb8132 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 51ab111ca359b..c8454c29160b0 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 426ce00b4bd15..8125de2db5e9a 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 9d396f7034a82..48ad610e75fad 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index f1d3850165adb..f307305a83a92 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 41b759d54336b..51460510b7708 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 510eb73db7c09..c0987b380d709 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index c5f3f2ba85268..5434ef8c98492 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index f6791e889e18f..f9f4970b26f2e 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 32b1a6dcafc43..6ff7a45fe0979 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index f5febc6f53764..e35e1e8c7fe9e 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 33341437b0c70..a8bbf53184c4c 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -10938,6 +10938,35 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-http-server", + "id": "def-common.KibanaRequest.httpVersion", + "type": "string", + "tags": [], + "label": "httpVersion", + "description": [ + "\nThe HTTP version sent by the client." + ], + "path": "packages/core/http/core-http-server/src/router/request.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-http-server", + "id": "def-common.KibanaRequest.protocol", + "type": "string", + "tags": [], + "label": "protocol", + "description": [ + "\nThe protocol used by the client, inferred from the httpVersion." + ], + "signature": [ + "\"http1\"" + ], + "path": "packages/core/http/core-http-server/src/router/request.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-http-server", "id": "def-common.KibanaRequest.socket", @@ -16017,6 +16046,10 @@ "plugin": "synthetics", "path": "x-pack/plugins/observability_solution/synthetics/server/server.ts" }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts" + }, { "plugin": "controls", "path": "src/plugins/controls/server/options_list/options_list_suggestions_route.ts" @@ -17168,6 +17201,23 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/core-http-server", + "id": "def-common.HttpProtocol", + "type": "Type", + "tags": [], + "label": "HttpProtocol", + "description": [ + "\nDefines an http protocol.\n(Only supporting http1 for now)\n\n- http1: regroups all http/1.x protocols" + ], + "signature": [ + "\"http1\"" + ], + "path": "packages/core/http/core-http-server/src/http_contract.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-http-server", "id": "def-common.HttpResponsePayload", diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index cfd001143db62..06e4ab9725460 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 483 | 2 | 193 | 0 | +| 486 | 2 | 193 | 0 | ## Common diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index f12330784e868..5ed22ef541a1c 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index ae39c8aa3f7a7..6b15ce5be210c 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 23a25a57d3eb2..a4936f9dd8453 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 8ad00b1a48823..6c616a5a6ee4d 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 32cd401da773a..e92ad9a20bac2 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 0854f4c38ea98..7e612e8a8a70b 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 7f47ab316c544..06d5d8fbeadcf 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 34a1c90381629..80d81d5fd8829 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 9c91f7b5c652e..d67231068d5ff 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index 84709ef3d39ae..8ed75f086afa9 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 1b414a10e89b7..84ab23b8f2a26 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index de22679913fb2..741bcd4da75ac 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index d25d1d6e7ca21..36e4af670d536 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index ee4919ebf5e8a..4a1358e544a3d 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 1714bfd184514..f2360595df173 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 1880edca44f26..6dba2fdcd7f29 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index c552d5b5c66d8..37e8058a02f42 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index e23a75f178d16..ff8f96913c74d 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index fa24293b7e312..99961b17c4639 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index f3b2b9e9767aa..dfdbcb6096dc2 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 0d9a4d1466990..4fec85e010f5b 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 6d5a874cdcab8..f74274709cbca 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index b3f6385ab4c76..a1a804e08cbf3 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 74375c8683d14..a00c37f30f747 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index f40af57c33616..cb84ee91e2366 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 0d23253462dfb..7590422e4d75f 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 3687e2abd36c7..bc228713d9de7 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 394035fd76cfd..69396520b28ff 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 79b00ba864792..1b0e65e39e5da 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 64b82ef3698b9..952b7cdb7add6 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index d754835110cb8..931cfb297b0d4 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index 477ae5b057835..41f5db00535ea 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 3327fa9b318ae..2bfcd6c29ba2c 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index c657290d23f3b..3d0eaf3fb4b63 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index f87edc5118822..2db0a0798af60 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 6a85a491636be..ed64397ef4bfe 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index a147aae398d78..6a00ea71d4872 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index 41d446c49fd61..ae799c4517f81 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index b088e990af2aa..7d288ad42ac4a 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index e93e9f10e0655..f90572814eae8 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 6f5cdb2cc81af..ad97dd2480bf5 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index c7620c8dab10a..1c27656bed7a2 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 983f50bf92863..5814973751948 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 8edd076bae49f..c3edf1774352d 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index a6c75edb284e3..2dc58b1b68056 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 646f86ddffb1d..d73a012fd5b97 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index d054658727353..fc41d41ccb1b6 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index bf16f75d077d5..f91f693cf8c4c 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 69104f882c95b..a773df5ea1827 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json b/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json index a7c515398843f..d8680e1581ea2 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json +++ b/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json @@ -2911,10 +2911,10 @@ }, { "parentPluginId": "@kbn/core-saved-objects-base-server-internal", - "id": "def-common.HASH_TO_VERSION_MAP.ingestpackagepoliciesa1a074bad36e68d54f98d2158d60f879", + "id": "def-common.HASH_TO_VERSION_MAP.ingestpackagepoliciesaef7977b81f7930f23cbfd8711ba272e", "type": "string", "tags": [], - "label": "'ingest-package-policies|a1a074bad36e68d54f98d2158d60f879'", + "label": "'ingest-package-policies|aef7977b81f7930f23cbfd8711ba272e'", "description": [], "path": "packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts", "deprecated": false, diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 1215cbdf6be48..74f46271bd385 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index c684ae28d93d7..d9de66f1a4493 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 873f0c5a8ca7c..79043941dd82a 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 558e408949bc1..0d215a506b4e6 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 385b9057258c1..34f7219b8f15e 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 0567167730911..8f54dd0c43571 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 787138c6f15cf..5d8936c419cce 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index af20d6a5b716a..824ccbe654fe1 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 547e8c067421e..fec1c07bad8e6 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index afc85c60d3b77..51b0595e7a0a9 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 7a316b93c571d..2e3fc37500e8f 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 3d4f73061547b..e60df97041c50 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 9075e80015302..ccd932ffc0573 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 4cd03e888abab..f349c92022450 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index a130b207b281d..902115f215d4b 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index 886714cdf8b5c..294754d71cfd9 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 9a4e4ab30250c..a5d9e94547d81 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 784b57ee9703f..75bb2881fa0e2 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index d0e080e22ff5d..df8622c4147a4 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index 699fa40e70673..0d4f03acdb229 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 81cb5989b1a83..211705a2dd5e2 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index cbe81ddc53c79..9d0b9505b84bd 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index a6ab0cdded4ae..f6c1bf7e6b531 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 0b6f7c0cb560d..2c0b7c9d67b42 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 6727001ea7d80..79f9f65bce8c6 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 557c4a6e00dd4..5c69a44300b73 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 660b3da203adc..cc0081277f7bd 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 3e666591c8547..f5c380905a7d8 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 8c77a30d6bbca..000408fbb079f 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 4ba5a9bde15ba..dca947eaa0fef 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 60f194cd061db..e0db805fb5417 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 36bc1e3ebba5f..47d4f54b8a73a 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 0655750340378..f238c05280e76 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 3a597038edc1c..9b5c376bfa2dc 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 4a3ef71a5ee38..fd6c8b199d0e1 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 03c8cea813f47..adf9dfebd21ff 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 7681ee0ad948e..cc74331a1e79b 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index c92582e578de8..259ed5b77f12b 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 878d3a8d57db0..21b05fdda695f 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 4cf558fca1530..b90796e1e7382 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index e5f208c7e76b1..7757c73d90eb5 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index a70b2f2ef2e5d..7886497fd8b0a 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 6c242087b79ee..11766a8688972 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index da199ae391538..089f30b5c58eb 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index f6a183e6ed410..9a85725f23002 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index 081ba81ed87c2..4951f9feaaa78 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index d501ff9d9abfa..007d2917137e4 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 51a6773703431..4f099f96ee167 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index 62077a80f00a4..9b3a822a80ca2 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index c2f3a4d5bba48..fdc1766b27506 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index 24df1b2fc824e..3335b519a2e53 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 93aec5bc15e44..850221c6ec508 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index beeb99f06dba5..1f2aba8655d85 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index e48726adf6cb9..97f8fb023bb4c 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index a63c76df61ca3..eaf1c29f054bf 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index 8f60f2d77a286..d44adb4d074f1 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index cd8b527a77f95..dc0a2a8ec1559 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 18e59134e133e..e822731059f6e 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.devdocs.json b/api_docs/kbn_data_forge.devdocs.json index abc002a41da4b..232f42faa35b7 100644 --- a/api_docs/kbn_data_forge.devdocs.json +++ b/api_docs/kbn_data_forge.devdocs.json @@ -116,12 +116,31 @@ "label": "cli", "description": [], "signature": [ - "() => Promise" + "(cliOptions: ", + "CliOptions", + " | undefined) => Promise" ], "path": "x-pack/packages/kbn-data-forge/src/cli.ts", "deprecated": false, "trackAdoption": false, - "children": [], + "children": [ + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.cli.$1", + "type": "Object", + "tags": [], + "label": "cliOptions", + "description": [], + "signature": [ + "CliOptions", + " | undefined" + ], + "path": "x-pack/packages/kbn-data-forge/src/cli.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], "returnComment": [], "initialIsOpen": false }, @@ -469,6 +488,274 @@ "initialIsOpen": false } ], - "objects": [] + "objects": [ + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS", + "type": "Object", + "tags": [], + "label": "DEFAULTS", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.EVENTS_PER_CYCLE", + "type": "number", + "tags": [], + "label": "EVENTS_PER_CYCLE", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.PAYLOAD_SIZE", + "type": "number", + "tags": [], + "label": "PAYLOAD_SIZE", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.CONCURRENCY", + "type": "number", + "tags": [], + "label": "CONCURRENCY", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.SERVERLESS", + "type": "boolean", + "tags": [], + "label": "SERVERLESS", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.INDEX_INTERVAL", + "type": "number", + "tags": [], + "label": "INDEX_INTERVAL", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.DATASET", + "type": "string", + "tags": [], + "label": "DATASET", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.SCENARIO", + "type": "string", + "tags": [], + "label": "SCENARIO", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.ELASTICSEARCH_HOST", + "type": "string", + "tags": [], + "label": "ELASTICSEARCH_HOST", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.ELASTICSEARCH_USERNAME", + "type": "string", + "tags": [], + "label": "ELASTICSEARCH_USERNAME", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.ELASTICSEARCH_PASSWORD", + "type": "string", + "tags": [], + "label": "ELASTICSEARCH_PASSWORD", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.ELASTICSEARCH_API_KEY", + "type": "string", + "tags": [], + "label": "ELASTICSEARCH_API_KEY", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.SKIP_KIBANA_USER", + "type": "boolean", + "tags": [], + "label": "SKIP_KIBANA_USER", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.INSTALL_KIBANA_ASSETS", + "type": "boolean", + "tags": [], + "label": "INSTALL_KIBANA_ASSETS", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.DELAY_IN_MINUTES", + "type": "number", + "tags": [], + "label": "DELAY_IN_MINUTES", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.DELAY_EVERY_MINUTES", + "type": "number", + "tags": [], + "label": "DELAY_EVERY_MINUTES", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.LOOKBACK", + "type": "string", + "tags": [], + "label": "LOOKBACK", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.KIBANA_URL", + "type": "string", + "tags": [], + "label": "KIBANA_URL", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.KIBANA_USERNAME", + "type": "string", + "tags": [], + "label": "KIBANA_USERNAME", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.KIBANA_PASSWORD", + "type": "string", + "tags": [], + "label": "KIBANA_PASSWORD", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.EVENT_TEMPLATE", + "type": "string", + "tags": [], + "label": "EVENT_TEMPLATE", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.REDUCE_WEEKEND_TRAFFIC_BY", + "type": "number", + "tags": [], + "label": "REDUCE_WEEKEND_TRAFFIC_BY", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.EPHEMERAL_PROJECT_IDS", + "type": "number", + "tags": [], + "label": "EPHEMERAL_PROJECT_IDS", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/data-forge", + "id": "def-common.DEFAULTS.ALIGN_EVENTS_TO_INTERVAL", + "type": "boolean", + "tags": [], + "label": "ALIGN_EVENTS_TO_INTERVAL", + "description": [], + "path": "x-pack/packages/kbn-data-forge/src/constants.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ] } } \ No newline at end of file diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index 77b427641fd06..9706690bfea76 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 26 | 0 | 26 | 0 | +| 51 | 0 | 51 | 1 | ## Common +### Objects + + ### Functions diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index f7c8cd4f79e50..2fbc334b5fa1f 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index b3122f7ae51bd..7088ddabd5f87 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index aa2394b3a95fd..369c9737021b1 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 1d246c0a39d21..d05539481e49f 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index c07271541acd8..84c15b0eea6a8 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 6adb69716e382..713d9396d9244 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index 4fc9389ec9b65..ac3249594a809 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 7b777f89de6b1..c9fabd69dd120 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index ed60480d3d0fe..dfe745b859aa3 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index 8d3ff8af26804..4ca813358870b 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index aa1a17f089365..7113d7d12f47f 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index 187a9890bda0d..31244e03f14bf 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index a4b5c02061939..1ba3f20176cb0 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 03124f5a248c1..1cb1e2889de4f 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index 36894a36fd468..9813c78f4bd61 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index 7dd0d287bacf4..267788ee3b493 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index ce652d54e07ab..4436378a70d3c 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index c46e74bd04532..7af256ba2a10b 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 6918c4038640c..af7052701de8c 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 9868b51309251..35465e1f7bd14 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 772a9c2e99188..b2d979ce60530 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 2bb02673cbaec..7e480d2ab5d94 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index cab07f28209d1..fa4dbca4fe9fd 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 0358613769c72..76c638e59df70 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index 64ffd0d644200..dff3e48cc5047 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index b9973c05fa579..bdc83ff069966 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index a3030a1edd466..053e056ce5f1a 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index 962f4257ed9c1..6e15aac431766 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.devdocs.json b/api_docs/kbn_elastic_assistant.devdocs.json index 15d2789e99175..edb7425fa9508 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -2192,117 +2192,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.DeleteKnowledgeBaseResponse", - "type": "Interface", - "tags": [], - "label": "DeleteKnowledgeBaseResponse", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.DeleteKnowledgeBaseResponse.success", - "type": "boolean", - "tags": [], - "label": "success", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.GetKnowledgeBaseStatusResponse", - "type": "Interface", - "tags": [], - "label": "GetKnowledgeBaseStatusResponse", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.GetKnowledgeBaseStatusResponse.elser_exists", - "type": "boolean", - "tags": [], - "label": "elser_exists", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.GetKnowledgeBaseStatusResponse.esql_exists", - "type": "CompoundType", - "tags": [], - "label": "esql_exists", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.GetKnowledgeBaseStatusResponse.index_exists", - "type": "boolean", - "tags": [], - "label": "index_exists", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.GetKnowledgeBaseStatusResponse.pipeline_exists", - "type": "boolean", - "tags": [], - "label": "pipeline_exists", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.PostKnowledgeBaseResponse", - "type": "Interface", - "tags": [], - "label": "PostKnowledgeBaseResponse", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.PostKnowledgeBaseResponse.success", - "type": "boolean", - "tags": [], - "label": "success", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.Prompt", diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index 0bc60bbc90ce4..b27829e88ef60 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 174 | 0 | 147 | 9 | +| 165 | 0 | 138 | 9 | ## Client diff --git a/api_docs/kbn_elastic_assistant_common.devdocs.json b/api_docs/kbn_elastic_assistant_common.devdocs.json index d1ac54ba561ff..387ca39c3bb1b 100644 --- a/api_docs/kbn_elastic_assistant_common.devdocs.json +++ b/api_docs/kbn_elastic_assistant_common.devdocs.json @@ -776,7 +776,7 @@ "\nInterface for features available to the elastic assistant" ], "signature": [ - "{ readonly assistantModelEvaluation: boolean; }" + "{ readonly assistantKnowledgeBaseByDefault: boolean; readonly assistantModelEvaluation: boolean; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", "deprecated": false, @@ -1134,6 +1134,51 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseEntryRequestBody", + "type": "Type", + "tags": [], + "label": "CreateKnowledgeBaseEntryRequestBody", + "description": [], + "signature": [ + "{ text: string; metadata: { source: string; required: boolean; kbResource: string; }; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseEntryRequestBodyInput", + "type": "Type", + "tags": [], + "label": "CreateKnowledgeBaseEntryRequestBodyInput", + "description": [], + "signature": [ + "{ text: string; metadata: { source: string; required: boolean; kbResource: string; }; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseEntryResponse", + "type": "Type", + "tags": [], + "label": "CreateKnowledgeBaseEntryResponse", + "description": [], + "signature": [ + "{ id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.CreateKnowledgeBaseRequestParams", @@ -1254,6 +1299,51 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseEntryRequestParams", + "type": "Type", + "tags": [], + "label": "DeleteKnowledgeBaseEntryRequestParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseEntryRequestParamsInput", + "type": "Type", + "tags": [], + "label": "DeleteKnowledgeBaseEntryRequestParamsInput", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseEntryResponse", + "type": "Type", + "tags": [], + "label": "DeleteKnowledgeBaseEntryResponse", + "description": [], + "signature": [ + "{ id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.DeleteKnowledgeBaseRequestParams", @@ -1410,6 +1500,57 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_INTERNAL_URL", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_INTERNAL_URL", + "description": [], + "signature": [ + "\"/internal/elastic_assistant\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL_BULK_ACTION", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL_BULK_ACTION", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.ELASTIC_AI_ASSISTANT_PROMPTS_URL", @@ -1679,7 +1820,7 @@ "label": "GetCapabilitiesResponse", "description": [], "signature": [ - "{ assistantModelEvaluation: boolean; }" + "{ assistantKnowledgeBaseByDefault: boolean; assistantModelEvaluation: boolean; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", "deprecated": false, @@ -1718,317 +1859,559 @@ }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.KnowledgeBaseResponse", + "id": "def-common.KnowledgeBaseEntryBulkActionBase", "type": "Type", "tags": [], - "label": "KnowledgeBaseResponse", - "description": [ - "\nAI assistant KnowledgeBase." - ], + "label": "KnowledgeBaseEntryBulkActionBase", + "description": [], "signature": [ - "{ success?: boolean | undefined; }" + "{ query?: string | undefined; ids?: string[] | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.Message", + "id": "def-common.KnowledgeBaseEntryBulkActionSkipReason", "type": "Type", "tags": [], - "label": "Message", - "description": [ - "\nAI assistant conversation message." - ], + "label": "KnowledgeBaseEntryBulkActionSkipReason", + "description": [], "signature": [ - "{ timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }" + "\"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.MessageRole", + "id": "def-common.KnowledgeBaseEntryBulkActionSkipResult", "type": "Type", "tags": [], - "label": "MessageRole", - "description": [ - "\nMessage role." - ], + "label": "KnowledgeBaseEntryBulkActionSkipResult", + "description": [], "signature": [ - "\"user\" | \"system\" | \"assistant\"" + "{ id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.MessageRoleEnum", + "id": "def-common.KnowledgeBaseEntryBulkCrudActionResponse", "type": "Type", "tags": [], - "label": "MessageRoleEnum", + "label": "KnowledgeBaseEntryBulkCrudActionResponse", "description": [], "signature": [ - "{ user: \"user\"; system: \"system\"; assistant: \"assistant\"; }" + "{ attributes: { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; statusCode?: number | undefined; message?: string | undefined; knowledgeBaseEntriesCount?: number | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.NonEmptyString", + "id": "def-common.KnowledgeBaseEntryBulkCrudActionResults", "type": "Type", "tags": [], - "label": "NonEmptyString", - "description": [ - "\nA string that is not empty and does not contain only whitespace" - ], + "label": "KnowledgeBaseEntryBulkCrudActionResults", + "description": [], "signature": [ - "string" + "{ created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.NormalizedConversationError", + "id": "def-common.KnowledgeBaseEntryBulkCrudActionSummary", "type": "Type", "tags": [], - "label": "NormalizedConversationError", + "label": "KnowledgeBaseEntryBulkCrudActionSummary", "description": [], "signature": [ - "{ message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }" + "{ total: number; succeeded: number; failed: number; skipped: number; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.OutputIndex", + "id": "def-common.KnowledgeBaseEntryCreateProps", "type": "Type", "tags": [], - "label": "OutputIndex", + "label": "KnowledgeBaseEntryCreateProps", "description": [], "signature": [ - "string" + "{ text: string; metadata: { source: string; required: boolean; kbResource: string; }; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PerformBulkActionRequestBody", + "id": "def-common.KnowledgeBaseEntryDetailsInError", "type": "Type", "tags": [], - "label": "PerformBulkActionRequestBody", + "label": "KnowledgeBaseEntryDetailsInError", "description": [], "signature": [ - "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" + "{ id: string; name?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PerformBulkActionRequestBodyInput", + "id": "def-common.KnowledgeBaseEntryErrorSchema", "type": "Type", "tags": [], - "label": "PerformBulkActionRequestBodyInput", + "label": "KnowledgeBaseEntryErrorSchema", "description": [], "signature": [ - "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" + "{ error: string; message: string; statusCode: number; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PerformBulkActionResponse", + "id": "def-common.KnowledgeBaseEntryResponse", "type": "Type", "tags": [], - "label": "PerformBulkActionResponse", + "label": "KnowledgeBaseEntryResponse", "description": [], "signature": [ - "{ attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }" + "{ id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateBody", + "id": "def-common.KnowledgeBaseEntryUpdateProps", "type": "Type", "tags": [], - "label": "PostEvaluateBody", + "label": "KnowledgeBaseEntryUpdateProps", "description": [], "signature": [ - "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + "{ id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestBody", + "id": "def-common.KnowledgeBaseResponse", "type": "Type", "tags": [], - "label": "PostEvaluateRequestBody", - "description": [], + "label": "KnowledgeBaseResponse", + "description": [ + "\nAI assistant KnowledgeBase." + ], "signature": [ - "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + "{ success?: boolean | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestBodyInput", + "id": "def-common.Message", "type": "Type", "tags": [], - "label": "PostEvaluateRequestBodyInput", - "description": [], + "label": "Message", + "description": [ + "\nAI assistant conversation message." + ], "signature": [ - "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + "{ timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestQuery", + "id": "def-common.MessageRole", "type": "Type", "tags": [], - "label": "PostEvaluateRequestQuery", - "description": [], + "label": "MessageRole", + "description": [ + "\nMessage role." + ], "signature": [ - "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | undefined; }" + "\"user\" | \"system\" | \"assistant\"" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestQueryInput", + "id": "def-common.MessageRoleEnum", "type": "Type", "tags": [], - "label": "PostEvaluateRequestQueryInput", + "label": "MessageRoleEnum", "description": [], "signature": [ - "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | undefined; }" + "{ user: \"user\"; system: \"system\"; assistant: \"assistant\"; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateResponse", + "id": "def-common.Metadata", "type": "Type", "tags": [], - "label": "PostEvaluateResponse", - "description": [], + "label": "Metadata", + "description": [ + "\nMetadata about an Knowledge Base Entry" + ], "signature": [ - "{ success: boolean; evaluationId: string; }" + "{ source: string; required: boolean; kbResource: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.Provider", + "id": "def-common.NonEmptyString", "type": "Type", "tags": [], - "label": "Provider", + "label": "NonEmptyString", "description": [ - "\nProvider" + "\nA string that is not empty and does not contain only whitespace" ], "signature": [ - "\"OpenAI\" | \"Azure OpenAI\"" + "string" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.ProviderEnum", + "id": "def-common.NormalizedConversationError", "type": "Type", "tags": [], - "label": "ProviderEnum", + "label": "NormalizedConversationError", "description": [], "signature": [ - "{ OpenAI: \"OpenAI\"; \"Azure OpenAI\": \"Azure OpenAI\"; }" + "{ message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PUBLIC_API_ACCESS", - "type": "string", + "id": "def-common.NormalizedKnowledgeBaseEntryError", + "type": "Type", "tags": [], - "label": "PUBLIC_API_ACCESS", + "label": "NormalizedKnowledgeBaseEntryError", "description": [], "signature": [ - "\"public\"" + "{ message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.ReadConversationRequestParams", + "id": "def-common.OutputIndex", "type": "Type", "tags": [], - "label": "ReadConversationRequestParams", + "label": "OutputIndex", "description": [], "signature": [ - "{ id: string; }" + "string" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.ReadConversationRequestParamsInput", + "id": "def-common.PerformBulkActionRequestBody", + "type": "Type", + "tags": [], + "label": "PerformBulkActionRequestBody", + "description": [], + "signature": [ + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformBulkActionRequestBodyInput", + "type": "Type", + "tags": [], + "label": "PerformBulkActionRequestBodyInput", + "description": [], + "signature": [ + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformBulkActionResponse", + "type": "Type", + "tags": [], + "label": "PerformBulkActionResponse", + "description": [], + "signature": [ + "{ attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformKnowledgeBaseEntryBulkActionRequestBody", + "type": "Type", + "tags": [], + "label": "PerformKnowledgeBaseEntryBulkActionRequestBody", + "description": [], + "signature": [ + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }[] | undefined; update?: { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }[] | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformKnowledgeBaseEntryBulkActionRequestBodyInput", + "type": "Type", + "tags": [], + "label": "PerformKnowledgeBaseEntryBulkActionRequestBodyInput", + "description": [], + "signature": [ + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }[] | undefined; update?: { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }[] | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformKnowledgeBaseEntryBulkActionResponse", + "type": "Type", + "tags": [], + "label": "PerformKnowledgeBaseEntryBulkActionResponse", + "description": [], + "signature": [ + "{ attributes: { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; statusCode?: number | undefined; message?: string | undefined; knowledgeBaseEntriesCount?: number | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateBody", + "type": "Type", + "tags": [], + "label": "PostEvaluateBody", + "description": [], + "signature": [ + "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestBody", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestBody", + "description": [], + "signature": [ + "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestBodyInput", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestBodyInput", + "description": [], + "signature": [ + "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestQuery", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestQuery", + "description": [], + "signature": [ + "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestQueryInput", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestQueryInput", + "description": [], + "signature": [ + "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateResponse", + "type": "Type", + "tags": [], + "label": "PostEvaluateResponse", + "description": [], + "signature": [ + "{ success: boolean; evaluationId: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Provider", + "type": "Type", + "tags": [], + "label": "Provider", + "description": [ + "\nProvider" + ], + "signature": [ + "\"OpenAI\" | \"Azure OpenAI\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ProviderEnum", + "type": "Type", + "tags": [], + "label": "ProviderEnum", + "description": [], + "signature": [ + "{ OpenAI: \"OpenAI\"; \"Azure OpenAI\": \"Azure OpenAI\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PUBLIC_API_ACCESS", + "type": "string", + "tags": [], + "label": "PUBLIC_API_ACCESS", + "description": [], + "signature": [ + "\"public\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadConversationRequestParams", + "type": "Type", + "tags": [], + "label": "ReadConversationRequestParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadConversationRequestParamsInput", "type": "Type", "tags": [], "label": "ReadConversationRequestParamsInput", @@ -2071,6 +2454,51 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseEntryRequestParams", + "type": "Type", + "tags": [], + "label": "ReadKnowledgeBaseEntryRequestParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseEntryRequestParamsInput", + "type": "Type", + "tags": [], + "label": "ReadKnowledgeBaseEntryRequestParamsInput", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseEntryResponse", + "type": "Type", + "tags": [], + "label": "ReadKnowledgeBaseEntryResponse", + "description": [], + "signature": [ + "{ id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.ReadKnowledgeBaseRequestParams", @@ -2109,7 +2537,7 @@ "label": "ReadKnowledgeBaseResponse", "description": [], "signature": [ - "{ elser_exists?: boolean | undefined; index_exists?: boolean | undefined; pipeline_exists?: boolean | undefined; }" + "{ elser_exists?: boolean | undefined; esql_exists?: boolean | undefined; index_exists?: boolean | undefined; is_setup_in_progress?: boolean | undefined; pipeline_exists?: boolean | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", "deprecated": false, @@ -2156,101 +2584,176 @@ "label": "SortOrderEnum", "description": [], "signature": [ - "{ asc: \"asc\"; desc: \"desc\"; }" + "{ asc: \"asc\"; desc: \"desc\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.TraceData", + "type": "Type", + "tags": [], + "label": "TraceData", + "description": [ + "\ntrace Data" + ], + "signature": [ + "{ transactionId?: string | undefined; traceId?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestBody", + "type": "Type", + "tags": [], + "label": "UpdateConversationRequestBody", + "description": [], + "signature": [ + "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestBodyInput", + "type": "Type", + "tags": [], + "label": "UpdateConversationRequestBodyInput", + "description": [], + "signature": [ + "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestParams", + "type": "Type", + "tags": [], + "label": "UpdateConversationRequestParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestParamsInput", + "type": "Type", + "tags": [], + "label": "UpdateConversationRequestParamsInput", + "description": [], + "signature": [ + "{ id: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.TraceData", + "id": "def-common.UpdateConversationResponse", "type": "Type", "tags": [], - "label": "TraceData", - "description": [ - "\ntrace Data" - ], + "label": "UpdateConversationResponse", + "description": [], "signature": [ - "{ transactionId?: string | undefined; traceId?: string | undefined; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.UpdateConversationRequestBody", + "id": "def-common.UpdateKnowledgeBaseEntryRequestBody", "type": "Type", "tags": [], - "label": "UpdateConversationRequestBody", + "label": "UpdateKnowledgeBaseEntryRequestBody", "description": [], "signature": [ - "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }" + "{ id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.UpdateConversationRequestBodyInput", + "id": "def-common.UpdateKnowledgeBaseEntryRequestBodyInput", "type": "Type", "tags": [], - "label": "UpdateConversationRequestBodyInput", + "label": "UpdateKnowledgeBaseEntryRequestBodyInput", "description": [], "signature": [ - "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }" + "{ id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.UpdateConversationRequestParams", + "id": "def-common.UpdateKnowledgeBaseEntryRequestParams", "type": "Type", "tags": [], - "label": "UpdateConversationRequestParams", + "label": "UpdateKnowledgeBaseEntryRequestParams", "description": [], "signature": [ "{ id: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.UpdateConversationRequestParamsInput", + "id": "def-common.UpdateKnowledgeBaseEntryRequestParamsInput", "type": "Type", "tags": [], - "label": "UpdateConversationRequestParamsInput", + "label": "UpdateKnowledgeBaseEntryRequestParamsInput", "description": [], "signature": [ "{ id: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.UpdateConversationResponse", + "id": "def-common.UpdateKnowledgeBaseEntryResponse", "type": "Type", "tags": [], - "label": "UpdateConversationResponse", + "label": "UpdateKnowledgeBaseEntryResponse", "description": [], "signature": [ - "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -2267,7 +2770,7 @@ "signature": [ "{ id?: string | undefined; name?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -2284,7 +2787,24 @@ "signature": [ "string" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Vector", + "type": "Type", + "tags": [], + "label": "Vector", + "description": [ + "\nObject containing Knowledge Base Entry text embeddings and modelId used to create the embeddings" + ], + "signature": [ + "{ modelId: string; tokens: {} & { [k: string]: number; }; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -2406,7 +2926,7 @@ "label": "AppendConversationMessageResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2511,7 +3031,7 @@ "label": "BulkCrudActionResponse", "description": [], "signature": [ - "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" + "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -2526,7 +3046,7 @@ "label": "BulkCrudActionResults", "description": [], "signature": [ - "Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>" + "Zod.ZodObject<{ updated: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -2661,7 +3181,7 @@ "label": "ConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -2691,356 +3211,581 @@ "label": "ConversationUpdateProps", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateConversationRequestBody", + "type": "Object", + "tags": [], + "label": "CreateConversationRequestBody", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodOptional; title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateConversationResponse", + "type": "Object", + "tags": [], + "label": "CreateConversationResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseEntryRequestBody", + "type": "Object", + "tags": [], + "label": "CreateKnowledgeBaseEntryRequestBody", + "description": [], + "signature": [ + "Zod.ZodObject<{ metadata: Zod.ZodObject<{ kbResource: Zod.ZodString; source: Zod.ZodString; required: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { source: string; required: boolean; kbResource: string; }, { source: string; required: boolean; kbResource: string; }>; text: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }, { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseEntryResponse", + "type": "Object", + "tags": [], + "label": "CreateKnowledgeBaseEntryResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ timestamp: Zod.ZodOptional; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseRequestParams", + "type": "Object", + "tags": [], + "label": "CreateKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ resource: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { resource?: string | undefined; }, { resource?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseResponse", + "type": "Object", + "tags": [], + "label": "CreateKnowledgeBaseResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ success: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { success?: boolean | undefined; }, { success?: boolean | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Dataset", + "type": "Object", + "tags": [], + "label": "Dataset", + "description": [], + "signature": [ + "Zod.ZodDefault; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>, \"many\">>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DatasetItem", + "type": "Object", + "tags": [], + "label": "DatasetItem", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodOptional; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.defaultAssistantFeatures", + "type": "Object", + "tags": [], + "label": "defaultAssistantFeatures", + "description": [ + "\nDefault features available to the elastic assistant" + ], + "signature": [ + "{ readonly assistantKnowledgeBaseByDefault: false; readonly assistantModelEvaluation: false; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteConversationRequestParams", + "type": "Object", + "tags": [], + "label": "DeleteConversationRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteConversationResponse", + "type": "Object", + "tags": [], + "label": "DeleteConversationResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseEntryRequestParams", + "type": "Object", + "tags": [], + "label": "DeleteKnowledgeBaseEntryRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseEntryResponse", + "type": "Object", + "tags": [], + "label": "DeleteKnowledgeBaseEntryResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ timestamp: Zod.ZodOptional; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseRequestParams", + "type": "Object", + "tags": [], + "label": "DeleteKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ resource: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { resource?: string | undefined; }, { resource?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseResponse", + "type": "Object", + "tags": [], + "label": "DeleteKnowledgeBaseResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ success: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { success?: boolean | undefined; }, { success?: boolean | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.CreateConversationRequestBody", + "id": "def-common.ErrorSchema", "type": "Object", "tags": [], - "label": "CreateConversationRequestBody", + "label": "ErrorSchema", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodOptional; title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodOptional; error: Zod.ZodObject<{ status_code: Zod.ZodNumber; message: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; }, { message: string; status_code: number; }>; }, \"strict\", Zod.ZodTypeAny, { error: { message: string; status_code: number; }; id?: string | undefined; }, { error: { message: string; status_code: number; }; id?: string | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.CreateConversationResponse", + "id": "def-common.ExecuteConnectorRequestBody", "type": "Object", "tags": [], - "label": "CreateConversationResponse", + "label": "ExecuteConnectorRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ conversationId: Zod.ZodOptional; message: Zod.ZodOptional; model: Zod.ZodOptional; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; actionTypeId: Zod.ZodString; alertsIndexPattern: Zod.ZodOptional; allow: Zod.ZodOptional>; allowReplacement: Zod.ZodOptional>; isEnabledKnowledgeBase: Zod.ZodOptional; isEnabledRAGAlerts: Zod.ZodOptional; replacements: Zod.ZodObject<{}, \"strip\", Zod.ZodString, Zod.objectOutputType<{}, Zod.ZodString, \"strip\">, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>; size: Zod.ZodOptional; langSmithProject: Zod.ZodOptional; langSmithApiKey: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.CreateKnowledgeBaseRequestParams", + "id": "def-common.ExecuteConnectorRequestParams", "type": "Object", "tags": [], - "label": "CreateKnowledgeBaseRequestParams", + "label": "ExecuteConnectorRequestParams", "description": [], "signature": [ - "Zod.ZodObject<{ resource: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { resource?: string | undefined; }, { resource?: string | undefined; }>" + "Zod.ZodObject<{ connectorId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; }, { connectorId: string; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.CreateKnowledgeBaseResponse", + "id": "def-common.ExecuteConnectorResponse", "type": "Object", "tags": [], - "label": "CreateKnowledgeBaseResponse", + "label": "ExecuteConnectorResponse", "description": [], "signature": [ - "Zod.ZodObject<{ success: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { success?: boolean | undefined; }, { success?: boolean | undefined; }>" + "Zod.ZodObject<{ data: Zod.ZodString; connector_id: Zod.ZodString; status: Zod.ZodString; trace_data: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { status: string; data: string; connector_id: string; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { status: string; data: string; connector_id: string; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.Dataset", + "id": "def-common.FindConversationsRequestQuery", "type": "Object", "tags": [], - "label": "Dataset", + "label": "FindConversationsRequestQuery", "description": [], "signature": [ - "Zod.ZodDefault; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>, \"many\">>" + "Zod.ZodObject<{ fields: Zod.ZodOptional, string[], unknown>>; filter: Zod.ZodOptional; sort_field: Zod.ZodOptional>; sort_order: Zod.ZodOptional>; page: Zod.ZodDefault>; per_page: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }, { fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.DatasetItem", + "id": "def-common.FindConversationsResponse", "type": "Object", "tags": [], - "label": "DatasetItem", + "label": "FindConversationsResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodOptional; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>" + "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.defaultAssistantFeatures", + "id": "def-common.FindConversationsSortField", "type": "Object", "tags": [], - "label": "defaultAssistantFeatures", - "description": [ - "\nDefault features available to the elastic assistant" - ], + "label": "FindConversationsSortField", + "description": [], "signature": [ - "{ readonly assistantModelEvaluation: false; }" + "Zod.ZodEnum<[\"created_at\", \"is_default\", \"title\", \"updated_at\"]>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.DeleteConversationRequestParams", + "id": "def-common.FindConversationsSortFieldEnum", "type": "Object", "tags": [], - "label": "DeleteConversationRequestParams", + "label": "FindConversationsSortFieldEnum", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + "{ title: \"title\"; updated_at: \"updated_at\"; created_at: \"created_at\"; is_default: \"is_default\"; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.DeleteConversationResponse", + "id": "def-common.FindCurrentUserConversationsRequestQuery", "type": "Object", "tags": [], - "label": "DeleteConversationResponse", + "label": "FindCurrentUserConversationsRequestQuery", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ fields: Zod.ZodOptional, string[], unknown>>; filter: Zod.ZodOptional; sort_field: Zod.ZodOptional>; sort_order: Zod.ZodOptional>; page: Zod.ZodDefault>; per_page: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }, { fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.DeleteKnowledgeBaseRequestParams", + "id": "def-common.FindCurrentUserConversationsResponse", "type": "Object", "tags": [], - "label": "DeleteKnowledgeBaseRequestParams", + "label": "FindCurrentUserConversationsResponse", "description": [], "signature": [ - "Zod.ZodObject<{ resource: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { resource?: string | undefined; }, { resource?: string | undefined; }>" + "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.DeleteKnowledgeBaseResponse", + "id": "def-common.GetCapabilitiesResponse", "type": "Object", "tags": [], - "label": "DeleteKnowledgeBaseResponse", + "label": "GetCapabilitiesResponse", "description": [], "signature": [ - "Zod.ZodObject<{ success: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { success?: boolean | undefined; }, { success?: boolean | undefined; }>" + "Zod.ZodObject<{ assistantKnowledgeBaseByDefault: Zod.ZodBoolean; assistantModelEvaluation: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { assistantKnowledgeBaseByDefault: boolean; assistantModelEvaluation: boolean; }, { assistantKnowledgeBaseByDefault: boolean; assistantModelEvaluation: boolean; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.ErrorSchema", + "id": "def-common.GetEvaluateResponse", "type": "Object", "tags": [], - "label": "ErrorSchema", + "label": "GetEvaluateResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodOptional; error: Zod.ZodObject<{ status_code: Zod.ZodNumber; message: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; }, { message: string; status_code: number; }>; }, \"strict\", Zod.ZodTypeAny, { error: { message: string; status_code: number; }; id?: string | undefined; }, { error: { message: string; status_code: number; }; id?: string | undefined; }>" + "Zod.ZodObject<{ agentExecutors: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { agentExecutors: string[]; }, { agentExecutors: string[]; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/get_evaluate_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.ExecuteConnectorRequestBody", + "id": "def-common.KnowledgeBaseEntryBulkActionBase", "type": "Object", "tags": [], - "label": "ExecuteConnectorRequestBody", + "label": "KnowledgeBaseEntryBulkActionBase", "description": [], "signature": [ - "Zod.ZodObject<{ conversationId: Zod.ZodOptional; message: Zod.ZodOptional; model: Zod.ZodOptional; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; actionTypeId: Zod.ZodString; alertsIndexPattern: Zod.ZodOptional; allow: Zod.ZodOptional>; allowReplacement: Zod.ZodOptional>; isEnabledKnowledgeBase: Zod.ZodOptional; isEnabledRAGAlerts: Zod.ZodOptional; replacements: Zod.ZodObject<{}, \"strip\", Zod.ZodString, Zod.objectOutputType<{}, Zod.ZodString, \"strip\">, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>; size: Zod.ZodOptional; langSmithProject: Zod.ZodOptional; langSmithApiKey: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }>" + "Zod.ZodObject<{ query: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.ExecuteConnectorRequestParams", + "id": "def-common.KnowledgeBaseEntryBulkActionSkipReason", "type": "Object", "tags": [], - "label": "ExecuteConnectorRequestParams", + "label": "KnowledgeBaseEntryBulkActionSkipReason", "description": [], "signature": [ - "Zod.ZodObject<{ connectorId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; }, { connectorId: string; }>" + "Zod.ZodLiteral<\"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\">" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.ExecuteConnectorResponse", + "id": "def-common.KnowledgeBaseEntryBulkActionSkipResult", "type": "Object", "tags": [], - "label": "ExecuteConnectorResponse", + "label": "KnowledgeBaseEntryBulkActionSkipResult", "description": [], "signature": [ - "Zod.ZodObject<{ data: Zod.ZodString; connector_id: Zod.ZodString; status: Zod.ZodString; trace_data: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { status: string; data: string; connector_id: string; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { status: string; data: string; connector_id: string; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; name: Zod.ZodOptional; skip_reason: Zod.ZodLiteral<\"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.FindConversationsRequestQuery", + "id": "def-common.KnowledgeBaseEntryBulkCrudActionResponse", "type": "Object", "tags": [], - "label": "FindConversationsRequestQuery", + "label": "KnowledgeBaseEntryBulkCrudActionResponse", "description": [], "signature": [ - "Zod.ZodObject<{ fields: Zod.ZodOptional, string[], unknown>>; filter: Zod.ZodOptional; sort_field: Zod.ZodOptional>; sort_order: Zod.ZodOptional>; page: Zod.ZodDefault>; per_page: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }, { fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }>" + "Zod.ZodObject<{ success: Zod.ZodOptional; statusCode: Zod.ZodOptional; message: Zod.ZodOptional; knowledgeBaseEntriesCount: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>, \"many\">; created: Zod.ZodArray; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; knowledgeBaseEntries: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; statusCode?: number | undefined; message?: string | undefined; knowledgeBaseEntriesCount?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; statusCode?: number | undefined; message?: string | undefined; knowledgeBaseEntriesCount?: number | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.FindConversationsResponse", + "id": "def-common.KnowledgeBaseEntryBulkCrudActionResults", "type": "Object", "tags": [], - "label": "FindConversationsResponse", + "label": "KnowledgeBaseEntryBulkCrudActionResults", "description": [], "signature": [ - "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" + "Zod.ZodObject<{ updated: Zod.ZodArray; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>, \"many\">; created: Zod.ZodArray; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.FindConversationsSortField", + "id": "def-common.KnowledgeBaseEntryBulkCrudActionSummary", "type": "Object", "tags": [], - "label": "FindConversationsSortField", + "label": "KnowledgeBaseEntryBulkCrudActionSummary", "description": [], "signature": [ - "Zod.ZodEnum<[\"created_at\", \"is_default\", \"title\", \"updated_at\"]>" + "Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.FindConversationsSortFieldEnum", + "id": "def-common.KnowledgeBaseEntryCreateProps", "type": "Object", "tags": [], - "label": "FindConversationsSortFieldEnum", + "label": "KnowledgeBaseEntryCreateProps", "description": [], "signature": [ - "{ title: \"title\"; updated_at: \"updated_at\"; created_at: \"created_at\"; is_default: \"is_default\"; }" + "Zod.ZodObject<{ metadata: Zod.ZodObject<{ kbResource: Zod.ZodString; source: Zod.ZodString; required: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { source: string; required: boolean; kbResource: string; }, { source: string; required: boolean; kbResource: string; }>; text: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }, { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.FindCurrentUserConversationsRequestQuery", + "id": "def-common.KnowledgeBaseEntryDetailsInError", "type": "Object", "tags": [], - "label": "FindCurrentUserConversationsRequestQuery", + "label": "KnowledgeBaseEntryDetailsInError", "description": [], "signature": [ - "Zod.ZodObject<{ fields: Zod.ZodOptional, string[], unknown>>; filter: Zod.ZodOptional; sort_field: Zod.ZodOptional>; sort_order: Zod.ZodOptional>; page: Zod.ZodDefault>; per_page: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }, { fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.FindCurrentUserConversationsResponse", + "id": "def-common.KnowledgeBaseEntryErrorSchema", "type": "Object", "tags": [], - "label": "FindCurrentUserConversationsResponse", + "label": "KnowledgeBaseEntryErrorSchema", "description": [], "signature": [ - "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" + "Zod.ZodObject<{ statusCode: Zod.ZodNumber; error: Zod.ZodString; message: Zod.ZodString; }, \"strict\", Zod.ZodTypeAny, { error: string; message: string; statusCode: number; }, { error: string; message: string; statusCode: number; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.GetCapabilitiesResponse", + "id": "def-common.KnowledgeBaseEntryResponse", "type": "Object", "tags": [], - "label": "GetCapabilitiesResponse", + "label": "KnowledgeBaseEntryResponse", "description": [], "signature": [ - "Zod.ZodObject<{ assistantModelEvaluation: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { assistantModelEvaluation: boolean; }, { assistantModelEvaluation: boolean; }>" + "Zod.ZodObject<{ timestamp: Zod.ZodOptional; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.GetEvaluateResponse", + "id": "def-common.KnowledgeBaseEntryUpdateProps", "type": "Object", "tags": [], - "label": "GetEvaluateResponse", + "label": "KnowledgeBaseEntryUpdateProps", "description": [], "signature": [ - "Zod.ZodObject<{ agentExecutors: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { agentExecutors: string[]; }, { agentExecutors: string[]; }>" + "Zod.ZodObject<{ id: Zod.ZodString; metadata: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }, { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/get_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3105,6 +3850,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Metadata", + "type": "Object", + "tags": [], + "label": "Metadata", + "description": [], + "signature": [ + "Zod.ZodObject<{ kbResource: Zod.ZodString; source: Zod.ZodString; required: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { source: string; required: boolean; kbResource: string; }, { source: string; required: boolean; kbResource: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.NonEmptyString", @@ -3115,7 +3875,7 @@ "signature": [ "Zod.ZodString" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3135,6 +3895,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.NormalizedKnowledgeBaseEntryError", + "type": "Object", + "tags": [], + "label": "NormalizedKnowledgeBaseEntryError", + "description": [], + "signature": [ + "Zod.ZodObject<{ message: Zod.ZodString; statusCode: Zod.ZodNumber; err_code: Zod.ZodOptional; knowledgeBaseEntries: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.OutputIndex", @@ -3158,7 +3933,7 @@ "label": "PerformBulkActionRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ delete: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>>; create: Zod.ZodOptional; title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>, \"many\">>; update: Zod.ZodOptional; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }>" + "Zod.ZodObject<{ delete: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>>; create: Zod.ZodOptional; title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>, \"many\">>; update: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -3173,13 +3948,43 @@ "label": "PerformBulkActionResponse", "description": [], "signature": [ - "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" + "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformKnowledgeBaseEntryBulkActionRequestBody", + "type": "Object", + "tags": [], + "label": "PerformKnowledgeBaseEntryBulkActionRequestBody", + "description": [], + "signature": [ + "Zod.ZodObject<{ delete: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>>; create: Zod.ZodOptional; text: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }, { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }>, \"many\">>; update: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }, { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }[] | undefined; update?: { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }[] | undefined; }, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { text: string; metadata: { source: string; required: boolean; kbResource: string; }; }[] | undefined; update?: { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }[] | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformKnowledgeBaseEntryBulkActionResponse", + "type": "Object", + "tags": [], + "label": "PerformKnowledgeBaseEntryBulkActionResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ success: Zod.ZodOptional; statusCode: Zod.ZodOptional; message: Zod.ZodOptional; knowledgeBaseEntriesCount: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>, \"many\">; created: Zod.ZodArray; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; knowledgeBaseEntries: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; statusCode?: number | undefined; message?: string | undefined; knowledgeBaseEntriesCount?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; updated: { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }[]; skipped: { id: string; skip_reason: \"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; statusCode: number; knowledgeBaseEntries: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; statusCode?: number | undefined; message?: string | undefined; knowledgeBaseEntriesCount?: number | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.PostEvaluateBody", @@ -3293,7 +4098,7 @@ "label": "ReadConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -3315,6 +4120,36 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseEntryRequestParams", + "type": "Object", + "tags": [], + "label": "ReadKnowledgeBaseEntryRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseEntryResponse", + "type": "Object", + "tags": [], + "label": "ReadKnowledgeBaseEntryResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ timestamp: Zod.ZodOptional; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.ReadKnowledgeBaseRequestParams", @@ -3338,7 +4173,7 @@ "label": "ReadKnowledgeBaseResponse", "description": [], "signature": [ - "Zod.ZodObject<{ elser_exists: Zod.ZodOptional; index_exists: Zod.ZodOptional; pipeline_exists: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { elser_exists?: boolean | undefined; index_exists?: boolean | undefined; pipeline_exists?: boolean | undefined; }, { elser_exists?: boolean | undefined; index_exists?: boolean | undefined; pipeline_exists?: boolean | undefined; }>" + "Zod.ZodObject<{ elser_exists: Zod.ZodOptional; esql_exists: Zod.ZodOptional; index_exists: Zod.ZodOptional; is_setup_in_progress: Zod.ZodOptional; pipeline_exists: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { elser_exists?: boolean | undefined; esql_exists?: boolean | undefined; index_exists?: boolean | undefined; is_setup_in_progress?: boolean | undefined; pipeline_exists?: boolean | undefined; }, { elser_exists?: boolean | undefined; esql_exists?: boolean | undefined; index_exists?: boolean | undefined; is_setup_in_progress?: boolean | undefined; pipeline_exists?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", "deprecated": false, @@ -3413,7 +4248,7 @@ "label": "UpdateConversationRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -3443,13 +4278,58 @@ "label": "UpdateConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodString; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateKnowledgeBaseEntryRequestBody", + "type": "Object", + "tags": [], + "label": "UpdateKnowledgeBaseEntryRequestBody", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; metadata: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }, { id: string; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateKnowledgeBaseEntryRequestParams", + "type": "Object", + "tags": [], + "label": "UpdateKnowledgeBaseEntryRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateKnowledgeBaseEntryResponse", + "type": "Object", + "tags": [], + "label": "UpdateKnowledgeBaseEntryResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ timestamp: Zod.ZodOptional; id: Zod.ZodString; createdAt: Zod.ZodString; createdBy: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; metadata: Zod.ZodOptional>; namespace: Zod.ZodString; text: Zod.ZodString; vector: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }, { id: string; namespace: string; text: string; createdAt: string; users: { id?: string | undefined; name?: string | undefined; }[]; timestamp?: string | undefined; createdBy?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; metadata?: { source: string; required: boolean; kbResource: string; } | undefined; vector?: { modelId: string; tokens: {} & { [k: string]: number; }; } | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.User", @@ -3460,7 +4340,7 @@ "signature": [ "Zod.ZodObject<{ id: Zod.ZodOptional; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3475,7 +4355,22 @@ "signature": [ "Zod.ZodString" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Vector", + "type": "Object", + "tags": [], + "label": "Vector", + "description": [], + "signature": [ + "Zod.ZodObject<{ modelId: Zod.ZodString; tokens: Zod.ZodObject<{}, \"strip\", Zod.ZodNumber, Zod.objectOutputType<{}, Zod.ZodNumber, \"strip\">, Zod.objectInputType<{}, Zod.ZodNumber, \"strip\">>; }, \"strip\", Zod.ZodTypeAny, { modelId: string; tokens: {} & { [k: string]: number; }; }, { modelId: string; tokens: {} & { [k: string]: number; }; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index 1d9c881ebc379..2ff982ad906c3 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 232 | 0 | 217 | 2 | +| 292 | 0 | 275 | 2 | ## Common diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index 7fdc3856050d6..1ea4de5a6ce5f 100644 --- a/api_docs/kbn_entities_schema.mdx +++ b/api_docs/kbn_entities_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-entities-schema title: "@kbn/entities-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/entities-schema plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 7509c63e77921..d3e1152bc2c5c 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index f6680c048cf14..cb14577d76cfc 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index f49662d452ced..820e58bc86dea 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.devdocs.json b/api_docs/kbn_es_query.devdocs.json index c52adf2911a0c..d4e035d56caa0 100644 --- a/api_docs/kbn_es_query.devdocs.json +++ b/api_docs/kbn_es_query.devdocs.json @@ -678,8 +678,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" }, ") => ", { @@ -731,8 +731,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" } ], "path": "packages/kbn-es-query/src/filters/build_filters/exists_filter.ts", @@ -997,8 +997,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" }, ") => ", { @@ -1069,8 +1069,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" } ], "path": "packages/kbn-es-query/src/filters/build_filters/phrase_filter.ts", @@ -1109,8 +1109,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" }, ") => ", { @@ -1174,8 +1174,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" } ], "path": "packages/kbn-es-query/src/filters/build_filters/phrases_filter.ts", @@ -1448,8 +1448,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" }, " | undefined, formattedValue?: string | undefined) => ", { @@ -1528,8 +1528,8 @@ "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewBase", - "text": "DataViewBase" + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" }, " | undefined" ], @@ -2683,6 +2683,86 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.getKqlFieldNames", + "type": "Function", + "tags": [], + "label": "getKqlFieldNames", + "description": [], + "signature": [ + "(node: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.KueryNode", + "text": "KueryNode" + }, + ") => string[]" + ], + "path": "packages/kbn-es-query/src/kuery/utils/get_kql_fields.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.getKqlFieldNames.$1", + "type": "Object", + "tags": [], + "label": "node", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.KueryNode", + "text": "KueryNode" + } + ], + "path": "packages/kbn-es-query/src/kuery/utils/get_kql_fields.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.getKqlFieldNamesFromExpression", + "type": "Function", + "tags": [], + "label": "getKqlFieldNamesFromExpression", + "description": [], + "signature": [ + "(expression: string) => string[]" + ], + "path": "packages/kbn-es-query/src/kuery/utils/get_kql_fields.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.getKqlFieldNamesFromExpression.$1", + "type": "string", + "tags": [], + "label": "expression", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-es-query/src/kuery/utils/get_kql_fields.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/es-query", "id": "def-common.getLanguageDisplayName", @@ -5247,6 +5327,99 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.DataViewBase", + "type": "Interface", + "tags": [], + "label": "DataViewBase", + "description": [ + "\nA base interface for an index pattern" + ], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.DataViewBase", + "text": "DataViewBase" + }, + " extends ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.DataViewBaseNoFields", + "text": "DataViewBaseNoFields" + } + ], + "path": "packages/kbn-es-query/src/es_query/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.DataViewBase.fields", + "type": "Array", + "tags": [], + "label": "fields", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.DataViewFieldBase", + "text": "DataViewFieldBase" + }, + "[]" + ], + "path": "packages/kbn-es-query/src/es_query/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.DataViewBaseNoFields", + "type": "Interface", + "tags": [], + "label": "DataViewBaseNoFields", + "description": [], + "path": "packages/kbn-es-query/src/es_query/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.DataViewBaseNoFields.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-es-query/src/es_query/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.DataViewBaseNoFields.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "path": "packages/kbn-es-query/src/es_query/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/es-query", "id": "def-common.EsQueryFiltersConfig", @@ -5923,31 +6096,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.DataViewBase", - "type": "Type", - "tags": [], - "label": "DataViewBase", - "description": [ - "\nA base interface for an index pattern" - ], - "signature": [ - "{ fields: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewFieldBase", - "text": "DataViewFieldBase" - }, - "[]; id?: string | undefined; title: string; }" - ], - "path": "packages/kbn-es-query/src/es_query/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/es-query", "id": "def-common.DataViewFieldBase", diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 1f865d800f153..133e844769caf 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 261 | 1 | 201 | 15 | +| 269 | 1 | 209 | 15 | ## Common diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 8a65e5353d999..eacfe9a801771 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index f9894eb340d78..4ee9a1be28ef1 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index c73424f7578d0..82946fa232886 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 3185b83461179..9721a5657f643 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 6891661b0b28c..05f6871fbb1a3 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index bee7e2673330f..620d41bc0d95f 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index a0edca96484e4..f1b88bfc62ccc 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 4f18c95f49ca2..6a755483dc4b5 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 8b92a98dab6e5..0030027ade603 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index e1cb1259a8b1b..8268d8f70c427 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 3724a34fad00b..fae961dc600bb 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 648c023f14d6f..cb49111aca642 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index b545e7c3c5b34..645fdaa11e35a 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 6681c12e8d111..3f05134d500cc 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 9ac51a310dad3..d429d5bac10ef 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index 068cf2df7e15f..03c74b9eb2d2a 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 62cc1c4471aa0..c72b6f26850fc 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 4ccfe0bb2217b..251a692f74fe3 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 434c0ea1c88f6..ed9b89784ea5c 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index e4c64d5be2625..77bb962e31c85 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index bc245facc9d6b..3aff8fd27f040 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index f5260f6eb7e11..5f77fc5697304 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index bb719406e334e..621f74d3c4390 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index a0bfa7bf67e25..8c63d47e674a5 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 7c4c02c29dede..60c37c8910017 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index eaa27c6b9303a..4c17fcae6cbe2 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index aad52fba0f782..e3dc75c2243e7 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index dae37620023b2..b99efadd70af8 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 8252010eecb30..b1420b085e4c7 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 13232cc3f0076..eb421ccec74d2 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 387b707ef33bf..a3fae46dd0c69 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index 5e5cf0f6b7570..ba661d4575e26 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 9d53dc3928e03..01c48101575fc 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index a88d3370f8737..7a0d8a0ddb2ee 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 70a94bda1b19d..5862b5be6ded4 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 73e8a08a8db27..6b96367f4a976 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index b5e3a51ddc953..1359e928b7457 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index d7cff9a698593..33be0e8c3dec1 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index 06dae205273db..b094c74fd3977 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index fa0cc30a66279..1914ebf983161 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 3a2c914d8972f..2f49bbad47da1 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_content_badge.mdx b/api_docs/kbn_managed_content_badge.mdx index c853f7684ffdf..6ac248c71ad50 100644 --- a/api_docs/kbn_managed_content_badge.mdx +++ b/api_docs/kbn_managed_content_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-content-badge title: "@kbn/managed-content-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-content-badge plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-content-badge'] --- import kbnManagedContentBadgeObj from './kbn_managed_content_badge.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index bb5564aa4a8ed..3194073a20c74 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index a26885eaf8dfc..0114ffe5d2628 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index 9a8776cf9eac4..8d45ceb1dd6b0 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index 20fab4480b4df..f2b5d25b9dd03 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index 3319f91551d56..4e6e2412811e5 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 0103222f036d7..fdb2f87c364e3 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index d095a0f3ce8a3..20bd72b4eeade 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index 0395cea532071..49eea2d9808a0 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 1ab0cdfdfc766..220035e0198b0 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index c1568de1b76f5..7e1675b4f00c7 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index 108d8de81ef67..f0f6ad186f826 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 3f1ebe9b73274..ae2ae081a2949 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 721d1e5c06122..2cc5a9e92de17 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index f36575c2e9e0f..cb7587bbb61e8 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index 944c37620fca0..c2eb1fc95cae4 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 691f13089edfc..10fd5d64ea0ef 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 4627bcb5da05d..653cde2b22f74 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.mdx b/api_docs/kbn_ml_cancellable_search.mdx index c534bb98129bf..89915d991603b 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index cf13409ca1bc2..47b8091114e18 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 96ef4dce826c2..7b79cd55d73ac 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index 2e815aec2dfba..5815c8dc635d8 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 06944e51e96fe..f4cbf4d102ea2 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 54c601b060b36..d20bfb24d7051 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 726a77c042d8e..7d25bddb5eac6 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index bb0a28fae804b..b753be6209f08 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 8256a5b17dccc..013b026e9816a 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 7d2b3849c30b2..547b48ec30733 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 6727da83c1138..b7b19e18769d5 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index ab24b887d9836..fa93c5aba6bf0 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index eec4d49078e26..a34edb95b2c21 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 1038de63310e5..33cc7aef1c4c3 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index e1abbae79cd0a..b6d9abe4cbfef 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index e342bce4e66e6..dd39d846a1e47 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index 304cbc9d0c8a9..e0204e98cddaf 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index 210206057ace2..c34d8688c0861 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 0387d847c8dab..f5e7c2b0f9158 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 6fcda645376cf..88481446d9d0e 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index 75a6555735baf..3aed1580ec11c 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 461abb8754801..8ec610561d054 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index caae8ac209814..372d4642c4dfd 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 14fab7aad9c26..3b985c2306781 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index d1435c0524254..a39ca03823886 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index f3f7c2bf7b17a..82534f85ce419 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 54bda828e2d26..710d7be91a037 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 9ddf3b925a45e..afe07f2cc4f2f 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index b0feb7bea0422..50e154e63922a 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index 0acc2281d3ff6..34df926fc930b 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index a64760faad9d0..021a1eaf17a26 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 693f3c620391c..cf1d7598d61e4 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 0b4676e4d5f19..61d2413e518db 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index ffc91d2c719a9..4206f567d2a69 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 0f64d776b1c11..add7eadbb2c6b 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index d9947f1d9738e..42e6ce739427b 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 20f1726a4795e..d9c3419d60da9 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index 8a3b0fe93837d..794ec3b23277d 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 1db3f00e4c792..6b3dc7e12b759 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index bcd1f927c3017..0369499767209 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.devdocs.json b/api_docs/kbn_presentation_containers.devdocs.json index 990eb469d20d8..81831f10c3eea 100644 --- a/api_docs/kbn_presentation_containers.devdocs.json +++ b/api_docs/kbn_presentation_containers.devdocs.json @@ -143,29 +143,29 @@ }, { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.apiHasSerializableState", + "id": "def-common.apiHasRuntimeChildState", "type": "Function", "tags": [], - "label": "apiHasSerializableState", + "label": "apiHasRuntimeChildState", "description": [], "signature": [ - "(api: unknown) => api is ", + "(api: unknown) => api is ", { "pluginId": "@kbn/presentation-containers", "scope": "common", "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.HasSerializableState", - "text": "HasSerializableState" + "section": "def-common.HasRuntimeChildState", + "text": "HasRuntimeChildState" }, - "" + "" ], - "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.apiHasSerializableState.$1", + "id": "def-common.apiHasRuntimeChildState.$1", "type": "Unknown", "tags": [], "label": "api", @@ -173,7 +173,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -184,10 +184,10 @@ }, { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.apiIsPresentationContainer", + "id": "def-common.apiHasSaveNotification", "type": "Function", "tags": [], - "label": "apiIsPresentationContainer", + "label": "apiHasSaveNotification", "description": [], "signature": [ "(api: unknown) => api is ", @@ -195,17 +195,17 @@ "pluginId": "@kbn/presentation-containers", "scope": "common", "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PresentationContainer", - "text": "PresentationContainer" + "section": "def-common.HasSaveNotification", + "text": "HasSaveNotification" } ], - "path": "packages/presentation/presentation_containers/interfaces/presentation_container.ts", + "path": "packages/presentation/presentation_containers/interfaces/has_save_notification.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.apiIsPresentationContainer.$1", + "id": "def-common.apiHasSaveNotification.$1", "type": "Unknown", "tags": [], "label": "api", @@ -213,7 +213,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_containers/interfaces/presentation_container.ts", + "path": "packages/presentation/presentation_containers/interfaces/has_save_notification.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -224,10 +224,10 @@ }, { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.apiPublishesLastSavedState", + "id": "def-common.apiHasSerializableState", "type": "Function", "tags": [], - "label": "apiPublishesLastSavedState", + "label": "apiHasSerializableState", "description": [], "signature": [ "(api: unknown) => api is ", @@ -235,17 +235,18 @@ "pluginId": "@kbn/presentation-containers", "scope": "common", "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PublishesLastSavedState", - "text": "PublishesLastSavedState" - } + "section": "def-common.HasSerializableState", + "text": "HasSerializableState" + }, + "" ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.apiPublishesLastSavedState.$1", + "id": "def-common.apiHasSerializableState.$1", "type": "Unknown", "tags": [], "label": "api", @@ -253,7 +254,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -264,36 +265,37 @@ }, { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.canTrackContentfulRender", + "id": "def-common.apiHasSerializedChildState", "type": "Function", "tags": [], - "label": "canTrackContentfulRender", + "label": "apiHasSerializedChildState", "description": [], "signature": [ - "(root: unknown) => root is ", + "(api: unknown) => api is ", { "pluginId": "@kbn/presentation-containers", "scope": "common", "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.TrackContentfulRender", - "text": "TrackContentfulRender" - } + "section": "def-common.HasSerializedChildState", + "text": "HasSerializedChildState" + }, + "" ], - "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.canTrackContentfulRender.$1", + "id": "def-common.apiHasSerializedChildState.$1", "type": "Unknown", "tags": [], - "label": "root", + "label": "api", "description": [], "signature": [ "unknown" ], - "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -304,21 +306,20 @@ }, { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.getContainerParentFromAPI", + "id": "def-common.apiIsPresentationContainer", "type": "Function", "tags": [], - "label": "getContainerParentFromAPI", + "label": "apiIsPresentationContainer", "description": [], "signature": [ - "(api: unknown) => ", + "(api: unknown) => api is ", { "pluginId": "@kbn/presentation-containers", "scope": "common", "docId": "kibKbnPresentationContainersPluginApi", "section": "def-common.PresentationContainer", "text": "PresentationContainer" - }, - " | undefined" + } ], "path": "packages/presentation/presentation_containers/interfaces/presentation_container.ts", "deprecated": false, @@ -326,7 +327,7 @@ "children": [ { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.getContainerParentFromAPI.$1", + "id": "def-common.apiIsPresentationContainer.$1", "type": "Unknown", "tags": [], "label": "api", @@ -345,83 +346,77 @@ }, { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.getLastSavedStateSubjectForChild", + "id": "def-common.canTrackContentfulRender", "type": "Function", "tags": [], - "label": "getLastSavedStateSubjectForChild", + "label": "canTrackContentfulRender", "description": [], "signature": [ - "(parentApi: unknown, childId: string, deserializer: (state: ", + "(root: unknown) => root is ", { "pluginId": "@kbn/presentation-containers", "scope": "common", "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" - }, - ") => RuntimeState) => ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishingSubject", - "text": "PublishingSubject" - }, - " | undefined" + "section": "def-common.TrackContentfulRender", + "text": "TrackContentfulRender" + } ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", + "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.getLastSavedStateSubjectForChild.$1", + "id": "def-common.canTrackContentfulRender.$1", "type": "Unknown", "tags": [], - "label": "parentApi", + "label": "root", "description": [], "signature": [ "unknown" ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", + "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", "deprecated": false, "trackAdoption": false, "isRequired": true - }, + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.getContainerParentFromAPI", + "type": "Function", + "tags": [], + "label": "getContainerParentFromAPI", + "description": [], + "signature": [ + "(api: unknown) => ", { - "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.getLastSavedStateSubjectForChild.$2", - "type": "string", - "tags": [], - "label": "childId", - "description": [], - "signature": [ - "string" - ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.PresentationContainer", + "text": "PresentationContainer" }, + " | undefined" + ], + "path": "packages/presentation/presentation_containers/interfaces/presentation_container.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.getLastSavedStateSubjectForChild.$3", - "type": "Function", + "id": "def-common.getContainerParentFromAPI.$1", + "type": "Unknown", "tags": [], - "label": "deserializer", + "label": "api", "description": [], "signature": [ - "(state: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" - }, - ") => RuntimeState" + "unknown" ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", + "path": "packages/presentation/presentation_containers/interfaces/presentation_container.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -869,6 +864,91 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasRuntimeChildState", + "type": "Interface", + "tags": [], + "label": "HasRuntimeChildState", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasRuntimeChildState", + "text": "HasRuntimeChildState" + }, + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasRuntimeChildState.getRuntimeStateForChild", + "type": "Function", + "tags": [], + "label": "getRuntimeStateForChild", + "description": [], + "signature": [ + "(childId: string) => Partial | undefined" + ], + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasRuntimeChildState.getRuntimeStateForChild.$1", + "type": "string", + "tags": [], + "label": "childId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSaveNotification", + "type": "Interface", + "tags": [], + "label": "HasSaveNotification", + "description": [], + "path": "packages/presentation/presentation_containers/interfaces/has_save_notification.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSaveNotification.saveNotification$", + "type": "Object", + "tags": [], + "label": "saveNotification$", + "description": [], + "signature": [ + "Subject", + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/has_save_notification.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-containers", "id": "def-common.HasSerializableState", @@ -884,7 +964,7 @@ "section": "def-common.HasSerializableState", "text": "HasSerializableState" }, - "" + "" ], "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", "deprecated": false, @@ -896,9 +976,19 @@ "type": "Function", "tags": [], "label": "serializeState", - "description": [], + "description": [ + "\nSerializes all state into a format that can be saved into\nsome external store. The opposite of `deserialize` in the {@link ReactEmbeddableFactory}" + ], "signature": [ "() => ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.MaybePromise", + "text": "MaybePromise" + }, + "<", { "pluginId": "@kbn/presentation-containers", "scope": "common", @@ -906,7 +996,113 @@ "section": "def-common.SerializedPanelState", "text": "SerializedPanelState" }, - "" + ">" + ], + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSerializedChildState", + "type": "Interface", + "tags": [], + "label": "HasSerializedChildState", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasSerializedChildState", + "text": "HasSerializedChildState" + }, + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSerializedChildState.getSerializedStateForChild", + "type": "Function", + "tags": [], + "label": "getSerializedStateForChild", + "description": [], + "signature": [ + "(childId: string) => ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.SerializedPanelState", + "text": "SerializedPanelState" + }, + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSerializedChildState.getSerializedStateForChild.$1", + "type": "string", + "tags": [], + "label": "childId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/presentation/presentation_containers/interfaces/child_state.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSnapshottableState", + "type": "Interface", + "tags": [], + "label": "HasSnapshottableState", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasSnapshottableState", + "text": "HasSnapshottableState" + }, + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSnapshottableState.snapshotRuntimeState", + "type": "Function", + "tags": [], + "label": "snapshotRuntimeState", + "description": [ + "\nSerializes all runtime state exactly as it appears. This could be used\nto rehydrate a component's state without needing to deserialize it." + ], + "signature": [ + "() => RuntimeState" ], "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", "deprecated": false, @@ -1281,75 +1477,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.PublishesLastSavedState", - "type": "Interface", - "tags": [], - "label": "PublishesLastSavedState", - "description": [], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.PublishesLastSavedState.lastSavedState", - "type": "Object", - "tags": [], - "label": "lastSavedState", - "description": [], - "signature": [ - "Subject", - "" - ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.PublishesLastSavedState.getLastSavedStateForChild", - "type": "Function", - "tags": [], - "label": "getLastSavedStateForChild", - "description": [], - "signature": [ - "(childId: string) => ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" - }, - " | undefined" - ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-containers", - "id": "def-common.PublishesLastSavedState.getLastSavedStateForChild.$1", - "type": "string", - "tags": [], - "label": "childId", - "description": [], - "signature": [ - "string" - ], - "path": "packages/presentation/presentation_containers/interfaces/last_saved_state.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/presentation-containers", "id": "def-common.SerializedPanelState", diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index 82745e9533998..e5e184c342b0f 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 64 | 0 | 60 | 1 | +| 70 | 0 | 64 | 1 | ## Common diff --git a/api_docs/kbn_presentation_publishing.devdocs.json b/api_docs/kbn_presentation_publishing.devdocs.json index 0c7f31ad4b1f9..1dbcbd813226a 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -181,6 +181,46 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiHasInPlaceLibraryTransforms", + "type": "Function", + "tags": [], + "label": "apiHasInPlaceLibraryTransforms", + "description": [], + "signature": [ + "(unknownApi: unknown) => unknownApi is ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.HasInPlaceLibraryTransforms", + "text": "HasInPlaceLibraryTransforms" + } + ], + "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiHasInPlaceLibraryTransforms.$1", + "type": "Unknown", + "tags": [], + "label": "unknownApi", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.apiHasLegacyLibraryTransforms", @@ -1189,6 +1229,39 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.areTriggersDisabled", + "type": "Function", + "tags": [], + "label": "areTriggersDisabled", + "description": [], + "signature": [ + "(api: unknown) => boolean" + ], + "path": "packages/presentation/presentation_publishing/interfaces/has_disable_triggers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.areTriggersDisabled.$1", + "type": "Unknown", + "tags": [], + "label": "api", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/presentation/presentation_publishing/interfaces/has_disable_triggers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.fetch$", @@ -2450,20 +2523,22 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms", + "id": "def-common.HasInPlaceLibraryTransforms", "type": "Interface", "tags": [], - "label": "HasLibraryTransforms", - "description": [], + "label": "HasInPlaceLibraryTransforms", + "description": [ + "\nAPIs that inherit this interface can be linked to and unlinked from the library in place without\nre-initialization." + ], "signature": [ { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasLibraryTransforms", - "text": "HasLibraryTransforms" + "section": "def-common.HasInPlaceLibraryTransforms", + "text": "HasInPlaceLibraryTransforms" }, - "" + " extends Partial,DuplicateTitleCheck" ], "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", "deprecated": false, @@ -2471,27 +2546,173 @@ "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.canLinkToLibrary", - "type": "Function", + "id": "def-common.HasInPlaceLibraryTransforms.libraryId$", + "type": "Object", "tags": [], - "label": "canLinkToLibrary", + "label": "libraryId$", "description": [ - "\n" + "\nThe id of the library item that this embeddable is linked to." ], "signature": [ - "() => Promise" + "{ source: ", + "Observable", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + ", op8: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + ", op8: ", + "OperatorFunction", + ", op9: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + ", op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + ", op8: ", + "OperatorFunction", + ", op9: ", + "OperatorFunction", + ", ...operations: ", + "OperatorFunction", + "[]): ", + "Observable", + "; }; closed: boolean; observers: ", + "Observer", + "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "Operator", + ") => ", + "Observable", + "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", + "Observable", + "; operator: ", + "Operator", + " | undefined; subscribe: { (observerOrNext?: Partial<", + "Observer", + "> | ((value: string | undefined) => void) | undefined): ", + "Subscription", + "; (next?: ((value: string | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "Subscription", + "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [ - "True when embeddable is by-value and can be converted to by-reference" - ] + "trackAdoption": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.saveToLibrary", + "id": "def-common.HasInPlaceLibraryTransforms.saveToLibrary", "type": "Function", "tags": [], "label": "saveToLibrary", @@ -2507,7 +2728,7 @@ "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.saveToLibrary.$1", + "id": "def-common.HasInPlaceLibraryTransforms.saveToLibrary.$1", "type": "string", "tags": [], "label": "title", @@ -2527,15 +2748,59 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.getByReferenceState", + "id": "def-common.HasInPlaceLibraryTransforms.unlinkFromLibrary", "type": "Function", "tags": [], - "label": "getByReferenceState", + "label": "unlinkFromLibrary", "description": [ - "\n" + "\nUn-links this embeddable from the library. This method is optional, and only needed if the Embeddable\nis not meant to be re-initialized as part of the unlink operation. If the embeddable needs to be re-initialized\nafter unlinking, the getByValueState method should be used instead." ], "signature": [ - "(libraryId: string) => StateT" + "() => void" + ], + "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.HasLibraryTransforms", + "type": "Interface", + "tags": [], + "label": "HasLibraryTransforms", + "description": [ + "\nAPIs that inherit this interface can be linked to and unlinked from the library. After the save or unlink\noperation, the embeddable will be reinitialized." + ], + "signature": [ + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.HasLibraryTransforms", + "text": "HasLibraryTransforms" + }, + " extends LibraryTransformGuards,DuplicateTitleCheck" + ], + "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.HasLibraryTransforms.saveToLibrary", + "type": "Function", + "tags": [], + "label": "saveToLibrary", + "description": [ + "\nSave embeddable to library\n" + ], + "signature": [ + "(title: string) => Promise" ], "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", "deprecated": false, @@ -2543,10 +2808,10 @@ "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.getByReferenceState.$1", + "id": "def-common.HasLibraryTransforms.saveToLibrary.$1", "type": "string", "tags": [], - "label": "libraryId", + "label": "title", "description": [], "signature": [ "string" @@ -2558,18 +2823,20 @@ } ], "returnComment": [ - "by-reference embeddable state replacing by-value embeddable state" + "id of persisted library item" ] }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.checkForDuplicateTitle", + "id": "def-common.HasLibraryTransforms.getByReferenceState", "type": "Function", "tags": [], - "label": "checkForDuplicateTitle", - "description": [], + "label": "getByReferenceState", + "description": [ + "\n" + ], "signature": [ - "(newTitle: string, isTitleDuplicateConfirmed: boolean, onTitleDuplicate: () => void) => Promise" + "(libraryId: string) => StateT" ], "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", "deprecated": false, @@ -2577,10 +2844,10 @@ "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.checkForDuplicateTitle.$1", + "id": "def-common.HasLibraryTransforms.getByReferenceState.$1", "type": "string", "tags": [], - "label": "newTitle", + "label": "libraryId", "description": [], "signature": [ "string" @@ -2589,58 +2856,10 @@ "deprecated": false, "trackAdoption": false, "isRequired": true - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.checkForDuplicateTitle.$2", - "type": "boolean", - "tags": [], - "label": "isTitleDuplicateConfirmed", - "description": [], - "signature": [ - "boolean" - ], - "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.checkForDuplicateTitle.$3", - "type": "Function", - "tags": [], - "label": "onTitleDuplicate", - "description": [], - "signature": [ - "() => void" - ], - "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true } ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.HasLibraryTransforms.canUnlinkFromLibrary", - "type": "Function", - "tags": [], - "label": "canUnlinkFromLibrary", - "description": [ - "\n" - ], - "signature": [ - "() => Promise" - ], - "path": "packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], "returnComment": [ - "True when embeddable is by-reference and can be converted to by-value" + "by-reference embeddable state replacing by-value embeddable state. After\nthe save operation, the embeddable will be reinitialized with the results of this method." ] }, { @@ -2660,7 +2879,7 @@ "trackAdoption": false, "children": [], "returnComment": [ - "by-value embeddable state replacing by-reference embeddable state" + "by-value embeddable state replacing by-reference embeddable state. After\nthe unlink operation, the embeddable will be reinitialized with the results of this method." ] } ], diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index 1d69b3c6d2a67..fa977d8912e89 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 194 | 0 | 163 | 5 | +| 197 | 0 | 163 | 5 | ## Common diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 275f30a38fd66..4b341ba8b4736 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index fe29e85ae2aa9..a54729f92d11e 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index e356efd368801..f57ea865bff25 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx index 99a1838392850..5f7cbd083e572 100644 --- a/api_docs/kbn_react_hooks.mdx +++ b/api_docs/kbn_react_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-hooks title: "@kbn/react-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-hooks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] --- import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index 4188949e59a4b..91544eadaead1 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 4a873f05cace4..b7e7c84ff93ef 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index d06e602a384c7..ed0ba7522c843 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index 9d153e136ade3..9942f9fd825bc 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index b68c77b1d2427..e92405f5f8211 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 9afddbcc77bf0..ff818606dc1e5 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 35f66c28ca036..a3894f12f652a 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index a2315e36827eb..3e0d4ddd0d643 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index 60709c8d76175..73eaf7fccb5be 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 46edbf94b0306..de051f0bea216 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index 6110843c5551b..5008dc5e37f35 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index 3e20af5537dbd..61ec0e84db957 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 6758cba46782a..c8ec072eaee73 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index cbae61c8704be..c93fd45baae74 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index e8bf737e0cf4d..0b7dffd2fb40c 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 6fcc103f5a36d..fc06f64cc7818 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index 0c83de45b0f78..5850cf773a9f9 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index e0306685b7dd7..35c75478d6747 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index 31fc719ea844e..a15e5455c8619 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index db9e3868a9098..20e66c10e96de 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.devdocs.json b/api_docs/kbn_reporting_server.devdocs.json index 669e6b1b6fbb3..1a84ea86e3e2a 100644 --- a/api_docs/kbn_reporting_server.devdocs.json +++ b/api_docs/kbn_reporting_server.devdocs.json @@ -1565,13 +1565,73 @@ }, { "parentPluginId": "@kbn/reporting-server", - "id": "def-server.REPORTING_SYSTEM_INDEX", + "id": "def-server.REPORTING_DATA_STREAM_ALIAS", "type": "string", "tags": [], - "label": "REPORTING_SYSTEM_INDEX", + "label": "REPORTING_DATA_STREAM_ALIAS", "description": [], "signature": [ - "\".reporting\"" + "\".kibana-reporting\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.REPORTING_DATA_STREAM_COMPONENT_TEMPLATE", + "type": "string", + "tags": [], + "label": "REPORTING_DATA_STREAM_COMPONENT_TEMPLATE", + "description": [], + "signature": [ + "\"kibana-reporting@custom\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.REPORTING_DATA_STREAM_WILDCARD", + "type": "string", + "tags": [], + "label": "REPORTING_DATA_STREAM_WILDCARD", + "description": [], + "signature": [ + "\".kibana-reporting*\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY", + "type": "string", + "tags": [], + "label": "REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY", + "description": [], + "signature": [ + "\".reporting-*,.kibana-reporting*\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.REPORTING_LEGACY_INDICES", + "type": "string", + "tags": [], + "label": "REPORTING_LEGACY_INDICES", + "description": [], + "signature": [ + "\".reporting-*\"" ], "path": "packages/kbn-reporting/server/constants.ts", "deprecated": false, diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 057e3b4216576..b15d152a90463 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 88 | 0 | 87 | 0 | +| 92 | 0 | 91 | 0 | ## Server diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index 75ff9919b5216..5786dceaf0065 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 7593302c72d33..86642d624350d 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index a148497154005..ddeedd063f557 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index 00624f80bdc87..945f2b3ce6d56 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index 434774814e5e1..f48b325a82a51 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 660759341c092..1de6405d826a2 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index 885459bb55477..e86496dcc6ff2 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index d83b26f6fc708..16d519a794d8b 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.devdocs.json b/api_docs/kbn_search_connectors.devdocs.json index 703be6afbdcd4..f7e4549263202 100644 --- a/api_docs/kbn_search_connectors.devdocs.json +++ b/api_docs/kbn_search_connectors.devdocs.json @@ -2125,7 +2125,7 @@ "section": "def-common.ElasticsearchClient", "text": "ElasticsearchClient" }, - ", connectorId: string, indexName: string) => Promise<", + ", connectorId: string, indexName: string | null) => Promise<", "Result", ">" ], @@ -2172,17 +2172,17 @@ { "parentPluginId": "@kbn/search-connectors", "id": "def-common.updateConnectorIndexName.$3", - "type": "string", + "type": "CompoundType", "tags": [], "label": "indexName", "description": [], "signature": [ - "string" + "string | null" ], "path": "packages/kbn-search-connectors/lib/update_connector_index_name.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "isRequired": false } ], "returnComment": [], diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 1eda416fa3a51..20ef7763f735e 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index cf687aaae3b14..69069b567be19 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index 343eb75e8bcc3..a8e1b2a04020f 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 8166b5a31026a..a02ba097a6963 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx index 88ba7c3a0a52c..f11844252c135 100644 --- a/api_docs/kbn_search_types.mdx +++ b/api_docs/kbn_search_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-types title: "@kbn/search-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] --- import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index 519bec9afc817..f28f2bebe653b 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index bf526f1d45a54..dd9d27b6978ac 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index f32b2f136dab7..4ecafc1a5ce87 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 068253b884d66..793ffe421c2ff 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index 7e68576b0b1d9..8d2b2d6db02cb 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index d706a7302fe4b..fcbec55716205 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index a72a4ccc8522c..013ed93e8038d 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index 7b2b9cd6e792f..5bc24bdf43ef3 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index ed2d948903f0c..6e21c96ae9071 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 562c5faaf5a03..78561ef5d2d5d 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index c550f218f43e8..1b9f7e09c5ca2 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 75db667e949f4..92cc76e5b49a3 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index e9a6389ff2b3f..9142cc1c4bdac 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index d8e4fcbf3ddde..60248fc46e002 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index ab9bc1108f5d2..55849128e2a89 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 1b3a7c22fecd5..93477daea464c 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index c572a1ce3de72..6513acb5dfc32 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index a2e076c65d1fb..dba0917fc5c83 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index e66309cab986b..a34cf58a1d604 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 35a57a3d6078a..10ca93221725f 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 63afb89f8fee0..45925d057976d 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 4ea6135b018d4..f24807a94fa32 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 5a9ad6150157a..a6b89977bff3c 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 8cf96bfc154bd..a2124afcb7df0 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 63c046237caf1..51ce7f9d0ad33 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index ca6f7abd6e5b5..214597d14a982 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.devdocs.json b/api_docs/kbn_server_http_tools.devdocs.json index eb8ca2eeaa8b2..1fe0296f941f7 100644 --- a/api_docs/kbn_server_http_tools.devdocs.json +++ b/api_docs/kbn_server_http_tools.devdocs.json @@ -239,8 +239,6 @@ "signature": [ "(serverOptions: ", "ServerOptions", - ", listenerOptions: ", - "ListenerOptions", ") => ", "Server" ], @@ -262,21 +260,6 @@ "deprecated": false, "trackAdoption": false, "isRequired": true - }, - { - "parentPluginId": "@kbn/server-http-tools", - "id": "def-common.createServer.$2", - "type": "Object", - "tags": [], - "label": "listenerOptions", - "description": [], - "signature": [ - "ListenerOptions" - ], - "path": "packages/kbn-server-http-tools/src/create_server.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true } ], "returnComment": [], @@ -353,54 +336,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/server-http-tools", - "id": "def-common.getListenerOptions", - "type": "Function", - "tags": [], - "label": "getListenerOptions", - "description": [], - "signature": [ - "(config: ", - { - "pluginId": "@kbn/server-http-tools", - "scope": "common", - "docId": "kibKbnServerHttpToolsPluginApi", - "section": "def-common.IHttpConfig", - "text": "IHttpConfig" - }, - ") => ", - "ListenerOptions" - ], - "path": "packages/kbn-server-http-tools/src/get_listener_options.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/server-http-tools", - "id": "def-common.getListenerOptions.$1", - "type": "Object", - "tags": [], - "label": "config", - "description": [], - "signature": [ - { - "pluginId": "@kbn/server-http-tools", - "scope": "common", - "docId": "kibKbnServerHttpToolsPluginApi", - "section": "def-common.IHttpConfig", - "text": "IHttpConfig" - } - ], - "path": "packages/kbn-server-http-tools/src/get_listener_options.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/server-http-tools", "id": "def-common.getRequestId", @@ -474,6 +409,69 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/server-http-tools", + "id": "def-common.getServerListener", + "type": "Function", + "tags": [], + "label": "getServerListener", + "description": [], + "signature": [ + "(config: ", + { + "pluginId": "@kbn/server-http-tools", + "scope": "common", + "docId": "kibKbnServerHttpToolsPluginApi", + "section": "def-common.IHttpConfig", + "text": "IHttpConfig" + }, + ", options: GetServerListenerOptions) => ", + "ServerListener" + ], + "path": "packages/kbn-server-http-tools/src/get_listener.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/server-http-tools", + "id": "def-common.getServerListener.$1", + "type": "Object", + "tags": [], + "label": "config", + "description": [], + "signature": [ + { + "pluginId": "@kbn/server-http-tools", + "scope": "common", + "docId": "kibKbnServerHttpToolsPluginApi", + "section": "def-common.IHttpConfig", + "text": "IHttpConfig" + } + ], + "path": "packages/kbn-server-http-tools/src/get_listener.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/server-http-tools", + "id": "def-common.getServerListener.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "GetServerListenerOptions" + ], + "path": "packages/kbn-server-http-tools/src/get_listener.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/server-http-tools", "id": "def-common.getServerOptions", @@ -565,7 +563,7 @@ "ServerResponse", "> | undefined" ], - "path": "packages/kbn-server-http-tools/src/get_server_options.ts", + "path": "packages/kbn-server-http-tools/src/get_tls_options.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -585,7 +583,7 @@ "text": "ISslConfig" } ], - "path": "packages/kbn-server-http-tools/src/get_server_options.ts", + "path": "packages/kbn-server-http-tools/src/get_tls_options.ts", "deprecated": false, "trackAdoption": false, "isRequired": true diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index f34a671c1a48c..d2d2e5156b2a4 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 01e8f7843532e..b75bf0f1d41f4 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 745260e4a94f8..88cd9766e17d6 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index d9c17089ddc89..2122f3854bd33 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index a5b47a9080ee1..25f3c10d0ecd5 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index b89a43151117a..b110748eba5fa 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index 4b79a918b03e8..ffb66e5c8be45 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index d239e446791a4..2cdcee037a715 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 0659128adf42d..2775fddea4b63 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 21f93739bcc4e..6d69f2220fb3c 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 62a7052d3e130..22612b1d5b3de 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 8bc05e22be7ef..6f734f82e09c1 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 153598bbb2a55..4e328356abfbd 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index f819a384e2403..a7c6787d03594 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 1618dea67537d..396fd54ca0907 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index d265a68b65e4c..5a2187073c3ac 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 18f0b044001b1..9b7b3ddcca766 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index b2fedf50c82d0..84a2720571146 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 6ffe0d1b1930f..3b7f0d235b768 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 2fdf7b0760c59..ec91c83d5664d 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 682990dc1a483..0672d93f9b877 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index 6e66f71e5d71b..603eb39f3892b 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 32692d3f3b59e..6368b645dc145 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index a1c70d25a2527..c71283f3890ec 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 591bb419eef5a..e0c44b3febfd0 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index c4ad07d9702e6..f8f8ae4e25f9c 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 27828e3a97c76..021098eff045c 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 824cd38f2b0b1..c1ed21b0f7755 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 58368a6162f8d..c50a54c2d9850 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 14c974ba11a34..2ac30b19d8fde 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 87eb0d4ae5c7b..22084d11698fb 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 9d8a19a7c71c7..ddf51ea55b7a0 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index e48dcb987f647..8cd30abf85715 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 567f2431b390c..d8d6fbf51f631 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 8887812c45027..eeb43be79150f 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index b7fd2434c980b..5a069bd153519 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 22946e98f94b9..e1d3045c59968 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 3732f6e44771d..15535683dd489 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 67406176211cd..f83baa9c03928 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 919798b6b1de3..3513b67805dc1 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 7394c69d76951..2fa702f5bb771 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index f9d71f1f23424..13b149a91734b 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 59886686b30d6..ba2c134552113 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 9def918de0020..966668b68b0a5 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 041e9720f7984..2bf4e2f4f9102 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index d635489810956..44ba05c0db21d 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index c92a246c73fd5..8a6db037b33d2 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 37fd11222f5f7..a6ef553090607 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index de52d4d13f3b1..28a786f7f0b2a 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_es.mdx b/api_docs/kbn_solution_nav_es.mdx index a6aeaf2d1ce3c..e35fb06ae8a63 100644 --- a/api_docs/kbn_solution_nav_es.mdx +++ b/api_docs/kbn_solution_nav_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-es title: "@kbn/solution-nav-es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-es plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-es'] --- import kbnSolutionNavEsObj from './kbn_solution_nav_es.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_oblt.mdx b/api_docs/kbn_solution_nav_oblt.mdx index dadd3bdcfcf29..59ad9c13dc615 100644 --- a/api_docs/kbn_solution_nav_oblt.mdx +++ b/api_docs/kbn_solution_nav_oblt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-oblt title: "@kbn/solution-nav-oblt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-oblt plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-oblt'] --- import kbnSolutionNavObltObj from './kbn_solution_nav_oblt.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 01879167d24fa..3832906f28938 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index 508f27f6014b1..4fe868837419e 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index ac15d2dd748cf..f8c48a59fac37 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 941fa8455045d..3610972932c17 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index fed8552a412dc..3d0712613ee12 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index f5e5d74c37a4f..d01dda11b5422 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 3e987fbad81eb..074150110667e 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index fde3359592ba7..9ef0ade665ae1 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 9ef0f4ff4cb60..a9c3f03d949d3 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 7b652eb750e23..8fc82df383096 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index 0db2cf9271d3d..2cd89728edd09 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index cbe053404428e..b108f350e3e10 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 1607c7d6d7f03..3468a4ae5bbb2 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index 98bf9927a42a3..f4a2fe75a5ffc 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index 6e28c672fca2a..8231f97fe090c 100644 --- a/api_docs/kbn_try_in_console.mdx +++ b/api_docs/kbn_try_in_console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console title: "@kbn/try-in-console" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/try-in-console plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console'] --- import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index fd2243c251a09..53652f7ef141e 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 9cb2ec1eda367..a91f736bd6f62 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 653baa42b1a7c..c7f3b73348f36 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index b59daa1a3d4ed..03c536fc404f2 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 27f5011c2f861..dccb7b38d01aa 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index b3b3f0aa1b648..de8f135ee6abf 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 8072d683064a0..121c8a8f91a7e 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 81be1b3177f53..bccb1f5edadfb 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index 63f58848e66ff..db1e5c9be4826 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index ac7a20c6b72e6..9ed2ad476e9fd 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.devdocs.json b/api_docs/kbn_user_profile_components.devdocs.json index 860936ef0b970..541125e5db436 100644 --- a/api_docs/kbn_user_profile_components.devdocs.json +++ b/api_docs/kbn_user_profile_components.devdocs.json @@ -1403,7 +1403,9 @@ "EuiSelectableOptionCheckedType", "; disabled?: boolean | undefined; isGroupLabel?: false | undefined; prepend?: React.ReactNode; append?: React.ReactNode; ref?: ((optionIndex: number) => void) | undefined; id?: undefined; data?: { [key: string]: any; } | undefined; textWrap?: \"wrap\" | \"truncate\" | undefined; truncationProps?: Partial> | undefined; } & React.HTMLAttributes) | (", + ", \"text\" | \"children\">> | undefined; toolTipContent?: React.ReactNode; toolTipProps?: Partial> | undefined; } & React.HTMLAttributes) | (", "DisambiguateSet", "<", "EuiSelectableLIOption", diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index db5b8249ff3ed..8235330e81350 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 233ae9ef55e13..bd746e39b5977 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index a762b3b6da30d..2823bbbea6b16 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 726214f3a22d9..02e1a67bc7cd1 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.devdocs.json b/api_docs/kbn_visualization_ui_components.devdocs.json index 329e0a16222f7..80f0cff7f6a2d 100644 --- a/api_docs/kbn_visualization_ui_components.devdocs.json +++ b/api_docs/kbn_visualization_ui_components.devdocs.json @@ -948,15 +948,13 @@ "label": "dataView", "description": [], "signature": [ - "{ fields: ", { "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.DataViewFieldBase", - "text": "DataViewFieldBase" - }, - "[]; id?: string | undefined; title: string; }" + "section": "def-common.DataViewBase", + "text": "DataViewBase" + } ], "path": "packages/kbn-visualization-ui-components/components/query_input/filter_query_input.tsx", "deprecated": false, diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index ba5a9aead9745..22a7fc9442c98 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index 9f8cd210a3f24..65ddd95dfb597 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index a9fb8508b490c..77c5dea24f7e9 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index abc9434abf530..0e7629b35ea33 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 1fbdf0062a349..ebb3d28b58144 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 1717c1602ba58..b2277c55b245b 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 36a5c3cfd0e65..f91d65f0edde0 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 0aa15b1d04d41..b1d578ef2d1af 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 7f6ae788d2720..75c85c033de5d 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index c3ef45609b022..4eec2dd331e86 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index df48c59479d8f..ba7b2d6b9c9d2 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 1ab460056ad87..44ff73b074012 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 2f482f3c45d9f..4b4ad98edd47a 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 99e3028a1874b..33e8d4b718384 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 485ce19c77d8a..82d0fcc57a5a5 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx index 9e95c7fceecda..586c5885368c9 100644 --- a/api_docs/logs_data_access.mdx +++ b/api_docs/logs_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess title: "logsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the logsDataAccess plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess'] --- import logsDataAccessObj from './logs_data_access.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index f45396785a08f..3ba0ddb11a4f3 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 485723b32754f..98678d1dd4e9f 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 2111af1994ea7..069cf81789821 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 6f79c80cff47a..be475f12eb2bc 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 07755a84b02c0..b2e0a98b25244 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 9a9f33206fdf9..7cdc2780d6ebc 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index beaea76c533b7..95e5282055ab4 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 2069056f50652..6fd108f9e36a0 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 61b72c0aa45de..61b84dd0a4e44 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index b2ca9d714ef6b..fc192848357e4 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index cd5e7719b1521..46d353b5e521e 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index e7e8a84d0999e..a7eabdb0c70c9 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index 2bf4842d3aa9c..0ef307824063c 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index ab929eaca72a7..9937a98aec1b1 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 977e46df309f5..4ac7b1cc38395 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -10332,7 +10332,7 @@ "label": "value", "description": [], "signature": [ - "false" + "true" ], "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", "deprecated": false, diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 94e78057415cb..ff0313be67deb 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 8bbd911ed4503..f6a5a354e5bdf 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index b11b636b3daa2..440df9aa2fc15 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index d39fa52f9d2c2..70eed8cd0ae9a 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index e7363949fffe8..e48bcc4d9e7c4 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 2f487c6187867..850ae2f125673 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index d5a79adc57e03..98aae3c9d1626 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index caeef587b92dd..b209755b6de11 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index f3994662ff5df..8558fb0e7560c 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 5a6ccd7f4b458..a48c74d7d3cc8 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 48219 | 241 | 36798 | 1860 | +| 48329 | 241 | 36889 | 1862 | ## Plugin Directory @@ -70,7 +70,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | A stateful layer to register shared features and provide an access point to discover without a direct dependency | 16 | 0 | 15 | 2 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | APIs used to assess the quality of data in Elasticsearch indexes | 2 | 0 | 0 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | Server APIs for the Elastic AI Assistant | 46 | 0 | 32 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 564 | 1 | 454 | 8 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 554 | 1 | 444 | 8 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 19 | 0 | 19 | 2 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 53 | 0 | 46 | 1 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | @@ -92,13 +92,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'shape' function and renderer to expressions | 148 | 0 | 146 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 6 | 0 | 6 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 177 | 0 | 166 | 13 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2217 | 17 | 1756 | 5 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2233 | 17 | 1763 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 235 | 0 | 99 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Index pattern fields and ambiguous values formatters | 292 | 5 | 253 | 3 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 84 | 0 | 84 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 240 | 0 | 24 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 2 | 0 | 2 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1305 | 5 | 1184 | 66 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1309 | 5 | 1188 | 66 | | ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 72 | 0 | 14 | 5 | | globalSearchBar | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 | @@ -345,7 +345,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 48 | 7 | 48 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 13 | 0 | 13 | 1 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 483 | 2 | 193 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 486 | 2 | 193 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 91 | 0 | 78 | 10 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 44 | 0 | 43 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 2 | 0 | @@ -453,7 +453,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 16 | 0 | 16 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 19 | 0 | 17 | 6 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | -| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 26 | 0 | 26 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 51 | 0 | 51 | 1 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 14 | 0 | 9 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 80 | 0 | 80 | 1 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 1 | 0 | 0 | 0 | @@ -482,13 +482,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 33 | 0 | 24 | 1 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 13 | 0 | 5 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 35 | 0 | 34 | 0 | -| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 174 | 0 | 147 | 9 | -| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 232 | 0 | 217 | 2 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 165 | 0 | 138 | 9 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 292 | 0 | 275 | 2 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 19 | 0 | 19 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 52 | 0 | 37 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 3 | 0 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 261 | 1 | 201 | 15 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 269 | 1 | 209 | 15 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 26 | 0 | 26 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 63 | 1 | 63 | 6 | @@ -588,8 +588,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 64 | 0 | 60 | 1 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 194 | 0 | 163 | 5 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 70 | 0 | 64 | 1 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 197 | 0 | 163 | 5 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 168 | 0 | 55 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 | @@ -614,7 +614,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 13 | 0 | 11 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 113 | 0 | 107 | 2 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 88 | 0 | 87 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 92 | 0 | 91 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | A component for creating resizable layouts containing a fixed width panel and a flexible panel, with support for horizontal and vertical layouts. | 18 | 0 | 5 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 2 | 8 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 5 | 1 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 8c268e1f95f1b..2152824b6fe2d 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index c3fbeb48c1cb4..f09e26928ec1e 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 24562df3c52b6..003bc60e2f530 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index 815446290093b..7b7fdc38d6b11 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 8a9b064ae4b3e..49259057f8293 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 6640e4af8b91d..7a4ed5d321e42 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 7a0c154687213..d3b00eed9b7e3 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 08ce12e279590..efc596092f1d3 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index fa58345d738ca..f6a0f50332b50 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 2bec6748e53cd..3a0ba8827ce1c 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 5daf9853f828f..da1d86f02b29f 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index e228ca4121902..a7ee1d13502ab 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index e97860955ca84..6526e9567332b 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 0d574769a21cd..3e1fc9755e622 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 16bc7de0b5688..43733f7621c74 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 2e07d5a49f159..63e7da2aa37a3 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index ae5c74157c1ba..d02560905295d 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 9a37ce5bc337b..5cadc84edb0e7 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index 4613c7395bbdc..700847cdcfd2e 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index 018d2605b2f76..fbe8c13b5e5ca 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 493597afeb4da..6c9f3dee69a05 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 4f10cc0529917..b4b30ca8b5011 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -390,7 +390,7 @@ "label": "data", "description": [], "signature": [ - "({ id: string; type: \"eql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"eql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; data_view_id?: string | undefined; filters?: unknown[] | undefined; event_category_override?: string | undefined; tiebreaker_field?: string | undefined; timestamp_field?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; saved_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; } | { id: string; type: \"saved_query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; saved_id: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; query?: string | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; } | { id: string; type: \"threshold\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threshold: { value: number; field: (string | string[]) & (string | string[] | undefined); cardinality?: { value: number; field: string; }[] | undefined; }; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { duration: { value: number; unit: \"m\" | \"h\" | \"s\"; }; } | undefined; saved_id?: string | undefined; } | { id: string; type: \"threat_match\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threat_query: string; threat_mapping: { entries: { value: string; type: \"mapping\"; field: string; }[]; }[]; threat_index: string[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; saved_id?: string | undefined; threat_filters?: unknown[] | undefined; threat_indicator_path?: string | undefined; threat_language?: \"lucene\" | \"kuery\" | undefined; concurrent_searches?: number | undefined; items_per_search?: number | undefined; } | { id: string; type: \"machine_learning\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; anomaly_threshold: number; machine_learning_job_id: (string | string[]) & (string | string[] | undefined); namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; } | { id: string; type: \"new_terms\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; new_terms_fields: string[]; history_window_start: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"esql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"esql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; })[]" + "({ id: string; type: \"eql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"eql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; data_view_id?: string | undefined; filters?: unknown[] | undefined; event_category_override?: string | undefined; tiebreaker_field?: string | undefined; timestamp_field?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; saved_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; } | { id: string; type: \"saved_query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; saved_id: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; query?: string | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; } | { id: string; type: \"threshold\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threshold: { value: number; field: (string | string[]) & (string | string[] | undefined); cardinality?: { value: number; field: string; }[] | undefined; }; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { duration: { value: number; unit: \"m\" | \"h\" | \"s\"; }; } | undefined; saved_id?: string | undefined; } | { id: string; type: \"threat_match\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threat_query: string; threat_mapping: { entries: { value: string; type: \"mapping\"; field: string; }[]; }[]; threat_index: string[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; saved_id?: string | undefined; threat_filters?: unknown[] | undefined; threat_indicator_path?: string | undefined; threat_language?: \"lucene\" | \"kuery\" | undefined; concurrent_searches?: number | undefined; items_per_search?: number | undefined; } | { id: string; type: \"machine_learning\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; anomaly_threshold: number; machine_learning_job_id: (string | string[]) & (string | string[] | undefined); namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; } | { id: string; type: \"new_terms\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; new_terms_fields: string[]; history_window_start: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"esql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; interval: string; description: string; version: number; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"esql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; references: string[]; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; rule_source?: { type: \"external\"; is_customized: boolean; } | { type: \"internal\"; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; })[]" ], "path": "x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts", "deprecated": false, @@ -485,7 +485,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" + "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"alertSuppressionForEsqlRuleEnabled\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -565,7 +565,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" + "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"alertSuppressionForEsqlRuleEnabled\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1964,7 +1964,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3054,7 +3054,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3230,7 +3230,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3296,7 +3296,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: false; readonly responseActionsSentinelOneGetFileEnabled: false; readonly agentStatusClientEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: true; readonly expandableTimelineFlyoutEnabled: true; readonly alertsPageFiltersEnabled: true; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jamfDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: false; readonly aiAssistantFlyoutMode: true; readonly valueListItemsModalEnabled: true; readonly bulkCustomHighlightedFieldsEnabled: false; }" + "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: true; readonly responseActionsSentinelOneGetFileEnabled: false; readonly agentStatusClientEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: true; readonly expandableTimelineFlyoutEnabled: true; readonly alertsPageFiltersEnabled: true; readonly assistantModelEvaluation: false; readonly assistantKnowledgeBaseByDefault: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly alertSuppressionForEsqlRuleEnabled: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jamfDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: false; readonly aiAssistantFlyoutMode: true; readonly valueListItemsModalEnabled: true; readonly bulkCustomHighlightedFieldsEnabled: false; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 27007122fc6d8..1168fc4cdfd9a 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 811a8cda4699f..bcb7ec4659ee6 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index cc23b3a3c1587..131c3bfa2580c 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index c0af522c9791d..c43f502585aa3 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index d81adb6537e73..35d03f10b1b53 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 61c74b672b4e7..03a2c1824ff6c 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index ea83468fcd1d3..1f3db3a3f8c28 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 8e94973d5c349..7a078e666b995 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index 7ef4a611abcf8..474ed008d3f49 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 0ea1d3172dd3b..049775b351a2c 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 087542719d1e4..b98f9fd1ed747 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 1a2bbb0524a15..3ccbef096cc92 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 33fc2ffd33a4e..86565d96f37ef 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 6e2fc9a19eaf8..8ac56ef78a30a 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 79de411a6e575..adc5e0060895d 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 95d3eec19eba4..ad35927629ddf 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index ec85be98e62b7..ce1341fb11a74 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 6531727d0d0fc..28e0329866ad8 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index e5df0709fea7d..2ead16c34920e 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 8a58fa683984b..137aa6018642f 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 207e867788d38..5a3759820b7fe 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 77864ff7ffdb3..195a2f423104e 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index ecceb395dcf5d..9eb7e40e9452b 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index b561d2da43a8e..652a81ead3355 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 7522b26b6f3f5..ce1dbe266ff0b 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index c1f174a432bb2..97d74caff335f 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index 074ba92429cbe..b4539e38a7527 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 0ef774e7bf6be..5ac4695b1924f 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index b79b3c80e18e6..bde18006da537 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index db3a5756af139..9ec2cb1cf4ad7 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index d7b26a682cb27..b5f164b3d3566 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index e741e98b12d20..02d52f1bf0e75 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 5bca97e899953..5315cbe1aa157 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 193e96d59bb23..311b2dfb9dfd2 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 7d5ef7ea92dff..364245c49b5bb 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index dab1277709244..9e9501f387030 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 496bb0951f15c..39349140baea0 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 9bb57b81870b0..16eaa33b9b80f 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 0607b3fbe497e..45d2bc4d47801 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 0ff4a1b9f893a..0624d3db19fe9 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index ebc6df00a2798..b118cdf5df5d5 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index be3ee2bb95a9b..e3eb4411150bd 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index b120e745b9875..c2b71fc079024 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 4c015585d1a70..de0edc32295f7 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-05-20 +date: 2024-05-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/docs/settings/reporting-settings.asciidoc b/docs/settings/reporting-settings.asciidoc index e19065a533adc..f871f72db22c0 100644 --- a/docs/settings/reporting-settings.asciidoc +++ b/docs/settings/reporting-settings.asciidoc @@ -70,7 +70,9 @@ reports, you might need to change the following settings. If capturing a report fails for any reason, {kib} will re-queue the report job for retry, as many times as this setting. Defaults to `3`. `xpack.reporting.queue.indexInterval`:: -How often the index that stores reporting jobs rolls over to a new index. Valid values are `year`, `month`, `week`, `day`, and `hour`. Defaults to `week`. +deprecated:[8.15.0,This setting has no effect.] How often Reporting creates a new index to store report jobs and file contents. +Valid values are `year`, `month`, `week`, `day`, and `hour`. Defaults to `week`. +*NOTE*: This setting exists for backwards compatibility, but is unused. Use the built-in ILM policy provided for the reporting plugin to customize the rollover of Reporting data. [[xpack-reportingQueue-pollEnabled]] `xpack.reporting.queue.pollEnabled` :: When `true`, enables the {kib} instance to poll {es} for pending jobs and claim them for diff --git a/docs/user/reporting/index.asciidoc b/docs/user/reporting/index.asciidoc index 318a901b15e4c..338b2bc53a55a 100644 --- a/docs/user/reporting/index.asciidoc +++ b/docs/user/reporting/index.asciidoc @@ -67,10 +67,9 @@ NOTE: When you create a dashboard report that includes a data table or saved sea . To view and manage reports, open the main menu, then click *Stack Management > Reporting*. -NOTE: Reports are stored in {es} and managed by the `kibana-reporting` {ilm} -({ilm-init}) policy. By default, the policy stores reports forever. To learn -more about {ilm-init} policies, refer to the {es} -{ref}/index-lifecycle-management.html[{ilm-init} documentation]. +NOTE: In "stateful" deployments, reports are stored in {es} and managed by the `kibana-reporting` {ilm} +({ilm-init}) policy. By default, the policy stores reports forever. To learn more about {ilm-init} policies, refer +to the {es} {ref}/index-lifecycle-management.html[{ilm-init} documentation]. [float] [[csv-limitations]] diff --git a/docs/user/reporting/script-example.asciidoc b/docs/user/reporting/script-example.asciidoc index 937e140bd67a0..5445058ead03b 100644 --- a/docs/user/reporting/script-example.asciidoc +++ b/docs/user/reporting/script-example.asciidoc @@ -36,4 +36,4 @@ An example response for a successfully queued report: --------------------------------------------------------- <1> The relative path on the {kib} host for downloading the report. -<2> (Not included in the example) Internal representation of the reporting job, as found in the `.reporting-*` index. +<2> (Not included in the example) Internal representation of the reporting job, as found in the `.reporting-*` storage. diff --git a/examples/embeddable_examples/public/app/render_examples.tsx b/examples/embeddable_examples/public/app/render_examples.tsx index f956a71711c7c..4998b3bc5a59c 100644 --- a/examples/embeddable_examples/public/app/render_examples.tsx +++ b/examples/embeddable_examples/public/app/render_examples.tsx @@ -27,19 +27,14 @@ import { SEARCH_EMBEDDABLE_ID } from '../react_embeddables/search/constants'; import type { SearchApi, SearchSerializedState } from '../react_embeddables/search/types'; export const RenderExamples = () => { - const initialState = useMemo(() => { - return { - rawState: { - timeRange: undefined, - }, - references: [], - }; - // only run onMount - }, []); - const parentApi = useMemo(() => { return { reload$: new Subject(), + getSerializedStateForChild: () => ({ + rawState: { + timeRange: undefined, + }, + }), timeRange$: new BehaviorSubject({ from: 'now-24h', to: 'now', @@ -85,8 +80,7 @@ export const RenderExamples = () => { {` type={SEARCH_EMBEDDABLE_ID} - state={initialState} - parentApi={parentApi} + getParentApi={() => parentApi} onApiAvailable={(newApi) => { setApi(newApi); }} @@ -107,8 +101,7 @@ export const RenderExamples = () => { key={hidePanelChrome ? 'hideChrome' : 'showChrome'} type={SEARCH_EMBEDDABLE_ID} - state={initialState} - parentApi={parentApi} + getParentApi={() => parentApi} onApiAvailable={(newApi) => { setApi(newApi); }} diff --git a/examples/embeddable_examples/public/plugin.ts b/examples/embeddable_examples/public/plugin.ts index bcac6bf4d1367..f17bf97db11fd 100644 --- a/examples/embeddable_examples/public/plugin.ts +++ b/examples/embeddable_examples/public/plugin.ts @@ -21,9 +21,11 @@ import { DATA_TABLE_ID } from './react_embeddables/data_table/constants'; import { registerCreateDataTableAction } from './react_embeddables/data_table/create_data_table_action'; import { EUI_MARKDOWN_ID } from './react_embeddables/eui_markdown/constants'; import { registerCreateEuiMarkdownAction } from './react_embeddables/eui_markdown/create_eui_markdown_action'; -import { registerCreateFieldListAction } from './react_embeddables/field_list/create_field_list_action'; import { FIELD_LIST_ID } from './react_embeddables/field_list/constants'; +import { registerCreateFieldListAction } from './react_embeddables/field_list/create_field_list_action'; import { registerFieldListPanelPlacementSetting } from './react_embeddables/field_list/register_field_list_embeddable'; +import { SAVED_BOOK_ID } from './react_embeddables/saved_book/constants'; +import { registerCreateSavedBookAction } from './react_embeddables/saved_book/create_saved_book_action'; import { registerAddSearchPanelAction } from './react_embeddables/search/register_add_search_panel_action'; import { registerSearchEmbeddable } from './react_embeddables/search/register_search_embeddable'; @@ -73,6 +75,14 @@ export class EmbeddableExamplesPlugin implements Plugin { + const { getSavedBookEmbeddableFactory } = await import( + './react_embeddables/saved_book/saved_book_react_embeddable' + ); + const [coreStart] = await startServicesPromise; + return getSavedBookEmbeddableFactory(coreStart); + }); + registerSearchEmbeddable( embeddable, new Promise((resolve) => startServicesPromise.then(([_, startDeps]) => resolve(startDeps))) @@ -88,6 +98,8 @@ export class EmbeddableExamplesPlugin implements Plugin { + const bookTitle = new BehaviorSubject(attributes.bookTitle); + const authorName = new BehaviorSubject(attributes.authorName); + const numberOfPages = new BehaviorSubject(attributes.numberOfPages); + const bookSynopsis = new BehaviorSubject(attributes.bookSynopsis); + + return { + bookTitle, + authorName, + numberOfPages, + bookSynopsis, + comparators: { + bookTitle: [bookTitle, (val) => bookTitle.next(val)], + authorName: [authorName, (val) => authorName.next(val)], + numberOfPages: [numberOfPages, (val) => numberOfPages.next(val)], + bookSynopsis: [bookSynopsis, (val) => bookSynopsis.next(val)], + }, + }; +}; + +export const serializeBookAttributes = (stateManager: BookAttributesManager): BookAttributes => ({ + bookTitle: stateManager.bookTitle.value, + authorName: stateManager.authorName.value, + numberOfPages: stateManager.numberOfPages.value, + bookSynopsis: stateManager.bookSynopsis.value, +}); diff --git a/examples/embeddable_examples/public/react_embeddables/saved_book/constants.ts b/examples/embeddable_examples/public/react_embeddables/saved_book/constants.ts new file mode 100644 index 0000000000000..4da3ebecf477e --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/saved_book/constants.ts @@ -0,0 +1,10 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const SAVED_BOOK_ID = 'book'; +export const ADD_SAVED_BOOK_ACTION_ID = 'create_saved_book'; diff --git a/examples/embeddable_examples/public/react_embeddables/saved_book/create_saved_book_action.tsx b/examples/embeddable_examples/public/react_embeddables/saved_book/create_saved_book_action.tsx new file mode 100644 index 0000000000000..6916bd38cc28d --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/saved_book/create_saved_book_action.tsx @@ -0,0 +1,71 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { CoreStart } from '@kbn/core/public'; +import { i18n } from '@kbn/i18n'; +import { apiIsPresentationContainer } from '@kbn/presentation-containers'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; +import { UiActionsPublicStart } from '@kbn/ui-actions-plugin/public/plugin'; +import { embeddableExamplesGrouping } from '../embeddable_examples_grouping'; +import { + defaultBookAttributes, + serializeBookAttributes, + stateManagerFromAttributes, +} from './book_state'; +import { ADD_SAVED_BOOK_ACTION_ID, SAVED_BOOK_ID } from './constants'; +import { openSavedBookEditor } from './saved_book_editor'; +import { saveBookAttributes } from './saved_book_library'; +import { + BookByReferenceSerializedState, + BookByValueSerializedState, + BookSerializedState, +} from './types'; + +export const registerCreateSavedBookAction = (uiActions: UiActionsPublicStart, core: CoreStart) => { + uiActions.registerAction({ + id: ADD_SAVED_BOOK_ACTION_ID, + getIconType: () => 'folderClosed', + grouping: [embeddableExamplesGrouping], + isCompatible: async ({ embeddable }) => { + return apiIsPresentationContainer(embeddable); + }, + execute: async ({ embeddable }) => { + if (!apiIsPresentationContainer(embeddable)) throw new IncompatibleActionError(); + const newPanelStateManager = stateManagerFromAttributes(defaultBookAttributes); + + const { addToLibrary } = await openSavedBookEditor(newPanelStateManager, true, core, { + parentApi: embeddable, + }); + + const initialState: BookSerializedState = await (async () => { + // if we're adding this to the library, we only need to return the by reference state. + if (addToLibrary) { + const savedBookId = await saveBookAttributes( + undefined, + serializeBookAttributes(newPanelStateManager) + ); + return { savedBookId } as BookByReferenceSerializedState; + } + return { + attributes: serializeBookAttributes(newPanelStateManager), + } as BookByValueSerializedState; + })(); + + embeddable.addNewPanel({ + panelType: SAVED_BOOK_ID, + initialState, + }); + }, + getDisplayName: () => + i18n.translate('embeddableExamples.savedbook.addBookAction.displayName', { + defaultMessage: 'Book', + }), + }); + uiActions.attachAction('ADD_PANEL_TRIGGER', ADD_SAVED_BOOK_ACTION_ID); +}; diff --git a/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_editor.tsx b/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_editor.tsx new file mode 100644 index 0000000000000..d658b8fac1e9e --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_editor.tsx @@ -0,0 +1,212 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { + EuiButton, + EuiButtonEmpty, + EuiFieldNumber, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiFormControlLayout, + EuiFormRow, + EuiSwitch, + EuiTextArea, + EuiTitle, +} from '@elastic/eui'; +import { CoreStart } from '@kbn/core-lifecycle-browser'; +import { OverlayRef } from '@kbn/core-mount-utils-browser'; +import { i18n } from '@kbn/i18n'; +import { tracksOverlays } from '@kbn/presentation-containers'; +import { + apiHasParentApi, + apiHasUniqueId, + useBatchedOptionalPublishingSubjects, +} from '@kbn/presentation-publishing'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import React from 'react'; +import { serializeBookAttributes } from './book_state'; +import { BookAttributesManager } from './types'; + +export const openSavedBookEditor = ( + attributesManager: BookAttributesManager, + isCreate: boolean, + core: CoreStart, + api: unknown +): Promise<{ addToLibrary: boolean }> => { + return new Promise((resolve) => { + const closeOverlay = (overlayRef: OverlayRef) => { + if (apiHasParentApi(api) && tracksOverlays(api.parentApi)) { + api.parentApi.clearOverlays(); + } + overlayRef.close(); + }; + + const initialState = serializeBookAttributes(attributesManager); + const overlay = core.overlays.openFlyout( + toMountPoint( + { + // set the state back to the initial state and reject + attributesManager.authorName.next(initialState.authorName); + attributesManager.bookSynopsis.next(initialState.bookSynopsis); + attributesManager.bookTitle.next(initialState.bookTitle); + attributesManager.numberOfPages.next(initialState.numberOfPages); + closeOverlay(overlay); + }} + onSubmit={(addToLibrary: boolean) => { + closeOverlay(overlay); + resolve({ addToLibrary }); + }} + />, + { + theme: core.theme, + i18n: core.i18n, + } + ), + { + type: isCreate ? 'overlay' : 'push', + size: isCreate ? 'm' : 's', + onClose: () => closeOverlay(overlay), + } + ); + + const overlayOptions = !isCreate && apiHasUniqueId(api) ? { focusedPanelId: api.uuid } : {}; + /** + * if our parent needs to know about the overlay, notify it. This allows the parent to close the overlay + * when navigating away, or change certain behaviors based on the overlay being open. + */ + if (apiHasParentApi(api) && tracksOverlays(api.parentApi)) { + api.parentApi.openOverlay(overlay, overlayOptions); + } + }); +}; + +export const SavedBookEditor = ({ + attributesManager, + isCreate, + onSubmit, + onCancel, +}: { + attributesManager: BookAttributesManager; + isCreate: boolean; + onSubmit: (addToLibrary: boolean) => void; + onCancel: () => void; +}) => { + const [addToLibrary, setAddToLibrary] = React.useState(false); + const [authorName, synopsis, bookTitle, numberOfPages] = useBatchedOptionalPublishingSubjects( + attributesManager.authorName, + attributesManager.bookSynopsis, + attributesManager.bookTitle, + attributesManager.numberOfPages + ); + + return ( + <> + + +

+ {isCreate + ? i18n.translate('embeddableExamples.savedBook.editor.newTitle', { + defaultMessage: 'Create new book', + }) + : i18n.translate('embeddableExamples.savedBook.editor.editTitle', { + defaultMessage: 'Edit book', + })} +

+
+
+ + + + attributesManager.authorName.next(e.target.value)} + /> + + + attributesManager.bookTitle.next(e.target.value)} + /> + + + attributesManager.numberOfPages.next(+e.target.value)} + /> + + + attributesManager.bookSynopsis.next(e.target.value)} + /> + + + + + + + + {i18n.translate('embeddableExamples.savedBook.editor.cancel', { + defaultMessage: 'Discard changes', + })} + + + + + {isCreate && ( + + setAddToLibrary(!addToLibrary)} + /> + + )} + + onSubmit(addToLibrary)} fill> + {isCreate + ? i18n.translate('embeddableExamples.savedBook.editor.create', { + defaultMessage: 'Create book', + }) + : i18n.translate('embeddableExamples.savedBook.editor.save', { + defaultMessage: 'Keep changes', + })} + + + + + + + + ); +}; diff --git a/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_library.ts b/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_library.ts new file mode 100644 index 0000000000000..49b42ad2b96bf --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_library.ts @@ -0,0 +1,29 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { v4 } from 'uuid'; +import { BookAttributes } from './types'; + +const storage = new Storage(localStorage); + +export const loadBookAttributes = async (id: string): Promise => { + await new Promise((r) => setTimeout(r, 500)); // simulate load from network. + const attributes = storage.get(id) as BookAttributes; + return attributes; +}; + +export const saveBookAttributes = async ( + maybeId?: string, + attributes?: BookAttributes +): Promise => { + await new Promise((r) => setTimeout(r, 100)); // simulate save to network. + const id = maybeId ?? v4(); + storage.set(id, attributes); + return id; +}; diff --git a/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_react_embeddable.tsx new file mode 100644 index 0000000000000..94e54b6ee350c --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_react_embeddable.tsx @@ -0,0 +1,211 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { EuiBadge, EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiText, EuiTitle } from '@elastic/eui'; +import { css } from '@emotion/react'; +import { CoreStart } from '@kbn/core-lifecycle-browser'; +import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import { i18n } from '@kbn/i18n'; +import { + initializeTitles, + SerializedTitles, + useBatchedPublishingSubjects, +} from '@kbn/presentation-publishing'; +import { euiThemeVars } from '@kbn/ui-theme'; +import React from 'react'; +import { BehaviorSubject } from 'rxjs'; +import { serializeBookAttributes, stateManagerFromAttributes } from './book_state'; +import { SAVED_BOOK_ID } from './constants'; +import { openSavedBookEditor } from './saved_book_editor'; +import { loadBookAttributes, saveBookAttributes } from './saved_book_library'; +import { + BookApi, + BookAttributes, + BookByReferenceSerializedState, + BookByValueSerializedState, + BookRuntimeState, + BookSerializedState, +} from './types'; + +const bookSerializedStateIsByReference = ( + state?: BookSerializedState +): state is BookByReferenceSerializedState => { + return Boolean(state && (state as BookByReferenceSerializedState).savedBookId !== undefined); +}; + +export const getSavedBookEmbeddableFactory = (core: CoreStart) => { + const savedBookEmbeddableFactory: ReactEmbeddableFactory< + BookSerializedState, + BookApi, + BookRuntimeState + > = { + type: SAVED_BOOK_ID, + deserializeState: async (serializedState) => { + // panel state is always stored with the parent. + const titlesState: SerializedTitles = { + title: serializedState.rawState.title, + hidePanelTitles: serializedState.rawState.hidePanelTitles, + description: serializedState.rawState.description, + }; + + const savedBookId = bookSerializedStateIsByReference(serializedState.rawState) + ? serializedState.rawState.savedBookId + : undefined; + + const attributes: BookAttributes = bookSerializedStateIsByReference(serializedState.rawState) + ? await loadBookAttributes(serializedState.rawState.savedBookId)! + : serializedState.rawState.attributes; + + // Combine the serialized state from the parent with the state from the + // external store to build runtime state. + return { + ...titlesState, + ...attributes, + savedBookId, + }; + }, + buildEmbeddable: async (state, buildApi) => { + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); + const bookAttributesManager = stateManagerFromAttributes(state); + const savedBookId$ = new BehaviorSubject(state.savedBookId); + + const api = buildApi( + { + ...titlesApi, + onEdit: async () => { + openSavedBookEditor(bookAttributesManager, false, core, api); + }, + isEditingEnabled: () => true, + getTypeDisplayName: () => + i18n.translate('embeddableExamples.savedbook.editBook.displayName', { + defaultMessage: 'book', + }), + serializeState: async () => { + if (savedBookId$.value === undefined) { + // if this book is currently by value, we serialize the entire state. + const bookByValueState: BookByValueSerializedState = { + attributes: serializeBookAttributes(bookAttributesManager), + ...serializeTitles(), + }; + return { rawState: bookByValueState }; + } + + // if this book is currently by reference, we serialize the reference and write to the external store. + const bookByReferenceState: BookByReferenceSerializedState = { + savedBookId: savedBookId$.value, + ...serializeTitles(), + }; + + await saveBookAttributes( + savedBookId$.value, + serializeBookAttributes(bookAttributesManager) + ); + return { rawState: bookByReferenceState }; + }, + + // in place library transforms + libraryId$: savedBookId$, + saveToLibrary: async (newTitle: string) => { + bookAttributesManager.bookTitle.next(newTitle); + const newId = await saveBookAttributes( + undefined, + serializeBookAttributes(bookAttributesManager) + ); + savedBookId$.next(newId); + return newId; + }, + checkForDuplicateTitle: async (title) => {}, + unlinkFromLibrary: () => { + savedBookId$.next(undefined); + }, + }, + { + savedBookId: [savedBookId$, (val) => savedBookId$.next(val)], + ...bookAttributesManager.comparators, + ...titleComparators, + } + ); + + return { + api, + Component: () => { + const [authorName, numberOfPages, savedBookId, bookTitle, synopsis] = + useBatchedPublishingSubjects( + bookAttributesManager.authorName, + bookAttributesManager.numberOfPages, + savedBookId$, + bookAttributesManager.bookTitle, + bookAttributesManager.bookSynopsis + ); + + return ( +
+ +
+ + + + {bookTitle} + + + + + + + {authorName} + + + + + {i18n.translate('embeddableExamples.savedBook.numberOfPages', { + defaultMessage: '{numberOfPages} pages', + values: { numberOfPages }, + })} + + + + + + {synopsis} + + +
+
+ ); + }, + }; + }, + }; + return savedBookEmbeddableFactory; +}; diff --git a/examples/embeddable_examples/public/react_embeddables/saved_book/types.ts b/examples/embeddable_examples/public/react_embeddables/saved_book/types.ts new file mode 100644 index 0000000000000..ec855bbd38f96 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/saved_book/types.ts @@ -0,0 +1,50 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { + HasEditCapabilities, + HasInPlaceLibraryTransforms, + SerializedTitles, + StateComparators, +} from '@kbn/presentation-publishing'; +import { BehaviorSubject } from 'rxjs'; + +export interface BookAttributes { + bookTitle: string; + authorName: string; + numberOfPages: number; + bookSynopsis?: string; +} + +export type BookAttributesManager = { + [key in keyof Required]: BehaviorSubject; +} & { comparators: StateComparators }; + +export interface BookByValueSerializedState { + attributes: BookAttributes; +} + +export interface BookByReferenceSerializedState { + savedBookId: string; +} + +export type BookSerializedState = SerializedTitles & + (BookByValueSerializedState | BookByReferenceSerializedState); + +/** + * Book runtime state is a flattened version of all possible state keys. + */ +export interface BookRuntimeState + extends BookAttributes, + Partial, + SerializedTitles {} + +export type BookApi = DefaultEmbeddableApi & + HasEditCapabilities & + HasInPlaceLibraryTransforms; diff --git a/examples/embeddable_examples/public/react_embeddables/search/search_embeddable_renderer.tsx b/examples/embeddable_examples/public/react_embeddables/search/search_embeddable_renderer.tsx index cadaedbc29f6f..65cb55fb3e43d 100644 --- a/examples/embeddable_examples/public/react_embeddables/search/search_embeddable_renderer.tsx +++ b/examples/embeddable_examples/public/react_embeddables/search/search_embeddable_renderer.tsx @@ -31,6 +31,7 @@ export function SearchEmbeddableRenderer(props: Props) { const parentApi = useMemo(() => { return { timeRange$: new BehaviorSubject(props.timeRange), + getSerializedStateForChild: () => initialState, }; // only run onMount // eslint-disable-next-line react-hooks/exhaustive-deps @@ -43,8 +44,7 @@ export function SearchEmbeddableRenderer(props: Props) { return ( type={SEARCH_EMBEDDABLE_ID} - state={initialState} - parentApi={parentApi} + getParentApi={() => parentApi} hidePanelChrome={true} /> ); diff --git a/examples/embeddable_examples/tsconfig.json b/examples/embeddable_examples/tsconfig.json index b356083a20546..2df5e6534bd27 100644 --- a/examples/embeddable_examples/tsconfig.json +++ b/examples/embeddable_examples/tsconfig.json @@ -38,6 +38,8 @@ "@kbn/kibana-react-plugin", "@kbn/react-kibana-context-render", "@kbn/unified-data-table", - "@kbn/kibana-utils-plugin" + "@kbn/kibana-utils-plugin", + "@kbn/core-mount-utils-browser", + "@kbn/react-kibana-mount" ] } diff --git a/fleet_packages.json b/fleet_packages.json index 7bbccae8a39e0..4f64dc77d5e89 100644 --- a/fleet_packages.json +++ b/fleet_packages.json @@ -30,7 +30,7 @@ }, { "name": "elastic_agent", - "version": "1.19.0" + "version": "1.19.1" }, { "name": "endpoint", diff --git a/package.json b/package.json index 04316640a2952..e747cf96a7fea 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.13.0", "@elastic/ems-client": "8.5.1", - "@elastic/eui": "94.3.0", + "@elastic/eui": "94.5.0-backport.1", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", @@ -998,7 +998,7 @@ "deepmerge": "^4.2.2", "del": "^6.1.0", "diff": "^5.1.0", - "elastic-apm-node": "^4.5.3", + "elastic-apm-node": "^4.5.4", "email-addresses": "^5.0.0", "eventsource-parser": "^1.1.1", "execa": "^5.1.1", diff --git a/packages/analytics/shippers/fullstory/src/fullstory_shipper.ts b/packages/analytics/shippers/fullstory/src/fullstory_shipper.ts index d02e87cace6b1..96ae3389be017 100644 --- a/packages/analytics/shippers/fullstory/src/fullstory_shipper.ts +++ b/packages/analytics/shippers/fullstory/src/fullstory_shipper.ts @@ -30,7 +30,7 @@ const PAGE_VARS_KEYS = [ // Deployment-specific keys 'version', // x4, split to version_major, version_minor, version_patch for easier filtering - 'buildNum', // May be useful for Serverless, TODO: replace with buildHash + 'buildSha', // Useful for Serverless 'cloudId', 'deploymentId', 'projectId', // projectId and deploymentId are mutually exclusive. They shouldn't be sent in the same offering. diff --git a/packages/core/http/core-http-router-server-internal/src/request.test.ts b/packages/core/http/core-http-router-server-internal/src/request.test.ts index 72d81e9ce48e6..f895cb0e2fde7 100644 --- a/packages/core/http/core-http-router-server-internal/src/request.test.ts +++ b/packages/core/http/core-http-router-server-internal/src/request.test.ts @@ -201,6 +201,36 @@ describe('CoreKibanaRequest', () => { }); }); + describe('route.httpVersion property', () => { + it('returns the version from the raw request', () => { + const request = hapiMocks.createRequest({ + raw: { + req: { + httpVersion: '7.4', + }, + }, + }); + const kibanaRequest = CoreKibanaRequest.from(request); + + expect(kibanaRequest.httpVersion).toEqual('7.4'); + }); + }); + + describe('route.protocol property', () => { + it('return a static value for now as only http1 is supported', () => { + const request = hapiMocks.createRequest({ + raw: { + req: { + httpVersion: '2.0', + }, + }, + }); + const kibanaRequest = CoreKibanaRequest.from(request); + + expect(kibanaRequest.protocol).toEqual('http1'); + }); + }); + describe('route.options.authRequired property', () => { it('handles required auth: undefined', () => { const auth: RouteOptions['auth'] = undefined; @@ -370,6 +400,17 @@ describe('CoreKibanaRequest', () => { }); }); + describe('httpVersion', () => { + it('should be 1.0', () => { + const request: FakeRawRequest = { + headers: {}, + path: '/', + }; + const kibanaRequest = CoreKibanaRequest.from(request); + expect(kibanaRequest.httpVersion).toEqual('1.0'); + }); + }); + describe('headers', () => { it('returns the correct headers', () => { const request: FakeRawRequest = { diff --git a/packages/core/http/core-http-router-server-internal/src/request.ts b/packages/core/http/core-http-router-server-internal/src/request.ts index 450294fb09c0f..d3274b0a2a1fe 100644 --- a/packages/core/http/core-http-router-server-internal/src/request.ts +++ b/packages/core/http/core-http-router-server-internal/src/request.ts @@ -29,6 +29,7 @@ import { KibanaRequestRouteOptions, RawRequest, FakeRawRequest, + HttpProtocol, } from '@kbn/core-http-server'; import { ELASTIC_INTERNAL_ORIGIN_QUERY_PARAM, @@ -131,6 +132,10 @@ export class CoreKibanaRequest< public readonly isInternalApiRequest: boolean; /** {@inheritDoc KibanaRequest.rewrittenUrl} */ public readonly rewrittenUrl?: URL; + /** {@inheritDoc KibanaRequest.httpVersion} */ + public readonly httpVersion: string; + /** {@inheritDoc KibanaRequest.protocol} */ + public readonly protocol: HttpProtocol; /** @internal */ protected readonly [requestSymbol]!: Request; @@ -167,6 +172,10 @@ export class CoreKibanaRequest< enumerable: false, }); + this.httpVersion = isRealReq ? request.raw.req.httpVersion : '1.0'; + // hardcoded for now as only supporting http1 + this.protocol = 'http1'; + this.route = deepFreeze(this.getRouteInfo(request)); this.socket = isRealReq ? new KibanaSocket(request.raw.req.socket) diff --git a/packages/core/http/core-http-server-internal/src/http_server.ts b/packages/core/http/core-http-server-internal/src/http_server.ts index 236b9567ddcb7..478d1d746bbac 100644 --- a/packages/core/http/core-http-server-internal/src/http_server.ts +++ b/packages/core/http/core-http-server-internal/src/http_server.ts @@ -10,14 +10,7 @@ import { Server, Request } from '@hapi/hapi'; import HapiStaticFiles from '@hapi/inert'; import url from 'url'; import { v4 as uuidv4 } from 'uuid'; -import { - createServer, - getListenerOptions, - getServerOptions, - setTlsConfig, - getRequestId, -} from '@kbn/server-http-tools'; - +import { createServer, getServerOptions, setTlsConfig, getRequestId } from '@kbn/server-http-tools'; import type { Duration } from 'moment'; import { Observable, Subscription, firstValueFrom, pairwise, take } from 'rxjs'; import apm from 'elastic-apm-node'; @@ -235,9 +228,8 @@ export class HttpServer { this.config = config; const serverOptions = getServerOptions(config); - const listenerOptions = getListenerOptions(config); - this.server = createServer(serverOptions, listenerOptions); + this.server = createServer(serverOptions); await this.server.register([HapiStaticFiles]); if (config.compression.brotli.enabled) { await this.server.register({ diff --git a/packages/core/http/core-http-server-internal/src/https_redirect_server.ts b/packages/core/http/core-http-server-internal/src/https_redirect_server.ts index 501c83377fe0a..2999c4aaf734e 100644 --- a/packages/core/http/core-http-server-internal/src/https_redirect_server.ts +++ b/packages/core/http/core-http-server-internal/src/https_redirect_server.ts @@ -8,7 +8,7 @@ import { Request, ResponseToolkit, Server } from '@hapi/hapi'; import { format as formatUrl } from 'url'; -import { createServer, getListenerOptions, getServerOptions } from '@kbn/server-http-tools'; +import { createServer, getServerOptions } from '@kbn/server-http-tools'; import type { Logger } from '@kbn/logging'; import { HttpConfig } from './http_config'; @@ -31,13 +31,10 @@ export class HttpsRedirectServer { // Redirect server is configured in the same way as any other HTTP server // within the platform with the only exception that it should always be a // plain HTTP server, so we just ignore `tls` part of options. - this.server = createServer( - { - ...getServerOptions(config, { configureTLS: false }), - port: config.ssl.redirectHttpFromPort, - }, - getListenerOptions(config) - ); + this.server = createServer({ + ...getServerOptions(config, { configureTLS: false }), + port: config.ssl.redirectHttpFromPort, + }); this.server.ext('onRequest', (request: Request, responseToolkit: ResponseToolkit) => { return responseToolkit diff --git a/packages/core/http/core-http-server/index.ts b/packages/core/http/core-http-server/index.ts index 859e6ff8efbd5..2b288be521d3a 100644 --- a/packages/core/http/core-http-server/index.ts +++ b/packages/core/http/core-http-server/index.ts @@ -141,6 +141,7 @@ export type { HttpServicePreboot, HttpServiceSetup, HttpServiceStart, + HttpProtocol, } from './src/http_contract'; export type { diff --git a/packages/core/http/core-http-server/src/http_contract.ts b/packages/core/http/core-http-server/src/http_contract.ts index 09250abf8adae..308ba2dd48785 100644 --- a/packages/core/http/core-http-server/src/http_contract.ts +++ b/packages/core/http/core-http-server/src/http_contract.ts @@ -402,3 +402,11 @@ export interface HttpServerInfo { /** The protocol used by the server */ protocol: 'http' | 'https' | 'socket'; } + +/** + * Defines an http protocol. + * (Only supporting http1 for now) + * + * - http1: regroups all http/1.x protocols + */ +export type HttpProtocol = 'http1'; diff --git a/packages/core/http/core-http-server/src/router/request.ts b/packages/core/http/core-http-server/src/router/request.ts index e1242dee7eb67..a58c97ccee762 100644 --- a/packages/core/http/core-http-server/src/router/request.ts +++ b/packages/core/http/core-http-server/src/router/request.ts @@ -10,6 +10,7 @@ import type { URL } from 'url'; import type { RequestApplicationState, RouteOptionsApp } from '@hapi/hapi'; import type { Observable } from 'rxjs'; import type { RecursiveReadonly } from '@kbn/utility-types'; +import type { HttpProtocol } from '../http_contract'; import type { IKibanaSocket } from './socket'; import type { RouteMethod, RouteConfigOptions } from './route'; import type { Headers } from './headers'; @@ -141,6 +142,16 @@ export interface KibanaRequest< */ readonly isInternalApiRequest: boolean; + /** + * The HTTP version sent by the client. + */ + readonly httpVersion: string; + + /** + * The protocol used by the client, inferred from the httpVersion. + */ + readonly protocol: HttpProtocol; + /** * The socket associated with this request. * See {@link IKibanaSocket}. diff --git a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 29a42c3a4c654..fd8ba14e035cf 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -6,8 +6,8 @@ exports[`#start() returns \`Context\` component 1`] = ` i18n={ Object { "mapping": Object { + "euiAbsoluteTab.dateFormatButtonLabel": "Parse date", "euiAbsoluteTab.dateFormatError": [Function], - "euiAbsoluteTab.dateFormatHint": "Press the Enter key to parse as a date.", "euiAccordionChildrenLoading.message": "Loading", "euiAutoRefresh.autoRefreshLabel": "Auto refresh", "euiAutoRefresh.buttonLabelOff": "Auto refresh is off", @@ -36,6 +36,7 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiCodeBlockFullScreen.fullscreenExpand": "Expand", "euiCollapsedItemActions.allActions": "All actions", "euiCollapsedItemActions.allActionsDisabled": "Individual item actions are disabled when rows are being selected.", + "euiCollapsedNavButton.ariaLabelButtonIcon": [Function], "euiCollapsibleNavBeta.ariaLabel": "Site menu", "euiCollapsibleNavButton.ariaLabelClose": "Close navigation", "euiCollapsibleNavButton.ariaLabelCollapse": "Collapse navigation", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index c7d290f3af603..386e7a55da83b 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -179,6 +179,11 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiCollapsibleNavBeta.ariaLabel': i18n.translate('core.euiCollapsibleNavBeta.ariaLabel', { defaultMessage: 'Site menu', }), + 'euiCollapsedNavButton.ariaLabelButtonIcon': ({ title }: EuiValues) => + i18n.translate('core.euiCollapsedNavButton.ariaLabelButtonIcon', { + defaultMessage: '{title}, quick navigation menu', + values: { title }, + }), 'euiCollapsibleNavButton.ariaLabelExpand': i18n.translate( 'core.euiCollapsibleNavButton.ariaLabelExpand', { defaultMessage: 'Expand navigation' } @@ -1413,9 +1418,12 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiRelativeTab.dateInputError': i18n.translate('core.euiRelativeTab.dateInputError', { defaultMessage: 'Must be a valid range', }), - 'euiAbsoluteTab.dateFormatHint': i18n.translate('core.euiAbsoluteTab.dateFormatHint', { - defaultMessage: 'Press the Enter key to parse as a date.', - }), + 'euiAbsoluteTab.dateFormatButtonLabel': i18n.translate( + 'core.euiAbsoluteTab.dateFormatButtonLabel', + { + defaultMessage: 'Parse date', + } + ), 'euiResizableButton.horizontalResizerAriaLabel': i18n.translate( 'core.euiResizableButton.horizontalResizerAriaLabel', { diff --git a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts index 4244a5fed91aa..becc08d872f91 100644 --- a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts +++ b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts @@ -185,7 +185,7 @@ export const HASH_TO_VERSION_MAP = { 'ingest-agent-policies|0fd93cd11c019b118e93a9157c22057b': '10.1.0', 'ingest-download-sources|0b0f6828e59805bd07a650d80817c342': '10.0.0', 'ingest-outputs|b1237f7fdc0967709e75d65d208ace05': '10.6.0', - 'ingest-package-policies|a1a074bad36e68d54f98d2158d60f879': '10.0.0', + 'ingest-package-policies|aef7977b81f7930f23cbfd8711ba272e': '10.9.0', 'inventory-view|3d1b76c39bfb2cc8296b024d73854724': '10.0.0', 'kql-telemetry|3d1b76c39bfb2cc8296b024d73854724': '10.0.0', 'legacy-url-alias|0750774cf16475f88f2361e99cc5c8f0': '8.2.0', diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json index 04343968ef958..ad653171f2707 100644 --- a/packages/kbn-check-mappings-update-cli/current_fields.json +++ b/packages/kbn-check-mappings-update-cli/current_fields.json @@ -602,6 +602,7 @@ "overrides", "package", "package.name", + "package.requires_root", "package.title", "package.version", "policy_id", diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json index 6ee1f6d13521f..6d54282cabafe 100644 --- a/packages/kbn-check-mappings-update-cli/current_mappings.json +++ b/packages/kbn-check-mappings-update-cli/current_mappings.json @@ -2017,6 +2017,9 @@ "name": { "type": "keyword" }, + "requires_root": { + "type": "boolean" + }, "title": { "type": "keyword" }, diff --git a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.ts b/packages/kbn-cli-dev-mode/src/base_path_proxy_server.ts index 46cd67e1e0642..f9aaad7923152 100644 --- a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.ts +++ b/packages/kbn-cli-dev-mode/src/base_path_proxy_server.ts @@ -15,7 +15,7 @@ import { sampleSize } from 'lodash'; import * as Rx from 'rxjs'; import { take } from 'rxjs'; import { ByteSizeValue } from '@kbn/config-schema'; -import { createServer, getListenerOptions, getServerOptions } from '@kbn/server-http-tools'; +import { createServer, getServerOptions } from '@kbn/server-http-tools'; import { DevConfig, HttpConfig } from './config'; import { Log } from './log'; @@ -67,8 +67,7 @@ export class BasePathProxyServer { public async start(options: BasePathProxyServerOptions) { const serverOptions = getServerOptions(this.httpConfig); - const listenerOptions = getListenerOptions(this.httpConfig); - this.server = createServer(serverOptions, listenerOptions); + this.server = createServer(serverOptions); // Register hapi plugin that adds proxying functionality. It can be configured // through the route configuration object (see { handler: { proxy: ... } }). diff --git a/packages/kbn-cli-dev-mode/src/integration_tests/base_path_proxy_server.test.ts b/packages/kbn-cli-dev-mode/src/integration_tests/base_path_proxy_server.test.ts index 0f0a69638cfa2..432f67a75f1b0 100644 --- a/packages/kbn-cli-dev-mode/src/integration_tests/base_path_proxy_server.test.ts +++ b/packages/kbn-cli-dev-mode/src/integration_tests/base_path_proxy_server.test.ts @@ -10,12 +10,7 @@ import { Server } from '@hapi/hapi'; import { EMPTY } from 'rxjs'; import moment from 'moment'; import supertest from 'supertest'; -import { - getServerOptions, - getListenerOptions, - createServer, - IHttpConfig, -} from '@kbn/server-http-tools'; +import { getServerOptions, createServer, type IHttpConfig } from '@kbn/server-http-tools'; import { ByteSizeValue } from '@kbn/config-schema'; import { BasePathProxyServer, BasePathProxyServerOptions } from '../base_path_proxy_server'; @@ -51,8 +46,7 @@ describe('BasePathProxyServer', () => { }; const serverOptions = getServerOptions(config); - const listenerOptions = getListenerOptions(config); - server = createServer(serverOptions, listenerOptions); + server = createServer(serverOptions); // setup and start the proxy server const proxyConfig: IHttpConfig = { ...config, port: 10013 }; @@ -276,8 +270,7 @@ describe('BasePathProxyServer', () => { } as IHttpConfig; const serverOptions = getServerOptions(configWithBasePath); - const listenerOptions = getListenerOptions(configWithBasePath); - server = createServer(serverOptions, listenerOptions); + server = createServer(serverOptions); server.route({ method: 'GET', diff --git a/packages/kbn-es-query/index.ts b/packages/kbn-es-query/index.ts index 3793f0efb8855..943d3dc28f570 100644 --- a/packages/kbn-es-query/index.ts +++ b/packages/kbn-es-query/index.ts @@ -9,6 +9,7 @@ export type { BoolQuery, DataViewBase, + DataViewBaseNoFields, DataViewFieldBase, EsQueryConfig, EsQueryFiltersConfig, @@ -117,6 +118,8 @@ export { toElasticsearchQuery, escapeKuery, escapeQuotes, + getKqlFieldNames, + getKqlFieldNamesFromExpression, } from './src/kuery'; export { diff --git a/packages/kbn-es-query/src/es_query/index.ts b/packages/kbn-es-query/src/es_query/index.ts index bb84ddbc16f97..ba11fd2fc3581 100644 --- a/packages/kbn-es-query/src/es_query/index.ts +++ b/packages/kbn-es-query/src/es_query/index.ts @@ -24,6 +24,7 @@ export type { IFieldSubType, BoolQuery, DataViewBase, + DataViewBaseNoFields, DataViewFieldBase, IFieldSubTypeMulti, IFieldSubTypeNested, diff --git a/packages/kbn-es-query/src/es_query/types.ts b/packages/kbn-es-query/src/es_query/types.ts index 89c22521a6409..1a756f55cf145 100644 --- a/packages/kbn-es-query/src/es_query/types.ts +++ b/packages/kbn-es-query/src/es_query/types.ts @@ -64,12 +64,14 @@ export type DataViewFieldBase = { * A base interface for an index pattern * @public */ -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -export type DataViewBase = { +export interface DataViewBase extends DataViewBaseNoFields { fields: DataViewFieldBase[]; +} + +export interface DataViewBaseNoFields { id?: string; title: string; -}; +} export interface BoolQuery { must: estypes.QueryDslQueryContainer[]; diff --git a/packages/kbn-es-query/src/filters/build_filters/build_filters.ts b/packages/kbn-es-query/src/filters/build_filters/build_filters.ts index 368c9e779f8e3..7719e922374ca 100644 --- a/packages/kbn-es-query/src/filters/build_filters/build_filters.ts +++ b/packages/kbn-es-query/src/filters/build_filters/build_filters.ts @@ -14,7 +14,7 @@ import { buildPhrasesFilter } from './phrases_filter'; import { buildRangeFilter, RangeFilterParams } from './range_filter'; import { buildExistsFilter } from './exists_filter'; -import type { DataViewFieldBase, DataViewBase } from '../../es_query'; +import type { DataViewFieldBase, DataViewBase, DataViewBaseNoFields } from '../../es_query'; import { FilterStateStore } from './types'; /** @@ -52,7 +52,7 @@ export function buildFilter( } function buildBaseFilter( - indexPattern: DataViewBase, + indexPattern: DataViewBaseNoFields, field: DataViewFieldBase, type: FILTERS, params: Serializable diff --git a/packages/kbn-es-query/src/filters/build_filters/exists_filter.ts b/packages/kbn-es-query/src/filters/build_filters/exists_filter.ts index 23210093fc8a8..bb28f7f786cd1 100644 --- a/packages/kbn-es-query/src/filters/build_filters/exists_filter.ts +++ b/packages/kbn-es-query/src/filters/build_filters/exists_filter.ts @@ -7,7 +7,7 @@ */ import { has } from 'lodash'; -import type { DataViewFieldBase, DataViewBase } from '../../es_query'; +import type { DataViewFieldBase, DataViewBaseNoFields } from '../../es_query'; import type { Filter, FilterMeta } from './types'; /** @public */ @@ -44,7 +44,7 @@ export const getExistsFilterField = (filter: ExistsFilter) => { * * @public */ -export const buildExistsFilter = (field: DataViewFieldBase, indexPattern: DataViewBase) => { +export const buildExistsFilter = (field: DataViewFieldBase, indexPattern: DataViewBaseNoFields) => { return { meta: { index: indexPattern.id, diff --git a/packages/kbn-es-query/src/filters/build_filters/phrase_filter.ts b/packages/kbn-es-query/src/filters/build_filters/phrase_filter.ts index 0b990bd9cdfa7..485a10fddb038 100644 --- a/packages/kbn-es-query/src/filters/build_filters/phrase_filter.ts +++ b/packages/kbn-es-query/src/filters/build_filters/phrase_filter.ts @@ -9,7 +9,7 @@ import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { SerializableRecord } from '@kbn/utility-types'; import { get, has, isPlainObject } from 'lodash'; import type { Filter, FilterMeta } from './types'; -import type { DataViewFieldBase, DataViewBase } from '../../es_query'; +import type { DataViewFieldBase, DataViewBaseNoFields } from '../../es_query'; import { getConvertedValueForField } from './get_converted_value_for_field'; import { hasRangeKeys } from './range_filter'; @@ -101,7 +101,7 @@ export const getPhraseFilterValue = ( export const buildPhraseFilter = ( field: DataViewFieldBase, value: PhraseFilterValue, - indexPattern: DataViewBase + indexPattern: DataViewBaseNoFields ): PhraseFilter | ScriptedPhraseFilter => { const convertedValue = getConvertedValueForField(field, value); diff --git a/packages/kbn-es-query/src/filters/build_filters/phrases_filter.ts b/packages/kbn-es-query/src/filters/build_filters/phrases_filter.ts index 2e2b954012867..09027a821da5d 100644 --- a/packages/kbn-es-query/src/filters/build_filters/phrases_filter.ts +++ b/packages/kbn-es-query/src/filters/build_filters/phrases_filter.ts @@ -9,7 +9,7 @@ import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { Filter, FilterMeta, FILTERS } from './types'; import { getPhraseScript, PhraseFilterValue } from './phrase_filter'; -import type { DataViewFieldBase, DataViewBase } from '../../es_query'; +import type { DataViewFieldBase, DataViewBaseNoFields } from '../../es_query'; export type PhrasesFilterMeta = FilterMeta & { params: PhraseFilterValue[]; // The unformatted values @@ -50,7 +50,7 @@ export const getPhrasesFilterField = (filter: PhrasesFilter) => { export const buildPhrasesFilter = ( field: DataViewFieldBase, params: PhraseFilterValue[], - indexPattern: DataViewBase + indexPattern: DataViewBaseNoFields ) => { const index = indexPattern.id; const type = FILTERS.PHRASES; diff --git a/packages/kbn-es-query/src/filters/build_filters/range_filter.ts b/packages/kbn-es-query/src/filters/build_filters/range_filter.ts index b1b0fdb0590ab..f80fce31cb8ae 100644 --- a/packages/kbn-es-query/src/filters/build_filters/range_filter.ts +++ b/packages/kbn-es-query/src/filters/build_filters/range_filter.ts @@ -10,7 +10,7 @@ import { map, reduce, mapValues, has, get, keys, pickBy } from 'lodash'; import type { SerializableRecord } from '@kbn/utility-types'; import type { Filter, FilterMeta, FilterMetaParams } from './types'; import { FILTERS } from './types'; -import type { DataViewBase, DataViewFieldBase } from '../../es_query'; +import type { DataViewFieldBase, DataViewBaseNoFields } from '../../es_query'; const OPERANDS_IN_RANGE = 2; @@ -133,7 +133,7 @@ const formatValue = (params: any[]) => * * @param field * @param params - * @param indexPattern + * @param dataView * @param formattedValue * @returns * @@ -142,7 +142,7 @@ const formatValue = (params: any[]) => export const buildRangeFilter = ( field: DataViewFieldBase, params: RangeFilterParams, - indexPattern?: DataViewBase, + indexPattern?: DataViewBaseNoFields, formattedValue?: string ): RangeFilter | ScriptedRangeFilter | MatchAllRangeFilter => { params = mapValues(params, (value: any) => (field.type === 'number' ? parseFloat(value) : value)); diff --git a/packages/kbn-es-query/src/kuery/index.ts b/packages/kbn-es-query/src/kuery/index.ts index 002c67b19c7dc..3e1576bc576e9 100644 --- a/packages/kbn-es-query/src/kuery/index.ts +++ b/packages/kbn-es-query/src/kuery/index.ts @@ -23,5 +23,10 @@ export const toElasticsearchQuery = (...params: Parameters { + it('returns single kuery field', () => { + const expression = 'service.name: my-service'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['service.name']); + }); + + it('returns kuery fields with wildcard', () => { + const expression = 'service.name: *'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['service.name']); + }); + + it('returns multiple fields used AND operator', () => { + const expression = 'service.name: my-service AND service.environment: production'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual([ + 'service.name', + 'service.environment', + ]); + }); + + it('returns multiple kuery fields with OR operator', () => { + const expression = 'network.carrier.mcc: test or child.id: 33'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['network.carrier.mcc', 'child.id']); + }); + + it('returns multiple kuery fields with wildcard', () => { + const expression = 'network.carrier.mcc:* or child.id: *'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['network.carrier.mcc', 'child.id']); + }); + + it('returns single kuery fields with gt operator', () => { + const expression = 'transaction.duration.aggregate > 10'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['transaction.duration.aggregate']); + }); + + it('returns duplicate fields', () => { + const expression = 'service.name: my-service and service.name: my-service and trace.id: trace'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual([ + 'service.name', + 'service.name', + 'trace.id', + ]); + }); + + it('returns multiple fields with multiple logical operators', () => { + const expression = + '(service.name:opbeans-* OR service.name:kibana) and (service.environment:production)'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual([ + 'service.name', + 'service.name', + 'service.environment', + ]); + }); + + it('returns nested fields', () => { + const expression = 'user.names:{ first: "Alice" and last: "White" }'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['user.names']); + }); + + it('returns wildcard fields', () => { + const expression = 'server.*: kibana'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['server.*']); + }); + + // _field_caps doesn't allow escaped wildcards, so for now this behavior is what we want + it('returns escaped fields', () => { + const expression = 'server.\\*: kibana'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual(['server.*']); + }); + + it('do not return if kuery field is null', () => { + const expression = 'opbean'; + expect(getKqlFieldNamesFromExpression(expression)).toEqual([]); + }); +}); diff --git a/packages/kbn-es-query/src/kuery/utils/get_kql_fields.ts b/packages/kbn-es-query/src/kuery/utils/get_kql_fields.ts new file mode 100644 index 0000000000000..7cef22b3f89c7 --- /dev/null +++ b/packages/kbn-es-query/src/kuery/utils/get_kql_fields.ts @@ -0,0 +1,45 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { fromKueryExpression, KueryNode } from '../../..'; +import { nodeTypes } from '../node_types'; +import { functions } from '../functions'; + +export function getKqlFieldNamesFromExpression(expression: string): string[] { + const node = fromKueryExpression(expression); + return getKqlFieldNames(node); +} + +export function getKqlFieldNames(node: KueryNode): string[] { + if (nodeTypes.function.isNode(node)) { + if (functions.and.isNode(node) || functions.or.isNode(node)) { + return node.arguments.reduce((result, child) => { + return result.concat(getKqlFieldNames(child)); + }, []); + } else if ( + functions.not.isNode(node) || + functions.exists.isNode(node) || + functions.is.isNode(node) || + functions.nested.isNode(node) || + functions.range.isNode(node) + ) { + // For each of these field types, we only need to look at the first argument to determine the fields + const [fieldNode] = node.arguments; + return getKqlFieldNames(fieldNode); + } else { + throw new Error(`KQL function ${node.function} not supported in getKqlFieldNames`); + } + } else if (nodeTypes.literal.isNode(node)) { + if (node.value === null) return []; + return [`${nodeTypes.literal.toElasticsearchQuery(node)}`]; + } else if (nodeTypes.wildcard.isNode(node)) { + return [nodeTypes.wildcard.toElasticsearchQuery(node)]; + } else { + throw new Error(`KQL node type ${node.type} not supported in getKqlFieldNames`); + } +} diff --git a/packages/kbn-es-query/src/kuery/utils/index.ts b/packages/kbn-es-query/src/kuery/utils/index.ts index 8726b56a466cc..31e19c713fc0d 100644 --- a/packages/kbn-es-query/src/kuery/utils/index.ts +++ b/packages/kbn-es-query/src/kuery/utils/index.ts @@ -7,3 +7,4 @@ */ export { escapeKuery, escapeQuotes } from './escape_kuery'; +export { getKqlFieldNames, getKqlFieldNamesFromExpression } from './get_kql_fields'; diff --git a/packages/kbn-hapi-mocks/src/request.ts b/packages/kbn-hapi-mocks/src/request.ts index 511e580071954..4379fcb9aeef0 100644 --- a/packages/kbn-hapi-mocks/src/request.ts +++ b/packages/kbn-hapi-mocks/src/request.ts @@ -39,6 +39,7 @@ export const createRequestMock = (customization: DeepPartial = {}): Req req: { url: path, socket: {}, + httpVersion: '1.1', }, res: { addListener: jest.fn(), diff --git a/packages/kbn-health-gateway-server/src/server/server.test.mocks.ts b/packages/kbn-health-gateway-server/src/server/server.test.mocks.ts index 543fe9b29e9cc..657b1fc26b930 100644 --- a/packages/kbn-health-gateway-server/src/server/server.test.mocks.ts +++ b/packages/kbn-health-gateway-server/src/server/server.test.mocks.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { sslSchema, getServerOptions, getListenerOptions } from '@kbn/server-http-tools'; +import { sslSchema, getServerOptions } from '@kbn/server-http-tools'; export const hapiStartMock = jest.fn(); export const hapiStopMock = jest.fn(); @@ -18,12 +18,10 @@ export const createServerMock = jest.fn().mockImplementation(() => ({ route: hapiRouteMock, })); export const getServerOptionsMock = jest.fn().mockImplementation(getServerOptions); -export const getListenerOptionsMock = jest.fn().mockImplementation(getListenerOptions); jest.doMock('@kbn/server-http-tools', () => ({ createServer: createServerMock, getServerOptions: getServerOptionsMock, - getListenerOptions: getListenerOptionsMock, sslSchema, SslConfig: jest.fn(), })); diff --git a/packages/kbn-health-gateway-server/src/server/server.test.ts b/packages/kbn-health-gateway-server/src/server/server.test.ts index e0a65229c3374..739bb8f0a5916 100644 --- a/packages/kbn-health-gateway-server/src/server/server.test.ts +++ b/packages/kbn-health-gateway-server/src/server/server.test.ts @@ -9,7 +9,6 @@ import { createServerMock, getServerOptionsMock, - getListenerOptionsMock, hapiStartMock, hapiStopMock, hapiRouteMock, @@ -56,9 +55,6 @@ describe('Server', () => { expect(getServerOptionsMock.mock.calls[0][0]).toEqual( expect.objectContaining({ ...mockConfig }) ); - expect(getListenerOptionsMock.mock.calls[0][0]).toEqual( - expect.objectContaining({ ...mockConfig }) - ); }); test('starts the Hapi server', async () => { diff --git a/packages/kbn-health-gateway-server/src/server/server.ts b/packages/kbn-health-gateway-server/src/server/server.ts index e75df33859981..1b679db5b9085 100644 --- a/packages/kbn-health-gateway-server/src/server/server.ts +++ b/packages/kbn-health-gateway-server/src/server/server.ts @@ -7,7 +7,7 @@ */ import type { Server as HapiServer, ServerRoute as HapiServerRoute } from '@hapi/hapi'; -import { createServer, getServerOptions, getListenerOptions } from '@kbn/server-http-tools'; +import { createServer, getServerOptions } from '@kbn/server-http-tools'; import type { IConfigService } from '@kbn/config'; import type { Logger, LoggerFactory } from '@kbn/logging'; import { ServerConfig } from './server_config'; @@ -40,7 +40,7 @@ export class Server { async start(): Promise { const serverConfig = new ServerConfig(this.config.atPathSync('server')); - this.server = createServer(getServerOptions(serverConfig), getListenerOptions(serverConfig)); + this.server = createServer(getServerOptions(serverConfig)); await this.server.start(); this.log.info(`Server running on ${this.server.info.uri}`); diff --git a/packages/kbn-reporting/common/constants.ts b/packages/kbn-reporting/common/constants.ts index 4620b46e8cab6..e041291323439 100644 --- a/packages/kbn-reporting/common/constants.ts +++ b/packages/kbn-reporting/common/constants.ts @@ -55,6 +55,7 @@ export const REPORTING_MANAGEMENT_HOME = '/app/management/insightsAndAlerting/re * ILM */ +// The ILM policy manages stored reports only in stateful deployments. export const ILM_POLICY_NAME = 'kibana-reporting'; /* diff --git a/packages/kbn-reporting/common/types.ts b/packages/kbn-reporting/common/types.ts index 92eb444880543..39d5a79e731c6 100644 --- a/packages/kbn-reporting/common/types.ts +++ b/packages/kbn-reporting/common/types.ts @@ -149,6 +149,7 @@ export interface ReportSource { migration_version: string; // for reminding the user to update their POST URL attempts: number; // initially populated as 0 created_at: string; // timestamp in UTC + '@timestamp'?: string; // creation timestamp, only used for data streams compatibility status: JOB_STATUS; /* diff --git a/packages/kbn-reporting/common/url.ts b/packages/kbn-reporting/common/url.ts index 14772b3a612aa..d7140bbd22044 100644 --- a/packages/kbn-reporting/common/url.ts +++ b/packages/kbn-reporting/common/url.ts @@ -29,12 +29,6 @@ export interface LocatorParams

=> { return await client.transport.request({ method: 'PUT', diff --git a/packages/kbn-server-http-tools/index.ts b/packages/kbn-server-http-tools/index.ts index a572cc6ab0832..7efa00c677015 100644 --- a/packages/kbn-server-http-tools/index.ts +++ b/packages/kbn-server-http-tools/index.ts @@ -9,8 +9,9 @@ export type { IHttpConfig, ISslConfig, ICorsConfig } from './src/types'; export { createServer } from './src/create_server'; export { defaultValidationErrorHandler } from './src/default_validation_error_handler'; -export { getListenerOptions } from './src/get_listener_options'; -export { getServerOptions, getServerTLSOptions } from './src/get_server_options'; +export { getServerListener } from './src/get_listener'; +export { getServerOptions } from './src/get_server_options'; +export { getServerTLSOptions } from './src/get_tls_options'; export { getRequestId } from './src/get_request_id'; export { setTlsConfig } from './src/set_tls_config'; export { sslSchema, SslConfig } from './src/ssl'; diff --git a/packages/kbn-server-http-tools/src/create_server.ts b/packages/kbn-server-http-tools/src/create_server.ts index 4752e342d5d3e..b57750ffaf538 100644 --- a/packages/kbn-server-http-tools/src/create_server.ts +++ b/packages/kbn-server-http-tools/src/create_server.ts @@ -7,23 +7,7 @@ */ import { Server, ServerOptions } from '@hapi/hapi'; -import { ListenerOptions } from './get_listener_options'; -export function createServer(serverOptions: ServerOptions, listenerOptions: ListenerOptions) { - const server = new Server(serverOptions); - - server.listener.keepAliveTimeout = listenerOptions.keepaliveTimeout; - server.listener.setTimeout(listenerOptions.socketTimeout); - server.listener.on('timeout', (socket) => { - socket.destroy(); - }); - server.listener.on('clientError', (err, socket) => { - if (socket.writable) { - socket.end(Buffer.from('HTTP/1.1 400 Bad Request\r\n\r\n', 'ascii')); - } else { - socket.destroy(err); - } - }); - - return server; +export function createServer(serverOptions: ServerOptions) { + return new Server(serverOptions); } diff --git a/packages/kbn-server-http-tools/src/get_listener.test.mocks.ts b/packages/kbn-server-http-tools/src/get_listener.test.mocks.ts new file mode 100644 index 0000000000000..1fab2d9191367 --- /dev/null +++ b/packages/kbn-server-http-tools/src/get_listener.test.mocks.ts @@ -0,0 +1,47 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const getServerTLSOptionsMock = jest.fn(); + +jest.doMock('./get_tls_options', () => { + const actual = jest.requireActual('./get_tls_options'); + return { + ...actual, + getServerTLSOptions: getServerTLSOptionsMock, + }; +}); + +export const createHttpServerMock = jest.fn(() => { + return { + on: jest.fn(), + setTimeout: jest.fn(), + }; +}); + +jest.doMock('http', () => { + const actual = jest.requireActual('http'); + return { + ...actual, + createServer: createHttpServerMock, + }; +}); + +export const createHttpsServerMock = jest.fn(() => { + return { + on: jest.fn(), + setTimeout: jest.fn(), + }; +}); + +jest.doMock('https', () => { + const actual = jest.requireActual('https'); + return { + ...actual, + createServer: createHttpsServerMock, + }; +}); diff --git a/packages/kbn-server-http-tools/src/get_listener.test.ts b/packages/kbn-server-http-tools/src/get_listener.test.ts new file mode 100644 index 0000000000000..21e0a93763490 --- /dev/null +++ b/packages/kbn-server-http-tools/src/get_listener.test.ts @@ -0,0 +1,139 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { + getServerTLSOptionsMock, + createHttpServerMock, + createHttpsServerMock, +} from './get_listener.test.mocks'; +import moment from 'moment'; +import { ByteSizeValue } from '@kbn/config-schema'; +import type { IHttpConfig } from './types'; +import { getServerListener } from './get_listener'; + +const createConfig = (parts: Partial): IHttpConfig => ({ + host: 'localhost', + port: 5601, + socketTimeout: 120000, + keepaliveTimeout: 120000, + payloadTimeout: 20000, + shutdownTimeout: moment.duration(30, 'seconds'), + maxPayload: ByteSizeValue.parse('1048576b'), + ...parts, + cors: { + enabled: false, + allowCredentials: false, + allowOrigin: ['*'], + ...parts.cors, + }, + ssl: { + enabled: false, + ...parts.ssl, + }, + restrictInternalApis: false, +}); + +describe('getServerListener', () => { + beforeEach(() => { + getServerTLSOptionsMock.mockReset(); + createHttpServerMock.mockClear(); + createHttpsServerMock.mockClear(); + }); + + describe('when TLS is enabled', () => { + it('calls getServerTLSOptions with the correct parameters', () => { + const config = createConfig({ ssl: { enabled: true } }); + + getServerListener(config); + + expect(getServerTLSOptionsMock).toHaveBeenCalledTimes(1); + expect(getServerTLSOptionsMock).toHaveBeenCalledWith(config.ssl); + }); + + it('calls https.createServer with the correct parameters', () => { + const config = createConfig({ ssl: { enabled: true } }); + + getServerTLSOptionsMock.mockReturnValue({ stub: true }); + + getServerListener(config); + + expect(createHttpsServerMock).toHaveBeenCalledTimes(1); + expect(createHttpsServerMock).toHaveBeenCalledWith({ + stub: true, + keepAliveTimeout: config.keepaliveTimeout, + }); + }); + + it('properly configures the listener', () => { + const config = createConfig({ ssl: { enabled: true } }); + const server = getServerListener(config); + + expect(server.setTimeout).toHaveBeenCalledTimes(1); + expect(server.setTimeout).toHaveBeenCalledWith(config.socketTimeout); + + expect(server.on).toHaveBeenCalledTimes(2); + expect(server.on).toHaveBeenCalledWith('clientError', expect.any(Function)); + expect(server.on).toHaveBeenCalledWith('timeout', expect.any(Function)); + }); + + it('returns the https server', () => { + const config = createConfig({ ssl: { enabled: true } }); + + const server = getServerListener(config); + + const expectedServer = createHttpsServerMock.mock.results[0].value; + + expect(server).toBe(expectedServer); + }); + }); + + describe('when TLS is disabled', () => { + it('does not call getServerTLSOptions', () => { + const config = createConfig({ ssl: { enabled: false } }); + + getServerListener(config); + + expect(getServerTLSOptionsMock).not.toHaveBeenCalled(); + }); + + it('calls http.createServer with the correct parameters', () => { + const config = createConfig({ ssl: { enabled: false } }); + + getServerTLSOptionsMock.mockReturnValue({ stub: true }); + + getServerListener(config); + + expect(createHttpServerMock).toHaveBeenCalledTimes(1); + expect(createHttpServerMock).toHaveBeenCalledWith({ + keepAliveTimeout: config.keepaliveTimeout, + }); + }); + + it('properly configures the listener', () => { + const config = createConfig({ ssl: { enabled: false } }); + const server = getServerListener(config); + + expect(server.setTimeout).toHaveBeenCalledTimes(1); + expect(server.setTimeout).toHaveBeenCalledWith(config.socketTimeout); + + expect(server.on).toHaveBeenCalledTimes(2); + expect(server.on).toHaveBeenCalledWith('clientError', expect.any(Function)); + expect(server.on).toHaveBeenCalledWith('timeout', expect.any(Function)); + }); + + it('returns the http server', () => { + const config = createConfig({ ssl: { enabled: false } }); + + const server = getServerListener(config); + + const expectedServer = createHttpServerMock.mock.results[0].value; + + expect(server).toBe(expectedServer); + }); + }); +}); diff --git a/packages/kbn-server-http-tools/src/get_listener.ts b/packages/kbn-server-http-tools/src/get_listener.ts new file mode 100644 index 0000000000000..f1dbe3de753fa --- /dev/null +++ b/packages/kbn-server-http-tools/src/get_listener.ts @@ -0,0 +1,54 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import http from 'http'; +import https from 'https'; +import { getServerTLSOptions } from './get_tls_options'; +import type { IHttpConfig, ServerListener } from './types'; + +interface GetServerListenerOptions { + configureTLS?: boolean; +} + +export function getServerListener( + config: IHttpConfig, + options: GetServerListenerOptions = {} +): ServerListener { + return configureHttp1Listener(config, options); +} + +const configureHttp1Listener = ( + config: IHttpConfig, + { configureTLS = true }: GetServerListenerOptions = {} +): ServerListener => { + const useTLS = configureTLS && config.ssl.enabled; + const tlsOptions = useTLS ? getServerTLSOptions(config.ssl) : undefined; + + const listener = useTLS + ? https.createServer({ + ...tlsOptions, + keepAliveTimeout: config.keepaliveTimeout, + }) + : http.createServer({ + keepAliveTimeout: config.keepaliveTimeout, + }); + + listener.setTimeout(config.socketTimeout); + listener.on('timeout', (socket) => { + socket.destroy(); + }); + listener.on('clientError', (err, socket) => { + if (socket.writable) { + socket.end(Buffer.from('HTTP/1.1 400 Bad Request\r\n\r\n', 'ascii')); + } else { + socket.destroy(err); + } + }); + + return listener; +}; diff --git a/packages/kbn-server-http-tools/src/get_listener_options.ts b/packages/kbn-server-http-tools/src/get_server_options.test.mocks.ts similarity index 55% rename from packages/kbn-server-http-tools/src/get_listener_options.ts rename to packages/kbn-server-http-tools/src/get_server_options.test.mocks.ts index 00884312b599f..32d808f264436 100644 --- a/packages/kbn-server-http-tools/src/get_listener_options.ts +++ b/packages/kbn-server-http-tools/src/get_server_options.test.mocks.ts @@ -6,16 +6,12 @@ * Side Public License, v 1. */ -import { IHttpConfig } from './types'; +export const getServerListenerMock = jest.fn(); -export interface ListenerOptions { - keepaliveTimeout: number; - socketTimeout: number; -} - -export function getListenerOptions(config: IHttpConfig): ListenerOptions { +jest.doMock('./get_listener', () => { + const actual = jest.requireActual('./get_listener'); return { - keepaliveTimeout: config.keepaliveTimeout, - socketTimeout: config.socketTimeout, + ...actual, + getServerListener: getServerListenerMock, }; -} +}); diff --git a/packages/kbn-server-http-tools/src/get_server_options.test.ts b/packages/kbn-server-http-tools/src/get_server_options.test.ts index 2d8f78a1405ac..00c140f46f6c7 100644 --- a/packages/kbn-server-http-tools/src/get_server_options.test.ts +++ b/packages/kbn-server-http-tools/src/get_server_options.test.ts @@ -6,10 +6,11 @@ * Side Public License, v 1. */ +import { getServerListenerMock } from './get_server_options.test.mocks'; import moment from 'moment'; import { ByteSizeValue } from '@kbn/config-schema'; +import type { IHttpConfig } from './types'; import { getServerOptions } from './get_server_options'; -import { IHttpConfig } from './types'; jest.mock('fs', () => { const original = jest.requireActual('fs'); @@ -43,69 +44,42 @@ const createConfig = (parts: Partial): IHttpConfig => ({ }); describe('getServerOptions', () => { - beforeEach(() => - jest.requireMock('fs').readFileSync.mockImplementation((path: string) => `content-${path}`) - ); + beforeEach(() => { + jest.requireMock('fs').readFileSync.mockImplementation((path: string) => `content-${path}`); + getServerListenerMock.mockReset(); + }); afterEach(() => { jest.clearAllMocks(); }); - it('properly configures TLS with default options', () => { - const httpConfig = createConfig({ - ssl: { - enabled: true, - key: 'some-key-path', - certificate: 'some-certificate-path', - }, - }); + it('calls `getServerListener` to retrieve the listener that will be provided in the config', () => { + const listener = Symbol('listener'); + getServerListenerMock.mockReturnValue(listener); - expect(getServerOptions(httpConfig).tls).toMatchInlineSnapshot(` - Object { - "ca": undefined, - "cert": "some-certificate-path", - "ciphers": undefined, - "honorCipherOrder": true, - "key": "some-key-path", - "passphrase": undefined, - "rejectUnauthorized": undefined, - "requestCert": undefined, - "secureOptions": undefined, - } - `); - }); + const httpConfig = createConfig({}); + const serverOptions = getServerOptions(httpConfig, { configureTLS: true }); - it('properly configures TLS with client authentication', () => { - const httpConfig = createConfig({ - ssl: { - enabled: true, - key: 'some-key-path', - certificate: 'some-certificate-path', - certificateAuthorities: ['ca-1', 'ca-2'], - cipherSuites: ['suite-a', 'suite-b'], - keyPassphrase: 'passPhrase', - rejectUnauthorized: true, - requestCert: true, - getSecureOptions: () => 42, - }, - }); + expect(getServerListenerMock).toHaveBeenCalledTimes(1); + expect(getServerListenerMock).toHaveBeenCalledWith(httpConfig, { configureTLS: true }); + + expect(serverOptions.listener).toBe(listener); + }); - expect(getServerOptions(httpConfig).tls).toMatchInlineSnapshot(` - Object { - "ca": Array [ - "ca-1", - "ca-2", - ], - "cert": "some-certificate-path", - "ciphers": "suite-a:suite-b", - "honorCipherOrder": true, - "key": "some-key-path", - "passphrase": "passPhrase", - "rejectUnauthorized": true, - "requestCert": true, - "secureOptions": 42, - } - `); + it('properly configures the tls option depending on the config and the configureTLS flag', () => { + expect( + getServerOptions(createConfig({ ssl: { enabled: true } }), { configureTLS: true }).tls + ).toBe(true); + expect(getServerOptions(createConfig({ ssl: { enabled: true } }), {}).tls).toBe(true); + expect( + getServerOptions(createConfig({ ssl: { enabled: true } }), { configureTLS: false }).tls + ).toBe(false); + expect( + getServerOptions(createConfig({ ssl: { enabled: false } }), { configureTLS: true }).tls + ).toBe(false); + expect( + getServerOptions(createConfig({ ssl: { enabled: false } }), { configureTLS: false }).tls + ).toBe(false); }); it('properly configures CORS when cors enabled', () => { diff --git a/packages/kbn-server-http-tools/src/get_server_options.ts b/packages/kbn-server-http-tools/src/get_server_options.ts index 37a8f5f69cc2b..fe0a669fd62f5 100644 --- a/packages/kbn-server-http-tools/src/get_server_options.ts +++ b/packages/kbn-server-http-tools/src/get_server_options.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -import { RouteOptionsCors, ServerOptions } from '@hapi/hapi'; -import { ServerOptions as TLSOptions } from 'https'; +import type { RouteOptionsCors, ServerOptions } from '@hapi/hapi'; +import type { IHttpConfig } from './types'; import { defaultValidationErrorHandler } from './default_validation_error_handler'; -import { IHttpConfig, ISslConfig } from './types'; +import { getServerListener } from './get_listener'; const corsAllowedHeaders = ['Accept', 'Authorization', 'Content-Type', 'If-None-Match', 'kbn-xsrf']; @@ -27,6 +27,10 @@ export function getServerOptions(config: IHttpConfig, { configureTLS = true } = const options: ServerOptions = { host: config.host, port: config.port, + // manually configuring the listener + listener: getServerListener(config, { configureTLS }), + // must set to true when manually passing a TLS listener, false otherwise + tls: configureTLS && config.ssl.enabled, routes: { cache: { privacy: 'private', @@ -51,31 +55,5 @@ export function getServerOptions(config: IHttpConfig, { configureTLS = true } = }, }; - if (configureTLS) { - options.tls = getServerTLSOptions(config.ssl); - } - return options; } - -/** - * Converts Kibana `SslConfig` into `TLSOptions` that are accepted by the Hapi server, - * and by https.Server.setSecureContext() - */ -export function getServerTLSOptions(ssl: ISslConfig): TLSOptions | undefined { - if (!ssl.enabled) { - return undefined; - } - return { - ca: ssl.certificateAuthorities, - cert: ssl.certificate, - ciphers: ssl.cipherSuites?.join(':'), - // We use the server's cipher order rather than the client's to prevent the BEAST attack. - honorCipherOrder: true, - key: ssl.key, - passphrase: ssl.keyPassphrase, - secureOptions: ssl.getSecureOptions ? ssl.getSecureOptions() : undefined, - requestCert: ssl.requestCert, - rejectUnauthorized: ssl.rejectUnauthorized, - }; -} diff --git a/packages/kbn-server-http-tools/src/get_tls_options.test.ts b/packages/kbn-server-http-tools/src/get_tls_options.test.ts new file mode 100644 index 0000000000000..0a50209db50c9 --- /dev/null +++ b/packages/kbn-server-http-tools/src/get_tls_options.test.ts @@ -0,0 +1,110 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import moment from 'moment'; +import { ByteSizeValue } from '@kbn/config-schema'; +import type { IHttpConfig } from './types'; +import { getServerTLSOptions } from './get_tls_options'; + +jest.mock('fs', () => { + const original = jest.requireActual('fs'); + return { + // Hapi Inert patches native methods + ...original, + readFileSync: jest.fn(), + }; +}); + +const createConfig = (parts: Partial): IHttpConfig => ({ + host: 'localhost', + port: 5601, + socketTimeout: 120000, + keepaliveTimeout: 120000, + payloadTimeout: 20000, + shutdownTimeout: moment.duration(30, 'seconds'), + maxPayload: ByteSizeValue.parse('1048576b'), + ...parts, + cors: { + enabled: false, + allowCredentials: false, + allowOrigin: ['*'], + ...parts.cors, + }, + ssl: { + enabled: false, + ...parts.ssl, + }, + restrictInternalApis: false, +}); + +describe('getServerTLSOptions', () => { + beforeEach(() => + jest.requireMock('fs').readFileSync.mockImplementation((path: string) => `content-${path}`) + ); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('properly configures TLS with default options', () => { + const httpConfig = createConfig({ + ssl: { + enabled: true, + key: 'some-key-path', + certificate: 'some-certificate-path', + }, + }); + + expect(getServerTLSOptions(httpConfig.ssl)).toMatchInlineSnapshot(` + Object { + "ca": undefined, + "cert": "some-certificate-path", + "ciphers": undefined, + "honorCipherOrder": true, + "key": "some-key-path", + "passphrase": undefined, + "rejectUnauthorized": undefined, + "requestCert": undefined, + "secureOptions": undefined, + } + `); + }); + + it('properly configures TLS with client authentication', () => { + const httpConfig = createConfig({ + ssl: { + enabled: true, + key: 'some-key-path', + certificate: 'some-certificate-path', + certificateAuthorities: ['ca-1', 'ca-2'], + cipherSuites: ['suite-a', 'suite-b'], + keyPassphrase: 'passPhrase', + rejectUnauthorized: true, + requestCert: true, + getSecureOptions: () => 42, + }, + }); + + expect(getServerTLSOptions(httpConfig.ssl)).toMatchInlineSnapshot(` + Object { + "ca": Array [ + "ca-1", + "ca-2", + ], + "cert": "some-certificate-path", + "ciphers": "suite-a:suite-b", + "honorCipherOrder": true, + "key": "some-key-path", + "passphrase": "passPhrase", + "rejectUnauthorized": true, + "requestCert": true, + "secureOptions": 42, + } + `); + }); +}); diff --git a/packages/kbn-server-http-tools/src/get_tls_options.ts b/packages/kbn-server-http-tools/src/get_tls_options.ts new file mode 100644 index 0000000000000..eb55327cef326 --- /dev/null +++ b/packages/kbn-server-http-tools/src/get_tls_options.ts @@ -0,0 +1,32 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ServerOptions as TLSOptions } from 'https'; +import { ISslConfig } from './types'; + +/** + * Converts Kibana `SslConfig` into `TLSOptions` that are accepted by the Hapi server, + * and by https.Server.setSecureContext() + */ +export function getServerTLSOptions(ssl: ISslConfig): TLSOptions | undefined { + if (!ssl.enabled) { + return undefined; + } + return { + ca: ssl.certificateAuthorities, + cert: ssl.certificate, + ciphers: ssl.cipherSuites?.join(':'), + // We use the server's cipher order rather than the client's to prevent the BEAST attack. + honorCipherOrder: true, + key: ssl.key, + passphrase: ssl.keyPassphrase, + secureOptions: ssl.getSecureOptions ? ssl.getSecureOptions() : undefined, + requestCert: ssl.requestCert, + rejectUnauthorized: ssl.rejectUnauthorized, + }; +} diff --git a/packages/kbn-server-http-tools/src/set_tls_config.test.mocks.ts b/packages/kbn-server-http-tools/src/set_tls_config.test.mocks.ts index 4b93301b334e5..597ab7d176c8e 100644 --- a/packages/kbn-server-http-tools/src/set_tls_config.test.mocks.ts +++ b/packages/kbn-server-http-tools/src/set_tls_config.test.mocks.ts @@ -8,8 +8,8 @@ export const getServerTLSOptionsMock = jest.fn(); -jest.doMock('./get_server_options', () => { - const actual = jest.requireActual('./get_server_options'); +jest.doMock('./get_tls_options', () => { + const actual = jest.requireActual('./get_tls_options'); return { ...actual, getServerTLSOptions: getServerTLSOptionsMock, diff --git a/packages/kbn-server-http-tools/src/set_tls_config.ts b/packages/kbn-server-http-tools/src/set_tls_config.ts index 1f2e1d70fa126..6b0cd35f067ea 100644 --- a/packages/kbn-server-http-tools/src/set_tls_config.ts +++ b/packages/kbn-server-http-tools/src/set_tls_config.ts @@ -7,18 +7,17 @@ */ import type { Server as HapiServer } from '@hapi/hapi'; -import type { Server as HttpServer } from 'http'; import type { Server as TlsServer } from 'https'; -import type { ISslConfig } from './types'; -import { getServerTLSOptions } from './get_server_options'; +import type { ISslConfig, ServerListener } from './types'; +import { getServerTLSOptions } from './get_tls_options'; -function isServerTLS(server: HttpServer): server is TlsServer { +function isTLSListener(server: ServerListener): server is TlsServer { return 'setSecureContext' in server; } export const setTlsConfig = (hapiServer: HapiServer, sslConfig: ISslConfig) => { const server = hapiServer.listener; - if (!isServerTLS(server)) { + if (!isTLSListener(server)) { throw new Error('tried to set TLS config on a non-TLS http server'); } const tlsOptions = getServerTLSOptions(sslConfig); diff --git a/packages/kbn-server-http-tools/src/types.ts b/packages/kbn-server-http-tools/src/types.ts index 693cb6feb46fe..88533162b2a32 100644 --- a/packages/kbn-server-http-tools/src/types.ts +++ b/packages/kbn-server-http-tools/src/types.ts @@ -6,9 +6,19 @@ * Side Public License, v 1. */ +import type { Server as HttpServer } from 'http'; +import type { Server as HttpsServer } from 'https'; import { ByteSizeValue } from '@kbn/config-schema'; import type { Duration } from 'moment'; +/** + * Composite type of all possible kind of Listener types. + * + * Unfortunately, there's no real common interface between all those concrete classes, + * as `net.Server` and `tls.Server` don't list all the APIs we're using (such as event binding) + */ +export type ServerListener = HttpServer | HttpsServer; + export interface IHttpConfig { host: string; port: number; diff --git a/packages/kbn-test/src/auth/helper.ts b/packages/kbn-test/src/auth/helper.ts index d13e3ef69f37b..fc32eab773c8e 100644 --- a/packages/kbn-test/src/auth/helper.ts +++ b/packages/kbn-test/src/auth/helper.ts @@ -20,3 +20,33 @@ export const readCloudUsersFromFile = (filePath: string): Array<[Role, User]> => return Object.entries(JSON.parse(data)) as Array<[Role, User]>; }; + +export const isValidUrl = (value: string) => { + try { + const url = new URL(value); + return url.protocol === 'http:' || url.protocol === 'https:'; + } catch (err) { + return false; + } +}; + +export const isValidHostname = (value: string) => { + if (value.length === 0) { + return false; + } + + const validChars = /^[a-zA-Z0-9-.]{1,253}\.?$/g; + if (!validChars.test(value)) { + return false; + } + + if (value.endsWith('.')) { + value = value.slice(0, value.length - 1); + } + + if (value.length > 253) { + return false; + } + + return true; +}; diff --git a/packages/kbn-test/src/auth/saml_auth.test.ts b/packages/kbn-test/src/auth/saml_auth.test.ts new file mode 100644 index 0000000000000..e64f18023a676 --- /dev/null +++ b/packages/kbn-test/src/auth/saml_auth.test.ts @@ -0,0 +1,197 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ToolingLog } from '@kbn/tooling-log'; +import axios, { AxiosRequestConfig } from 'axios'; + +jest.mock('axios'); +import { + createCloudSession, + createSAMLRequest, + createSAMLResponse, + finishSAMLHandshake, +} from './saml_auth'; + +const axiosRequestMock = jest.spyOn(axios, 'request'); +const axiosGetMock = jest.spyOn(axios, 'get'); + +const log = new ToolingLog(); + +const mockRequestOnce = (mockedPath: string, response: any) => { + axiosRequestMock.mockImplementationOnce((config: AxiosRequestConfig) => { + if (config.url?.endsWith(mockedPath)) { + return Promise.resolve(response); + } + return Promise.reject(new Error(`Unexpected URL: ${config.url}`)); + }); +}; + +const mockGetOnce = (mockedUrl: string, response: any) => { + axiosGetMock.mockImplementationOnce((url: string) => { + if (url === mockedUrl) { + return Promise.resolve(response); + } + return Promise.reject(new Error(`Unexpected URL`)); + }); +}; + +describe('saml_auth', () => { + describe('createCloudSession', () => { + test('returns token value', async () => { + mockRequestOnce('/api/v1/saas/auth/_login', { data: { token: 'mocked_token' } }); + + const sessionToken = await createCloudSession({ + hostname: 'cloud', + email: 'viewer@elastic.co', + password: 'changeme', + log, + }); + expect(sessionToken).toBe('mocked_token'); + }); + + test('throws error when response has no token', async () => { + mockRequestOnce('/api/v1/saas/auth/_login', { data: { message: 'no token' } }); + + await expect( + createCloudSession({ + hostname: 'cloud', + email: 'viewer@elastic.co', + password: 'changeme', + log, + }) + ).rejects.toThrow('Unable to create Cloud session, token is missing.'); + }); + }); + + describe('createSAMLRequest', () => { + test('returns { location, sid }', async () => { + mockRequestOnce('/internal/security/login', { + data: { + location: 'https://cloud.test/saml?SAMLRequest=fVLLbtswEPwVgXe9K6%2F', + }, + headers: { + 'set-cookie': [`sid=Fe26.2**1234567890; Secure; HttpOnly; Path=/`], + }, + }); + + const response = await createSAMLRequest('https://kbn.test.co', '8.12.0', log); + expect(response).toStrictEqual({ + location: 'https://cloud.test/saml?SAMLRequest=fVLLbtswEPwVgXe9K6%2F', + sid: 'Fe26.2**1234567890', + }); + }); + + test(`throws error when response has no 'set-cookie' header`, async () => { + mockRequestOnce('/internal/security/login', { + data: { + location: 'https://cloud.test/saml?SAMLRequest=fVLLbtswEPwVgXe9K6%2F', + }, + headers: {}, + }); + + expect(createSAMLRequest('https://kbn.test.co', '8.12.0', log)).rejects.toThrow( + `Failed to parse 'set-cookie' header` + ); + }); + + test('throws error when location is not a valid url', async () => { + mockRequestOnce('/internal/security/login', { + data: { + location: 'http/.test', + }, + headers: { + 'set-cookie': [`sid=Fe26.2**1234567890; Secure; HttpOnly; Path=/`], + }, + }); + + expect(createSAMLRequest('https://kbn.test.co', '8.12.0', log)).rejects.toThrow( + `Location from Kibana SAML request is not a valid url: http/.test` + ); + }); + + test('throws error when response has no location', async () => { + const data = { error: 'mocked error' }; + mockRequestOnce('/internal/security/login', { + data, + headers: { + 'set-cookie': [`sid=Fe26.2**1234567890; Secure; HttpOnly; Path=/`], + }, + }); + + expect(createSAMLRequest('https://kbn.test.co', '8.12.0', log)).rejects.toThrow( + `Failed to get location from SAML response data: ${JSON.stringify(data)}` + ); + }); + }); + + describe('createSAMLResponse', () => { + const location = 'https://cloud.test/saml?SAMLRequest=fVLLbtswEPwVgXe9K6%2F'; + const createSAMLResponseParams = { + location, + ecSession: 'mocked_token', + email: 'viewer@elastic.co', + kbnHost: 'https://kbn.test.co', + log, + }; + + test('returns valid saml response', async () => { + mockGetOnce(location, { + data: `Test`, + }); + + const actualResponse = await createSAMLResponse(createSAMLResponseParams); + expect(actualResponse).toBe('PD94bWluc2U+'); + }); + + test('throws error when failed to parse SAML response value', async () => { + mockGetOnce(location, { + data: `Test`, + }); + + await expect(createSAMLResponse(createSAMLResponseParams)).rejects + .toThrowError(`Failed to parse SAML response value.\nMost likely the 'viewer@elastic.co' user has no access to the cloud deployment. +Login to ${ + new URL(location).hostname + } with the user from '.ftr/role_users.json' file and try to load +https://kbn.test.co in the same window.`); + }); + }); + + describe('finishSAMLHandshake', () => { + const cookieStr = 'mocked_cookie'; + test('returns valid cookie', async () => { + mockRequestOnce('/api/security/saml/callback', { + headers: { + 'set-cookie': [`sid=${cookieStr}; Secure; HttpOnly; Path=/`], + }, + }); + + const response = await finishSAMLHandshake({ + kbnHost: 'https://kbn.test.co', + samlResponse: 'PD94bWluc2U+', + sid: 'Fe26.2**1234567890', + log, + }); + expect(response.key).toEqual('sid'); + expect(response.value).toEqual(cookieStr); + }); + + test(`throws error when response has no 'set-cookie' header`, async () => { + mockRequestOnce('/api/security/saml/callback', { headers: {} }); + + await expect( + finishSAMLHandshake({ + kbnHost: 'https://kbn.test.co', + samlResponse: 'PD94bWluc2U+', + sid: 'Fe26.2**1234567890', + log, + }) + ).rejects.toThrow(`Failed to parse 'set-cookie' header`); + }); + }); +}); diff --git a/packages/kbn-test/src/auth/saml_auth.ts b/packages/kbn-test/src/auth/saml_auth.ts index bd570188922e6..a88d11c6a5bc9 100644 --- a/packages/kbn-test/src/auth/saml_auth.ts +++ b/packages/kbn-test/src/auth/saml_auth.ts @@ -12,10 +12,12 @@ import axios, { AxiosResponse } from 'axios'; import * as cheerio from 'cheerio'; import { Cookie, parse as parseCookie } from 'tough-cookie'; import Url from 'url'; +import { isValidHostname, isValidUrl } from './helper'; import { CloudSamlSessionParams, CreateSamlSessionParams, LocalSamlSessionParams, + SAMLResponseValueParams, UserProfile, } from './types'; @@ -50,13 +52,23 @@ const cleanException = (url: string, ex: any) => { } }; -const getSessionCookie = (cookieString: string) => { - return parseCookie(cookieString); +const getCookieFromResponseHeaders = (response: AxiosResponse, errorMessage: string) => { + const setCookieHeader = response?.headers['set-cookie']; + if (!setCookieHeader) { + throw new Error(`Failed to parse 'set-cookie' header`); + } + + const cookie = parseCookie(setCookieHeader![0]); + if (!cookie) { + throw new Error(errorMessage); + } + + return cookie; }; const getCloudHostName = () => { const hostname = process.env.TEST_CLOUD_HOST_NAME; - if (!hostname) { + if (!hostname || !isValidHostname(hostname)) { throw new Error('SAML Authentication requires TEST_CLOUD_HOST_NAME env variable to be set'); } @@ -71,7 +83,7 @@ const getCloudUrl = (hostname: string, pathname: string) => { }); }; -const createCloudSession = async (params: CreateSamlSessionParams) => { +export const createCloudSession = async (params: CreateSamlSessionParams) => { const { hostname, email, password, log } = params; const cloudLoginUrl = getCloudUrl(hostname, '/api/v1/saas/auth/_login'); let sessionResponse: AxiosResponse | undefined; @@ -112,7 +124,7 @@ const createCloudSession = async (params: CreateSamlSessionParams) => { return token; }; -const createSAMLRequest = async (kbnUrl: string, kbnVersion: string, log: ToolingLog) => { +export const createSAMLRequest = async (kbnUrl: string, kbnVersion: string, log: ToolingLog) => { let samlResponse: AxiosResponse; const url = kbnUrl + '/internal/security/login'; try { @@ -138,10 +150,10 @@ const createSAMLRequest = async (kbnUrl: string, kbnVersion: string, log: Toolin throw ex; } - const cookie = getSessionCookie(samlResponse.headers['set-cookie']![0]); - if (!cookie) { - throw new Error(`Failed to parse cookie from SAML response headers`); - } + const cookie = getCookieFromResponseHeaders( + samlResponse, + 'Failed to parse cookie from SAML response headers' + ); const location = samlResponse?.data?.location as string; if (!location) { @@ -149,24 +161,46 @@ const createSAMLRequest = async (kbnUrl: string, kbnVersion: string, log: Toolin `Failed to get location from SAML response data: ${JSON.stringify(samlResponse.data)}` ); } + if (!isValidUrl(location)) { + throw new Error(`Location from Kibana SAML request is not a valid url: ${location}`); + } return { location, sid: cookie.value }; }; -const createSAMLResponse = async (url: string, ecSession: string) => { - const samlResponse = await axios.get(url, { - headers: { - Cookie: `ec_session=${ecSession}`, - }, - }); - const $ = cheerio.load(samlResponse.data); - const value = $('input').attr('value') ?? ''; - if (value.length === 0) { - throw new Error('Failed to parse SAML response value'); +export const createSAMLResponse = async (params: SAMLResponseValueParams) => { + const { location, ecSession, email, kbnHost, log } = params; + let samlResponse: AxiosResponse; + let value: string | undefined; + try { + samlResponse = await axios.get(location, { + headers: { + Cookie: `ec_session=${ecSession}`, + }, + maxRedirects: 0, + }); + const $ = cheerio.load(samlResponse.data); + value = $('input').attr('value'); + } catch (err) { + if (err.isAxiosError) { + log.error( + `Create SAML Response failed with status code ${err?.response?.status}: ${err?.response?.data}` + ); + } } + + if (!value) { + const hostname = new URL(location).hostname; + throw new Error( + `Failed to parse SAML response value.\nMost likely the '${email}' user has no access to the cloud deployment. +Login to ${hostname} with the user from '.ftr/role_users.json' file and try to load +${kbnHost} in the same window.` + ); + } + return value; }; -const finishSAMLHandshake = async ({ +export const finishSAMLHandshake = async ({ kbnHost, samlResponse, sid, @@ -199,12 +233,10 @@ const finishSAMLHandshake = async ({ throw ex; } - const cookie = getSessionCookie(authResponse!.headers['set-cookie']![0]); - if (!cookie) { - throw new Error(`Failed to get cookie from SAML callback response headers`); - } - - return cookie; + return getCookieFromResponseHeaders( + authResponse, + 'Failed to get cookie from SAML callback response headers' + ); }; const getSecurityProfile = async ({ @@ -238,9 +270,9 @@ const getSecurityProfile = async ({ export const createCloudSAMLSession = async (params: CloudSamlSessionParams) => { const { email, password, kbnHost, kbnVersion, log } = params; const hostname = getCloudHostName(); - const token = await createCloudSession({ hostname, email, password, log }); + const ecSession = await createCloudSession({ hostname, email, password, log }); const { location, sid } = await createSAMLRequest(kbnHost, kbnVersion, log); - const samlResponse = await createSAMLResponse(location, token); + const samlResponse = await createSAMLResponse({ location, ecSession, email, kbnHost, log }); const cookie = await finishSAMLHandshake({ kbnHost, samlResponse, sid, log }); const userProfile = await getSecurityProfile({ kbnHost, cookie, log }); return new Session(cookie, email, userProfile.full_name); diff --git a/packages/kbn-test/src/auth/sesson_manager.test.ts b/packages/kbn-test/src/auth/sesson_manager.test.ts index 4332a3630bfe9..f0679917654a0 100644 --- a/packages/kbn-test/src/auth/sesson_manager.test.ts +++ b/packages/kbn-test/src/auth/sesson_manager.test.ts @@ -24,6 +24,7 @@ const roleEditor = 'editor'; const createLocalSAMLSessionMock = jest.spyOn(samlAuth, 'createLocalSAMLSession'); const createCloudSAMLSessionMock = jest.spyOn(samlAuth, 'createCloudSAMLSession'); const readCloudUsersFromFileMock = jest.spyOn(helper, 'readCloudUsersFromFile'); +const isValidHostnameMock = jest.spyOn(helper, 'isValidHostname'); jest.mock('../kbn_client/kbn_client', () => { return { @@ -130,19 +131,6 @@ describe('SamlSessionManager', () => { }); describe('for cloud session', () => { - beforeEach(() => { - jest.resetAllMocks(); - jest - .requireMock('../kbn_client/kbn_client') - .KbnClient.mockImplementation(() => ({ version: { get } })); - get.mockImplementationOnce(() => Promise.resolve('8.12.0')); - - createCloudSAMLSessionMock.mockResolvedValue( - new Session(cloudCookieInstance, cloudEmail, cloudFullname) - ); - readCloudUsersFromFileMock.mockReturnValue(cloudUsers); - }); - const hostOptions = { protocol: 'https' as 'http' | 'https', hostname: 'cloud', @@ -165,6 +153,43 @@ describe('SamlSessionManager', () => { cloudUsers.push(['viewer', { email: 'viewer@elastic.co', password: 'p1234' }]); cloudUsers.push(['editor', { email: 'editor@elastic.co', password: 'p1234' }]); + describe('handles errors', () => { + beforeEach(() => { + jest.resetAllMocks(); + jest + .requireMock('../kbn_client/kbn_client') + .KbnClient.mockImplementation(() => ({ version: { get } })); + get.mockImplementationOnce(() => Promise.resolve('8.12.0')); + + readCloudUsersFromFileMock.mockReturnValue(cloudUsers); + }); + + test('should throw error if TEST_CLOUD_HOST_NAME is not set', async () => { + isValidHostnameMock.mockReturnValueOnce(false); + const samlSessionManager = new SamlSessionManager({ + hostOptions, + log, + isCloud, + }); + await expect(samlSessionManager.getSessionCookieForRole(roleViewer)).rejects.toThrow( + 'SAML Authentication requires TEST_CLOUD_HOST_NAME env variable to be set' + ); + }); + }); + + beforeEach(() => { + jest.resetAllMocks(); + jest + .requireMock('../kbn_client/kbn_client') + .KbnClient.mockImplementation(() => ({ version: { get } })); + get.mockImplementationOnce(() => Promise.resolve('8.12.0')); + + createCloudSAMLSessionMock.mockResolvedValue( + new Session(cloudCookieInstance, cloudEmail, cloudFullname) + ); + readCloudUsersFromFileMock.mockReturnValue(cloudUsers); + }); + test('should create an instance of SamlSessionManager', () => { const samlSessionManager = new SamlSessionManager({ hostOptions, diff --git a/packages/kbn-test/src/auth/types.ts b/packages/kbn-test/src/auth/types.ts index 17b5183ab9967..62ee5ac428934 100644 --- a/packages/kbn-test/src/auth/types.ts +++ b/packages/kbn-test/src/auth/types.ts @@ -32,6 +32,14 @@ export interface CreateSamlSessionParams { log: ToolingLog; } +export interface SAMLResponseValueParams { + location: string; + ecSession: string; + email: string; + kbnHost: string; + log: ToolingLog; +} + export interface User { readonly email: string; readonly password: string; diff --git a/packages/presentation/presentation_containers/index.ts b/packages/presentation/presentation_containers/index.ts index f6049b284eae2..89b327801d289 100644 --- a/packages/presentation/presentation_containers/index.ts +++ b/packages/presentation/presentation_containers/index.ts @@ -8,10 +8,15 @@ export { apiCanAddNewPanel, type CanAddNewPanel } from './interfaces/can_add_new_panel'; export { - apiPublishesLastSavedState, - getLastSavedStateSubjectForChild, - type PublishesLastSavedState, -} from './interfaces/last_saved_state'; + apiHasRuntimeChildState, + apiHasSerializedChildState, + type HasRuntimeChildState, + type HasSerializedChildState, +} from './interfaces/child_state'; +export { + apiHasSaveNotification, + type HasSaveNotification, +} from './interfaces/has_save_notification'; export { apiCanDuplicatePanels, apiCanExpandPanels, @@ -25,13 +30,14 @@ export { type PanelPackage, type PresentationContainer, } from './interfaces/presentation_container'; -export { - canTrackContentfulRender, - type TrackContentfulRender, -} from './interfaces/track_contentful_render'; export { apiHasSerializableState, type HasSerializableState, + type HasSnapshottableState, type SerializedPanelState, } from './interfaces/serialized_state'; export { tracksOverlays, type TracksOverlays } from './interfaces/tracks_overlays'; +export { + canTrackContentfulRender, + type TrackContentfulRender, +} from './interfaces/track_contentful_render'; diff --git a/packages/presentation/presentation_containers/interfaces/child_state.ts b/packages/presentation/presentation_containers/interfaces/child_state.ts new file mode 100644 index 0000000000000..c197974c67add --- /dev/null +++ b/packages/presentation/presentation_containers/interfaces/child_state.ts @@ -0,0 +1,29 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { SerializedPanelState } from './serialized_state'; + +export interface HasSerializedChildState { + getSerializedStateForChild: (childId: string) => SerializedPanelState; +} + +export interface HasRuntimeChildState { + getRuntimeStateForChild: (childId: string) => Partial | undefined; +} + +export const apiHasSerializedChildState = ( + api: unknown +): api is HasSerializedChildState => { + return Boolean(api && (api as HasSerializedChildState).getSerializedStateForChild); +}; + +export const apiHasRuntimeChildState = ( + api: unknown +): api is HasRuntimeChildState => { + return Boolean(api && (api as HasRuntimeChildState).getRuntimeStateForChild); +}; diff --git a/packages/presentation/presentation_containers/interfaces/has_save_notification.ts b/packages/presentation/presentation_containers/interfaces/has_save_notification.ts new file mode 100644 index 0000000000000..0607b83a12955 --- /dev/null +++ b/packages/presentation/presentation_containers/interfaces/has_save_notification.ts @@ -0,0 +1,17 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Subject } from 'rxjs'; + +export interface HasSaveNotification { + saveNotification$: Subject; // a notification that state has been saved +} + +export const apiHasSaveNotification = (api: unknown): api is HasSaveNotification => { + return Boolean(api && (api as HasSaveNotification).saveNotification$); +}; diff --git a/packages/presentation/presentation_containers/interfaces/last_saved_state.ts b/packages/presentation/presentation_containers/interfaces/last_saved_state.ts deleted file mode 100644 index b4e4664920f11..0000000000000 --- a/packages/presentation/presentation_containers/interfaces/last_saved_state.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { PublishingSubject } from '@kbn/presentation-publishing'; -import { BehaviorSubject, Subject } from 'rxjs'; -import { filter, map } from 'rxjs'; -import { SerializedPanelState } from './serialized_state'; - -export interface PublishesLastSavedState { - lastSavedState: Subject; // a notification that the last saved state has changed - getLastSavedStateForChild: ( - childId: string - ) => SerializedPanelState | undefined; -} - -export const apiPublishesLastSavedState = (api: unknown): api is PublishesLastSavedState => { - return Boolean( - api && - (api as PublishesLastSavedState).lastSavedState && - (api as PublishesLastSavedState).getLastSavedStateForChild - ); -}; - -export const getLastSavedStateSubjectForChild = < - SerializedState extends object = object, - RuntimeState extends object = object ->( - parentApi: unknown, - childId: string, - deserializer: (state: SerializedPanelState) => RuntimeState -): PublishingSubject | undefined => { - if (!parentApi) return; - const fetchLastSavedState = (): RuntimeState | undefined => { - if (!apiPublishesLastSavedState(parentApi)) return; - const rawLastSavedState = parentApi.getLastSavedStateForChild(childId); - if (rawLastSavedState === undefined) return; - return deserializer(rawLastSavedState); - }; - - const lastSavedStateForChild = new BehaviorSubject( - fetchLastSavedState() - ); - if (!apiPublishesLastSavedState(parentApi)) return; - parentApi.lastSavedState - .pipe( - map(() => fetchLastSavedState()), - filter((rawLastSavedState) => rawLastSavedState !== undefined) - ) - .subscribe(lastSavedStateForChild); - return lastSavedStateForChild; -}; diff --git a/packages/presentation/presentation_containers/interfaces/serialized_state.ts b/packages/presentation/presentation_containers/interfaces/serialized_state.ts index f56dd215bbcda..9678e5a1faeca 100644 --- a/packages/presentation/presentation_containers/interfaces/serialized_state.ts +++ b/packages/presentation/presentation_containers/interfaces/serialized_state.ts @@ -7,6 +7,7 @@ */ import { Reference } from '@kbn/content-management-utils'; +import { MaybePromise } from '@kbn/utility-types'; /** * A package containing the serialized Embeddable state, with references extracted. When saving Embeddables using any @@ -17,10 +18,22 @@ export interface SerializedPanelState { rawState: RawStateType; } -export interface HasSerializableState { - serializeState: () => SerializedPanelState; +export interface HasSerializableState { + /** + * Serializes all state into a format that can be saved into + * some external store. The opposite of `deserialize` in the {@link ReactEmbeddableFactory} + */ + serializeState: () => MaybePromise>; } export const apiHasSerializableState = (api: unknown | null): api is HasSerializableState => { return Boolean((api as HasSerializableState)?.serializeState); }; + +export interface HasSnapshottableState { + /** + * Serializes all runtime state exactly as it appears. This could be used + * to rehydrate a component's state without needing to deserialize it. + */ + snapshotRuntimeState: () => RuntimeState; +} diff --git a/packages/presentation/presentation_containers/tsconfig.json b/packages/presentation/presentation_containers/tsconfig.json index 8e25a7b80c6e2..15fe397861700 100644 --- a/packages/presentation/presentation_containers/tsconfig.json +++ b/packages/presentation/presentation_containers/tsconfig.json @@ -10,5 +10,6 @@ "@kbn/presentation-publishing", "@kbn/core-mount-utils-browser", "@kbn/content-management-utils", + "@kbn/utility-types", ] } diff --git a/packages/presentation/presentation_publishing/index.ts b/packages/presentation/presentation_publishing/index.ts index c2669c19c3254..7a940bc46806f 100644 --- a/packages/presentation/presentation_publishing/index.ts +++ b/packages/presentation/presentation_publishing/index.ts @@ -29,11 +29,11 @@ export { useInheritedViewMode, type CanAccessViewMode, } from './interfaces/can_access_view_mode'; +export { fetch$, type FetchContext } from './interfaces/fetch/fetch'; export { initializeTimeRange, type SerializedTimeRange, } from './interfaces/fetch/initialize_time_range'; -export { fetch$, type FetchContext } from './interfaces/fetch/fetch'; export { apiPublishesPartialUnifiedSearch, apiPublishesTimeRange, @@ -48,11 +48,21 @@ export { type HasAppContext, type EmbeddableAppContext, } from './interfaces/has_app_context'; -export { apiHasDisableTriggers, type HasDisableTriggers } from './interfaces/has_disable_triggers'; +export { + apiHasDisableTriggers, + areTriggersDisabled, + type HasDisableTriggers, +} from './interfaces/has_disable_triggers'; export { hasEditCapabilities, type HasEditCapabilities } from './interfaces/has_edit_capabilities'; +export { + apiHasExecutionContext, + type HasExecutionContext, +} from './interfaces/has_execution_context'; export { apiHasLegacyLibraryTransforms, apiHasLibraryTransforms, + apiHasInPlaceLibraryTransforms, + type HasInPlaceLibraryTransforms, type HasLegacyLibraryTransforms, type HasLibraryTransforms, } from './interfaces/has_library_transforms'; @@ -68,10 +78,6 @@ export { type HasTypeDisplayName, } from './interfaces/has_type'; export { apiHasUniqueId, type HasUniqueId } from './interfaces/has_uuid'; -export { - apiHasExecutionContext, - type HasExecutionContext, -} from './interfaces/has_execution_context'; export { apiPublishesBlockingError, type PublishesBlockingError, diff --git a/packages/presentation/presentation_publishing/interfaces/has_disable_triggers.ts b/packages/presentation/presentation_publishing/interfaces/has_disable_triggers.ts index 00066be3967fa..a4233faf2aab8 100644 --- a/packages/presentation/presentation_publishing/interfaces/has_disable_triggers.ts +++ b/packages/presentation/presentation_publishing/interfaces/has_disable_triggers.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import { apiHasParentApi } from './has_parent_api'; + export interface HasDisableTriggers { disableTriggers: boolean; } @@ -13,3 +15,14 @@ export interface HasDisableTriggers { export const apiHasDisableTriggers = (api: unknown | null): api is HasDisableTriggers => { return Boolean(api && typeof (api as HasDisableTriggers).disableTriggers === 'boolean'); }; + +export function areTriggersDisabled(api?: unknown) { + function getDisabledTriggers(thisApi?: unknown) { + return apiHasDisableTriggers(thisApi) ? thisApi.disableTriggers : false; + } + + return ( + getDisabledTriggers(api) || + getDisabledTriggers(apiHasParentApi(api) ? api.parentApi : undefined) + ); +} diff --git a/packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts b/packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts index b3715c1b35ae2..17d48eca51be7 100644 --- a/packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts +++ b/packages/presentation/presentation_publishing/interfaces/has_library_transforms.ts @@ -6,47 +6,93 @@ * Side Public License, v 1. */ -export interface HasLibraryTransforms { - // - // Add to library methods - // +import { PublishingSubject } from '../publishing_subject'; + +interface DuplicateTitleCheck { + checkForDuplicateTitle: ( + newTitle: string, + isTitleDuplicateConfirmed: boolean, + onTitleDuplicate: () => void + ) => Promise; +} +interface LibraryTransformGuards { /** * * @returns {Promise} * True when embeddable is by-value and can be converted to by-reference */ canLinkToLibrary: () => Promise; + /** + * + * @returns {Promise} + * True when embeddable is by-reference and can be converted to by-value + */ + canUnlinkFromLibrary: () => Promise; +} + +/** + * APIs that inherit this interface can be linked to and unlinked from the library in place without + * re-initialization. + */ +export interface HasInPlaceLibraryTransforms + extends Partial, + DuplicateTitleCheck { + /** + * The id of the library item that this embeddable is linked to. + */ + libraryId$: PublishingSubject; + /** * Save embeddable to library * * @returns {Promise} id of persisted library item */ saveToLibrary: (title: string) => Promise; + /** - * - * @returns {StateT} - * by-reference embeddable state replacing by-value embeddable state + * Un-links this embeddable from the library. This method is optional, and only needed if the Embeddable + * is not meant to be re-initialized as part of the unlink operation. If the embeddable needs to be re-initialized + * after unlinking, the getByValueState method should be used instead. */ - getByReferenceState: (libraryId: string) => StateT; - checkForDuplicateTitle: ( - newTitle: string, - isTitleDuplicateConfirmed: boolean, - onTitleDuplicate: () => void - ) => Promise; + unlinkFromLibrary: () => void; +} + +export const apiHasInPlaceLibraryTransforms = ( + unknownApi: null | unknown +): unknownApi is HasInPlaceLibraryTransforms => { + return Boolean( + unknownApi && + Boolean((unknownApi as HasInPlaceLibraryTransforms)?.libraryId$) && + typeof (unknownApi as HasInPlaceLibraryTransforms).saveToLibrary === 'function' && + typeof (unknownApi as HasInPlaceLibraryTransforms).unlinkFromLibrary === 'function' + ); +}; - // - // Unlink from library methods - // +/** + * APIs that inherit this interface can be linked to and unlinked from the library. After the save or unlink + * operation, the embeddable will be reinitialized. + */ +export interface HasLibraryTransforms + extends LibraryTransformGuards, + DuplicateTitleCheck { /** + * Save embeddable to library * - * @returns {Promise} - * True when embeddable is by-reference and can be converted to by-value + * @returns {Promise} id of persisted library item */ - canUnlinkFromLibrary: () => Promise; + saveToLibrary: (title: string) => Promise; + /** + * + * @returns {StateT} + * by-reference embeddable state replacing by-value embeddable state. After + * the save operation, the embeddable will be reinitialized with the results of this method. + */ + getByReferenceState: (libraryId: string) => StateT; /** * * @returns {StateT} - * by-value embeddable state replacing by-reference embeddable state + * by-value embeddable state replacing by-reference embeddable state. After + * the unlink operation, the embeddable will be reinitialized with the results of this method. */ getByValueState: () => StateT; } diff --git a/packages/shared-ux/code_editor/impl/__snapshots__/code_editor.test.tsx.snap b/packages/shared-ux/code_editor/impl/__snapshots__/code_editor.test.tsx.snap index df22190992fb3..b4b4fea7b22fd 100644 --- a/packages/shared-ux/code_editor/impl/__snapshots__/code_editor.test.tsx.snap +++ b/packages/shared-ux/code_editor/impl/__snapshots__/code_editor.test.tsx.snap @@ -170,11 +170,13 @@ exports[` is rendered 1`] = ` isVisible={false} onBlur={[Function]} onFocus={[Function]} + onKeyDown={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} > @@ -250,6 +252,7 @@ exports[` is rendered 1`] = ` /> diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts index 015c517e9a6b8..7697bc0ec1858 100644 --- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts +++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts @@ -112,7 +112,7 @@ describe('checking migration metadata changes on all registered SO types', () => "ingest-agent-policies": "803dc27e106440c41e8f3c3d8ee8bbb0821bcde2", "ingest-download-sources": "279a68147e62e4d8858c09ad1cf03bd5551ce58d", "ingest-outputs": "daafff49255ab700e07491376fe89f04fc998b91", - "ingest-package-policies": "e6da7d0ee2996241ade23b3a7811fe5d3e449cb2", + "ingest-package-policies": "44c682a6bf23993c665f0a60a427f3c120a0a10d", "ingest_manager_settings": "91445219e7115ff0c45d1dabd5d614a80b421797", "inventory-view": "b8683c8e352a286b4aca1ab21003115a4800af83", "kql-telemetry": "93c1d16c1a0dfca9c8842062cf5ef8f62ae401ad", diff --git a/src/core/server/integration_tests/http/request.test.ts b/src/core/server/integration_tests/http/request.test.ts index 9e90c1364a902..e68bc9013ddfa 100644 --- a/src/core/server/integration_tests/http/request.test.ts +++ b/src/core/server/integration_tests/http/request.test.ts @@ -427,6 +427,7 @@ describe('KibanaRequest', () => { expect(resp3.body).toEqual({ requestId: 'gamma' }); }); }); + describe('request uuid', () => { it('generates a UUID', async () => { const { server: innerServer, createRouter } = await server.setup(setupDeps); @@ -442,4 +443,23 @@ describe('KibanaRequest', () => { expect(resp1.body.requestUuid).toBe('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'); }); }); + + describe('httpVersion and protocol', () => { + it('returns the correct values', async () => { + const { server: innerServer, createRouter } = await server.setup(setupDeps); + const router = createRouter('/'); + router.get({ path: '/', validate: false }, async (context, req, res) => { + return res.ok({ body: { httpVersion: req.httpVersion, protocol: req.protocol } }); + }); + await server.start(); + + const st = supertest(innerServer.listener); + + const resp1 = await st.get('/').expect(200); + expect(resp1.body).toEqual({ + httpVersion: '1.1', + protocol: 'http1', + }); + }); + }); }); diff --git a/src/core/server/integration_tests/http/set_tls_config.test.ts b/src/core/server/integration_tests/http/set_tls_config.test.ts index 6c198d820670f..b809a32075733 100644 --- a/src/core/server/integration_tests/http/set_tls_config.test.ts +++ b/src/core/server/integration_tests/http/set_tls_config.test.ts @@ -8,12 +8,7 @@ import supertest from 'supertest'; import { KBN_CERT_PATH, KBN_KEY_PATH, ES_KEY_PATH, ES_CERT_PATH } from '@kbn/dev-utils'; -import { - createServer, - getListenerOptions, - getServerOptions, - setTlsConfig, -} from '@kbn/server-http-tools'; +import { createServer, getServerOptions, setTlsConfig } from '@kbn/server-http-tools'; import { HttpConfig, config as httpConfig, @@ -47,8 +42,7 @@ describe('setTlsConfig', () => { const firstConfig = new HttpConfig(rawHttpConfig, CSP_CONFIG, EXTERNAL_URL_CONFIG); const serverOptions = getServerOptions(firstConfig); - const listenerOptions = getListenerOptions(firstConfig); - const server = createServer(serverOptions, listenerOptions); + const server = createServer(serverOptions); server.route({ method: 'GET', diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts index 63abe75209d59..65fc3830ae069 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts @@ -176,13 +176,21 @@ describe('migration v2', () => { const startWithDelay = async (instances: Root[], delayInSec: number) => { const promises: Array> = []; + const errors: string[] = []; for (let i = 0; i < instances.length; i++) { - promises.push(instances[i].start()); + promises.push( + instances[i].start().catch((err) => { + errors.push(err.message); + }) + ); if (i < instances.length - 1) { await delay(delayInSec * 1000); } } - return Promise.all(promises); + await Promise.all(promises); + if (errors.length) { + throw new Error(`Failed to start all instances: ${errors.join(',')}`); + } }; it('migrates saved objects normally when multiple Kibana instances are started at the same time', async () => { diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index f73d44b46a982..6b79cae3fac7b 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -86,7 +86,7 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.5.1': ['Elastic License 2.0'], - '@elastic/eui@94.3.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@94.5.0-backport.1': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/src/plugins/console/public/application/containers/editor/monaco/hooks/index.ts b/src/plugins/console/public/application/containers/editor/monaco/hooks/index.ts index e0a56ebf655d0..93bc00bb4e8e7 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/hooks/index.ts +++ b/src/plugins/console/public/application/containers/editor/monaco/hooks/index.ts @@ -10,3 +10,4 @@ export { useResizeCheckerUtils } from './use_resize_checker_utils'; export { useSetInitialValue } from './use_set_initial_value'; export { useSetupAutocompletePolling } from './use_setup_autocomplete_polling'; export { useSetupAutosave } from './use_setup_autosave'; +export { useKeyboardCommandsUtils } from './use_register_keyboard_commands'; diff --git a/src/plugins/console/public/application/containers/editor/monaco/hooks/use_register_keyboard_commands.ts b/src/plugins/console/public/application/containers/editor/monaco/hooks/use_register_keyboard_commands.ts new file mode 100644 index 0000000000000..9fff68bf13b2b --- /dev/null +++ b/src/plugins/console/public/application/containers/editor/monaco/hooks/use_register_keyboard_commands.ts @@ -0,0 +1,158 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { useRef } from 'react'; +import { i18n } from '@kbn/i18n'; +import { monaco } from '@kbn/monaco'; + +interface RegisterKeyboardCommandsParams { + /** The current Monaco editor instance. */ + editor: monaco.editor.IStandaloneCodeEditor; + /** Function for sending the selected request(s). */ + sendRequest: () => void; + /** Function for indenting the selected request(s). */ + autoIndent: () => void; + /** Function that returns the documentation link for the selected request. */ + getDocumentationLink: () => Promise | undefined; + /** Function for moving the cursor to the previous request edge. */ + moveToPreviousRequestEdge: () => void; + /** Function for moving the cursor to the next request edge. */ + moveToNextRequestEdge: () => void; +} + +const SEND_REQUEST_ACTION_ID = 'sendRequest'; +const AUTO_INDENT_ACTION_ID = 'autoIndent'; +const OPEN_DOCS_ACTION_ID = 'openDocs'; +const MOVE_UP_ACTION_ID = 'moveUp'; +const MOVE_DOWN_ACTION_ID = 'moveDown'; +const MOVE_TO_LINE_ACTION_ID = 'moveToLine'; + +/** + * Hook that returns a function for registering keyboard commands in the editor. + * + * @param params The {@link RegisterKeyboardCommandsParams} to use. + */ +export const useKeyboardCommandsUtils = () => { + const sendRequestAction = useRef(null); + const autoIndentAction = useRef(null); + const openDocsAction = useRef(null); + const moveToPreviousAction = useRef(null); + const moveToNextAction = useRef(null); + const moveToLineAction = useRef(null); + + const disposeAllActions = () => { + if (sendRequestAction.current) { + sendRequestAction.current.dispose(); + } + if (autoIndentAction.current) { + autoIndentAction.current.dispose(); + } + if (openDocsAction.current) { + openDocsAction.current.dispose(); + } + if (moveToPreviousAction.current) { + moveToPreviousAction.current.dispose(); + } + if (moveToNextAction.current) { + moveToNextAction.current.dispose(); + } + if (moveToLineAction.current) { + moveToLineAction.current.dispose(); + } + }; + + const registerKeyboardCommands = (params: RegisterKeyboardCommandsParams) => { + const { + editor, + sendRequest, + autoIndent, + getDocumentationLink, + moveToPreviousRequestEdge, + moveToNextRequestEdge, + } = params; + + const openDocs = async () => { + const documentation = await getDocumentationLink(); + if (!documentation) { + return; + } + window.open(documentation, '_blank'); + }; + + disposeAllActions(); + + sendRequestAction.current = editor.addAction({ + id: SEND_REQUEST_ACTION_ID, + label: i18n.translate('console.keyboardCommandActionLabel.sendRequest', { + defaultMessage: 'Send request', + }), + // eslint-disable-next-line no-bitwise + keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter], + run: sendRequest, + }); + + autoIndentAction.current = editor.addAction({ + id: AUTO_INDENT_ACTION_ID, + label: i18n.translate('console.keyboardCommandActionLabel.autoIndent', { + defaultMessage: 'Apply indentations', + }), + // eslint-disable-next-line no-bitwise + keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyI], + run: autoIndent, + }); + + openDocsAction.current = editor.addAction({ + id: OPEN_DOCS_ACTION_ID, + label: i18n.translate('console.keyboardCommandActionLabel.openDocs', { + defaultMessage: 'Open documentation', + }), + // eslint-disable-next-line no-bitwise + keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Slash], + run: openDocs, + }); + + moveToPreviousAction.current = editor.addAction({ + id: MOVE_UP_ACTION_ID, + label: i18n.translate('console.keyboardCommandActionLabel.moveToPreviousRequestEdge', { + defaultMessage: 'Move to previous request start or end', + }), + // eslint-disable-next-line no-bitwise + keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.UpArrow], + run: moveToPreviousRequestEdge, + }); + + moveToNextAction.current = editor.addAction({ + id: MOVE_DOWN_ACTION_ID, + label: i18n.translate('console.keyboardCommandActionLabel.moveToNextRequestEdge', { + defaultMessage: 'Move to next request start or end', + }), + // eslint-disable-next-line no-bitwise + keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.DownArrow], + run: moveToNextRequestEdge, + }); + + moveToLineAction.current = editor.addAction({ + id: MOVE_TO_LINE_ACTION_ID, + label: i18n.translate('console.keyboardCommandActionLabel.moveToLine', { + defaultMessage: 'Move cursor to a line', + }), + // eslint-disable-next-line no-bitwise + keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyL], + run: () => { + const line = parseInt(prompt('Enter line number') ?? '', 10); + if (!isNaN(line)) { + editor.setPosition({ lineNumber: line, column: 1 }); + } + }, + }); + }; + + const unregisterKeyboardCommands = () => disposeAllActions(); + + return { registerKeyboardCommands, unregisterKeyboardCommands }; +}; diff --git a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx index 09da187694989..cd4ba9297f108 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx +++ b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx @@ -23,6 +23,7 @@ import { useSetupAutocompletePolling, useSetupAutosave, useResizeCheckerUtils, + useKeyboardCommandsUtils, } from './hooks'; import { MonacoEditorActionsProvider } from './monaco_editor_actions_provider'; import { getSuggestionProvider } from './monaco_editor_suggestion_provider'; @@ -48,23 +49,12 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => { const divRef = useRef(null); const { setupResizeChecker, destroyResizeChecker } = useResizeCheckerUtils(); + const { registerKeyboardCommands, unregisterKeyboardCommands } = useKeyboardCommandsUtils(); const dispatch = useRequestActionContext(); const actionsProvider = useRef(null); const [editorActionsCss, setEditorActionsCss] = useState({}); - const editorDidMountCallback = useCallback( - (editor: monaco.editor.IStandaloneCodeEditor) => { - actionsProvider.current = new MonacoEditorActionsProvider(editor, setEditorActionsCss); - setupResizeChecker(divRef.current!, editor); - }, - [setupResizeChecker] - ); - - const editorWillUnmountCallback = useCallback(() => { - destroyResizeChecker(); - }, [destroyResizeChecker]); - const getCurlCallback = useCallback(async (): Promise => { const curl = await actionsProvider.current?.getCurl(esHostService.getHost()); return curl ?? ''; @@ -82,6 +72,28 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => { await actionsProvider.current?.sendRequests(toasts, dispatch, trackUiMetric, http); }, [dispatch, http, toasts, trackUiMetric]); + const editorDidMountCallback = useCallback( + (editor: monaco.editor.IStandaloneCodeEditor) => { + actionsProvider.current = new MonacoEditorActionsProvider(editor, setEditorActionsCss); + setupResizeChecker(divRef.current!, editor); + registerKeyboardCommands({ + editor, + sendRequest: sendRequestsCallback, + autoIndent: async () => await actionsProvider.current?.autoIndent(), + getDocumentationLink: getDocumenationLink, + moveToPreviousRequestEdge: async () => + await actionsProvider.current?.moveToPreviousRequestEdge(), + moveToNextRequestEdge: async () => await actionsProvider.current?.moveToNextRequestEdge(), + }); + }, + [getDocumenationLink, registerKeyboardCommands, sendRequestsCallback, setupResizeChecker] + ); + + const editorWillUnmountCallback = useCallback(() => { + destroyResizeChecker(); + unregisterKeyboardCommands(); + }, [destroyResizeChecker, unregisterKeyboardCommands]); + const suggestionProvider = useMemo(() => { return getSuggestionProvider(actionsProvider); }, []); diff --git a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.test.ts b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.test.ts index fb21900ddc292..d2dd7a56a8ce3 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.test.ts +++ b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.test.ts @@ -66,8 +66,10 @@ describe('Editor actions provider', () => { onDidChangeCursorSelection: jest.fn(), onDidContentSizeChange: jest.fn(), getSelection: jest.fn(), + getPosition: jest.fn(), getTopForLineNumber: jest.fn(), getScrollTop: jest.fn(), + setPosition: jest.fn(), } as unknown as jest.Mocked; editor.getModel.mockReturnValue({ @@ -210,4 +212,193 @@ describe('Editor actions provider', () => { expect((endpoints as string[]).sort()).toEqual(['_cat', '_search']); }); }); + + describe('move to next/previous request edge', () => { + beforeEach(() => { + /* The editor has the following text: + 1: + 2: POST _search + 3: { + 4: "test": "test" + 5: } + 6: GET _analyze + 7: + */ + mockGetParsedRequests.mockReturnValue([ + { + method: 'POST', + url: '_search', + startOffset: 1, + endOffset: 36, + data: [ + { + test: 'test', + }, + ], + }, + { + method: 'GET', + url: '_analyze', + startOffset: 37, + endOffset: 49, + }, + ]); + + editor.getModel.mockReturnValue({ + getPositionAt: (offset: number) => { + // mock for start offsets of the mocked requests + if (offset === 1) { + return { lineNumber: 2, column: 1 }; + } + if (offset === 37) { + return { lineNumber: 6, column: 1 }; + } + // mock for end offsets of the mocked requests + if (offset === 36) { + return { lineNumber: 5, column: 2 }; + } + if (offset === 49) { + return { lineNumber: 6, column: 13 }; + } + }, + getLineContent: (lineNumber: number) => { + if (lineNumber === 1) { + return ''; + } + if (lineNumber === 2) { + return 'POST _search'; + } + if (lineNumber === 3) { + return '{'; + } + if (lineNumber === 4) { + return ' "test": "test"'; + } + if (lineNumber === 5) { + return '}'; + } + if (lineNumber === 6) { + return 'GET _analyze'; + } + if (lineNumber === 7) { + return ''; + } + }, + getLineCount: () => 7, + } as unknown as monaco.editor.ITextModel); + }); + describe('moveToPreviousRequestEdge', () => { + it('correctly sets position when cursor is at first line of a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 6, + column: 4, + } as monaco.Position); + + await editorActionsProvider.moveToPreviousRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 5, column: 1 }); + }); + + it('correctly sets position when cursor is at last line of a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 5, + column: 1, + } as monaco.Position); + + await editorActionsProvider.moveToPreviousRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 2, column: 1 }); + }); + + it('correctly sets position when cursor is inside a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 4, + column: 1, + } as monaco.Position); + + await editorActionsProvider.moveToPreviousRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 2, column: 1 }); + }); + + it('correctly sets position when cursor is after a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 7, + column: 1, + } as monaco.Position); + + await editorActionsProvider.moveToPreviousRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 6, column: 1 }); + }); + + it('correctly sets position to first line of editor when there are no requests before cursor', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 2, + column: 3, + } as monaco.Position); + + await editorActionsProvider.moveToPreviousRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 1, column: 1 }); + }); + }); + + describe('moveToNextRequestEdge', () => { + it('correctly sets position when cursor is at first line of a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 2, + column: 8, + } as monaco.Position); + + await editorActionsProvider.moveToNextRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 5, column: 1 }); + }); + + it('correctly sets position when cursor is at last line of a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 5, + column: 1, + } as monaco.Position); + + await editorActionsProvider.moveToNextRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 6, column: 1 }); + }); + + it('correctly sets position when cursor is inside a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 3, + column: 1, + } as monaco.Position); + + await editorActionsProvider.moveToNextRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 5, column: 1 }); + }); + + it('correctly sets position when cursor is before a request', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 1, + column: 1, + } as monaco.Position); + + await editorActionsProvider.moveToNextRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 2, column: 1 }); + }); + + it('correctly sets position to last line of editor when there are no requests after cursor', async () => { + editor.getPosition.mockReturnValue({ + lineNumber: 6, + column: 3, + } as monaco.Position); + + await editorActionsProvider.moveToNextRequestEdge(); + expect(editor.setPosition).toHaveBeenCalledTimes(1); + expect(editor.setPosition).toHaveBeenCalledWith({ lineNumber: 7, column: 1 }); + }); + }); + }); }); diff --git a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts index de9c2289c8a29..4a13b3ef782ca 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts +++ b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts @@ -399,4 +399,66 @@ export class MonacoEditorActionsProvider { }, ]); } + + /** + * This function moves the cursor to the previous request edge (start/end line). + * If the cursor is inside a request, it is moved to the start line of this request. + * If there are no requests before the cursor, it is moved at the first line in the editor. + */ + public async moveToPreviousRequestEdge() { + const currentPosition = this.editor.getPosition(); + const model = this.editor.getModel(); + if (!currentPosition || !model) { + return; + } + const { lineNumber: currentLineNumber } = currentPosition; + // Get all requests before the current line + const requestsBefore = await this.getRequestsBetweenLines(model, 1, currentLineNumber - 1); + if (requestsBefore.length === 0) { + // If no requests before current line, set position to first line + this.editor.setPosition({ lineNumber: 1, column: 1 }); + return; + } + const lastRequestBefore = requestsBefore[requestsBefore.length - 1]; + if (lastRequestBefore.endLineNumber < currentLineNumber) { + this.editor.setPosition({ lineNumber: lastRequestBefore.endLineNumber, column: 1 }); + } else { + // If the end line of the request is after the current line, then the cursor is inside the request + // The previous request edge is the start line of the request + this.editor.setPosition({ lineNumber: lastRequestBefore.startLineNumber, column: 1 }); + } + } + + /** + * This function moves the cursor to the next request edge. + * If the cursor is inside a request, it is moved to the end line of this request. + * If there are no requests after the cursor, it is moved at the last line in the editor. + */ + public async moveToNextRequestEdge() { + const currentPosition = this.editor.getPosition(); + const model = this.editor.getModel(); + if (!currentPosition || !model) { + return; + } + const { lineNumber: currentLineNumber } = currentPosition; + // Get all requests before the current line + const requestsAfter = await this.getRequestsBetweenLines( + model, + currentLineNumber + 1, + model.getLineCount() + ); + if (requestsAfter.length === 0) { + // If no requests after current line, set position to last line + this.editor.setPosition({ lineNumber: model.getLineCount(), column: 1 }); + return; + } + const firstRequestAfter = requestsAfter[0]; + if (firstRequestAfter.startLineNumber > currentLineNumber) { + this.editor.setPosition({ lineNumber: firstRequestAfter.startLineNumber, column: 1 }); + } else { + // If the start line of the request is before the current line, then the cursor is inside the request + // The next request edge is the end line of the request + this.editor.setPosition({ lineNumber: firstRequestAfter.endLineNumber, column: 1 }); + } + } } diff --git a/src/plugins/dashboard/public/dashboard_actions/add_to_library_action.tsx b/src/plugins/dashboard/public/dashboard_actions/add_to_library_action.tsx index 90a0667a87c5a..8f8178aa1e11c 100644 --- a/src/plugins/dashboard/public/dashboard_actions/add_to_library_action.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/add_to_library_action.tsx @@ -23,6 +23,8 @@ import { HasParentApi, apiHasUniqueId, apiHasParentApi, + HasInPlaceLibraryTransforms, + apiHasInPlaceLibraryTransforms, } from '@kbn/presentation-publishing'; import { OnSaveProps, @@ -40,14 +42,14 @@ export const ACTION_ADD_TO_LIBRARY = 'saveToLibrary'; export type AddPanelToLibraryActionApi = CanAccessViewMode & HasType & HasUniqueId & - HasLibraryTransforms & + (HasLibraryTransforms | HasInPlaceLibraryTransforms) & HasParentApi> & Partial; const isApiCompatible = (api: unknown | null): api is AddPanelToLibraryActionApi => Boolean( apiCanAccessViewMode(api) && - apiHasLibraryTransforms(api) && + (apiHasLibraryTransforms(api) || apiHasInPlaceLibraryTransforms(api)) && apiHasType(api) && apiHasUniqueId(api) && apiHasParentApi(api) && @@ -79,7 +81,7 @@ export class AddToLibraryAction implements Action { public async isCompatible({ embeddable }: EmbeddableApiContext) { if (!isApiCompatible(embeddable)) return false; - return getInheritedViewMode(embeddable) === 'edit' && (await embeddable.canLinkToLibrary()); + return getInheritedViewMode(embeddable) === 'edit' && (await this.canLinkToLibrary(embeddable)); } public async execute({ embeddable }: EmbeddableApiContext) { @@ -87,7 +89,7 @@ export class AddToLibraryAction implements Action { const title = getPanelTitle(embeddable); try { - const byRefState = await new Promise((resolve, reject) => { + const byRefState = await new Promise((resolve, reject) => { const onSave = async (props: OnSaveProps): Promise => { await embeddable.checkForDuplicateTitle( props.newTitle, @@ -96,7 +98,10 @@ export class AddToLibraryAction implements Action { ); try { const libraryId = await embeddable.saveToLibrary(props.newTitle); - resolve({ ...embeddable.getByReferenceState(libraryId), title: props.newTitle }); + if (apiHasLibraryTransforms(embeddable)) { + resolve({ ...embeddable.getByReferenceState(libraryId), title: props.newTitle }); + } + resolve(undefined); return { id: libraryId }; } catch (error) { reject(error); @@ -118,10 +123,16 @@ export class AddToLibraryAction implements Action { /> ); }); - await embeddable.parentApi.replacePanel(embeddable.uuid, { - panelType: embeddable.type, - initialState: byRefState, - }); + /** + * If byRefState is defined, this embeddable type must be re-initialized with the + * newly provided state. + */ + if (byRefState) { + await embeddable.parentApi.replacePanel(embeddable.uuid, { + panelType: embeddable.type, + initialState: byRefState, + }); + } this.toastsService.addSuccess({ title: dashboardAddToLibraryActionStrings.getSuccessMessage(title ? `'${title}'` : ''), 'data-test-subj': 'addPanelToLibrarySuccess', @@ -133,4 +144,14 @@ export class AddToLibraryAction implements Action { }); } } + + private async canLinkToLibrary(api: AddPanelToLibraryActionApi) { + if (apiHasLibraryTransforms(api)) { + return api.canLinkToLibrary?.(); + } else if (apiHasInPlaceLibraryTransforms(api)) { + const canLink = api.canLinkToLibrary ? await api.canLinkToLibrary() : true; + return api.libraryId$.value === undefined && canLink; + } + throw new IncompatibleActionError(); + } } diff --git a/src/plugins/dashboard/public/dashboard_actions/library_notification_action.tsx b/src/plugins/dashboard/public/dashboard_actions/library_notification_action.tsx index 86adbab9c2030..ca4b20ae71433 100644 --- a/src/plugins/dashboard/public/dashboard_actions/library_notification_action.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/library_notification_action.tsx @@ -9,14 +9,16 @@ import React from 'react'; import { + apiHasInPlaceLibraryTransforms, EmbeddableApiContext, getInheritedViewMode, getViewModeSubject, } from '@kbn/presentation-publishing'; import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; +import { BehaviorSubject, combineLatest } from 'rxjs'; import { LibraryNotificationPopover } from './library_notification_popover'; -import { dashboardLibraryNotificationStrings } from './_dashboard_actions_strings'; import { isApiCompatible, UnlinkFromLibraryAction } from './unlink_from_library_action'; +import { dashboardLibraryNotificationStrings } from './_dashboard_actions_strings'; export const ACTION_LIBRARY_NOTIFICATION = 'ACTION_LIBRARY_NOTIFICATION'; @@ -37,22 +39,27 @@ export class LibraryNotificationAction implements Action { return isApiCompatible(embeddable); } - public subscribeToCompatibilityChanges( + public subscribeToCompatibilityChanges = ( { embeddable }: EmbeddableApiContext, onChange: (isCompatible: boolean, action: LibraryNotificationAction) => void - ) { + ) => { if (!isApiCompatible(embeddable)) return; + const libraryIdSubject = apiHasInPlaceLibraryTransforms(embeddable) + ? embeddable.libraryId$ + : new BehaviorSubject(undefined); + const viewModeSubject = getViewModeSubject(embeddable); + if (!viewModeSubject) throw new IncompatibleActionError(); /** * TODO: Upgrade this action by subscribing to changes in the existance of a saved object id. Currently, * this is unnecessary because a link or unlink operation will cause the panel to unmount and remount. */ - return getViewModeSubject(embeddable)?.subscribe((viewMode) => { - embeddable.canUnlinkFromLibrary().then((canUnlink) => { + return combineLatest([libraryIdSubject, viewModeSubject]).subscribe(([libraryId, viewMode]) => { + this.unlinkAction.canUnlinkFromLibrary(embeddable).then((canUnlink) => { onChange(viewMode === 'edit' && canUnlink, this); }); }); - } + }; public getDisplayName({ embeddable }: EmbeddableApiContext) { if (!isApiCompatible(embeddable)) throw new IncompatibleActionError(); @@ -66,7 +73,10 @@ export class LibraryNotificationAction implements Action { public isCompatible = async ({ embeddable }: EmbeddableApiContext) => { if (!isApiCompatible(embeddable)) return false; - return getInheritedViewMode(embeddable) === 'edit' && embeddable.canUnlinkFromLibrary(); + return ( + getInheritedViewMode(embeddable) === 'edit' && + this.unlinkAction.canUnlinkFromLibrary(embeddable) + ); }; public execute = async () => {}; diff --git a/src/plugins/dashboard/public/dashboard_actions/library_notification_popover.tsx b/src/plugins/dashboard/public/dashboard_actions/library_notification_popover.tsx index bbb480d990f1d..6a11450d1b213 100644 --- a/src/plugins/dashboard/public/dashboard_actions/library_notification_popover.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/library_notification_popover.tsx @@ -70,7 +70,10 @@ export function LibraryNotificationPopover({ unlinkAction, api }: LibraryNotific data-test-subj={'libraryNotificationUnlinkButton'} size="s" fill - onClick={() => unlinkAction.execute({ embeddable: api })} + onClick={() => { + setIsPopoverOpen(false); + unlinkAction.execute({ embeddable: api }); + }} > {unlinkAction.getDisplayName({ embeddable: api })} diff --git a/src/plugins/dashboard/public/dashboard_actions/unlink_from_library_action.tsx b/src/plugins/dashboard/public/dashboard_actions/unlink_from_library_action.tsx index cccfa64028ad2..17612fa9c6ef7 100644 --- a/src/plugins/dashboard/public/dashboard_actions/unlink_from_library_action.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/unlink_from_library_action.tsx @@ -23,6 +23,8 @@ import { apiHasUniqueId, HasType, apiHasType, + HasInPlaceLibraryTransforms, + apiHasInPlaceLibraryTransforms, } from '@kbn/presentation-publishing'; import { PresentationContainer } from '@kbn/presentation-containers'; import { pluginServices } from '../services/plugin_services'; @@ -31,7 +33,7 @@ import { dashboardUnlinkFromLibraryActionStrings } from './_dashboard_actions_st export const ACTION_UNLINK_FROM_LIBRARY = 'unlinkFromLibrary'; export type UnlinkPanelFromLibraryActionApi = CanAccessViewMode & - HasLibraryTransforms & + (HasLibraryTransforms | HasInPlaceLibraryTransforms) & HasType & HasUniqueId & HasParentApi> & @@ -40,7 +42,7 @@ export type UnlinkPanelFromLibraryActionApi = CanAccessViewMode & export const isApiCompatible = (api: unknown | null): api is UnlinkPanelFromLibraryActionApi => Boolean( apiCanAccessViewMode(api) && - apiHasLibraryTransforms(api) && + (apiHasLibraryTransforms(api) || apiHasInPlaceLibraryTransforms(api)) && apiHasUniqueId(api) && apiHasType(api) && apiHasParentApi(api) && @@ -70,19 +72,40 @@ export class UnlinkFromLibraryAction implements Action { return 'folderExclamation'; } + public async canUnlinkFromLibrary(api: UnlinkPanelFromLibraryActionApi) { + if (apiHasLibraryTransforms(api)) { + return api.canUnlinkFromLibrary(); + } else if (apiHasInPlaceLibraryTransforms(api)) { + const canUnLink = api.canUnlinkFromLibrary ? await api.canUnlinkFromLibrary() : true; + return canUnLink && api.libraryId$.value !== undefined; + } + throw new IncompatibleActionError(); + } + public async isCompatible({ embeddable }: EmbeddableApiContext) { - if (!isApiCompatible(embeddable)) return false; - return getInheritedViewMode(embeddable) === 'edit' && (await embeddable.canUnlinkFromLibrary()); + if (!isApiCompatible(embeddable)) { + // either a an `unlinkFromLibrary` method or a `getByValueState` method is required + return false; + } + return ( + getInheritedViewMode(embeddable) === 'edit' && (await this.canUnlinkFromLibrary(embeddable)) + ); } public async execute({ embeddable }: EmbeddableApiContext) { if (!isApiCompatible(embeddable)) throw new IncompatibleActionError(); const title = getPanelTitle(embeddable); try { - await embeddable.parentApi.replacePanel(embeddable.uuid, { - panelType: embeddable.type, - initialState: { ...embeddable.getByValueState(), title }, - }); + if (apiHasLibraryTransforms(embeddable)) { + await embeddable.parentApi.replacePanel(embeddable.uuid, { + panelType: embeddable.type, + initialState: { ...embeddable.getByValueState(), title }, + }); + } else if (apiHasInPlaceLibraryTransforms(embeddable)) { + embeddable.unlinkFromLibrary(); + } else { + throw new IncompatibleActionError(); + } this.toastsService.addSuccess({ title: dashboardUnlinkFromLibraryActionStrings.getSuccessMessage(title ? `'${title}'` : ''), 'data-test-subj': 'unlinkPanelSuccess', diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.test.tsx b/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.test.tsx index da4cb0b637398..9cdab72403e5b 100644 --- a/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.test.tsx +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.test.tsx @@ -70,7 +70,9 @@ describe('ShowShareModal', () => { const getPropsAndShare = ( unsavedState?: Partial ): ShowShareModalProps => { - pluginServices.getServices().dashboardBackup.getState = jest.fn().mockReturnValue(unsavedState); + pluginServices.getServices().dashboardBackup.getState = jest + .fn() + .mockReturnValue({ dashboardState: unsavedState }); return { isDirty: true, anchorElement: document.createElement('div'), diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx b/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx index e654a8aad29e5..b60c389346638 100644 --- a/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx @@ -23,7 +23,7 @@ import { DASHBOARD_APP_LOCATOR } from '@kbn/deeplinks-analytics'; import { dashboardUrlParams } from '../../dashboard_router'; import { shareModalStrings } from '../../_dashboard_app_strings'; import { pluginServices } from '../../../services/plugin_services'; -import { convertPanelMapToSavedPanels } from '../../../../common'; +import { convertPanelMapToSavedPanels, DashboardPanelMap } from '../../../../common'; import { DashboardLocatorParams } from '../../../dashboard_container'; const showFilterBarId = 'showFilterBar'; @@ -123,18 +123,23 @@ export function ShowShareModal({ }; let unsavedStateForLocator: DashboardLocatorParams = {}; - const unsavedDashboardState = dashboardBackup.getState(savedObjectId); + const { dashboardState: unsavedDashboardState, panels } = + dashboardBackup.getState(savedObjectId) ?? {}; + + const allPanels: DashboardPanelMap = { + ...(unsavedDashboardState?.panels ?? {}), + ...((panels as DashboardPanelMap) ?? {}), + }; if (unsavedDashboardState) { unsavedStateForLocator = { query: unsavedDashboardState.query, filters: unsavedDashboardState.filters, controlGroupInput: unsavedDashboardState.controlGroupInput as SerializableControlGroupInput, - panels: unsavedDashboardState.panels - ? (convertPanelMapToSavedPanels( - unsavedDashboardState.panels - ) as DashboardLocatorParams['panels']) - : undefined, + panels: + allPanels && Object.keys(allPanels).length > 0 + ? (convertPanelMapToSavedPanels(allPanels) as DashboardLocatorParams['panels']) + : undefined, // options useMargins: unsavedDashboardState?.useMargins, diff --git a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx index 7ec73f6dbe97c..b0413b9fa3c46 100644 --- a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx +++ b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx @@ -13,7 +13,6 @@ import { PhaseEvent } from '@kbn/presentation-publishing'; import classNames from 'classnames'; import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; import { DashboardPanelState } from '../../../../common'; -import { getReferencesForPanelId } from '../../../../common/dashboard_container/persistable_state/dashboard_container_references'; import { pluginServices } from '../../../services/plugin_services'; import { useDashboardContainer } from '../../embeddable/dashboard_container'; @@ -52,7 +51,6 @@ export const Item = React.forwardRef( const scrollToPanelId = container.select((state) => state.componentState.scrollToPanelId); const highlightPanelId = container.select((state) => state.componentState.highlightPanelId); const useMargins = container.select((state) => state.explicitInput.useMargins); - const panel = container.select((state) => state.explicitInput.panels[id]); const expandPanel = expandedPanelId !== undefined && expandedPanelId === id; const hidePanel = expandedPanelId !== undefined && expandedPanelId !== id; @@ -99,7 +97,6 @@ export const Item = React.forwardRef( const { embeddable: { reactEmbeddableRegistryHasKey }, } = pluginServices.getServices(); - const references = getReferencesForPanelId(id, container.savedObjectReferences); const panelProps = { showBadges: true, @@ -114,11 +111,10 @@ export const Item = React.forwardRef( container} key={`${type}_${id}`} panelProps={panelProps} onApiAvailable={(api) => container.registerChildApi(api)} - state={{ rawState: panel.explicitInput as object, references }} /> ); } @@ -132,7 +128,7 @@ export const Item = React.forwardRef( {...panelProps} /> ); - }, [id, container, useMargins, type, index, onPanelStatusChange, panel.explicitInput]); + }, [id, container, type, index, useMargins, onPanelStatusChange]); return (
}> + > = []; for (const [uuid, panel] of Object.entries(panels)) { if (!reactEmbeddableRegistryHasKey(panel.type)) continue; const api = dashboard.children$.value[uuid]; + if (api && apiHasSerializableState(api)) { - const serializedState = api.serializeState(); - panels[uuid].explicitInput = { ...serializedState.rawState, id: uuid }; - references.push(...prefixReferencesFromPanel(uuid, serializedState.references ?? [])); + serializePromises.push( + (async () => { + const serialized = await api.serializeState(); + return { uuid, serialized }; + })() + ); } } + + const serializeResults = await Promise.all(serializePromises); + for (const result of serializeResults) { + panels[result.uuid].explicitInput = { ...result.serialized.rawState, id: result.uuid }; + references.push(...prefixReferencesFromPanel(result.uuid, result.serialized.references ?? [])); + } + return { panels, references }; }; @@ -145,7 +160,7 @@ export function runSaveAs(this: DashboardContainer) { }); } this.savedObjectReferences = saveResult.references ?? []; - this.lastSavedState.next(); + this.saveNotification$.next(); resolve(saveResult); return saveResult; }; @@ -199,7 +214,7 @@ export async function runQuickSave(this: DashboardContainer) { this.savedObjectReferences = saveResult.references ?? []; this.dispatch.setLastSavedInput(dashboardStateToSave); - this.lastSavedState.next(); + this.saveNotification$.next(); if (this.controlGroup && persistableControlGroupInput) { this.controlGroup.setSavedState(persistableControlGroupInput); } diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.test.ts b/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.test.ts index 12eebe31da173..bfe29801b07fb 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.test.ts +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.test.ts @@ -168,7 +168,7 @@ test('pulls state from backup which overrides state from saved object', async () }); pluginServices.getServices().dashboardBackup.getState = jest .fn() - .mockReturnValue({ description: 'wow this description marginally better' }); + .mockReturnValue({ dashboardState: { description: 'wow this description marginally better' } }); const dashboard = await createDashboard({ useSessionStorageIntegration: true }, 0, 'wow-such-id'); expect(dashboard).toBeDefined(); expect(dashboard!.getState().explicitInput.description).toBe( diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts b/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts index ac585ce58d8cc..cd0d5e6fa23df 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts @@ -195,11 +195,18 @@ export const initializeDashboard = async ({ // -------------------------------------------------------------------------------------- // Gather input from session storage and local storage if integration is used. // -------------------------------------------------------------------------------------- + const dashboardBackupState = dashboardBackup.getState(loadDashboardReturn.dashboardId); const sessionStorageInput = ((): Partial | undefined => { if (!useSessionStorageIntegration) return; - return dashboardBackup.getState(loadDashboardReturn.dashboardId); + return dashboardBackupState?.dashboardState; })(); + if (useSessionStorageIntegration) { + untilDashboardReady().then((dashboardContainer) => { + dashboardContainer.restoredRuntimeState = dashboardBackupState?.panels; + }); + } + // -------------------------------------------------------------------------------------- // Combine input from saved object, session storage, & passed input to create initial input. // -------------------------------------------------------------------------------------- diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx index 9a33543b7c3b1..a0a10469483c7 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx @@ -34,7 +34,12 @@ import { } from '@kbn/embeddable-plugin/public'; import type { Filter, Query, TimeRange } from '@kbn/es-query'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; -import { TrackContentfulRender } from '@kbn/presentation-containers'; +import { + HasRuntimeChildState, + HasSaveNotification, + HasSerializedChildState, + TrackContentfulRender, +} from '@kbn/presentation-containers'; import { apiHasSerializableState, PanelPackage } from '@kbn/presentation-containers'; import { ReduxEmbeddableTools, ReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; import { LocatorPublic } from '@kbn/share-plugin/common'; @@ -72,6 +77,7 @@ import { DashboardPublicState, DashboardReduxState, DashboardRenderPerformanceStats, + UnsavedPanelState, } from '../types'; import { addFromLibrary, @@ -123,7 +129,12 @@ export const useDashboardContainer = (): DashboardContainer => { export class DashboardContainer extends Container - implements DashboardExternallyAccessibleApi, TrackContentfulRender + implements + DashboardExternallyAccessibleApi, + TrackContentfulRender, + HasSaveNotification, + HasRuntimeChildState, + HasSerializedChildState { public readonly type = DASHBOARD_CONTAINER_TYPE; @@ -575,7 +586,9 @@ export class DashboardContainer if (reactEmbeddableRegistryHasKey(panel.type)) { const child = this.children$.value[panelId]; if (!child) throw new PanelNotFoundError(); - const serialized = apiHasSerializableState(child) ? child.serializeState() : { rawState: {} }; + const serialized = apiHasSerializableState(child) + ? await child.serializeState() + : { rawState: {} }; return { type: panel.type, explicitInput: { ...panel.explicitInput, ...serialized.rawState }, @@ -806,17 +819,19 @@ export class DashboardContainer }); }; - public lastSavedState: Subject = new Subject(); - public getLastSavedStateForChild = (childId: string) => { - const { - componentState: { - lastSavedInput: { panels }, - }, - } = this.getState(); - const panel: DashboardPanelState | undefined = panels[childId]; + public saveNotification$: Subject = new Subject(); + public getSerializedStateForChild = (childId: string) => { const references = getReferencesForPanelId(childId, this.savedObjectReferences); - return { rawState: panel?.explicitInput, version: panel?.version, references }; + return { + rawState: this.getInput().panels[childId].explicitInput, + references, + }; + }; + + public restoredRuntimeState: UnsavedPanelState | undefined = undefined; + public getRuntimeStateForChild = (childId: string) => { + return this.restoredRuntimeState?.[childId]; }; public removePanel(id: string) { @@ -857,6 +872,7 @@ export class DashboardContainer }; public resetAllReactEmbeddables = () => { + this.restoredRuntimeState = undefined; let resetChangedPanelCount = false; const currentChildren = this.children$.value; for (const panelId of Object.keys(currentChildren)) { diff --git a/src/plugins/dashboard/public/dashboard_container/state/diffing/dashboard_diffing_integration.ts b/src/plugins/dashboard/public/dashboard_container/state/diffing/dashboard_diffing_integration.ts index a8644239de90e..dc3c4996e860f 100644 --- a/src/plugins/dashboard/public/dashboard_container/state/diffing/dashboard_diffing_integration.ts +++ b/src/plugins/dashboard/public/dashboard_container/state/diffing/dashboard_diffing_integration.ts @@ -8,7 +8,7 @@ import { PersistableControlGroupInput } from '@kbn/controls-plugin/common'; import { apiPublishesUnsavedChanges, PublishesUnsavedChanges } from '@kbn/presentation-publishing'; import deepEqual from 'fast-deep-equal'; -import { cloneDeep, omit } from 'lodash'; +import { omit } from 'lodash'; import { AnyAction, Middleware } from 'redux'; import { combineLatest, debounceTime, Observable, of, startWith, switchMap } from 'rxjs'; import { distinctUntilChanged, map } from 'rxjs'; @@ -16,6 +16,7 @@ import { DashboardContainer, DashboardCreationOptions } from '../..'; import { DashboardContainerInput } from '../../../../common'; import { CHANGE_CHECK_DEBOUNCE } from '../../../dashboard_constants'; import { pluginServices } from '../../../services/plugin_services'; +import { UnsavedPanelState } from '../../types'; import { dashboardContainerReducers } from '../dashboard_container_reducers'; import { isKeyEqualAsync, unsavedChangesDiffingFunctions } from './dashboard_diffing_functions'; @@ -151,13 +152,17 @@ export function startDiffingDashboardState( this.dispatch.setHasUnsavedChanges(hasUnsavedChanges); } + const unsavedPanelState = reactEmbeddableChanges.reduce( + (acc, { childId, unsavedChanges }) => { + acc[childId] = unsavedChanges; + return acc; + }, + {} as UnsavedPanelState + ); + // backup unsaved changes if configured to do so if (creationOptions?.useSessionStorageIntegration) { - backupUnsavedChanges.bind(this)( - dashboardChanges, - reactEmbeddableChanges, - controlGroupChanges - ); + backupUnsavedChanges.bind(this)(dashboardChanges, unsavedPanelState, controlGroupChanges); } }) ); @@ -209,36 +214,19 @@ export async function getDashboardUnsavedChanges( function backupUnsavedChanges( this: DashboardContainer, dashboardChanges: Partial, - reactEmbeddableChanges: Array<{ - childId: string; - unsavedChanges: object | undefined; - }>, + reactEmbeddableChanges: UnsavedPanelState, controlGroupChanges: PersistableControlGroupInput | undefined ) { const { dashboardBackup } = pluginServices.getServices(); - - // apply all unsaved state from react embeddables to the unsaved changes object. - let hasAnyReactEmbeddableUnsavedChanges = false; - const currentPanels = cloneDeep(dashboardChanges.panels ?? this.getInput().panels); - for (const { childId, unsavedChanges: childUnsavedChanges } of reactEmbeddableChanges) { - if (!childUnsavedChanges) continue; - const panelStateToBackup = { - ...currentPanels[childId], - ...(dashboardChanges.panels?.[childId] ?? {}), - explicitInput: { - ...currentPanels[childId]?.explicitInput, - ...(dashboardChanges.panels?.[childId]?.explicitInput ?? {}), - ...childUnsavedChanges, - }, - }; - hasAnyReactEmbeddableUnsavedChanges = true; - currentPanels[childId] = panelStateToBackup; - } const dashboardStateToBackup = omit(dashboardChanges, keysToOmitFromSessionStorage); - dashboardBackup.setState(this.getDashboardSavedObjectId(), { - ...dashboardStateToBackup, - panels: hasAnyReactEmbeddableUnsavedChanges ? currentPanels : dashboardChanges.panels, - controlGroupInput: controlGroupChanges, - }); + dashboardBackup.setState( + this.getDashboardSavedObjectId(), + { + ...dashboardStateToBackup, + panels: dashboardChanges.panels, + controlGroupInput: controlGroupChanges, + }, + reactEmbeddableChanges + ); } diff --git a/src/plugins/dashboard/public/dashboard_container/types.ts b/src/plugins/dashboard/public/dashboard_container/types.ts index 26f37d7f7d993..f3287494c7b66 100644 --- a/src/plugins/dashboard/public/dashboard_container/types.ts +++ b/src/plugins/dashboard/public/dashboard_container/types.ts @@ -14,6 +14,10 @@ import { SerializableRecord } from '@kbn/utility-types'; import type { DashboardContainerInput, DashboardOptions } from '../../common'; import { SavedDashboardPanel } from '../../common/content_management'; +export interface UnsavedPanelState { + [key: string]: object | undefined; +} + export type DashboardReduxState = ReduxEmbeddableState< DashboardContainerInput, DashboardContainerOutput, diff --git a/src/plugins/dashboard/public/services/dashboard_backup/dashboard_backup_service.ts b/src/plugins/dashboard/public/services/dashboard_backup/dashboard_backup_service.ts index fb5b2c12f05ee..5a121ef430400 100644 --- a/src/plugins/dashboard/public/services/dashboard_backup/dashboard_backup_service.ts +++ b/src/plugins/dashboard/public/services/dashboard_backup/dashboard_backup_service.ts @@ -20,11 +20,15 @@ import type { DashboardBackupServiceType } from './types'; import type { DashboardContainerInput } from '../../../common'; import { DashboardNotificationsService } from '../notifications/types'; import { backupServiceStrings } from '../../dashboard_container/_dashboard_container_strings'; +import { UnsavedPanelState } from '../../dashboard_container/types'; export const DASHBOARD_PANELS_UNSAVED_ID = 'unsavedDashboard'; -const DASHBOARD_PANELS_SESSION_KEY = 'dashboardStateManagerPanels'; +const DASHBOARD_PANELS_SESSION_KEY = 'dashboardPanels'; const DASHBOARD_VIEWMODE_LOCAL_KEY = 'dashboardViewMode'; +// this key is named `panels` for BWC reasons, but actually contains the entire dashboard state +const DASHBOARD_STATE_SESSION_KEY = 'dashboardStateManagerPanels'; + interface DashboardBackupRequiredServices { notifications: DashboardNotificationsService; spaces: DashboardSpacesService; @@ -75,11 +79,22 @@ class DashboardBackupService implements DashboardBackupServiceType { public clearState(id = DASHBOARD_PANELS_UNSAVED_ID) { try { - const sessionStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY); - const sessionStorageForSpace = sessionStorage?.[this.activeSpaceId] || {}; - if (sessionStorageForSpace[id]) { - delete sessionStorageForSpace[id]; - this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStorage); + const dashboardStateStorage = + this.sessionStorage.get(DASHBOARD_STATE_SESSION_KEY)?.[this.activeSpaceId] ?? {}; + if (dashboardStateStorage[id]) { + delete dashboardStateStorage[id]; + this.sessionStorage.set(DASHBOARD_STATE_SESSION_KEY, { + [this.activeSpaceId]: dashboardStateStorage, + }); + } + + const panelsStorage = + this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] ?? {}; + if (panelsStorage[id]) { + delete panelsStorage[id]; + this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, { + [this.activeSpaceId]: panelsStorage, + }); } } catch (e) { this.notifications.toasts.addDanger({ @@ -89,9 +104,15 @@ class DashboardBackupService implements DashboardBackupServiceType { } } - public getState(id = DASHBOARD_PANELS_UNSAVED_ID): Partial | undefined { + public getState(id = DASHBOARD_PANELS_UNSAVED_ID) { try { - return this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId]?.[id]; + const dashboardState = this.sessionStorage.get(DASHBOARD_STATE_SESSION_KEY)?.[ + this.activeSpaceId + ]?.[id] as Partial | undefined; + const panels = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId]?.[ + id + ] as UnsavedPanelState | undefined; + return { dashboardState, panels }; } catch (e) { this.notifications.toasts.addDanger({ title: backupServiceStrings.getPanelsGetError(e.message), @@ -100,11 +121,19 @@ class DashboardBackupService implements DashboardBackupServiceType { } } - public setState(id = DASHBOARD_PANELS_UNSAVED_ID, newState: Partial) { + public setState( + id = DASHBOARD_PANELS_UNSAVED_ID, + newState: Partial, + unsavedPanels: UnsavedPanelState + ) { try { - const sessionStateStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}; - set(sessionStateStorage, [this.activeSpaceId, id], newState); - this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStateStorage); + const dashboardStateStorage = this.sessionStorage.get(DASHBOARD_STATE_SESSION_KEY) ?? {}; + set(dashboardStateStorage, [this.activeSpaceId, id], newState); + this.sessionStorage.set(DASHBOARD_STATE_SESSION_KEY, dashboardStateStorage); + + const panelsStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) ?? {}; + set(panelsStorage, [this.activeSpaceId, id], unsavedPanels); + this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, panelsStorage); } catch (e) { this.notifications.toasts.addDanger({ title: backupServiceStrings.getPanelsSetError(e.message), @@ -116,18 +145,25 @@ class DashboardBackupService implements DashboardBackupServiceType { public getDashboardIdsWithUnsavedChanges() { try { const dashboardStatesInSpace = - this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] || {}; - const dashboardsWithUnsavedChanges: string[] = []; - - Object.keys(dashboardStatesInSpace).map((dashboardId) => { - if ( - dashboardStatesInSpace[dashboardId].viewMode === ViewMode.EDIT && - Object.keys(dashboardStatesInSpace[dashboardId]).some( - (stateKey) => stateKey !== 'viewMode' + this.sessionStorage.get(DASHBOARD_STATE_SESSION_KEY)?.[this.activeSpaceId] ?? {}; + const panelStatesInSpace = + this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] ?? {}; + + const dashboardsSet: Set = new Set(); + + [...Object.keys(panelStatesInSpace), ...Object.keys(dashboardStatesInSpace)].map( + (dashboardId) => { + if ( + dashboardStatesInSpace[dashboardId].viewMode === ViewMode.EDIT && + (Object.keys(dashboardStatesInSpace[dashboardId]).some( + (stateKey) => stateKey !== 'viewMode' + ) || + Object.keys(panelStatesInSpace?.[dashboardId]).length > 0) ) - ) - dashboardsWithUnsavedChanges.push(dashboardId); - }); + dashboardsSet.add(dashboardId); + } + ); + const dashboardsWithUnsavedChanges = [...dashboardsSet]; /** * Because we are storing these unsaved dashboard IDs in React component state, we only want things to be re-rendered diff --git a/src/plugins/dashboard/public/services/dashboard_backup/types.ts b/src/plugins/dashboard/public/services/dashboard_backup/types.ts index 70748085d3ee1..ee371a4463b56 100644 --- a/src/plugins/dashboard/public/services/dashboard_backup/types.ts +++ b/src/plugins/dashboard/public/services/dashboard_backup/types.ts @@ -7,12 +7,22 @@ */ import { ViewMode } from '@kbn/embeddable-plugin/public'; +import { UnsavedPanelState } from '../../dashboard_container/types'; import { SavedDashboardInput } from '../dashboard_content_management/types'; export interface DashboardBackupServiceType { clearState: (id?: string) => void; - getState: (id: string | undefined) => Partial | undefined; - setState: (id: string | undefined, newState: Partial) => void; + getState: (id: string | undefined) => + | { + dashboardState?: Partial; + panels?: UnsavedPanelState; + } + | undefined; + setState: ( + id: string | undefined, + dashboardState: Partial, + panels: UnsavedPanelState + ) => void; getViewMode: () => ViewMode; storeViewMode: (viewMode: ViewMode) => void; getDashboardIdsWithUnsavedChanges: () => string[]; diff --git a/src/plugins/data/common/search/expressions/eql.ts b/src/plugins/data/common/search/expressions/eql.ts index d60bb6f72480a..d050461ae6b40 100644 --- a/src/plugins/data/common/search/expressions/eql.ts +++ b/src/plugins/data/common/search/expressions/eql.ts @@ -58,6 +58,7 @@ export const getEqlFn = ({ name, type: 'eql_raw_response', inputTypes: ['kibana_context', 'null'], + allowCache: true, help: i18n.translate('data.search.eql.help', { defaultMessage: 'Run Elasticsearch request', }), diff --git a/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts b/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts index 7b5b2700f72c7..818e4ab72d59f 100644 --- a/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts +++ b/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts @@ -57,6 +57,7 @@ export const getEsaggsMeta: () => Omit name, type: 'datatable', inputTypes: ['kibana_context', 'null'], + allowCache: true, help: i18n.translate('data.functions.esaggs.help', { defaultMessage: 'Run AggConfig aggregation', }), diff --git a/src/plugins/data/common/search/expressions/esdsl.ts b/src/plugins/data/common/search/expressions/esdsl.ts index 84d301498f2f9..1173ae83ec47a 100644 --- a/src/plugins/data/common/search/expressions/esdsl.ts +++ b/src/plugins/data/common/search/expressions/esdsl.ts @@ -51,6 +51,7 @@ export const getEsdslFn = ({ name, type: 'es_raw_response', inputTypes: ['kibana_context', 'null'], + allowCache: true, help: i18n.translate('data.search.esdsl.help', { defaultMessage: 'Run Elasticsearch request', }), diff --git a/src/plugins/data/common/search/expressions/esql.ts b/src/plugins/data/common/search/expressions/esql.ts index 2303dabb7e59c..6c3929f201458 100644 --- a/src/plugins/data/common/search/expressions/esql.ts +++ b/src/plugins/data/common/search/expressions/esql.ts @@ -75,6 +75,7 @@ export const getEsqlFn = ({ getStartDependencies }: EsqlFnArguments) => { name: 'esql', type: 'datatable', inputTypes: ['kibana_context', 'null'], + allowCache: true, help: i18n.translate('data.search.esql.help', { defaultMessage: 'Queries Elasticsearch using ES|QL.', }), diff --git a/src/plugins/data/common/search/expressions/essql.ts b/src/plugins/data/common/search/expressions/essql.ts index 69d0e7ed9f727..e459aa4fae170 100644 --- a/src/plugins/data/common/search/expressions/essql.ts +++ b/src/plugins/data/common/search/expressions/essql.ts @@ -66,6 +66,7 @@ export const getEssqlFn = ({ getStartDependencies }: EssqlFnArguments) => { name: 'essql', type: 'datatable', inputTypes: ['kibana_context', 'null'], + allowCache: true, help: i18n.translate('data.search.essql.help', { defaultMessage: 'Queries Elasticsearch using Elasticsearch SQL.', }), diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap b/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap index 555be566a5082..a6449fd265492 100644 --- a/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap +++ b/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap @@ -40,11 +40,13 @@ exports[`Doc table cell component renders a cell with filter buttons if it is fi isVisible={false} onBlur={[Function]} onFocus={[Function]} + onKeyDown={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} > @@ -124,6 +126,7 @@ exports[`Doc table cell component renders a cell with filter buttons if it is fi /> @@ -164,11 +167,13 @@ exports[`Doc table cell component renders a cell with filter buttons if it is fi isVisible={false} onBlur={[Function]} onFocus={[Function]} + onKeyDown={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} > @@ -248,6 +253,7 @@ exports[`Doc table cell component renders a cell with filter buttons if it is fi /> diff --git a/src/plugins/embeddable/README.md b/src/plugins/embeddable/README.md index d4c9a5ca23193..0612226664da4 100644 --- a/src/plugins/embeddable/README.md +++ b/src/plugins/embeddable/README.md @@ -1,21 +1,55 @@ Embeddables are React components that manage their own state, can be serialized and deserialized, and return an API that can be used to interact with them imperatively. -#### Guiding principles -* **Coupled to React:** Kibana is a React application, and the minimum unit of sharing is the React component. Embeddables enforce this by requiring a React component during registration. -* **Composition over inheritence:** Rather than an inheritance-based system with classes, imperative APIs are plain old typescript objects that implement any number of shared interfaces. Interfaces are enforced via type guards and are shared via Packages. -* **Internal state management:** Each embeddable manages its own state. This is because the embeddable system allows a page to render a registry of embeddable types that can change over time. This makes it untenable for a single page to manage state for every type of embeddable. The page is only responsible for persisting and providing the last persisted state to the embeddable on startup. +### Guiding principles -#### Best practices -* **Do not use Embeddables to share Components between plugins: ** Only create an embeddable if your Component is rendered on a page that persists embeddable state and renders multiple embeddable types. For example, create an embeddable to render your Component on a Dashboard. Otherwise, use a vanilla React Component to share Components between plugins. -* **Do not use Embeddables to avoid circular plugin dependencies: ** Break your Component into a Package or another plugin to avoid circular plugin dependencies. -* **Minimal API surface area: ** Embeddable APIs are accessable to all Kibana systems and all embeddable siblings and parents. Functions and state that are internal to an embeddable including any child components should not be added to the API. Consider passing internal state to child as props or react context. +#### Coupled to React +Kibana is a React application, and the minimum unit of sharing is the React component. Embeddables enforce this by requiring a React component during registration. + +#### Composition over inheritence +Rather than an inheritance-based system with classes, imperative APIs are plain old typescript objects that implement any number of shared interfaces. Interfaces are enforced via type guards and are shared via Packages. + +#### Internal state management +Each embeddable manages its own state. This is because the embeddable system allows a page to render a registry of embeddable types that can change over time. This makes it untenable for a single page to manage state for every type of embeddable. The page is only responsible for persisting and providing the last persisted state to the embeddable on startup. + +### Key concepts + +#### Publishing package +An embeddable API is a plain old typescript object that implements any number of shared interfaces. A shared interface is defined by a publishing package. A publishing package also provides a type guard that is used to check if a given object fulfills the interface. + +For example, the [has_edit_capabilites](https://github.com/elastic/kibana/tree/main/packages/presentation/presentation_publishing/interfaces/has_edit_capabilities.ts) publishing package defines the `HasEditCapabilities` interface and the `apiHasEditCapabilities` type guard. The [edit panal action](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_panel/public/panel_actions/edit_panel_action/edit_panel_action.ts) defines the "Edit" panel context menu action. The action's `isCompatible` check uses the `apiHasEditCapabilities` type guard to check that an embeddable API implements the `HasEditCapabilities` interface. When an embeddable API implements the interface and all other conditions of `isCompatible` check are true, the "Edit" action is availabe in the panel context menu. When an embeddable API does not implement the interface, the "Edit" action is not available in the panel context menu. + +#### Publishing subject +An embeddable API shares state via a publishing subject, a read only RxJS Observable. + +For example, [publishes_panel_title](https://github.com/elastic/kibana/tree/main/packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts) publishing package defines interfaces and type guards for title state. [initializeTitles](https://github.com/elastic/kibana/tree/main/packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts) provides an implemenation for the titles publishing package. `panelTitle` is provided as a publishing subject. [PresentationPanelInternal React component](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_panel/public/panel_component/presentation_panel_internal.tsx) uses a hook to consume `panelTitle` as React state. Changes to `panelTitle` publishing subject updates React state, which in turn, causes the UI to re-render with the current value. [CustomizePanelEditor React component](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.tsx) uses `api.setPanelTitle` to set the title on save. + +#### Comparators +Comparators allow a page to track changes to an embeddable's state. For example, Dashboard uses comparators to display a UI notification for unsaved changes, to reset changes, and persist unsaved changes to session storage. + +A comparator must be provided for each property in an embeddable's RuntimeState. A comparator is a 3 element tuple: where the first element is a publishing subject providing the current value. The second element is a setter allowing the page to reset the value. The third element is an optional comparator function which provides logic to diff this property. + +For example, [initializeTitles](https://github.com/elastic/kibana/tree/main/packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts) provides an implemenation for the titles publishing package. Comparitors are provided for each property from `SerializedTitles`. + +### Best practices + +#### Do not use Embeddables to share Components between plugins +Only create an embeddable if your Component is rendered on a page that persists embeddable state and renders multiple embeddable types. For example, create an embeddable to render your Component on a Dashboard. Otherwise, use a vanilla React Component to share Components between plugins. + +#### Do not use Embeddables to avoid circular plugin dependencies +Break your Component into a Package or another plugin to avoid circular plugin dependencies. + +#### Minimal API surface area +Embeddable APIs are accessable to all Kibana systems and all embeddable siblings and parents. Functions and state that are internal to an embeddable including any child components should not be added to the API. Consider passing internal state to child as props or react context. + +### Examples -#### Examples Examples available at [/examples/embeddable_examples](https://github.com/elastic/kibana/tree/main/examples/embeddable_examples) -* [Register an embeddable](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable.ts) -* [Embeddable that responds to Unified search](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx) -* [Embeddable that interacts with sibling embeddables](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/data_table/data_table_react_embeddable.tsx) -* [Render an embeddable](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/search/search_embeddable_renderer.tsx) + +- [Register an embeddable](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable.ts) +- [Embeddable that responds to Unified search](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx) +- [Embeddable that interacts with sibling embeddables](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/data_table/data_table_react_embeddable.tsx) +- [Embeddable that can be by value or by reference](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_react_embeddable.tsx) +- [Render an embeddable](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/react_embeddables/search/search_embeddable_renderer.tsx) Run examples with `yarn start --run-examples` To access example embeddables, create a new dashboard, click "Add panel" and finally select "Embeddable examples". \ No newline at end of file diff --git a/src/plugins/embeddable/public/index.ts b/src/plugins/embeddable/public/index.ts index 7580e84f29e39..b00adeb711a5b 100644 --- a/src/plugins/embeddable/public/index.ts +++ b/src/plugins/embeddable/public/index.ts @@ -98,8 +98,6 @@ export { ReactEmbeddableRenderer, type DefaultEmbeddableApi, type ReactEmbeddableFactory, - type ReactEmbeddableRegistration, - startTrackingEmbeddableUnsavedChanges, } from './react_embeddable_system'; export function plugin(initializerContext: PluginInitializerContext) { diff --git a/src/plugins/embeddable/public/lib/containers/container.ts b/src/plugins/embeddable/public/lib/containers/container.ts index d1a15bb2588f0..d7b5f56b2202b 100644 --- a/src/plugins/embeddable/public/lib/containers/container.ts +++ b/src/plugins/embeddable/public/lib/containers/container.ts @@ -8,7 +8,7 @@ import deepEqual from 'fast-deep-equal'; import { isEqual, xor } from 'lodash'; -import { BehaviorSubject, EMPTY, merge, Subject, Subscription } from 'rxjs'; +import { BehaviorSubject, EMPTY, merge, Subscription } from 'rxjs'; import { catchError, combineLatestWith, @@ -22,7 +22,7 @@ import { import { v4 as uuidv4 } from 'uuid'; import { PanelPackage } from '@kbn/presentation-containers'; -import { PresentationContainer, SerializedPanelState } from '@kbn/presentation-containers'; +import { PresentationContainer } from '@kbn/presentation-containers'; import { isSavedObjectEmbeddableInput } from '../../../common/lib/saved_object_embeddable'; import { EmbeddableStart } from '../../plugin'; @@ -64,10 +64,6 @@ export abstract class Container< private subscription: Subscription | undefined; private readonly anyChildOutputChange$; - public lastSavedState: Subject = new Subject(); - public getLastSavedStateForChild: (childId: string) => SerializedPanelState | undefined = () => - undefined; - constructor( input: TContainerInput, output: TContainerOutput, diff --git a/src/plugins/embeddable/public/plugin.tsx b/src/plugins/embeddable/public/plugin.tsx index 334e4799ae334..771db22cdd674 100644 --- a/src/plugins/embeddable/public/plugin.tsx +++ b/src/plugins/embeddable/public/plugin.tsx @@ -58,8 +58,6 @@ import { import { getAllMigrations } from '../common/lib/get_all_migrations'; import { setKibanaServices } from './kibana_services'; import { - DefaultEmbeddableApi, - ReactEmbeddableFactory, reactEmbeddableRegistryHasKey, registerReactEmbeddableFactory, } from './react_embeddable_system'; @@ -108,13 +106,7 @@ export interface EmbeddableSetup { /** * Registers an async {@link ReactEmbeddableFactory} getter. */ - registerReactEmbeddableFactory: < - StateType extends object = object, - APIType extends DefaultEmbeddableApi = DefaultEmbeddableApi - >( - type: string, - getFactory: () => Promise> - ) => void; + registerReactEmbeddableFactory: typeof registerReactEmbeddableFactory; /** * @deprecated use {@link registerReactEmbeddableFactory} instead. diff --git a/src/plugins/embeddable/public/react_embeddable_system/index.ts b/src/plugins/embeddable/public/react_embeddable_system/index.ts index 00f77c87cb5b7..54917869508af 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/index.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/index.ts @@ -11,9 +11,4 @@ export { registerReactEmbeddableFactory, } from './react_embeddable_registry'; export { ReactEmbeddableRenderer } from './react_embeddable_renderer'; -export { startTrackingEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; -export type { - DefaultEmbeddableApi, - ReactEmbeddableFactory, - ReactEmbeddableRegistration, -} from './types'; +export type { DefaultEmbeddableApi, ReactEmbeddableFactory } from './types'; diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts index 5cd245ca074cc..b1d67cc8a1d90 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts @@ -14,16 +14,17 @@ const registry: { [key: string]: () => Promise> /** * Registers a new React embeddable factory. This should be called at plugin start time. * - * @param type The key to register the factory under. This should be the same as the `type` key in the factory definition. + * @param type The key to register the factory under. * @param getFactory an async function that gets the factory definition for this key. This should always async import the * actual factory definition file to avoid polluting page load. */ export const registerReactEmbeddableFactory = < - StateType extends object = object, - APIType extends DefaultEmbeddableApi = DefaultEmbeddableApi + SerializedState extends object = object, + Api extends DefaultEmbeddableApi = DefaultEmbeddableApi, + RuntimeState extends object = SerializedState >( type: string, - getFactory: () => Promise> + getFactory: () => Promise> ) => { if (registry[type] !== undefined) throw new Error( @@ -38,11 +39,12 @@ export const registerReactEmbeddableFactory = < export const reactEmbeddableRegistryHasKey = (key: string) => registry[key] !== undefined; export const getReactEmbeddableFactory = async < - StateType extends object = object, - ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi + SerializedState extends object = object, + Api extends DefaultEmbeddableApi = DefaultEmbeddableApi, + RuntimeState extends object = SerializedState >( key: string -): Promise> => { +): Promise> => { if (registry[key] === undefined) throw new Error( i18n.translate('embeddableApi.reactEmbeddable.factoryNotFoundError', { diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx index f4b9a4db43960..84cfa78e983b0 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx @@ -54,8 +54,19 @@ describe('react embeddable renderer', () => { setupPresentationPanelServices(); }); - it('deserializes given state', async () => { - render(); + it('deserializes unsaved state provided by the parent', async () => { + render( + ({ + getSerializedStateForChild: () => ({ + rawState: { + bork: 'blorp?', + }, + }), + })} + /> + ); await waitFor(() => { expect(testEmbeddableFactory.deserializeState).toHaveBeenCalledWith({ rawState: { bork: 'blorp?' }, @@ -65,13 +76,24 @@ describe('react embeddable renderer', () => { it('builds the embeddable', async () => { const buildEmbeddableSpy = jest.spyOn(testEmbeddableFactory, 'buildEmbeddable'); - render(); + render( + ({ + getSerializedStateForChild: () => ({ + rawState: { + bork: 'blorp?', + }, + }), + })} + /> + ); await waitFor(() => { expect(buildEmbeddableSpy).toHaveBeenCalledWith( { bork: 'blorp?' }, expect.any(Function), expect.any(String), - undefined + expect.any(Object) ); }); }); @@ -82,7 +104,13 @@ describe('react embeddable renderer', () => { ({ + getSerializedStateForChild: () => ({ + rawState: { + bork: 'blorp?', + }, + }), + })} /> ); await waitFor(() => { @@ -90,21 +118,22 @@ describe('react embeddable renderer', () => { { bork: 'blorp?' }, expect.any(Function), '12345', - undefined + expect.any(Object) ); }); }); it('builds the embeddable, providing a parent', async () => { const buildEmbeddableSpy = jest.spyOn(testEmbeddableFactory, 'buildEmbeddable'); - const parentApi = getMockPresentationContainer(); - render( - - ); + const parentApi = { + ...getMockPresentationContainer(), + getSerializedStateForChild: () => ({ + rawState: { + bork: 'blorp?', + }, + }), + }; + render( parentApi} />); await waitFor(() => { expect(buildEmbeddableSpy).toHaveBeenCalledWith( { bork: 'blorp?' }, @@ -119,7 +148,11 @@ describe('react embeddable renderer', () => { render( ({ + getSerializedStateForChild: () => ({ + rawState: { name: 'Kuni Garu', bork: 'Dara' }, + }), + })} /> ); await waitFor(() => { @@ -136,17 +169,22 @@ describe('react embeddable renderer', () => { type={'test'} maybeId={'12345'} onApiAvailable={onApiAvailable} - state={{ rawState: { name: 'Kuni Garu' } }} + getParentApi={() => ({ + getSerializedStateForChild: () => ({ + rawState: { name: 'Kuni Garu' }, + }), + })} /> ); await waitFor(() => expect(onApiAvailable).toHaveBeenCalledWith({ type: 'test', uuid: '12345', - parentApi: undefined, + parentApi: expect.any(Object), unsavedChanges: expect.any(Object), serializeState: expect.any(Function), resetUnsavedChanges: expect.any(Function), + snapshotRuntimeState: expect.any(Function), }) ); }); @@ -157,7 +195,11 @@ describe('react embeddable renderer', () => { ({ + getSerializedStateForChild: () => ({ + rawState: { name: 'Kuni Garu' }, + }), + })} /> ); await waitFor(() => diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx index 45cb648e1b626..98a7a42244bb4 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx @@ -6,14 +6,14 @@ * Side Public License, v 1. */ -import { SerializedPanelState } from '@kbn/presentation-containers'; +import { HasSerializedChildState, SerializedPanelState } from '@kbn/presentation-containers'; import { PresentationPanel, PresentationPanelProps } from '@kbn/presentation-panel-plugin/public'; import { ComparatorDefinition, StateComparators } from '@kbn/presentation-publishing'; import React, { useEffect, useImperativeHandle, useMemo, useRef } from 'react'; -import { combineLatest, debounceTime, skip } from 'rxjs'; +import { combineLatest, debounceTime, skip, switchMap } from 'rxjs'; import { v4 as generateId } from 'uuid'; import { getReactEmbeddableFactory } from './react_embeddable_registry'; -import { startTrackingEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; +import { initializeReactEmbeddableState } from './react_embeddable_state'; import { DefaultEmbeddableApi, ReactEmbeddableApiRegistration } from './types'; const ON_STATE_CHANGE_DEBOUNCE = 100; @@ -24,25 +24,25 @@ const ON_STATE_CHANGE_DEBOUNCE = 100; * TODO: Rename this to simply `Embeddable` when the legacy Embeddable system is removed. */ export const ReactEmbeddableRenderer = < - StateType extends object = object, - ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi + SerializedState extends object = object, + Api extends DefaultEmbeddableApi = DefaultEmbeddableApi, + RuntimeState extends object = SerializedState, + ParentApi extends HasSerializedChildState = HasSerializedChildState >({ - maybeId, type, - state, - parentApi, - onApiAvailable, + maybeId, + getParentApi, panelProps, onAnyStateChange, + onApiAvailable, hidePanelChrome, }: { - maybeId?: string; type: string; - state: SerializedPanelState; - parentApi?: unknown; - onApiAvailable?: (api: ApiType) => void; + maybeId?: string; + getParentApi: () => ParentApi; + onApiAvailable?: (api: Api) => void; panelProps?: Pick< - PresentationPanelProps, + PresentationPanelProps, | 'showShadow' | 'showBorder' | 'showBadges' @@ -55,57 +55,73 @@ export const ReactEmbeddableRenderer = < * This `onAnyStateChange` callback allows the parent to keep track of the state of the embeddable * as it changes. This is **not** expected to change over the lifetime of the component. */ - onAnyStateChange?: (state: SerializedPanelState) => void; + onAnyStateChange?: (state: SerializedPanelState) => void; }) => { const cleanupFunction = useRef<(() => void) | null>(null); const componentPromise = useMemo( () => (async () => { + const parentApi = getParentApi(); const uuid = maybeId ?? generateId(); - const factory = await getReactEmbeddableFactory(type); - const registerApi = ( - apiRegistration: ReactEmbeddableApiRegistration, - comparators: StateComparators - ) => { - const { unsavedChanges, resetUnsavedChanges, cleanup } = - startTrackingEmbeddableUnsavedChanges( - uuid, - parentApi, - comparators, - factory.deserializeState - ); + const factory = await getReactEmbeddableFactory(type); + + const { initialState, startStateDiffing } = await initializeReactEmbeddableState< + SerializedState, + Api, + RuntimeState + >(uuid, factory, parentApi); + const buildApi = ( + apiRegistration: ReactEmbeddableApiRegistration, + comparators: StateComparators + ) => { if (onAnyStateChange) { /** * To avoid unnecessary re-renders, only subscribe to the comparator publishing subjects if * an `onAnyStateChange` callback is provided */ - const comparatorDefinitions: Array> = - Object.values(comparators); + const comparatorDefinitions: Array< + ComparatorDefinition + > = Object.values(comparators); combineLatest(comparatorDefinitions.map((comparator) => comparator[0])) - .pipe(skip(1), debounceTime(ON_STATE_CHANGE_DEBOUNCE)) - .subscribe(() => { - onAnyStateChange(apiRegistration.serializeState()); + .pipe( + skip(1), + debounceTime(ON_STATE_CHANGE_DEBOUNCE), + switchMap(() => { + const isAsync = + apiRegistration.serializeState.prototype?.name === 'AsyncFunction'; + return isAsync + ? (apiRegistration.serializeState() as Promise< + SerializedPanelState + >) + : Promise.resolve(apiRegistration.serializeState()); + }) + ) + .subscribe((serializedState) => { + onAnyStateChange(serializedState); }); } + const { unsavedChanges, resetUnsavedChanges, cleanup, snapshotRuntimeState } = + startStateDiffing(comparators); const fullApi = { ...apiRegistration, uuid, parentApi, unsavedChanges, - resetUnsavedChanges, type: factory.type, - } as unknown as ApiType; + resetUnsavedChanges, + snapshotRuntimeState, + } as unknown as Api; cleanupFunction.current = () => cleanup(); onApiAvailable?.(fullApi); return fullApi; }; const { api, Component } = await factory.buildEmbeddable( - factory.deserializeState(state), - registerApi, + initialState, + buildApi, uuid, parentApi ); @@ -132,7 +148,7 @@ export const ReactEmbeddableRenderer = < }, []); return ( - + hidePanelChrome={hidePanelChrome} {...panelProps} Component={componentPromise} diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.test.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_state.test.ts similarity index 54% rename from src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.test.tsx rename to src/plugins/embeddable/public/react_embeddable_system/react_embeddable_state.test.ts index c230e7a3840a6..6f34b4f04bffd 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.test.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_state.test.ts @@ -7,15 +7,17 @@ */ import { + HasRuntimeChildState, + HasSaveNotification, + HasSerializedChildState, PresentationContainer, - PublishesLastSavedState, - SerializedPanelState, } from '@kbn/presentation-containers'; import { getMockPresentationContainer } from '@kbn/presentation-containers/mocks'; import { StateComparators } from '@kbn/presentation-publishing'; import { waitFor } from '@testing-library/react'; import { BehaviorSubject, Subject } from 'rxjs'; -import { startTrackingEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; +import { initializeReactEmbeddableState } from './react_embeddable_state'; +import { ReactEmbeddableFactory } from './types'; interface SuperTestStateType { name: string; @@ -24,29 +26,36 @@ interface SuperTestStateType { } describe('react embeddable unsaved changes', () => { - let initialState: SuperTestStateType; - let lastSavedState: SuperTestStateType; + let serializedStateForChild: SuperTestStateType; + let comparators: StateComparators; - let deserializeState: (state: SerializedPanelState) => SuperTestStateType; - let parentApi: (PresentationContainer & PublishesLastSavedState) | null; + let parentApi: PresentationContainer & + HasSerializedChildState & + Partial> & + HasSaveNotification; beforeEach(() => { - initialState = { + serializedStateForChild = { name: 'Sir Testsalot', age: 42, - tagline: 'A glutton for testing!', + tagline: `Oh he's a glutton for testing!`, }; - lastSavedState = { - name: 'Sir Testsalot', - age: 42, - tagline: 'A glutton for testing!', + parentApi = { + saveNotification$: new Subject(), + ...getMockPresentationContainer(), + getSerializedStateForChild: () => ({ rawState: serializedStateForChild }), + getRuntimeStateForChild: () => undefined, }; }); const initializeDefaultComparators = () => { - const nameSubject = new BehaviorSubject(initialState.name); - const ageSubject = new BehaviorSubject(initialState.age); - const taglineSubject = new BehaviorSubject(initialState.tagline); + const latestState: SuperTestStateType = { + ...serializedStateForChild, + ...(parentApi.getRuntimeStateForChild?.('uuid') ?? {}), + }; + const nameSubject = new BehaviorSubject(latestState.name); + const ageSubject = new BehaviorSubject(latestState.age); + const taglineSubject = new BehaviorSubject(latestState.tagline); const defaultComparators: StateComparators = { name: [nameSubject, jest.fn((nextName) => nameSubject.next(nextName))], age: [ageSubject, jest.fn((nextAge) => ageSubject.next(nextAge))], @@ -55,49 +64,58 @@ describe('react embeddable unsaved changes', () => { return defaultComparators; }; - const startTrackingUnsavedChanges = ( + const startTrackingUnsavedChanges = async ( customComparators?: StateComparators ) => { comparators = customComparators ?? initializeDefaultComparators(); - deserializeState = jest.fn((state) => state.rawState as SuperTestStateType); - parentApi = { - ...getMockPresentationContainer(), - getLastSavedStateForChild: () => ({ - rawState: lastSavedState as SerializedState, - }), - lastSavedState: new Subject(), + const factory: ReactEmbeddableFactory = { + type: 'superTest', + deserializeState: jest.fn().mockImplementation((state) => state.rawState), + buildEmbeddable: async (runtimeState, buildApi) => { + const api = buildApi({ serializeState: jest.fn() }, comparators); + return { api, Component: () => null }; + }, }; - return startTrackingEmbeddableUnsavedChanges('id', parentApi, comparators, deserializeState); + const { startStateDiffing } = await initializeReactEmbeddableState('uuid', factory, parentApi); + return startStateDiffing(comparators); }; - it('should return undefined unsaved changes when used without a parent context to provide the last saved state', async () => { - parentApi = null; - const unsavedChangesApi = startTrackingUnsavedChanges(); + it('should return undefined unsaved changes when parent API does not provide runtime state', async () => { + const unsavedChangesApi = await startTrackingUnsavedChanges(); + parentApi.getRuntimeStateForChild = undefined; expect(unsavedChangesApi).toBeDefined(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); }); - it('runs factory deserialize function on last saved state', async () => { - startTrackingUnsavedChanges(); - expect(deserializeState).toHaveBeenCalledWith({ rawState: lastSavedState }); + it('should return undefined unsaved changes when parent API does not have runtime state for this child', async () => { + const unsavedChangesApi = await startTrackingUnsavedChanges(); + // no change here becuase getRuntimeStateForChild already returns undefined + expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); }); it('should return unsaved changes subject initialized to undefined when no unsaved changes are detected', async () => { - const unsavedChangesApi = startTrackingUnsavedChanges(); + parentApi.getRuntimeStateForChild = () => ({ + name: 'Sir Testsalot', + age: 42, + tagline: `Oh he's a glutton for testing!`, + }); + const unsavedChangesApi = await startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); }); it('should return unsaved changes subject initialized with diff when unsaved changes are detected', async () => { - initialState.tagline = 'Testing is my speciality!'; - const unsavedChangesApi = startTrackingUnsavedChanges(); + parentApi.getRuntimeStateForChild = () => ({ + tagline: 'Testing is my speciality!', + }); + const unsavedChangesApi = await startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toEqual({ tagline: 'Testing is my speciality!', }); }); it('should detect unsaved changes when state changes during the lifetime of the component', async () => { - const unsavedChangesApi = startTrackingUnsavedChanges(); + const unsavedChangesApi = await startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); comparators.tagline[1]('Testing is my speciality!'); @@ -108,22 +126,25 @@ describe('react embeddable unsaved changes', () => { }); }); - it('should detect unsaved changes when last saved state changes during the lifetime of the component', async () => { - const unsavedChangesApi = startTrackingUnsavedChanges(); + it('current runtime state should become last saved state when parent save notification is triggered', async () => { + const unsavedChangesApi = await startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); - lastSavedState.tagline = 'Some other tagline'; - parentApi?.lastSavedState.next(); + comparators.tagline[1]('Testing is my speciality!'); await waitFor(() => { expect(unsavedChangesApi.unsavedChanges.value).toEqual({ - // we expect `A glutton for testing!` here because that is the current state of the component. - tagline: 'A glutton for testing!', + tagline: 'Testing is my speciality!', }); }); + + parentApi.saveNotification$.next(); + await waitFor(() => { + expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); + }); }); it('should reset unsaved changes, calling given setters with last saved values. This should remove all unsaved state', async () => { - const unsavedChangesApi = startTrackingUnsavedChanges(); + const unsavedChangesApi = await startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); comparators.tagline[1]('Testing is my speciality!'); @@ -134,16 +155,18 @@ describe('react embeddable unsaved changes', () => { }); unsavedChangesApi.resetUnsavedChanges(); - expect(comparators.tagline[1]).toHaveBeenCalledWith('A glutton for testing!'); + expect(comparators.tagline[1]).toHaveBeenCalledWith(`Oh he's a glutton for testing!`); await waitFor(() => { expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); }); }); it('uses a custom comparator when supplied', async () => { - lastSavedState.age = 20; - initialState.age = 50; - const ageSubject = new BehaviorSubject(initialState.age); + serializedStateForChild.age = 20; + parentApi.getRuntimeStateForChild = () => ({ + age: 50, + }); + const ageSubject = new BehaviorSubject(50); const customComparators: StateComparators = { ...initializeDefaultComparators(), age: [ @@ -153,7 +176,7 @@ describe('react embeddable unsaved changes', () => { ], }; - const unsavedChangesApi = startTrackingUnsavedChanges(customComparators); + const unsavedChangesApi = await startTrackingUnsavedChanges(customComparators); // here we expect there to be no unsaved changes, both unsaved state and last saved state have two digits. expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_state.ts b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_state.ts new file mode 100644 index 0000000000000..605b8d20a7cd1 --- /dev/null +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_state.ts @@ -0,0 +1,120 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { + apiHasRuntimeChildState, + apiHasSaveNotification, + HasSerializedChildState, +} from '@kbn/presentation-containers'; +import { + getInitialValuesFromComparators, + PublishingSubject, + runComparators, + StateComparators, +} from '@kbn/presentation-publishing'; +import { + BehaviorSubject, + combineLatest, + combineLatestWith, + debounceTime, + map, + Subscription, +} from 'rxjs'; +import { DefaultEmbeddableApi, ReactEmbeddableFactory } from './types'; + +export const initializeReactEmbeddableState = async < + SerializedState extends object = object, + Api extends DefaultEmbeddableApi = DefaultEmbeddableApi, + RuntimeState extends object = SerializedState +>( + uuid: string, + factory: ReactEmbeddableFactory, + parentApi: HasSerializedChildState +) => { + const lastSavedRuntimeState = await factory.deserializeState( + parentApi.getSerializedStateForChild(uuid) + ); + + // If the parent provides runtime state for the child (usually as a state backup or cache), + // we merge it with the last saved runtime state. + const partialRuntimeState = apiHasRuntimeChildState(parentApi) + ? parentApi.getRuntimeStateForChild(uuid) ?? ({} as Partial) + : ({} as Partial); + + const initialRuntimeState = { ...lastSavedRuntimeState, ...partialRuntimeState }; + + const startStateDiffing = (comparators: StateComparators) => { + const subscription = new Subscription(); + const snapshotRuntimeState = () => { + const comparatorKeys = Object.keys(comparators) as Array; + return comparatorKeys.reduce((acc, key) => { + acc[key] = comparators[key][0].value as RuntimeState[typeof key]; + return acc; + }, {} as RuntimeState); + }; + + // the last saved state subject is always initialized with the deserialized state from the parent. + const lastSavedState$ = new BehaviorSubject(lastSavedRuntimeState); + if (apiHasSaveNotification(parentApi)) { + subscription.add( + // any time the parent saves, the current state becomes the last saved state... + parentApi.saveNotification$.subscribe(() => { + lastSavedState$.next(snapshotRuntimeState()); + }) + ); + } + + const comparatorSubjects: Array> = []; + const comparatorKeys: Array = []; + for (const key of Object.keys(comparators) as Array) { + const comparatorSubject = comparators[key][0]; // 0th element of tuple is the subject + comparatorSubjects.push(comparatorSubject as PublishingSubject); + comparatorKeys.push(key); + } + + const unsavedChanges = new BehaviorSubject | undefined>( + runComparators( + comparators, + comparatorKeys, + lastSavedState$.getValue() as RuntimeState, + getInitialValuesFromComparators(comparators, comparatorKeys) + ) + ); + + subscription.add( + combineLatest(comparatorSubjects) + .pipe( + debounceTime(100), + map((latestStates) => + comparatorKeys.reduce((acc, key, index) => { + acc[key] = latestStates[index] as RuntimeState[typeof key]; + return acc; + }, {} as Partial) + ), + combineLatestWith(lastSavedState$) + ) + .subscribe(([latest, last]) => { + unsavedChanges.next(runComparators(comparators, comparatorKeys, last, latest)); + }) + ); + return { + unsavedChanges, + resetUnsavedChanges: () => { + const lastSaved = lastSavedState$.getValue(); + for (const key of comparatorKeys) { + const setter = comparators[key][1]; // setter function is the 1st element of the tuple + setter(lastSaved?.[key] as RuntimeState[typeof key]); + } + }, + snapshotRuntimeState, + cleanup: () => subscription.unsubscribe(), + }; + }; + + return { initialState: initialRuntimeState, startStateDiffing }; +}; diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts deleted file mode 100644 index 4df8bd9df287a..0000000000000 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { - getLastSavedStateSubjectForChild, - SerializedPanelState, -} from '@kbn/presentation-containers'; -import { - getInitialValuesFromComparators, - PublishingSubject, - runComparators, - StateComparators, -} from '@kbn/presentation-publishing'; -import { BehaviorSubject, combineLatest } from 'rxjs'; -import { combineLatestWith, debounceTime, map } from 'rxjs'; - -const getDefaultDiffingApi = () => { - return { - unsavedChanges: new BehaviorSubject(undefined), - resetUnsavedChanges: () => {}, - cleanup: () => {}, - }; -}; - -export const startTrackingEmbeddableUnsavedChanges = < - SerializedState extends object = object, - RuntimeState extends object = object ->( - uuid: string, - parentApi: unknown, - comparators: StateComparators, - deserializeState: (state: SerializedPanelState) => RuntimeState -) => { - if (Object.keys(comparators).length === 0) return getDefaultDiffingApi(); - - const lastSavedStateSubject = getLastSavedStateSubjectForChild( - parentApi, - uuid, - deserializeState - ); - if (!lastSavedStateSubject) return getDefaultDiffingApi(); - - const comparatorSubjects: Array> = []; - const comparatorKeys: Array = []; - for (const key of Object.keys(comparators) as Array) { - const comparatorSubject = comparators[key][0]; // 0th element of tuple is the subject - comparatorSubjects.push(comparatorSubject as PublishingSubject); - comparatorKeys.push(key); - } - - const unsavedChanges = new BehaviorSubject | undefined>( - runComparators( - comparators, - comparatorKeys, - lastSavedStateSubject?.getValue(), - getInitialValuesFromComparators(comparators, comparatorKeys) - ) - ); - - const subscription = combineLatest(comparatorSubjects) - .pipe( - debounceTime(100), - map((latestStates) => - comparatorKeys.reduce((acc, key, index) => { - acc[key] = latestStates[index] as RuntimeState[typeof key]; - return acc; - }, {} as Partial) - ), - combineLatestWith(lastSavedStateSubject) - ) - .subscribe(([latestStates, lastSavedState]) => { - unsavedChanges.next( - runComparators(comparators, comparatorKeys, lastSavedState, latestStates) - ); - }); - - return { - unsavedChanges, - resetUnsavedChanges: () => { - const lastSaved = lastSavedStateSubject?.getValue(); - for (const key of comparatorKeys) { - const setter = comparators[key][1]; // setter function is the 1st element of the tuple - setter(lastSaved?.[key] as RuntimeState[typeof key]); - } - }, - cleanup: () => subscription.unsubscribe(), - }; -}; diff --git a/src/plugins/embeddable/public/react_embeddable_system/types.ts b/src/plugins/embeddable/public/react_embeddable_system/types.ts index 89b2ac3d98af4..f0ff899f5df69 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/types.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/types.ts @@ -5,34 +5,41 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { HasSerializableState, SerializedPanelState } from '@kbn/presentation-containers'; +import { + HasSerializableState, + HasSnapshottableState, + SerializedPanelState, +} from '@kbn/presentation-containers'; import { DefaultPresentationPanelApi } from '@kbn/presentation-panel-plugin/public/panel_component/types'; import { HasType, PublishesUnsavedChanges, StateComparators } from '@kbn/presentation-publishing'; -import React, { ReactElement } from 'react'; - -export type ReactEmbeddableRegistration< - ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi -> = (ref: React.ForwardedRef) => ReactElement | null; +import { MaybePromise } from '@kbn/utility-types'; +import React from 'react'; /** * The default embeddable API that all Embeddables must implement. * * Before adding anything to this interface, please be certain that it belongs in *every* embeddable. */ -export interface DefaultEmbeddableApi - extends DefaultPresentationPanelApi, +export interface DefaultEmbeddableApi< + SerializedState extends object = object, + RuntimeState extends object = SerializedState +> extends DefaultPresentationPanelApi, HasType, PublishesUnsavedChanges, - HasSerializableState {} + HasSerializableState, + HasSnapshottableState {} /** * A subset of the default embeddable API used in registration to allow implementors to omit aspects * of the API that will be automatically added by the system. */ export type ReactEmbeddableApiRegistration< - StateType extends object = object, - ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi -> = Omit; + SerializedState extends object = object, + Api extends DefaultEmbeddableApi = DefaultEmbeddableApi +> = Omit< + Api, + 'uuid' | 'parent' | 'type' | 'unsavedChanges' | 'resetUnsavedChanges' | 'snapshotRuntimeState' +>; /** * The React Embeddable Factory interface is used to register a series of functions that @@ -43,7 +50,7 @@ export type ReactEmbeddableApiRegistration< **/ export interface ReactEmbeddableFactory< SerializedState extends object = object, - ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi, + Api extends DefaultEmbeddableApi = DefaultEmbeddableApi, RuntimeState extends object = SerializedState > { /** @@ -53,16 +60,16 @@ export interface ReactEmbeddableFactory< type: string; /** - * A required synchronous function that transforms serialized state into runtime state. - * This will be used twice - once for the parent state, and once for the last saved state - * for comparison. - * - * This can also be used to: + * A required asynchronous function that transforms serialized state into runtime state. * + * This could be used to: + * - Load state from some external store * - Inject references provided by the parent * - Migrate the state to a newer version (this must be undone when serializing) */ - deserializeState: (state: SerializedPanelState) => RuntimeState; + deserializeState: ( + panelState: SerializedPanelState + ) => MaybePromise; /** * A required async function that builds your embeddable component and a linked API instance. The API @@ -75,10 +82,10 @@ export interface ReactEmbeddableFactory< buildEmbeddable: ( initialState: RuntimeState, buildApi: ( - apiRegistration: ReactEmbeddableApiRegistration, + apiRegistration: ReactEmbeddableApiRegistration, comparators: StateComparators - ) => ApiType, + ) => Api, uuid: string, parentApi?: unknown - ) => Promise<{ Component: React.FC<{}>; api: ApiType }>; + ) => Promise<{ Component: React.FC<{}>; api: Api }>; } diff --git a/src/plugins/expressions/common/execution/execution.ts b/src/plugins/expressions/common/execution/execution.ts index 13162b3a9d825..9dea349940ccb 100644 --- a/src/plugins/expressions/common/execution/execution.ts +++ b/src/plugins/expressions/common/execution/execution.ts @@ -27,7 +27,7 @@ import { Subscription, } from 'rxjs'; import { catchError, finalize, map, pluck, shareReplay, switchMap, tap } from 'rxjs'; -import { now, AbortError } from '@kbn/kibana-utils-plugin/common'; +import { now, AbortError, calculateObjectHash } from '@kbn/kibana-utils-plugin/common'; import { Adapters } from '@kbn/inspector-plugin/common'; import { Executor } from '../executor'; import { createExecutionContainer, ExecutionContainer } from './container'; @@ -55,6 +55,10 @@ type UnwrapReturnType unknown> = ? UnwrapObservable> : Awaited>; +export interface FunctionCacheItem { + value: unknown; + time: number; +} /** * The result returned after an expression function execution. */ @@ -70,6 +74,8 @@ export interface ExecutionResult { result: Output; } +const maxCacheSize = 1000; + const createAbortErrorValue = () => createError({ message: 'The expression was aborted.', @@ -235,6 +241,7 @@ export class Execution< * @private */ private readonly childExecutions: Execution[] = []; + private cacheTimeout: number = 30000; /** * Contract is a public representation of `Execution` instances. Contract we @@ -248,7 +255,11 @@ export class Execution< return this.context.inspectorAdapters; } - constructor(public readonly execution: ExecutionParams, private readonly logger?: Logger) { + constructor( + public readonly execution: ExecutionParams, + private readonly logger?: Logger, + private readonly functionCache: Map = new Map() + ) { const { executor } = execution; this.contract = new ExecutionContract(this); @@ -278,6 +289,7 @@ export class Execution< ? () => execution.params.kibanaRequest! : undefined, variables: execution.params.variables || {}, + allowCache: this.execution.params.allowCache, types: executor.getTypes(), abortSignal: this.abortController.signal, inspectorAdapters, @@ -454,42 +466,75 @@ export class Execution< input: unknown, args: Record ): Observable> { - return of(input).pipe( - map((currentInput) => this.cast(currentInput, fn.inputTypes)), - switchMap((normalizedInput) => of(fn.fn(normalizedInput, args, this.context))), - switchMap( - (fnResult) => - (isObservable(fnResult) - ? fnResult - : from(isPromise(fnResult) ? fnResult : [fnResult])) as Observable< - UnwrapReturnType - > - ), - map((output) => { - // Validate that the function returned the type it said it would. - // This isn't required, but it keeps function developers honest. - const returnType = getType(output); - const expectedType = fn.type; - if (expectedType && returnType !== expectedType) { - throw new Error( - `Function '${fn.name}' should return '${expectedType}',` + - ` actually returned '${returnType}'` - ); - } + let hash: string | undefined; + let lastValue: unknown; + let completionFlag = false; + + return of(input) + .pipe( + map((currentInput) => this.cast(currentInput, fn.inputTypes)), + switchMap((normalizedInput) => { + if (fn.allowCache && this.context.allowCache) { + hash = calculateObjectHash([ + fn.name, + normalizedInput, + args, + this.context.getSearchContext(), + ]); + } + if (hash && this.functionCache.has(hash)) { + const cached = this.functionCache.get(hash); + if (cached && Date.now() - cached.time < this.cacheTimeout) { + return of(cached.value); + } + } + return of(fn.fn(normalizedInput, args, this.context)); + }), + switchMap((fnResult) => { + return ( + isObservable(fnResult) ? fnResult : from(isPromise(fnResult) ? fnResult : [fnResult]) + ) as Observable>; + }), + map((output) => { + // Validate that the function returned the type it said it would. + // This isn't required, but it keeps function developers honest. + const returnType = getType(output); + const expectedType = fn.type; + if (expectedType && returnType !== expectedType) { + throw new Error( + `Function '${fn.name}' should return '${expectedType}',` + + ` actually returned '${returnType}'` + ); + } - // Validate the function output against the type definition's validate function. - const type = this.context.types[fn.type]; - if (type && type.validate) { - try { - type.validate(output); - } catch (e) { - throw new Error(`Output of '${fn.name}' is not a valid type '${fn.type}': ${e}`); + // Validate the function output against the type definition's validate function. + const type = this.context.types[fn.type]; + if (type && type.validate) { + try { + type.validate(output); + } catch (e) { + throw new Error(`Output of '${fn.name}' is not a valid type '${fn.type}': ${e}`); + } } - } - return output; - }) - ); + lastValue = output; + + return output; + }), + finalize(() => { + if (completionFlag && hash) { + while (this.functionCache.size >= maxCacheSize) { + this.functionCache.delete(this.functionCache.keys().next().value); + } + this.functionCache.set(hash, { value: lastValue, time: Date.now() }); + } + }) + ) + .pipe( + tap({ + complete: () => (completionFlag = true), // Set flag true only on successful completion + }) + ); } public cast(value: unknown, toTypeNames?: string[]): Type { diff --git a/src/plugins/expressions/common/execution/types.ts b/src/plugins/expressions/common/execution/types.ts index 03dbcc8a6ff13..4d8923003893a 100644 --- a/src/plugins/expressions/common/execution/types.ts +++ b/src/plugins/expressions/common/execution/types.ts @@ -35,6 +35,11 @@ export interface ExecutionContext */ types: Record; + /** + * Allow caching in the current execution. + */ + allowCache?: boolean; + /** * Adds ability to abort current execution. */ diff --git a/src/plugins/expressions/common/executor/executor.execution.test.ts b/src/plugins/expressions/common/executor/executor.execution.test.ts index ea906881e9738..44e6c92134b7e 100644 --- a/src/plugins/expressions/common/executor/executor.execution.test.ts +++ b/src/plugins/expressions/common/executor/executor.execution.test.ts @@ -27,7 +27,8 @@ describe('Executor mocked execution tests', () => { expect(Execution).toHaveBeenCalledWith( expect.objectContaining({ expression: 'foo bar="baz"' }), - undefined + undefined, + expect.anything() ); }); }); @@ -40,7 +41,8 @@ describe('Executor mocked execution tests', () => { expect(Execution).toHaveBeenCalledWith( expect.not.objectContaining({ expression: expect.anything() }), - undefined + undefined, + expect.anything() ); }); }); diff --git a/src/plugins/expressions/common/executor/executor.test.ts b/src/plugins/expressions/common/executor/executor.test.ts index 6f9dae491e5b2..de651e4c35f10 100644 --- a/src/plugins/expressions/common/executor/executor.test.ts +++ b/src/plugins/expressions/common/executor/executor.test.ts @@ -9,7 +9,7 @@ import { Executor } from './executor'; import * as expressionTypes from '../expression_types'; import * as expressionFunctions from '../expression_functions'; -import { Execution } from '../execution'; +import { Execution, FunctionCacheItem } from '../execution'; import { ExpressionAstFunction, parseExpression, formatExpression } from '../ast'; import { MigrateFunction } from '@kbn/kibana-utils-plugin/common/persistable_state'; import { SavedObjectReference } from '@kbn/core/types'; @@ -312,4 +312,92 @@ describe('Executor', () => { }); }); }); + + describe('caching', () => { + const functionCache: Map = new Map(); + const fakeCacheEntry = { time: Date.now(), value: 'test' }; + let executor: Executor; + + beforeAll(() => { + executor = new Executor(undefined, undefined, functionCache); + executor.registerFunction(expressionFunctions.variable); + expressionFunctions.theme.allowCache = true; + executor.registerFunction(expressionFunctions.theme); + }); + + afterEach(() => { + functionCache.clear(); + }); + + it('caches the result of function', async () => { + await executor.run('theme size default=12', null, { allowCache: true }).toPromise(); + expect(functionCache.size).toEqual(1); + const entry = functionCache.keys().next().value; + functionCache.set(entry, fakeCacheEntry); + const result = await executor + .run('theme size default=12', null, { allowCache: true }) + .toPromise(); + expect(functionCache.size).toEqual(1); + expect(result?.result).toEqual(fakeCacheEntry.value); + }); + + it('doesnt cache if allowCache flag is false', async () => { + await executor.run('theme size default=12', null, { allowCache: true }).toPromise(); + expect(functionCache.size).toEqual(1); + const entry = functionCache.keys().next().value; + functionCache.set(entry, fakeCacheEntry); + const result = await executor + .run('theme size default=12', null, { allowCache: false }) + .toPromise(); + expect(functionCache.size).toEqual(1); + expect(result?.result).not.toEqual(fakeCacheEntry.value); + }); + + it('doesnt cache results of functions that have allowCache property set to false', async () => { + await executor.run('var name="test"', null, { allowCache: true }).toPromise(); + expect(functionCache.size).toEqual(0); + }); + + describe('doesnt use cached version', () => { + const cachedVersion = { time: Date.now(), value: 'value' }; + + beforeAll(async () => { + await executor.run('theme size default=12', null, { allowCache: true }).toPromise(); + expect(functionCache.size).toEqual(1); + const entry: string = Object.keys(functionCache)[0]; + functionCache.set(entry, cachedVersion); + }); + + it('input changed', async () => { + const result = await executor + .run( + 'theme size default=12', + { + type: 'kibana_context', + value: 'test', + }, + { allowCache: true } + ) + .toPromise(); + expect(result).not.toEqual(cachedVersion); + }); + + it('arguments changed', async () => { + const result = await executor + .run('theme size default=14', null, { allowCache: true }) + .toPromise(); + expect(result).not.toEqual(cachedVersion); + }); + + it('search context changed', async () => { + const result = await executor + .run('theme size default=12', null, { + searchContext: { filters: [] }, + allowCache: true, + }) + .toPromise(); + expect(result).not.toEqual(cachedVersion); + }); + }); + }); }); diff --git a/src/plugins/expressions/common/executor/executor.ts b/src/plugins/expressions/common/executor/executor.ts index e8d01b15fd81d..28ccd1b95db1f 100644 --- a/src/plugins/expressions/common/executor/executor.ts +++ b/src/plugins/expressions/common/executor/executor.ts @@ -22,7 +22,12 @@ import { import { ExecutorState, ExecutorContainer } from './container'; import { createExecutorContainer } from './container'; import { AnyExpressionFunctionDefinition, ExpressionFunction } from '../expression_functions'; -import { Execution, ExecutionParams, ExecutionResult } from '../execution/execution'; +import { + Execution, + ExecutionParams, + ExecutionResult, + FunctionCacheItem, +} from '../execution/execution'; import { IRegistry } from '../types'; import { ExpressionType } from '../expression_types/expression_type'; import { AnyExpressionTypeDefinition } from '../expression_types/types'; @@ -109,10 +114,17 @@ export class Executor = Record) { + private functionCache: Map; + + constructor( + private readonly logger?: Logger, + state?: ExecutorState, + functionCache: Map = new Map() + ) { this.functions = new FunctionsRegistry(this as Executor); this.types = new TypesRegistry(this as Executor); this.container = createExecutorContainer(state); + this.functionCache = functionCache; } public get state(): ExecutorState { @@ -189,12 +201,17 @@ export class Executor = Record(executionParams, this.logger); + const execution = new Execution( + executionParams, + this.logger, + this.functionCache + ); return execution; } diff --git a/src/plugins/expressions/common/expression_functions/expression_function.ts b/src/plugins/expressions/common/expression_functions/expression_function.ts index 7ce51e3a7d36d..5df2e40a8286d 100644 --- a/src/plugins/expressions/common/expression_functions/expression_function.ts +++ b/src/plugins/expressions/common/expression_functions/expression_function.ts @@ -38,6 +38,11 @@ export class ExpressionFunction implements PersistableState c); diff --git a/src/plugins/expressions/common/expression_functions/types.ts b/src/plugins/expressions/common/expression_functions/types.ts index c59169ccf04ab..7e14d4ba72f30 100644 --- a/src/plugins/expressions/common/expression_functions/types.ts +++ b/src/plugins/expressions/common/expression_functions/types.ts @@ -57,6 +57,11 @@ export interface ExpressionFunctionDefinition< */ type?: TypeString | UnmappedTypeStrings; + /** + * Opt-in to caching this function. By default function outputs are cached and given the same inputs cached result is returned. + */ + allowCache?: boolean; + /** * List of allowed type names for input value of this function. If this * property is set the input of function will be cast to the first possible diff --git a/src/plugins/expressions/common/mocks.ts b/src/plugins/expressions/common/mocks.ts index 4141da06ec04e..db880a4eaa5d2 100644 --- a/src/plugins/expressions/common/mocks.ts +++ b/src/plugins/expressions/common/mocks.ts @@ -28,6 +28,7 @@ export const createMockExecutionContext = requests: {}, data: {}, }, + allowCache: false, } as unknown as ExecutionContext; return { diff --git a/src/plugins/expressions/common/service/expressions_services.ts b/src/plugins/expressions/common/service/expressions_services.ts index e73e07a387c46..d28703b40145b 100644 --- a/src/plugins/expressions/common/service/expressions_services.ts +++ b/src/plugins/expressions/common/service/expressions_services.ts @@ -173,6 +173,8 @@ export interface ExpressionExecutionParams { * @deafult 0 */ throttle?: number; + + allowCache?: boolean; } /** diff --git a/src/plugins/expressions/public/loader.ts b/src/plugins/expressions/public/loader.ts index eb45b581c29a2..11ed32c4633a9 100644 --- a/src/plugins/expressions/public/loader.ts +++ b/src/plugins/expressions/public/loader.ts @@ -151,6 +151,7 @@ export class ExpressionLoader { executionContext: params.executionContext, partial: params.partial, throttle: params.throttle, + allowCache: params.allowCache, }); this.subscription = this.execution .getData() @@ -190,6 +191,7 @@ export class ExpressionLoader { this.params.debug = Boolean(params.debug); this.params.partial = Boolean(params.partial); this.params.throttle = Number(params.throttle ?? 1000); + this.params.allowCache = params.allowCache; this.params.inspectorAdapters = (params.inspectorAdapters || this.execution?.inspect()) as Adapters; diff --git a/src/plugins/expressions/public/types/index.ts b/src/plugins/expressions/public/types/index.ts index c1b7dc8cc6369..8f6a7b9dc63b3 100644 --- a/src/plugins/expressions/public/types/index.ts +++ b/src/plugins/expressions/public/types/index.ts @@ -40,7 +40,6 @@ export interface IExpressionLoaderParams { variables?: Record; // Enables debug tracking on each expression in the AST debug?: boolean; - disableCaching?: boolean; customFunctions?: []; customRenderers?: []; uiState?: unknown; @@ -67,6 +66,8 @@ export interface IExpressionLoaderParams { * By default, it equals 1000. */ throttle?: number; + + allowCache?: boolean; } export interface ExpressionRenderError extends Error { diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts index 9c4e025dd92b5..3a81a37dba189 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -492,6 +492,10 @@ export const stackManagementSchema: MakeSchemaFrom = { type: 'boolean', _meta: { description: 'Non-default value of setting.' }, }, + 'observability:aiAssistantSearchConnectorIndexPattern': { + type: 'text', + _meta: { description: 'Non-default value of setting.' }, + }, 'observability:logsExplorer:allowedDataViews': { type: 'array', items: { diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts index e3b84245ce3f0..82f31eb629a89 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -56,6 +56,7 @@ export interface UsageStats { 'observability:aiAssistantLogsIndexPattern': string; 'observability:aiAssistantResponseLanguage': string; 'observability:aiAssistantSimulatedFunctionCalling': boolean; + 'observability:aiAssistantSearchConnectorIndexPattern': string; 'visualization:heatmap:maxBuckets': number; 'visualization:colorMapping': string; 'visualization:useLegacyTimeAxis': boolean; diff --git a/src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx b/src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx index 034f63083be1d..99e64ee919d8c 100644 --- a/src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx +++ b/src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx @@ -16,13 +16,13 @@ import type { IUiSettingsClient } from '@kbn/core/public'; import { EuiFlexGroup, EuiFlexItem, - EuiIcon, EuiInMemoryTable, EuiLink, EuiSearchBarProps, EuiTableFieldDataColumnType, EuiText, EuiToolTip, + EuiIconTip, IconType, PropertySort, Query, @@ -255,14 +255,14 @@ export class SavedObjectFinderUi extends React.Component< ).getIconForSavedObject(item.simple); return ( - - - + ); }, } diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 673361881b2ff..4b26657fc9339 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -10203,6 +10203,12 @@ "description": "Non-default value of setting." } }, + "observability:aiAssistantSearchConnectorIndexPattern": { + "type": "text", + "_meta": { + "description": "Non-default value of setting." + } + }, "observability:logsExplorer:allowedDataViews": { "type": "array", "items": { diff --git a/test/functional/apps/dashboard/group3/dashboard_state.ts b/test/functional/apps/dashboard/group3/dashboard_state.ts index d5d522a738481..423adf781835c 100644 --- a/test/functional/apps/dashboard/group3/dashboard_state.ts +++ b/test/functional/apps/dashboard/group3/dashboard_state.ts @@ -185,7 +185,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.waitForRenderComplete(); }; - describe('Directly modifying url updates dashboard state', () => { + // FLAKY: https://github.com/elastic/kibana/issues/139762 + describe.skip('Directly modifying url updates dashboard state', () => { before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.clickNewDashboard(); diff --git a/test/functional/apps/discover/group4/_esql_view.ts b/test/functional/apps/discover/group4/_esql_view.ts index 17c2e9542d774..a5a626b8fe771 100644 --- a/test/functional/apps/discover/group4/_esql_view.ts +++ b/test/functional/apps/discover/group4/_esql_view.ts @@ -257,7 +257,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - describe('inspector', () => { + // FLAKY: https://github.com/elastic/kibana/issues/183847 + describe.skip('inspector', () => { beforeEach(async () => { await PageObjects.common.navigateToApp('discover'); await PageObjects.timePicker.setDefaultAbsoluteRange(); diff --git a/test/functional/services/data_grid.ts b/test/functional/services/data_grid.ts index a6c91d91a8961..18282442696ff 100644 --- a/test/functional/services/data_grid.ts +++ b/test/functional/services/data_grid.ts @@ -376,12 +376,12 @@ export class DataGridService extends FtrService { await this.testSubjects.click('dataGridDisplaySelectorButton'); } - public async getCurrentRowHeightValue() { + public async getCurrentRowHeightValue(scope: 'row' | 'header' = 'row') { const buttonGroup = await this.testSubjects.find( - 'unifiedDataTableRowHeightSettings_rowHeightButtonGroup' + `unifiedDataTable${scope === 'header' ? 'Header' : ''}RowHeightSettings_rowHeightButtonGroup` ); let value = ''; - await this.retry.waitFor('row height value not to be empty', async () => { + await this.retry.waitFor(`${scope} height value not to be empty`, async () => { // to prevent flakiness const selectedButton = await buttonGroup.findByCssSelector( '.euiButtonGroupButton-isSelected' @@ -401,12 +401,7 @@ export class DataGridService extends FtrService { } public async getCurrentHeaderRowHeightValue() { - const buttonGroup = await this.testSubjects.find( - 'unifiedDataTableHeaderRowHeightSettings_rowHeightButtonGroup' - ); - return ( - await buttonGroup.findByCssSelector('.euiButtonGroupButton-isSelected') - ).getVisibleText(); + return await this.getCurrentRowHeightValue('header'); } public async changeHeaderRowHeightValue(newValue: string) { diff --git a/x-pack/packages/kbn-elastic-assistant-common/constants.ts b/x-pack/packages/kbn-elastic-assistant-common/constants.ts index 67a20011dffd9..f30cb053d4ce1 100755 --- a/x-pack/packages/kbn-elastic-assistant-common/constants.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/constants.ts @@ -8,18 +8,24 @@ export const ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION = '1'; export const ELASTIC_AI_ASSISTANT_URL = '/api/elastic_assistant'; +export const ELASTIC_AI_ASSISTANT_INTERNAL_URL = '/internal/elastic_assistant'; -export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL = `${ELASTIC_AI_ASSISTANT_URL}/current_user/conversations`; +export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL = `${ELASTIC_AI_ASSISTANT_INTERNAL_URL}/current_user/conversations`; export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/{id}`; export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID}/messages`; export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/_bulk_action`; export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/_find`; -export const ELASTIC_AI_ASSISTANT_PROMPTS_URL = `${ELASTIC_AI_ASSISTANT_URL}/prompts`; +export const ELASTIC_AI_ASSISTANT_PROMPTS_URL = `${ELASTIC_AI_ASSISTANT_INTERNAL_URL}/prompts`; export const ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION = `${ELASTIC_AI_ASSISTANT_PROMPTS_URL}/_bulk_action`; export const ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND = `${ELASTIC_AI_ASSISTANT_PROMPTS_URL}/_find`; -export const ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL = `${ELASTIC_AI_ASSISTANT_URL}/anonymization_fields`; +export const ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL = `${ELASTIC_AI_ASSISTANT_INTERNAL_URL}/anonymization_fields`; export const ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION = `${ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL}/_bulk_action`; export const ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND = `${ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL}/_find`; + +// TODO: Update existing 'status' endpoint to take resource as query param as to not conflict with 'entries' +export const ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL = `${ELASTIC_AI_ASSISTANT_INTERNAL_URL}/knowledge_base/{resource?}`; +export const ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL = `${ELASTIC_AI_ASSISTANT_URL}/knowledge_base/entries`; +export const ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL_BULK_ACTION = `${ELASTIC_AI_ASSISTANT_URL}/knowledge_base/_bulk_action`; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts index 2a6cce1adbdbb..9c734cc4b3c13 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts @@ -14,5 +14,6 @@ export type AssistantFeatures = { [K in keyof typeof defaultAssistantFeatures]: * Default features available to the elastic assistant */ export const defaultAssistantFeatures = Object.freeze({ + assistantKnowledgeBaseByDefault: false, assistantModelEvaluation: false, }); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts index be9ed538cda7f..1b855650ddcfc 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts @@ -16,7 +16,8 @@ import { z } from 'zod'; * version: 1 */ -import { UUID, Replacements } from '../conversations/common_attributes.gen'; +import { NonEmptyString } from '../common_attributes.gen'; +import { Replacements } from '../conversations/common_attributes.gen'; export type ExecuteConnectorRequestParams = z.infer; export const ExecuteConnectorRequestParams = z.object({ @@ -29,7 +30,7 @@ export type ExecuteConnectorRequestParamsInput = z.input; export const ExecuteConnectorRequestBody = z.object({ - conversationId: UUID.optional(), + conversationId: NonEmptyString.optional(), message: z.string().optional(), model: z.string().optional(), subAction: z.enum(['invokeAI', 'invokeStream']), diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml index d8bb1396746ed..9ea3c4107c7d1 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml @@ -31,7 +31,7 @@ paths: - subAction properties: conversationId: - $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' message: type: string model: diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts index bc2cb93bb30c3..1fe37666b93e7 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts @@ -13,10 +13,10 @@ import { z } from 'zod'; * * info: * title: Bulk Actions API endpoint - * version: 2023-10-31 + * version: 1 */ -import { UUID, NonEmptyString } from '../conversations/common_attributes.gen'; +import { NonEmptyString } from '../common_attributes.gen'; export type BulkActionSkipReason = z.infer; export const BulkActionSkipReason = z.literal('ANONYMIZATION_FIELD_NOT_MODIFIED'); @@ -44,7 +44,7 @@ export const NormalizedAnonymizationFieldError = z.object({ export type AnonymizationFieldResponse = z.infer; export const AnonymizationFieldResponse = z.object({ - id: UUID, + id: NonEmptyString, timestamp: NonEmptyString.optional(), field: z.string(), allowed: z.boolean().optional(), diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml index e07e492b5fdbe..9e2623966f129 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml @@ -1,9 +1,9 @@ openapi: 3.0.0 info: title: Bulk Actions API endpoint - version: '2023-10-31' + version: '1' paths: - /api/elastic_assistant/anonymization_fields/_bulk_action: + /internal/elastic_assistant/anonymization_fields/_bulk_action: post: operationId: PerformBulkAction x-codegen-enabled: true @@ -103,9 +103,9 @@ components: - field properties: id: - $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' 'timestamp': - $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' field: type: string allowed: @@ -232,4 +232,3 @@ components: type: boolean anonymized: type: boolean - \ No newline at end of file diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts index a0c83a6594fad..ce24ee0bb54e0 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts @@ -14,7 +14,7 @@ import { ArrayFromString } from '@kbn/zod-helpers'; * * info: * title: Find AnonymizationFields API endpoint - * version: 2023-10-31 + * version: 1 */ import { AnonymizationFieldResponse } from './bulk_crud_anonymization_fields_route.gen'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml index 4861d267ce5c8..b9b2d1e9e2097 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml @@ -1,9 +1,9 @@ openapi: 3.0.0 info: title: Find AnonymizationFields API endpoint - version: '2023-10-31' + version: '1' paths: - /api/elastic_assistant/anonymization_fields/_find: + /internal/elastic_assistant/anonymization_fields/_find: get: operationId: FindAnonymizationFields x-codegen-enabled: true diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts index 5d218afd48131..6c2ea102a501d 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts @@ -18,5 +18,6 @@ import { z } from 'zod'; export type GetCapabilitiesResponse = z.infer; export const GetCapabilitiesResponse = z.object({ + assistantKnowledgeBaseByDefault: z.boolean(), assistantModelEvaluation: z.boolean(), }); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml index 4664405cfef33..7461bdbc93237 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml @@ -19,9 +19,12 @@ paths: schema: type: object properties: + assistantKnowledgeBaseByDefault: + type: boolean assistantModelEvaluation: type: boolean required: + - assistantKnowledgeBaseByDefault - assistantModelEvaluation '400': description: Generic Error diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts new file mode 100644 index 0000000000000..d98ee02af9ce4 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.gen.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +import { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Common Elastic AI Assistant Attributes + * version: not applicable + */ + +/** + * A string that is not empty and does not contain only whitespace + */ +export type NonEmptyString = z.infer; +export const NonEmptyString = z + .string() + .min(1) + .regex(/^(?! *$).+$/); + +/** + * A universally unique identifier + */ +export type UUID = z.infer; +export const UUID = z.string().uuid(); + +/** + * Could be any string, not necessarily a UUID + */ +export type User = z.infer; +export const User = z.object({ + /** + * User id + */ + id: z.string().optional(), + /** + * User name + */ + name: z.string().optional(), +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.schema.yaml new file mode 100644 index 0000000000000..5c580c52281ad --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common_attributes.schema.yaml @@ -0,0 +1,30 @@ +openapi: 3.0.0 +info: + title: Common Elastic AI Assistant Attributes + version: 'not applicable' +paths: {} +components: + x-codegen-enabled: true + schemas: + NonEmptyString: + type: string + pattern: ^(?! *$).+$ + minLength: 1 + description: A string that is not empty and does not contain only whitespace + + UUID: + type: string + format: uuid + description: A universally unique identifier + + User: + type: object + description: Could be any string, not necessarily a UUID + properties: + id: + type: string + description: User id + name: + type: string + description: User name + diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts index bb401150bbee0..1acde90ccebb3 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts @@ -13,7 +13,7 @@ import { z } from 'zod'; * * info: * title: Bulk Actions API endpoint - * version: 2023-10-31 + * version: 1 */ import { diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.schema.yaml index 790f4e5e85d5e..0768508205708 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.schema.yaml @@ -1,9 +1,9 @@ openapi: 3.0.0 info: title: Bulk Actions API endpoint - version: '2023-10-31' + version: '1' paths: - /api/elastic_assistant/conversations/_bulk_action: + /internal/elastic_assistant/conversations/_bulk_action: post: operationId: PerformBulkAction x-codegen-enabled: true diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts index 808cf88fcec7c..a8637be38c146 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts @@ -16,35 +16,7 @@ import { z } from 'zod'; * version: not applicable */ -/** - * A string that is not empty and does not contain only whitespace - */ -export type NonEmptyString = z.infer; -export const NonEmptyString = z - .string() - .min(1) - .regex(/^(?! *$).+$/); - -/** - * A universally unique identifier - */ -export type UUID = z.infer; -export const UUID = z.string().uuid(); - -/** - * Could be any string, not necessarily a UUID - */ -export type User = z.infer; -export const User = z.object({ - /** - * User id. - */ - id: z.string().optional(), - /** - * User name. - */ - name: z.string().optional(), -}); +import { NonEmptyString, User } from '../common_attributes.gen'; /** * trace Data @@ -180,7 +152,7 @@ export const ConversationSummary = z.object({ export type ErrorSchema = z.infer; export const ErrorSchema = z .object({ - id: UUID.optional(), + id: NonEmptyString.optional(), error: z.object({ status_code: z.number().int().min(400), message: z.string(), @@ -190,7 +162,7 @@ export const ErrorSchema = z export type ConversationResponse = z.infer; export const ConversationResponse = z.object({ - id: z.union([UUID, NonEmptyString]), + id: NonEmptyString, /** * The conversation title. */ @@ -235,7 +207,7 @@ export const ConversationResponse = z.object({ export type ConversationUpdateProps = z.infer; export const ConversationUpdateProps = z.object({ - id: z.union([UUID, NonEmptyString]), + id: NonEmptyString, /** * The conversation title. */ diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml index 3f2827b348004..49aaaa5663a1c 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml @@ -6,27 +6,6 @@ paths: {} components: x-codegen-enabled: true schemas: - NonEmptyString: - type: string - pattern: ^(?! *$).+$ - minLength: 1 - description: A string that is not empty and does not contain only whitespace - - UUID: - type: string - format: uuid - description: A universally unique identifier - - User: - type: object - description: Could be any string, not necessarily a UUID - properties: - id: - type: string - description: User id. - name: - type: string - description: User name. TraceData: type: object @@ -97,7 +76,7 @@ components: $ref: '#/components/schemas/MessageRole' description: Message role. timestamp: - $ref: '#/components/schemas/NonEmptyString' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' description: The timestamp message was sent or received. isError: type: boolean @@ -135,7 +114,7 @@ components: type: string description: Summary text of the conversation over time. timestamp: - $ref: '#/components/schemas/NonEmptyString' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' description: The timestamp summary was updated. public: type: boolean @@ -151,7 +130,7 @@ components: additionalProperties: false properties: id: - $ref: '#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' error: type: object required: @@ -175,9 +154,7 @@ components: - category properties: id: - oneOf: - - $ref: '#/components/schemas/UUID' - - $ref: '#/components/schemas/NonEmptyString' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' title: type: string description: The conversation title. @@ -187,7 +164,7 @@ components: summary: $ref: '#/components/schemas/ConversationSummary' 'timestamp': - $ref: '#/components/schemas/NonEmptyString' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' updatedAt: description: The last time conversation was updated. type: string @@ -199,7 +176,7 @@ components: users: type: array items: - $ref: '#/components/schemas/User' + $ref: '../common_attributes.schema.yaml#/components/schemas/User' messages: type: array items: @@ -224,9 +201,7 @@ components: - id properties: id: - oneOf: - - $ref: '#/components/schemas/UUID' - - $ref: '#/components/schemas/NonEmptyString' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' title: type: string description: The conversation title. diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts index ed5f1b8f057c6..072a04d944d34 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts @@ -13,16 +13,16 @@ import { z } from 'zod'; * * info: * title: Create Conversation API endpoint - * version: 2023-10-31 + * version: 1 */ import { ConversationCreateProps, ConversationResponse, - UUID, ConversationUpdateProps, ConversationMessageCreateProps, } from './common_attributes.gen'; +import { NonEmptyString } from '../common_attributes.gen'; export type AppendConversationMessageRequestParams = z.infer< typeof AppendConversationMessageRequestParams @@ -31,7 +31,7 @@ export const AppendConversationMessageRequestParams = z.object({ /** * The conversation's `id` value. */ - id: UUID, + id: NonEmptyString, }); export type AppendConversationMessageRequestParamsInput = z.input< typeof AppendConversationMessageRequestParams @@ -60,7 +60,7 @@ export const DeleteConversationRequestParams = z.object({ /** * The conversation's `id` value. */ - id: UUID, + id: NonEmptyString, }); export type DeleteConversationRequestParamsInput = z.input; @@ -72,7 +72,7 @@ export const ReadConversationRequestParams = z.object({ /** * The conversation's `id` value. */ - id: UUID, + id: NonEmptyString, }); export type ReadConversationRequestParamsInput = z.input; @@ -84,7 +84,7 @@ export const UpdateConversationRequestParams = z.object({ /** * The conversation's `id` value. */ - id: UUID, + id: NonEmptyString, }); export type UpdateConversationRequestParamsInput = z.input; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.schema.yaml index a7f08659e76e3..fc2f86e8a8654 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.schema.yaml @@ -1,9 +1,9 @@ openapi: 3.0.0 info: title: Create Conversation API endpoint - version: '2023-10-31' + version: '1' paths: - /api/elastic_assistant/conversations: + /internal/elastic_assistant/conversations: post: operationId: CreateConversation x-codegen-enabled: true @@ -37,8 +37,8 @@ paths: type: string message: type: string - - /api/elastic_assistant/conversations/{id}: + + /internal/elastic_assistant/conversations/{id}: get: operationId: ReadConversation x-codegen-enabled: true @@ -52,7 +52,7 @@ paths: required: true description: The conversation's `id` value. schema: - $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' responses: 200: description: Indicates a successful call. @@ -86,7 +86,7 @@ paths: required: true description: The conversation's `id` value. schema: - $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' requestBody: required: true content: @@ -126,7 +126,7 @@ paths: required: true description: The conversation's `id` value. schema: - $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' responses: 200: description: Indicates a successful call. @@ -147,8 +147,8 @@ paths: type: string message: type: string - - /api/elastic_assistant/conversations/{id}/messages: + + /internal/elastic_assistant/conversations/{id}/messages: post: operationId: AppendConversationMessage x-codegen-enabled: true @@ -162,7 +162,7 @@ paths: required: true description: The conversation's `id` value. schema: - $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' requestBody: required: true content: @@ -188,4 +188,4 @@ paths: error: type: string message: - type: string \ No newline at end of file + type: string diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts index 16743f77b3efd..8f840c69adf30 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts @@ -14,7 +14,7 @@ import { ArrayFromString } from '@kbn/zod-helpers'; * * info: * title: Find Conversations API endpoint - * version: 2023-10-31 + * version: 1 */ import { ConversationResponse } from './common_attributes.gen'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.schema.yaml index b44cebd1d3ec2..44cec1a169e51 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.schema.yaml @@ -1,9 +1,9 @@ openapi: 3.0.0 info: title: Find Conversations API endpoint - version: '2023-10-31' + version: '1' paths: - /api/elastic_assistant/conversations/_find: + /internal/elastic_assistant/conversations/_find: get: operationId: FindConversations x-codegen-enabled: true @@ -91,7 +91,7 @@ paths: message: type: string - /api/elastic_assistant/conversations/current_user/_find: + /internal/elastic_assistant/conversations/current_user/_find: get: operationId: FindCurrentUserConversations x-codegen-enabled: true diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts index 24d484bdd06c6..c9c2d2a8be3c0 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts @@ -18,6 +18,9 @@ export const API_VERSIONS = { export const PUBLIC_API_ACCESS = 'public'; export const INTERNAL_API_ACCESS = 'internal'; +// Common Schemas +export * from './common_attributes.gen'; + // Attack discovery Schemas export * from './attack_discovery/post_attack_discovery_route.gen'; @@ -37,5 +40,8 @@ export * from './conversations/find_conversations_route.gen'; // Actions Connector Schemas export * from './actions_connector/post_actions_connector_execute_route.gen'; -// KB Schemas +// Knowledge Base Schemas export * from './knowledge_base/crud_kb_route.gen'; +export * from './knowledge_base/bulk_crud_knowledge_base_route.gen'; +export * from './knowledge_base/common_attributes.gen'; +export * from './knowledge_base/crud_knowledge_base_route.gen'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts new file mode 100644 index 0000000000000..9ff055e656fe3 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.gen.ts @@ -0,0 +1,117 @@ +/* + * 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. + */ + +import { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Bulk Knowledge Base Actions API endpoint + * version: 2023-10-31 + */ + +import { + KnowledgeBaseEntryCreateProps, + KnowledgeBaseEntryUpdateProps, + KnowledgeBaseEntryResponse, +} from './common_attributes.gen'; + +export type KnowledgeBaseEntryBulkActionSkipReason = z.infer< + typeof KnowledgeBaseEntryBulkActionSkipReason +>; +export const KnowledgeBaseEntryBulkActionSkipReason = z.literal( + 'KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED' +); + +export type KnowledgeBaseEntryBulkActionSkipResult = z.infer< + typeof KnowledgeBaseEntryBulkActionSkipResult +>; +export const KnowledgeBaseEntryBulkActionSkipResult = z.object({ + id: z.string(), + name: z.string().optional(), + skip_reason: KnowledgeBaseEntryBulkActionSkipReason, +}); + +export type KnowledgeBaseEntryDetailsInError = z.infer; +export const KnowledgeBaseEntryDetailsInError = z.object({ + id: z.string(), + name: z.string().optional(), +}); + +export type NormalizedKnowledgeBaseEntryError = z.infer; +export const NormalizedKnowledgeBaseEntryError = z.object({ + message: z.string(), + statusCode: z.number().int(), + err_code: z.string().optional(), + knowledgeBaseEntries: z.array(KnowledgeBaseEntryDetailsInError), +}); + +export type KnowledgeBaseEntryBulkCrudActionResults = z.infer< + typeof KnowledgeBaseEntryBulkCrudActionResults +>; +export const KnowledgeBaseEntryBulkCrudActionResults = z.object({ + updated: z.array(KnowledgeBaseEntryResponse), + created: z.array(KnowledgeBaseEntryResponse), + deleted: z.array(z.string()), + skipped: z.array(KnowledgeBaseEntryBulkActionSkipResult), +}); + +export type KnowledgeBaseEntryBulkCrudActionSummary = z.infer< + typeof KnowledgeBaseEntryBulkCrudActionSummary +>; +export const KnowledgeBaseEntryBulkCrudActionSummary = z.object({ + failed: z.number().int(), + skipped: z.number().int(), + succeeded: z.number().int(), + total: z.number().int(), +}); + +export type KnowledgeBaseEntryBulkCrudActionResponse = z.infer< + typeof KnowledgeBaseEntryBulkCrudActionResponse +>; +export const KnowledgeBaseEntryBulkCrudActionResponse = z.object({ + success: z.boolean().optional(), + statusCode: z.number().int().optional(), + message: z.string().optional(), + knowledgeBaseEntriesCount: z.number().int().optional(), + attributes: z.object({ + results: KnowledgeBaseEntryBulkCrudActionResults, + summary: KnowledgeBaseEntryBulkCrudActionSummary, + errors: z.array(NormalizedKnowledgeBaseEntryError).optional(), + }), +}); + +export type KnowledgeBaseEntryBulkActionBase = z.infer; +export const KnowledgeBaseEntryBulkActionBase = z.object({ + /** + * Query to filter Knowledge Base Entries + */ + query: z.string().optional(), + /** + * Array of Knowledge base Entry IDs + */ + ids: z.array(z.string()).min(1).optional(), +}); + +export type PerformKnowledgeBaseEntryBulkActionRequestBody = z.infer< + typeof PerformKnowledgeBaseEntryBulkActionRequestBody +>; +export const PerformKnowledgeBaseEntryBulkActionRequestBody = z.object({ + delete: KnowledgeBaseEntryBulkActionBase.optional(), + create: z.array(KnowledgeBaseEntryCreateProps).optional(), + update: z.array(KnowledgeBaseEntryUpdateProps).optional(), +}); +export type PerformKnowledgeBaseEntryBulkActionRequestBodyInput = z.input< + typeof PerformKnowledgeBaseEntryBulkActionRequestBody +>; + +export type PerformKnowledgeBaseEntryBulkActionResponse = z.infer< + typeof PerformKnowledgeBaseEntryBulkActionResponse +>; +export const PerformKnowledgeBaseEntryBulkActionResponse = KnowledgeBaseEntryBulkCrudActionResponse; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.schema.yaml new file mode 100644 index 0000000000000..f8a2ee49d399a --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/bulk_crud_knowledge_base_route.schema.yaml @@ -0,0 +1,175 @@ +openapi: 3.0.0 +info: + title: Bulk Knowledge Base Actions API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/knowledge_base/entries/_bulk_action: + post: + operationId: PerformKnowledgeBaseEntryBulkAction + x-codegen-enabled: true + summary: Applies a bulk action to multiple Knowledge Base Entries + description: The bulk action is applied to all Knowledge Base Entries that match the filter or to the list of Knowledge Base Entries by their IDs + tags: + - Knowledge Base Entries Bulk API + requestBody: + content: + application/json: + schema: + type: object + properties: + delete: + $ref: '#/components/schemas/KnowledgeBaseEntryBulkActionBase' + create: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryCreateProps' + update: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryUpdateProps' + responses: + 200: + description: Successful bulk operation request + content: + application/json: + schema: + $ref: '#/components/schemas/KnowledgeBaseEntryBulkCrudActionResponse' + 400: + description: Generic Error + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryErrorSchema' + +components: + schemas: + KnowledgeBaseEntryBulkActionSkipReason: + type: string + enum: + - KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED + + KnowledgeBaseEntryBulkActionSkipResult: + type: object + properties: + id: + type: string + name: + type: string + skip_reason: + $ref: '#/components/schemas/KnowledgeBaseEntryBulkActionSkipReason' + required: + - id + - skip_reason + + KnowledgeBaseEntryDetailsInError: + type: object + properties: + id: + type: string + name: + type: string + required: + - id + + NormalizedKnowledgeBaseEntryError: + type: object + properties: + message: + type: string + statusCode: + type: integer + err_code: + type: string + knowledgeBaseEntries: + type: array + items: + $ref: '#/components/schemas/KnowledgeBaseEntryDetailsInError' + required: + - message + - statusCode + - knowledgeBaseEntries + + KnowledgeBaseEntryBulkCrudActionResults: + type: object + properties: + updated: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryResponse' + created: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryResponse' + deleted: + type: array + items: + type: string + skipped: + type: array + items: + $ref: '#/components/schemas/KnowledgeBaseEntryBulkActionSkipResult' + required: + - updated + - created + - deleted + - skipped + + KnowledgeBaseEntryBulkCrudActionSummary: + type: object + properties: + failed: + type: integer + skipped: + type: integer + succeeded: + type: integer + total: + type: integer + required: + - failed + - skipped + - succeeded + - total + + KnowledgeBaseEntryBulkCrudActionResponse: + type: object + properties: + success: + type: boolean + statusCode: + type: integer + message: + type: string + knowledgeBaseEntriesCount: + type: integer + attributes: + type: object + properties: + results: + $ref: '#/components/schemas/KnowledgeBaseEntryBulkCrudActionResults' + summary: + $ref: '#/components/schemas/KnowledgeBaseEntryBulkCrudActionSummary' + errors: + type: array + items: + $ref: '#/components/schemas/NormalizedKnowledgeBaseEntryError' + required: + - results + - summary + required: + - attributes + + + KnowledgeBaseEntryBulkActionBase: + x-inline: true + type: object + properties: + query: + type: string + description: Query to filter Knowledge Base Entries + ids: + type: array + description: Array of Knowledge base Entry IDs + minItems: 1 + items: + type: string diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts new file mode 100644 index 0000000000000..0d44cbe51e320 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen.ts @@ -0,0 +1,119 @@ +/* + * 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. + */ + +import { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Common Knowledge Base Attributes + * version: not applicable + */ + +import { NonEmptyString, User } from '../common_attributes.gen'; + +export type KnowledgeBaseEntryErrorSchema = z.infer; +export const KnowledgeBaseEntryErrorSchema = z + .object({ + statusCode: z.number(), + error: z.string(), + message: z.string(), + }) + .strict(); + +/** + * Metadata about an Knowledge Base Entry + */ +export type Metadata = z.infer; +export const Metadata = z.object({ + /** + * Knowledge Base resource name + */ + kbResource: z.string(), + /** + * Original text content source + */ + source: z.string(), + /** + * Whether or not this resource should always be included + */ + required: z.boolean(), +}); + +/** + * Object containing Knowledge Base Entry text embeddings and modelId used to create the embeddings + */ +export type Vector = z.infer; +export const Vector = z.object({ + /** + * ID of the model used to create the embeddings + */ + modelId: z.string(), + /** + * Tokens with their corresponding values + */ + tokens: z.object({}).catchall(z.number()), +}); + +export type KnowledgeBaseEntryResponse = z.infer; +export const KnowledgeBaseEntryResponse = z.object({ + timestamp: NonEmptyString.optional(), + id: NonEmptyString, + /** + * Time the Knowledge Base Entry was created + */ + createdAt: z.string(), + /** + * User who created the Knowledge Base Entry + */ + createdBy: z.string().optional(), + /** + * Time the Knowledge Base Entry was last updated + */ + updatedAt: z.string().optional(), + /** + * User who last updated the Knowledge Base Entry + */ + updatedBy: z.string().optional(), + users: z.array(User), + /** + * Metadata about the Knowledge Base Entry + */ + metadata: Metadata.optional(), + /** + * Kibana space + */ + namespace: z.string(), + /** + * Knowledge Base Entry content + */ + text: z.string(), + vector: Vector.optional(), +}); + +export type KnowledgeBaseEntryUpdateProps = z.infer; +export const KnowledgeBaseEntryUpdateProps = z.object({ + id: NonEmptyString, + /** + * Metadata about the Knowledge Base Entry + */ + metadata: Metadata.optional(), +}); + +export type KnowledgeBaseEntryCreateProps = z.infer; +export const KnowledgeBaseEntryCreateProps = z.object({ + /** + * Metadata about the Knowledge Base Entry + */ + metadata: Metadata, + /** + * Knowledge Base Entry content + */ + text: z.string(), +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.schema.yaml new file mode 100644 index 0000000000000..a9a9794852953 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.schema.yaml @@ -0,0 +1,124 @@ +openapi: 3.0.0 +info: + title: Common Knowledge Base Attributes + version: 'not applicable' +paths: {} +components: + x-codegen-enabled: true + schemas: + + KnowledgeBaseEntryErrorSchema: + type: object + required: + - statusCode + - error + - message + additionalProperties: false + properties: + statusCode: + type: number + error: + type: string + message: + type: string + + Metadata: + type: object + description: Metadata about an Knowledge Base Entry + required: + - 'kbResource' + - 'source' + - 'required' + properties: + kbResource: + type: string + description: Knowledge Base resource name + source: + type: string + description: Original text content source + required: + type: boolean + description: Whether or not this resource should always be included + + Vector: + type: object + description: Object containing Knowledge Base Entry text embeddings and modelId used to create the embeddings + required: + - 'modelId' + - 'tokens' + properties: + modelId: + type: string + description: ID of the model used to create the embeddings + tokens: + type: object + additionalProperties: + type: number + description: Tokens with their corresponding values + + KnowledgeBaseEntryResponse: + type: object + required: + - id + - createdAt + - users + - namespace + - text + properties: + 'timestamp': + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' + id: + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' + createdAt: + description: Time the Knowledge Base Entry was created + type: string + createdBy: + description: User who created the Knowledge Base Entry + type: string + updatedAt: + description: Time the Knowledge Base Entry was last updated + type: string + updatedBy: + description: User who last updated the Knowledge Base Entry + type: string + users: + type: array + items: + $ref: '../common_attributes.schema.yaml#/components/schemas/User' + metadata: + $ref: '#/components/schemas/Metadata' + description: Metadata about the Knowledge Base Entry + namespace: + type: string + description: Kibana space + text: + type: string + description: Knowledge Base Entry content + vector: + $ref: '#/components/schemas/Vector' + + KnowledgeBaseEntryUpdateProps: + type: object + required: + - id + properties: + id: + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' + metadata: + $ref: '#/components/schemas/Metadata' + description: Metadata about the Knowledge Base Entry + + KnowledgeBaseEntryCreateProps: + type: object + required: + - metadata + - text + properties: + metadata: + $ref: '#/components/schemas/Metadata' + description: Metadata about the Knowledge Base Entry + text: + type: string + description: Knowledge Base Entry content + + diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts index 634cd8cb6e78b..8c85cbce32108 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts @@ -67,6 +67,8 @@ export type ReadKnowledgeBaseRequestParamsInput = z.input; export const ReadKnowledgeBaseResponse = z.object({ elser_exists: z.boolean().optional(), + esql_exists: z.boolean().optional(), index_exists: z.boolean().optional(), + is_setup_in_progress: z.boolean().optional(), pipeline_exists: z.boolean().optional(), }); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.schema.yaml index 650a7e141ce39..16d13c24f23ea 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.schema.yaml @@ -60,8 +60,12 @@ paths: properties: elser_exists: type: boolean + esql_exists: + type: boolean index_exists: type: boolean + is_setup_in_progress: + type: boolean pipeline_exists: type: boolean 400: diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts new file mode 100644 index 0000000000000..92523a43b8e76 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.gen.ts @@ -0,0 +1,91 @@ +/* + * 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. + */ + +import { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Manage Knowledge Base Entries API endpoint + * version: 2023-10-31 + */ + +import { + KnowledgeBaseEntryCreateProps, + KnowledgeBaseEntryResponse, + KnowledgeBaseEntryUpdateProps, +} from './common_attributes.gen'; +import { NonEmptyString } from '../common_attributes.gen'; + +export type CreateKnowledgeBaseEntryRequestBody = z.infer< + typeof CreateKnowledgeBaseEntryRequestBody +>; +export const CreateKnowledgeBaseEntryRequestBody = KnowledgeBaseEntryCreateProps; +export type CreateKnowledgeBaseEntryRequestBodyInput = z.input< + typeof CreateKnowledgeBaseEntryRequestBody +>; + +export type CreateKnowledgeBaseEntryResponse = z.infer; +export const CreateKnowledgeBaseEntryResponse = KnowledgeBaseEntryResponse; + +export type DeleteKnowledgeBaseEntryRequestParams = z.infer< + typeof DeleteKnowledgeBaseEntryRequestParams +>; +export const DeleteKnowledgeBaseEntryRequestParams = z.object({ + /** + * The Knowledge Base Entry's `id` value + */ + id: NonEmptyString, +}); +export type DeleteKnowledgeBaseEntryRequestParamsInput = z.input< + typeof DeleteKnowledgeBaseEntryRequestParams +>; + +export type DeleteKnowledgeBaseEntryResponse = z.infer; +export const DeleteKnowledgeBaseEntryResponse = KnowledgeBaseEntryResponse; + +export type ReadKnowledgeBaseEntryRequestParams = z.infer< + typeof ReadKnowledgeBaseEntryRequestParams +>; +export const ReadKnowledgeBaseEntryRequestParams = z.object({ + /** + * The Knowledge Base Entry's `id` value. + */ + id: NonEmptyString, +}); +export type ReadKnowledgeBaseEntryRequestParamsInput = z.input< + typeof ReadKnowledgeBaseEntryRequestParams +>; + +export type ReadKnowledgeBaseEntryResponse = z.infer; +export const ReadKnowledgeBaseEntryResponse = KnowledgeBaseEntryResponse; + +export type UpdateKnowledgeBaseEntryRequestParams = z.infer< + typeof UpdateKnowledgeBaseEntryRequestParams +>; +export const UpdateKnowledgeBaseEntryRequestParams = z.object({ + /** + * The Knowledge Base Entry's `id` value + */ + id: NonEmptyString, +}); +export type UpdateKnowledgeBaseEntryRequestParamsInput = z.input< + typeof UpdateKnowledgeBaseEntryRequestParams +>; + +export type UpdateKnowledgeBaseEntryRequestBody = z.infer< + typeof UpdateKnowledgeBaseEntryRequestBody +>; +export const UpdateKnowledgeBaseEntryRequestBody = KnowledgeBaseEntryUpdateProps; +export type UpdateKnowledgeBaseEntryRequestBodyInput = z.input< + typeof UpdateKnowledgeBaseEntryRequestBody +>; + +export type UpdateKnowledgeBaseEntryResponse = z.infer; +export const UpdateKnowledgeBaseEntryResponse = KnowledgeBaseEntryResponse; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.schema.yaml new file mode 100644 index 0000000000000..6db7da89f55e5 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_knowledge_base_route.schema.yaml @@ -0,0 +1,122 @@ +openapi: 3.0.0 +info: + title: Manage Knowledge Base Entries API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/knowledge_base/entries: + post: + operationId: CreateKnowledgeBaseEntry + x-codegen-enabled: true + description: Create a Knowledge Base Entry + summary: Create a Knowledge Base Entry + tags: + - Knowledge Base Entries API + requestBody: + required: true + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryCreateProps' + responses: + 200: + description: Successful request returning Knowledge Base Entries + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryResponse' + 400: + description: Generic Error + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryErrorSchema' + + /api/elastic_assistant/knowledge_base/entries/{id}: + get: + operationId: ReadKnowledgeBaseEntry + x-codegen-enabled: true + description: Read a Knowledge Base Entry + summary: Read a Knowledge Base Entry + tags: + - Knowledge Base Entries API + parameters: + - name: id + in: path + required: true + description: The Knowledge Base Entry's `id` value. + schema: + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' + responses: + 200: + description: Successful request returning a Knowledge Base Entry + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryResponse' + 400: + description: Generic Error + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryErrorSchema' + put: + operationId: UpdateKnowledgeBaseEntry + x-codegen-enabled: true + description: Update a Knowledge Base Entry + summary: Update a Knowledge Base Entry + tags: + - Knowledge Base Entries API + parameters: + - name: id + in: path + required: true + description: The Knowledge Base Entry's `id` value + schema: + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' + requestBody: + required: true + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryUpdateProps' + responses: + 200: + description: Successful request returning the updated Knowledge Base Entry + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryResponse' + 400: + description: Generic Error + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryErrorSchema' + delete: + operationId: DeleteKnowledgeBaseEntry + x-codegen-enabled: true + description: Deletes a single Knowledge Base Entry using the `id` field + summary: Deletes a single Knowledge Base Entry using the `id` field + tags: + - Knowledge Base Entries API + parameters: + - name: id + in: path + required: true + description: The Knowledge Base Entry's `id` value + schema: + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' + responses: + 200: + description: Successful request returning the deleted Knowledge Base Entry + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryResponse' + 400: + description: Generic Error + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/KnowledgeBaseEntryErrorSchema' + diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts index ce54c6a41fecc..123665bbb582f 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts @@ -13,10 +13,10 @@ import { z } from 'zod'; * * info: * title: Bulk Actions API endpoint - * version: 2023-10-31 + * version: 1 */ -import { UUID, NonEmptyString, User } from '../conversations/common_attributes.gen'; +import { NonEmptyString, User } from '../common_attributes.gen'; export type BulkActionSkipReason = z.infer; export const BulkActionSkipReason = z.literal('PROMPT_FIELD_NOT_MODIFIED'); @@ -44,7 +44,7 @@ export const NormalizedPromptError = z.object({ export type PromptResponse = z.infer; export const PromptResponse = z.object({ - id: UUID, + id: NonEmptyString, timestamp: NonEmptyString.optional(), name: z.string(), promptType: z.string(), diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml index 2f6a419d9bf2c..ede0136ba710a 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml @@ -1,9 +1,9 @@ openapi: 3.0.0 info: title: Bulk Actions API endpoint - version: '2023-10-31' + version: '1' paths: - /api/elastic_assistant/prompts/_bulk_action: + /internal/elastic_assistant/prompts/_bulk_action: post: operationId: PerformBulkAction x-codegen-enabled: true @@ -105,9 +105,9 @@ components: - content properties: id: - $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/UUID' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' 'timestamp': - $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString' name: type: string promptType: @@ -131,7 +131,7 @@ components: users: type: array items: - $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/User' + $ref: '../common_attributes.schema.yaml#/components/schemas/User' namespace: type: string description: Kibana space @@ -256,4 +256,3 @@ components: type: boolean isShared: type: boolean - \ No newline at end of file diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts index 7400b11f25c7a..2a7a87ecf1094 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts @@ -14,7 +14,7 @@ import { ArrayFromString } from '@kbn/zod-helpers'; * * info: * title: Find Prompts API endpoint - * version: 2023-10-31 + * version: 1 */ import { PromptResponse } from './bulk_crud_prompts_route.gen'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.schema.yaml index b5d3b25ca2018..8e85194811dbc 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.schema.yaml @@ -1,9 +1,9 @@ openapi: 3.0.0 info: title: Find Prompts API endpoint - version: '2023-10-31' + version: '1' paths: - /api/elastic_assistant/prompts/_find: + /internal/elastic_assistant/prompts/_find: get: operationId: FindPrompts x-codegen-enabled: true diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.test.ts index 88e9c0febba13..544c8c1606c3d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.test.ts @@ -48,7 +48,7 @@ describe('bulkUpdateAnonymizationFields', () => { ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify({ create: [], update: [], @@ -71,7 +71,7 @@ describe('bulkUpdateAnonymizationFields', () => { ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify({ create: [anonymizationField1, anonymizationField2], update: [], @@ -93,7 +93,7 @@ describe('bulkUpdateAnonymizationFields', () => { ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify({ update: [anonymizationField1, anonymizationField2], delete: { ids: [] }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.ts index 9745e7ce38662..72d73cc2a5929 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.ts @@ -26,7 +26,7 @@ export const bulkUpdateAnonymizationFields = async ( ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify(anonymizationFieldsActions), } ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.test.tsx index aabdcb6909ccb..7c10597eaed87 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.test.tsx @@ -13,11 +13,10 @@ import React from 'react'; import { useFetchAnonymizationFields } from './use_fetch_anonymization_fields'; import { HttpSetup } from '@kbn/core-http-browser'; import { useAssistantContext } from '../../../assistant_context'; - -const statusResponse = { assistantModelEvaluation: true, assistantStreamingEnabled: false }; +import { API_VERSIONS, defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; const http = { - fetch: jest.fn().mockResolvedValue(statusResponse), + fetch: jest.fn().mockResolvedValue(defaultAssistantFeatures), } as unknown as HttpSetup; jest.mock('../../../assistant_context'); @@ -45,15 +44,18 @@ describe('useFetchAnonymizationFields', () => { await act(async () => { const { waitForNextUpdate } = renderHook(() => useFetchAnonymizationFields()); await waitForNextUpdate(); - expect(http.fetch).toHaveBeenCalledWith('/api/elastic_assistant/anonymization_fields/_find', { - method: 'GET', - query: { - page: 1, - per_page: 1000, - }, - version: '2023-10-31', - signal: undefined, - }); + expect(http.fetch).toHaveBeenCalledWith( + '/internal/elastic_assistant/anonymization_fields/_find', + { + method: 'GET', + query: { + page: 1, + per_page: 1000, + }, + version: API_VERSIONS.internal.v1, + signal: undefined, + } + ); expect(http.fetch).toHaveBeenCalled(); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.ts index 657216b9079cd..d2f07124f04b0 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.ts @@ -36,7 +36,7 @@ export const CACHING_KEYS = [ ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, QUERY.page, QUERY.per_page, - API_VERSIONS.public.v1, + API_VERSIONS.internal.v1, ]; export const useFetchAnonymizationFields = (payload?: UseFetchAnonymizationFieldsParams) => { @@ -50,7 +50,7 @@ export const useFetchAnonymizationFields = (payload?: UseFetchAnonymizationField async () => http.fetch(ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, { method: 'GET', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, query: QUERY, signal: payload?.signal, }), diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/__mocks__/use_capabilities.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/__mocks__/use_capabilities.tsx new file mode 100644 index 0000000000000..d6dd239d4b6b8 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/__mocks__/use_capabilities.tsx @@ -0,0 +1,17 @@ +/* + * 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. + */ + +import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; + +export const useCapabilities = jest.fn().mockReturnValue({ + isLoading: false, + isError: false, + data: defaultAssistantFeatures, + error: null, + isFetching: false, + isSuccess: true, +}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx index 29ad65929bc4c..6101782ae43b1 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx @@ -11,15 +11,10 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import type { ReactNode } from 'react'; import React from 'react'; import { useCapabilities, UseCapabilitiesParams } from './use_capabilities'; -import { API_VERSIONS } from '@kbn/elastic-assistant-common'; - -const statusResponse = { - assistantModelEvaluation: true, - assistantStreamingEnabled: false, -}; +import { API_VERSIONS, defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; const http = { - get: jest.fn().mockResolvedValue(statusResponse), + get: jest.fn().mockResolvedValue(defaultAssistantFeatures), }; const toasts = { addError: jest.fn(), diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.test.ts index 99cea460fe7d2..a770b90e7881f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.test.ts @@ -63,7 +63,7 @@ describe('bulkUpdateConversations', () => { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify({ update: [], create: [], @@ -89,7 +89,7 @@ describe('bulkUpdateConversations', () => { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify({ update: [], create: [conversation1, conversation2], @@ -114,7 +114,7 @@ describe('bulkUpdateConversations', () => { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify({ update: [conversation1, conversation2], delete: { ids: [] }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.ts index 71ebdf50c251d..c22095665a229 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.ts @@ -114,7 +114,7 @@ export const bulkUpdateConversations = async ( ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, body: JSON.stringify({ update: conversationsToUpdate, create: conversationsToCreate, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.test.tsx index 0edb5e0f4a158..5f7d7cefaf450 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.test.tsx @@ -36,11 +36,11 @@ describe('conversations api', () => { await waitForNextUpdate(); expect(deleteProps.http.fetch).toHaveBeenCalledWith( - '/api/elastic_assistant/current_user/conversations/test', + '/internal/elastic_assistant/current_user/conversations/test', { method: 'DELETE', signal: undefined, - version: '2023-10-31', + version: '1', } ); expect(toasts.addError).not.toHaveBeenCalled(); @@ -62,11 +62,11 @@ describe('conversations api', () => { await waitForNextUpdate(); expect(getProps.http.fetch).toHaveBeenCalledWith( - '/api/elastic_assistant/current_user/conversations/test', + '/internal/elastic_assistant/current_user/conversations/test', { method: 'GET', signal: undefined, - version: '2023-10-31', + version: '1', } ); expect(toasts.addError).not.toHaveBeenCalled(); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts index 54bac7e563acc..e6c6b2925f337 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts @@ -44,7 +44,7 @@ export const getConversationById = async ({ try { const response = await http.fetch(`${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/${id}`, { method: 'GET', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, signal, }); @@ -84,7 +84,7 @@ export const getUserConversations = async ({ ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, { method: 'GET', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, signal, } ); @@ -125,7 +125,7 @@ export const createConversation = async ({ try { const response = await http.post(ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, { body: JSON.stringify(conversation), - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, signal, }); @@ -168,7 +168,7 @@ export const deleteConversation = async ({ try { const response = await http.fetch(`${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/${id}`, { method: 'DELETE', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, signal, }); @@ -237,7 +237,7 @@ export const updateConversation = async ({ headers: { 'Content-Type': 'application/json', }, - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, signal, } ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx index 86b39f5ea43be..2c6ed953b56f3 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx @@ -14,11 +14,10 @@ import { UseFetchCurrentUserConversationsParams, useFetchCurrentUserConversations, } from './use_fetch_current_user_conversations'; - -const statusResponse = { assistantModelEvaluation: true, assistantStreamingEnabled: false }; +import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; const http = { - fetch: jest.fn().mockResolvedValue(statusResponse), + fetch: jest.fn().mockResolvedValue(defaultAssistantFeatures), }; const onFetch = jest.fn(); @@ -48,14 +47,14 @@ describe('useFetchCurrentUserConversations', () => { ); await waitForNextUpdate(); expect(defaultProps.http.fetch).toHaveBeenCalledWith( - '/api/elastic_assistant/current_user/conversations/_find', + '/internal/elastic_assistant/current_user/conversations/_find', { method: 'GET', query: { page: 1, perPage: 100, }, - version: '2023-10-31', + version: '1', signal: undefined, } ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts index 68612e3e22397..58be08317d40c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts @@ -47,7 +47,7 @@ export const CONVERSATIONS_QUERY_KEYS = [ ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, query.page, query.perPage, - API_VERSIONS.public.v1, + API_VERSIONS.internal.v1, ]; export const useFetchCurrentUserConversations = ({ @@ -62,7 +62,7 @@ export const useFetchCurrentUserConversations = ({ async () => http.fetch(ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, { method: 'GET', - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, query, signal, }), diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx index ae465cdf27ba9..94f62aa4040f2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx @@ -7,7 +7,18 @@ import { HttpSetup } from '@kbn/core/public'; import { IHttpFetchError } from '@kbn/core-http-browser'; -import { API_VERSIONS, ApiConfig, Replacements } from '@kbn/elastic-assistant-common'; +import { + API_VERSIONS, + ApiConfig, + CreateKnowledgeBaseRequestParams, + CreateKnowledgeBaseResponse, + DeleteKnowledgeBaseRequestParams, + DeleteKnowledgeBaseResponse, + ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, + ReadKnowledgeBaseRequestParams, + ReadKnowledgeBaseResponse, + Replacements, +} from '@kbn/elastic-assistant-common'; import { API_ERROR } from '../translations'; import { getOptionalRequestParams } from '../helpers'; import { TraceOptions } from '../types'; @@ -179,19 +190,6 @@ export const fetchConnectorExecuteAction = async ({ } }; -export interface GetKnowledgeBaseStatusParams { - http: HttpSetup; - resource?: string; - signal?: AbortSignal | undefined; -} - -export interface GetKnowledgeBaseStatusResponse { - elser_exists: boolean; - esql_exists?: boolean; - index_exists: boolean; - pipeline_exists: boolean; -} - /** * API call for getting the status of the Knowledge Base. Provide * a resource to include the status of that specific resource. @@ -201,37 +199,29 @@ export interface GetKnowledgeBaseStatusResponse { * @param {string} [options.resource] - Resource to get the status of, otherwise status of overall KB * @param {AbortSignal} [options.signal] - AbortSignal * - * @returns {Promise} + * @returns {Promise} */ export const getKnowledgeBaseStatus = async ({ http, resource, signal, -}: GetKnowledgeBaseStatusParams): Promise => { +}: ReadKnowledgeBaseRequestParams & { http: HttpSetup; signal?: AbortSignal | undefined }): Promise< + ReadKnowledgeBaseResponse | IHttpFetchError +> => { try { - const path = `/internal/elastic_assistant/knowledge_base/${resource || ''}`; + const path = ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL.replace('{resource?}', resource || ''); const response = await http.fetch(path, { method: 'GET', signal, version: API_VERSIONS.internal.v1, }); - return response as GetKnowledgeBaseStatusResponse; + return response as ReadKnowledgeBaseResponse; } catch (error) { return error as IHttpFetchError; } }; -export interface PostKnowledgeBaseParams { - http: HttpSetup; - resource?: string; - signal?: AbortSignal | undefined; -} - -export interface PostKnowledgeBaseResponse { - success: boolean; -} - /** * API call for setting up the Knowledge Base. Provide a resource to set up a specific resource. * @@ -240,37 +230,30 @@ export interface PostKnowledgeBaseResponse { * @param {string} [options.resource] - Resource to be added to the KB, otherwise sets up the base KB * @param {AbortSignal} [options.signal] - AbortSignal * - * @returns {Promise} + * @returns {Promise} */ export const postKnowledgeBase = async ({ http, resource, signal, -}: PostKnowledgeBaseParams): Promise => { +}: CreateKnowledgeBaseRequestParams & { + http: HttpSetup; + signal?: AbortSignal | undefined; +}): Promise => { try { - const path = `/internal/elastic_assistant/knowledge_base/${resource || ''}`; + const path = ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL.replace('{resource?}', resource || ''); const response = await http.fetch(path, { method: 'POST', signal, version: API_VERSIONS.internal.v1, }); - return response as PostKnowledgeBaseResponse; + return response as CreateKnowledgeBaseResponse; } catch (error) { return error as IHttpFetchError; } }; -export interface DeleteKnowledgeBaseParams { - http: HttpSetup; - resource?: string; - signal?: AbortSignal | undefined; -} - -export interface DeleteKnowledgeBaseResponse { - success: boolean; -} - /** * API call for deleting the Knowledge Base. Provide a resource to delete that specific resource. * @@ -285,9 +268,12 @@ export const deleteKnowledgeBase = async ({ http, resource, signal, -}: DeleteKnowledgeBaseParams): Promise => { +}: DeleteKnowledgeBaseRequestParams & { + http: HttpSetup; + signal?: AbortSignal | undefined; +}): Promise => { try { - const path = `/internal/elastic_assistant/knowledge_base/${resource || ''}`; + const path = ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL.replace('{resource?}', resource || ''); const response = await http.fetch(path, { method: 'DELETE', signal, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx index 5672a48dad0b9..18f2c6be2a863 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -90,6 +90,7 @@ import { clearPresentationData } from '../connectorland/connector_setup/helpers' import { getGenAiConfig } from '../connectorland/helpers'; import { AssistantAnimatedIcon } from './assistant_animated_icon'; import { useFetchAnonymizationFields } from './api/anonymization_fields/use_fetch_anonymization_fields'; +import { InstallKnowledgeBaseButton } from '../knowledge_base/install_knowledge_base_button'; export interface Props { conversationTitle?: string; @@ -862,6 +863,9 @@ const AssistantComponent: React.FC = ({ isFlyoutMode /> + + + diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx index 4f745f51a11b7..8278cb1559535 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx @@ -38,7 +38,7 @@ const mockContext = { basePromptContexts: MOCK_QUICK_PROMPTS, setSelectedSettingsTab, http: {}, - modelEvaluatorEnabled: true, + assistantFeatures: { assistantModelEvaluation: true }, selectedSettingsTab: 'CONVERSATIONS_TAB', assistantAvailability: { isAssistantEnabled: true, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx index b6bd193aa8534..f83e6c0d72ee6 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx @@ -86,7 +86,7 @@ export const AssistantSettings: React.FC = React.memo( }) => { const { actionTypeRegistry, - modelEvaluatorEnabled, + assistantFeatures: { assistantModelEvaluation: modelEvaluatorEnabled }, http, toasts, selectedSettingsTab, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx index 26cd4340a1435..79a050b11bb27 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx @@ -66,7 +66,7 @@ export const AssistantSettingsManagement: React.FC = React.memo( }) => { const { actionTypeRegistry, - modelEvaluatorEnabled, + assistantFeatures: { assistantModelEvaluation: modelEvaluatorEnabled }, http, selectedSettingsTab, setSelectedSettingsTab, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx index 73e9c8ddf3492..08e9fb434b051 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx @@ -171,10 +171,10 @@ describe('useSettingsUpdater', () => { await result.current.saveSettings(); expect(mockHttp.fetch).toHaveBeenCalledWith( - '/api/elastic_assistant/current_user/conversations/_bulk_action', + '/internal/elastic_assistant/current_user/conversations/_bulk_action', { method: 'POST', - version: '2023-10-31', + version: '1', body: '{"delete":{"ids":["1"]}}', } ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx index 7d9cc86941f34..6a74dab81ac47 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx @@ -13,7 +13,7 @@ import type { IToasts } from '@kbn/core-notifications-browser'; import { ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; import { useLocalStorage, useSessionStorage } from 'react-use'; import type { DocLinksStart } from '@kbn/core-doc-links-browser'; -import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; +import { AssistantFeatures, defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; import { updatePromptContexts } from './helpers'; import type { PromptContext, @@ -97,6 +97,7 @@ export interface UseAssistantContext { actionTypeRegistry: ActionTypeRegistryContract; alertsIndexPattern: string | undefined; assistantAvailability: AssistantAvailability; + assistantFeatures: AssistantFeatures; assistantStreamingEnabled: boolean; assistantTelemetry?: AssistantTelemetry; augmentMessageCodeBlocks: ( @@ -127,7 +128,6 @@ export interface UseAssistantContext { knowledgeBase: KnowledgeBaseConfig; getLastConversationId: (conversationTitle?: string) => string; promptContexts: Record; - modelEvaluatorEnabled: boolean; nameSpace: string; registerPromptContext: RegisterPromptContext; selectedSettingsTab: SettingsTabs; @@ -276,15 +276,14 @@ export const AssistantProvider: React.FC = ({ ); // Fetch assistant capabilities - const { data: capabilities } = useCapabilities({ http, toasts }); - const { assistantModelEvaluation: modelEvaluatorEnabled } = - capabilities ?? defaultAssistantFeatures; + const { data: assistantFeatures } = useCapabilities({ http, toasts }); const value = useMemo( () => ({ actionTypeRegistry, alertsIndexPattern, assistantAvailability, + assistantFeatures: assistantFeatures ?? defaultAssistantFeatures, assistantTelemetry, augmentMessageCodeBlocks, allQuickPrompts: localStorageQuickPrompts ?? [], @@ -297,7 +296,6 @@ export const AssistantProvider: React.FC = ({ getComments, http, knowledgeBase: { ...DEFAULT_KNOWLEDGE_BASE_SETTINGS, ...localStorageKnowledgeBase }, - modelEvaluatorEnabled, promptContexts, nameSpace, registerPromptContext, @@ -324,6 +322,7 @@ export const AssistantProvider: React.FC = ({ actionTypeRegistry, alertsIndexPattern, assistantAvailability, + assistantFeatures, assistantTelemetry, augmentMessageCodeBlocks, localStorageQuickPrompts, @@ -336,7 +335,6 @@ export const AssistantProvider: React.FC = ({ getComments, http, localStorageKnowledgeBase, - modelEvaluatorEnabled, promptContexts, nameSpace, registerPromptContext, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/install_knowledge_base_button.tsx b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/install_knowledge_base_button.tsx new file mode 100644 index 0000000000000..f5a82fd02c55d --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/install_knowledge_base_button.tsx @@ -0,0 +1,64 @@ +/* + * 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. + */ + +import React, { useCallback } from 'react'; +import { EuiButton } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { useAssistantContext } from '../..'; +import { useSetupKnowledgeBase } from './use_setup_knowledge_base'; +import { useKnowledgeBaseStatus } from './use_knowledge_base_status'; + +const ESQL_RESOURCE = 'esql'; + +/** + * Self-contained component that renders a button to install the knowledge base. + * + * Only renders if `assistantKnowledgeBaseByDefault` feature flag is enabled. + */ +export const InstallKnowledgeBaseButton: React.FC = React.memo(() => { + const { + assistantFeatures: { assistantKnowledgeBaseByDefault: enableKnowledgeBaseByDefault }, + http, + toasts, + } = useAssistantContext(); + + const { data: kbStatus } = useKnowledgeBaseStatus({ http, resource: ESQL_RESOURCE }); + const { mutate: setupKB, isLoading: isSettingUpKB } = useSetupKnowledgeBase({ http, toasts }); + + const isSetupInProgress = kbStatus?.is_setup_in_progress || isSettingUpKB; + const isSetupComplete = + kbStatus?.elser_exists && + kbStatus?.index_exists && + kbStatus?.pipeline_exists && + kbStatus?.esql_exists; + + const onInstallKnowledgeBase = useCallback(() => { + setupKB(ESQL_RESOURCE); + }, [setupKB]); + + if (!enableKnowledgeBaseByDefault || isSetupComplete) { + return null; + } + + return ( + + {i18n.translate('xpack.elasticAssistant.knowledgeBase.installKnowledgeBaseButton', { + defaultMessage: 'Install Knowledge Base', + })} + + ); +}); + +InstallKnowledgeBaseButton.displayName = 'InstallKnowledgeBaseButton'; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.test.tsx index 20ab3aab4a26f..56f6796ac16fa 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.test.tsx @@ -13,9 +13,11 @@ import { KnowledgeBaseSettings } from './knowledge_base_settings'; import { TestProviders } from '../mock/test_providers/test_providers'; import { useKnowledgeBaseStatus } from './use_knowledge_base_status'; import { mockSystemPrompts } from '../mock/system_prompt'; +import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; const mockUseAssistantContext = { allSystemPrompts: mockSystemPrompts, + assistantFeatures: jest.fn(() => defaultAssistantFeatures), conversations: {}, http: { basePath: { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.tsx index 95bf754874966..8c83d1f3403e8 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings.tsx @@ -35,7 +35,8 @@ import { useKnowledgeBaseStatus } from './use_knowledge_base_status'; import { useSetupKnowledgeBase } from './use_setup_knowledge_base'; const ESQL_RESOURCE = 'esql'; -const KNOWLEDGE_BASE_INDEX_PATTERN = '.kibana-elastic-ai-assistant-kb'; +const KNOWLEDGE_BASE_INDEX_PATTERN_OLD = '.kibana-elastic-ai-assistant-kb'; +const KNOWLEDGE_BASE_INDEX_PATTERN = '.kibana-elastic-ai-assistant-knowledge-base-(SPACE)'; interface Props { knowledgeBase: KnowledgeBaseConfig; @@ -47,7 +48,10 @@ interface Props { */ export const KnowledgeBaseSettings: React.FC = React.memo( ({ knowledgeBase, setUpdatedKnowledgeBaseSettings }) => { - const { http } = useAssistantContext(); + const { + assistantFeatures: { assistantKnowledgeBaseByDefault: enableKnowledgeBaseByDefault }, + http, + } = useAssistantContext(); const { data: kbStatus, isLoading, @@ -60,14 +64,18 @@ export const KnowledgeBaseSettings: React.FC = React.memo( const isElserEnabled = kbStatus?.elser_exists ?? false; const isKnowledgeBaseEnabled = (kbStatus?.index_exists && kbStatus?.pipeline_exists) ?? false; const isESQLEnabled = kbStatus?.esql_exists ?? false; + const isSetupInProgress = kbStatus?.is_setup_in_progress ?? false; // Resource availability state - const isLoadingKb = isLoading || isFetching || isSettingUpKB || isDeletingUpKB; + const isLoadingKb = + isLoading || isFetching || isSettingUpKB || isDeletingUpKB || isSetupInProgress; const isKnowledgeBaseAvailable = knowledgeBase.isEnabledKnowledgeBase && kbStatus?.elser_exists; const isESQLAvailable = knowledgeBase.isEnabledKnowledgeBase && isKnowledgeBaseAvailable && isKnowledgeBaseEnabled; // Prevent enabling if elser doesn't exist, but always allow to disable - const isSwitchDisabled = !kbStatus?.elser_exists && !knowledgeBase.isEnabledKnowledgeBase; + const isSwitchDisabled = enableKnowledgeBaseByDefault + ? false + : !kbStatus?.elser_exists && !knowledgeBase.isEnabledKnowledgeBase; // Calculated health state for EuiHealth component const elserHealth = isElserEnabled ? 'success' : 'subdued'; @@ -84,12 +92,18 @@ export const KnowledgeBaseSettings: React.FC = React.memo( isEnabledKnowledgeBase: event.target.checked, }); - // If enabling and ELSER exists, try to set up automatically - if (event.target.checked && kbStatus?.elser_exists) { + // If enabling and ELSER exists or automatic KB setup FF is enabled, try to set up automatically + if (event.target.checked && (enableKnowledgeBaseByDefault || kbStatus?.elser_exists)) { setupKB(ESQL_RESOURCE); } }, - [kbStatus?.elser_exists, knowledgeBase, setUpdatedKnowledgeBaseSettings, setupKB] + [ + enableKnowledgeBaseByDefault, + kbStatus?.elser_exists, + knowledgeBase, + setUpdatedKnowledgeBaseSettings, + setupKB, + ] ); const isEnabledKnowledgeBaseSwitch = useMemo(() => { @@ -149,7 +163,11 @@ export const KnowledgeBaseSettings: React.FC = React.memo( const knowledgeBaseDescription = useMemo(() => { return isKnowledgeBaseEnabled ? ( - {i18n.KNOWLEDGE_BASE_DESCRIPTION_INSTALLED(KNOWLEDGE_BASE_INDEX_PATTERN)}{' '} + {i18n.KNOWLEDGE_BASE_DESCRIPTION_INSTALLED( + enableKnowledgeBaseByDefault + ? KNOWLEDGE_BASE_INDEX_PATTERN + : KNOWLEDGE_BASE_INDEX_PATTERN_OLD + )}{' '} {knowledgeBaseActionButton} ) : ( @@ -157,7 +175,7 @@ export const KnowledgeBaseSettings: React.FC = React.memo( {i18n.KNOWLEDGE_BASE_DESCRIPTION} {knowledgeBaseActionButton} ); - }, [isKnowledgeBaseEnabled, knowledgeBaseActionButton]); + }, [enableKnowledgeBaseByDefault, isKnowledgeBaseEnabled, knowledgeBaseActionButton]); ////////////////////////////////////////////////////////////////////////////////////////// // ESQL Resource diff --git a/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/use_knowledge_base_status.tsx b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/use_knowledge_base_status.tsx index 7ec7d227f9ef8..c03eb31581e42 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/use_knowledge_base_status.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/use_knowledge_base_status.tsx @@ -11,6 +11,7 @@ import type { HttpSetup, IHttpFetchError, ResponseErrorBody } from '@kbn/core-ht import type { IToasts } from '@kbn/core-notifications-browser'; import { i18n } from '@kbn/i18n'; import { useCallback } from 'react'; +import { ReadKnowledgeBaseResponse } from '@kbn/elastic-assistant-common'; import { getKnowledgeBaseStatus } from '../assistant/api'; const KNOWLEDGE_BASE_STATUS_QUERY_KEY = ['elastic-assistant', 'knowledge-base-status']; @@ -21,13 +22,6 @@ export interface UseKnowledgeBaseStatusParams { toasts?: IToasts; } -export interface GetKnowledgeBaseStatusResponse { - elser_exists: boolean; - esql_exists?: boolean; - index_exists: boolean; - pipeline_exists: boolean; -} - /** * Hook for getting the status of the Knowledge Base. Provide a resource name to include * the status for that specific resource within the KB. @@ -42,10 +36,7 @@ export const useKnowledgeBaseStatus = ({ http, resource, toasts, -}: UseKnowledgeBaseStatusParams): UseQueryResult< - GetKnowledgeBaseStatusResponse, - IHttpFetchError -> => { +}: UseKnowledgeBaseStatusParams): UseQueryResult => { return useQuery( KNOWLEDGE_BASE_STATUS_QUERY_KEY, async ({ signal }) => { diff --git a/x-pack/packages/kbn-elastic-assistant/index.ts b/x-pack/packages/kbn-elastic-assistant/index.ts index 56fb74af3aba4..df0ba1e8db0f9 100644 --- a/x-pack/packages/kbn-elastic-assistant/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/index.ts @@ -145,13 +145,6 @@ export type { PromptContextTemplate } from './impl/assistant/prompt_context/type */ export type { QuickPrompt } from './impl/assistant/quick_prompts/types'; -/** - * Knowledge Base API Responses - */ -export type { DeleteKnowledgeBaseResponse } from './impl/assistant/api'; -export type { GetKnowledgeBaseStatusResponse } from './impl/assistant/api'; -export type { PostKnowledgeBaseResponse } from './impl/assistant/api'; - export { useFetchCurrentUserConversations } from './impl/assistant/api/conversations/use_fetch_current_user_conversations'; export * from './impl/assistant/api/conversations/bulk_update_actions_conversations'; export { getConversationById } from './impl/assistant/api/conversations/conversations'; diff --git a/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx b/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx index fe5eceb9041f9..43d498aa98905 100644 --- a/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx +++ b/x-pack/packages/ml/aiops_components/src/dual_brush/dual_brush.tsx @@ -233,10 +233,14 @@ export const DualBrush: FC = (props) => { ]); } - brushes.current[0].start = snappedWindowParameters.baselineMin; - brushes.current[0].end = snappedWindowParameters.baselineMax; - brushes.current[1].start = snappedWindowParameters.deviationMin; - brushes.current[1].end = snappedWindowParameters.deviationMax; + if (id === 'baseline') { + brushes.current[0].start = snappedWindowParameters.baselineMin; + brushes.current[0].end = snappedWindowParameters.baselineMax; + } + if (id === 'deviation') { + brushes.current[1].start = snappedWindowParameters.deviationMin; + brushes.current[1].end = snappedWindowParameters.deviationMax; + } if (onChange) { onChange(snappedWindowParameters, newBrushPx); @@ -263,7 +267,10 @@ export const DualBrush: FC = (props) => { return 'aiopsBrush' + b.id.charAt(0).toUpperCase() + b.id.slice(1); }) .each((brushObject: DualBrush, i, n) => { - const x = d3.scaleLinear().domain([min, max]).rangeRound([0, widthRef.current]); + const x = d3 + .scaleLinear() + .domain([minRef.current, maxRef.current]) + .rangeRound([0, widthRef.current]); // Ensure brush style is applied brushObject.brush.extent([ [0, BRUSH_MARGIN], diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts index 9cd7bd3a3acb8..98dbd11398174 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts @@ -56,8 +56,18 @@ export const getSignificantTermRequest = ( ]; } - const pValueAgg: Record<'change_point_p_value', estypes.AggregationsAggregationContainer> = { - change_point_p_value: { + const pValueAgg: Record< + 'sig_term_p_value' | 'distinct_count', + estypes.AggregationsAggregationContainer + > = { + // Used to identify fields with only one distinct value which we'll ignore in the analysis. + distinct_count: { + cardinality: { + field: fieldName, + }, + }, + // Used to calculate the p-value for terms of the field. + sig_term_p_value: { significant_terms: { field: fieldName, background_filter: { @@ -158,13 +168,26 @@ export const fetchSignificantTermPValues = async ( } const overallResult = ( - randomSamplerWrapper.unwrap(resp.aggregations) as Record<'change_point_p_value', Aggs> - ).change_point_p_value; + randomSamplerWrapper.unwrap(resp.aggregations) as Record<'sig_term_p_value', Aggs> + ).sig_term_p_value; + + const distinctCount = ( + randomSamplerWrapper.unwrap(resp.aggregations) as Record< + 'distinct_count', + estypes.AggregationsCardinalityAggregate + > + ).distinct_count.value; for (const bucket of overallResult.buckets) { const pValue = Math.exp(-bucket.score); - if (typeof pValue === 'number' && pValue < LOG_RATE_ANALYSIS_SETTINGS.P_VALUE_THRESHOLD) { + if ( + typeof pValue === 'number' && + // Skip items where the p-value is not significant. + pValue < LOG_RATE_ANALYSIS_SETTINGS.P_VALUE_THRESHOLD && + // Skip items where the field has only one distinct value. + distinctCount > 1 + ) { result.push({ key: `${fieldName}:${String(bucket.key)}`, type: SIGNIFICANT_ITEM_TYPE.KEYWORD, diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx index 59373ae4b9253..16fc210d2efc2 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx @@ -63,6 +63,7 @@ export function getDocumentCountStatsSplitLabel( } export interface LogRateAnalysisContentProps { + /** Optional time range override */ timeRange?: { min: Moment; max: Moment }; /** Elasticsearch query to pass to analysis endpoint */ esSearchQuery?: estypes.QueryDslQueryContainer; diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx index c8d69b54e70a6..f6a40f2540f65 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx @@ -99,7 +99,7 @@ export const LogRateAnalysisPage: FC = ({ stickyHistogram }) => { ); useEffect( - // TODO: Consolidate this hook/function with with Data visualizer's + // TODO: Consolidate this hook/function with the one in `x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx` function clearFiltersOnLeave() { return () => { // We want to clear all filters that have not been pinned globally diff --git a/x-pack/plugins/aiops/public/hooks/use_data.ts b/x-pack/plugins/aiops/public/hooks/use_data.ts index 9986a4d65dd70..26941cf2840fa 100644 --- a/x-pack/plugins/aiops/public/hooks/use_data.ts +++ b/x-pack/plugins/aiops/public/hooks/use_data.ts @@ -117,8 +117,8 @@ export const useData = ( time: timefilter.getTime(), refreshInterval: timefilter.getRefreshInterval(), }); - setLastRefresh(Date.now()); } + setLastRefresh(Date.now()); }); // This listens just for an initial update of the timefilter to be switched on. diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts index 730b11cdd28a5..038fc0588f6a2 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts @@ -36,6 +36,7 @@ export const indexInfoHandlerFactory = let fieldCandidatesCount = fieldCandidates.length; const textFieldCandidates: string[] = []; + let textFieldCandidatesCount = textFieldCandidates.length; let zeroDocsFallback = false; @@ -68,6 +69,7 @@ export const indexInfoHandlerFactory = fieldCandidates.push(...indexInfo.fieldCandidates); fieldCandidatesCount = fieldCandidates.length; textFieldCandidates.push(...indexInfo.textFieldCandidates); + textFieldCandidatesCount = textFieldCandidates.length; zeroDocsFallback = indexInfo.zeroDocsFallback; } catch (e) { if (!isRequestAbortedError(e)) { @@ -92,7 +94,7 @@ export const indexInfoHandlerFactory = defaultMessage: 'Identified {fieldCandidatesCount, plural, one {# field candidate} other {# field candidates}}.', values: { - fieldCandidatesCount, + fieldCandidatesCount: fieldCandidatesCount + textFieldCandidatesCount, }, } ), diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts index aa2aa1944e64a..6a3a83352ca76 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts @@ -18,9 +18,9 @@ import type { AiopsLogRateAnalysisApiVersion as ApiVersion, } from '@kbn/aiops-log-rate-analysis/api/schema'; import { isRequestAbortedError } from '@kbn/aiops-common/is_request_aborted_error'; - import { fetchSignificantCategories } from '@kbn/aiops-log-rate-analysis/queries/fetch_significant_categories'; import { fetchSignificantTermPValues } from '@kbn/aiops-log-rate-analysis/queries/fetch_significant_term_p_values'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { LOADED_FIELD_CANDIDATES, @@ -29,6 +29,20 @@ import { } from '../response_stream_utils/constants'; import type { ResponseStreamFetchOptions } from '../response_stream_factory'; +interface FieldCandidate { + fieldCandidate: string; +} +const isFieldCandidate = (d: unknown): d is FieldCandidate => + isPopulatedObject(d, ['fieldCandidate']); + +interface TextFieldCandidate { + textFieldCandidate: string; +} +const isTextFieldCandidate = (d: unknown): d is FieldCandidate => + isPopulatedObject(d, ['textFieldCandidate']); + +type Candidate = FieldCandidate | TextFieldCandidate; + export const significantItemsHandlerFactory = ({ abortSignal, @@ -47,6 +61,7 @@ export const significantItemsHandlerFactory = textFieldCandidates: string[]; }) => { let fieldCandidatesCount = fieldCandidates.length; + const textFieldCandidatesCount = textFieldCandidates.length; // This will store the combined count of detected significant log patterns and keywords let fieldValuePairsCount = 0; @@ -59,25 +74,6 @@ export const significantItemsHandlerFactory = ) ?? []) ); - // Get significant categories of text fields - if (textFieldCandidates.length > 0) { - significantCategories.push( - ...(await fetchSignificantCategories( - client, - requestBody, - textFieldCandidates, - logger, - stateHandler.sampleProbability(), - responseStream.pushError, - abortSignal - )) - ); - - if (significantCategories.length > 0) { - responseStream.push(addSignificantItemsAction(significantCategories)); - } - } - const significantTerms: SignificantItem[] = []; significantTerms.push( @@ -105,39 +101,67 @@ export const significantItemsHandlerFactory = logDebugMessage('Fetch p-values.'); - const pValuesQueue = queue(async function (fieldCandidate: string) { - stateHandler.loaded((1 / fieldCandidatesCount) * loadingStepSizePValues, false); + const loadingStep = + (1 / (fieldCandidatesCount + textFieldCandidatesCount)) * loadingStepSizePValues; + + const pValuesQueue = queue(async function (payload: Candidate) { + if (isFieldCandidate(payload)) { + const { fieldCandidate } = payload; + let pValues: Awaited>; + + try { + pValues = await fetchSignificantTermPValues( + client, + requestBody, + [fieldCandidate], + logger, + stateHandler.sampleProbability(), + responseStream.pushError, + abortSignal + ); + } catch (e) { + if (!isRequestAbortedError(e)) { + logger.error( + `Failed to fetch p-values for '${fieldCandidate}', got: \n${e.toString()}` + ); + responseStream.pushError(`Failed to fetch p-values for '${fieldCandidate}'.`); + } + return; + } + + remainingFieldCandidates = remainingFieldCandidates.filter((d) => d !== fieldCandidate); - let pValues: Awaited>; + if (pValues.length > 0) { + pValues.forEach((d) => { + fieldsToSample.add(d.fieldName); + }); + significantTerms.push(...pValues); + + responseStream.push(addSignificantItemsAction(pValues)); + + fieldValuePairsCount += pValues.length; + } + } else if (isTextFieldCandidate(payload)) { + const { textFieldCandidate } = payload; - try { - pValues = await fetchSignificantTermPValues( + const significantCategoriesForField = await fetchSignificantCategories( client, requestBody, - [fieldCandidate], + [textFieldCandidate], logger, stateHandler.sampleProbability(), responseStream.pushError, abortSignal ); - } catch (e) { - if (!isRequestAbortedError(e)) { - logger.error(`Failed to fetch p-values for '${fieldCandidate}', got: \n${e.toString()}`); - responseStream.pushError(`Failed to fetch p-values for '${fieldCandidate}'.`); + + if (significantCategoriesForField.length > 0) { + significantCategories.push(...significantCategoriesForField); + responseStream.push(addSignificantItemsAction(significantCategoriesForField)); + fieldValuePairsCount += significantCategoriesForField.length; } - return; } - remainingFieldCandidates = remainingFieldCandidates.filter((d) => d !== fieldCandidate); - - if (pValues.length > 0) { - pValues.forEach((d) => { - fieldsToSample.add(d.fieldName); - }); - significantTerms.push(...pValues); - - responseStream.push(addSignificantItemsAction(pValues)); - } + stateHandler.loaded(loadingStep, false); responseStream.push( updateLoadingStateAction({ @@ -158,18 +182,24 @@ export const significantItemsHandlerFactory = ); }, MAX_CONCURRENT_QUERIES); - pValuesQueue.push(fieldCandidates, (err) => { - if (err) { - logger.error(`Failed to fetch p-values.', got: \n${err.toString()}`); - responseStream.pushError(`Failed to fetch p-values.`); - pValuesQueue.kill(); - responseStream.end(); - } else if (stateHandler.shouldStop()) { - logDebugMessage('shouldStop fetching p-values.'); - pValuesQueue.kill(); - responseStream.end(); + pValuesQueue.push( + [ + ...textFieldCandidates.map((d) => ({ textFieldCandidate: d })), + ...fieldCandidates.map((d) => ({ fieldCandidate: d })), + ], + (err) => { + if (err) { + logger.error(`Failed to fetch p-values.', got: \n${err.toString()}`); + responseStream.pushError(`Failed to fetch p-values.`); + pValuesQueue.kill(); + responseStream.end(); + } else if (stateHandler.shouldStop()) { + logDebugMessage('shouldStop fetching p-values.'); + pValuesQueue.kill(); + responseStream.end(); + } } - }); + ); await pValuesQueue.drain(); fieldValuePairsCount = significantCategories.length + significantTerms.length; diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/create/schemas/v1.ts b/x-pack/plugins/alerting/common/routes/rule/apis/create/schemas/v1.ts index 40dd30249c09d..cb24fe674b899 100644 --- a/x-pack/plugins/alerting/common/routes/rule/apis/create/schemas/v1.ts +++ b/x-pack/plugins/alerting/common/routes/rule/apis/create/schemas/v1.ts @@ -11,60 +11,172 @@ import { notifyWhenSchemaV1, alertDelaySchemaV1 } from '../../../response'; import { alertsFilterQuerySchemaV1 } from '../../../../alerts_filter_query'; export const actionFrequencySchema = schema.object({ - summary: schema.boolean(), + summary: schema.boolean({ + meta: { description: 'Indicates whether the action is a summary.' }, + }), notify_when: notifyWhenSchemaV1, - throttle: schema.nullable(schema.string({ validate: validateDurationV1 })), -}); - -export const actionAlertsFilterSchema = schema.object({ - query: schema.maybe(alertsFilterQuerySchemaV1), - timeframe: schema.maybe( - schema.object({ - days: schema.arrayOf( - schema.oneOf([ - schema.literal(1), - schema.literal(2), - schema.literal(3), - schema.literal(4), - schema.literal(5), - schema.literal(6), - schema.literal(7), - ]) - ), - hours: schema.object({ - start: schema.string({ - validate: validateHoursV1, - }), - end: schema.string({ - validate: validateHoursV1, - }), - }), - timezone: schema.string({ validate: validateTimezoneV1 }), + throttle: schema.nullable( + schema.string({ + validate: validateDurationV1, + meta: { + description: + 'The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.', + }, }) ), }); -export const actionSchema = schema.object({ - group: schema.maybe(schema.string()), - id: schema.string(), - params: schema.recordOf(schema.string(), schema.maybe(schema.any()), { defaultValue: {} }), - frequency: schema.maybe(actionFrequencySchema), - uuid: schema.maybe(schema.string()), - alerts_filter: schema.maybe(actionAlertsFilterSchema), - use_alert_data_for_template: schema.maybe(schema.boolean()), -}); +export const actionAlertsFilterSchema = schema.object( + { + query: schema.maybe(alertsFilterQuerySchemaV1), + timeframe: schema.maybe( + schema.object( + { + days: schema.arrayOf( + schema.oneOf([ + schema.literal(1), + schema.literal(2), + schema.literal(3), + schema.literal(4), + schema.literal(5), + schema.literal(6), + schema.literal(7), + ]), + { + meta: { + description: + 'Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.', + }, + } + ), + hours: schema.object( + { + start: schema.string({ + validate: validateHoursV1, + meta: { description: 'The start of the time frame in 24-hour notation (`hh:mm`).' }, + }), + end: schema.string({ + validate: validateHoursV1, + meta: { description: 'The end of the time frame in 24-hour notation (`hh:mm`).' }, + }), + }, + { + meta: { + description: + 'Defines the range of time in a day that the action can run. If the `start` value is `00:00` and the `end` value is `24:00`, actions be generated all day.', + }, + } + ), + timezone: schema.string({ + validate: validateTimezoneV1, + meta: { + description: + 'The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.', + }, + }), + }, + { meta: { description: 'Defines a period that limits whether the action runs.' } } + ) + ), + }, + { + meta: { + description: + 'Conditions that affect whether the action runs. If you specify multiple conditions, all conditions must be met for the action to run. For example, if an alert occurs within the specified time frame and matches the query, the action runs.', + }, + } +); + +export const actionSchema = schema.object( + { + group: schema.maybe( + schema.string({ + meta: { + description: + "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.", + }, + }) + ), + id: schema.string({ + meta: { description: 'The identifier for the connector saved object.' }, + }), + params: schema.recordOf(schema.string(), schema.maybe(schema.any()), { + defaultValue: {}, + meta: { + description: + 'The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.', + }, + }), + frequency: schema.maybe(actionFrequencySchema), + uuid: schema.maybe( + schema.string({ + meta: { description: 'A universally unique identifier (UUID) for the action.' }, + }) + ), + alerts_filter: schema.maybe(actionAlertsFilterSchema), + use_alert_data_for_template: schema.maybe(schema.boolean()), + }, + { + meta: { description: 'An action that runs under defined conditions.' }, + } +); export const createBodySchema = schema.object({ - name: schema.string(), - rule_type_id: schema.string(), - enabled: schema.boolean({ defaultValue: true }), - consumer: schema.string(), - tags: schema.arrayOf(schema.string(), { defaultValue: [] }), - throttle: schema.maybe(schema.nullable(schema.string({ validate: validateDurationV1 }))), - params: schema.recordOf(schema.string(), schema.maybe(schema.any()), { defaultValue: {} }), - schedule: schema.object({ - interval: schema.string({ validate: validateDurationV1 }), + name: schema.string({ + meta: { + description: + 'The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule.', + }, + }), + rule_type_id: schema.string({ + meta: { description: 'The rule type identifier.' }, }), + enabled: schema.boolean({ + defaultValue: true, + meta: { + description: + 'Indicates whether you want to run the rule on an interval basis after it is created.', + }, + }), + consumer: schema.string({ + meta: { + description: + 'The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.', + }, + }), + tags: schema.arrayOf(schema.string(), { + defaultValue: [], + meta: { description: 'The tags for the rule.' }, + }), + throttle: schema.maybe( + schema.nullable( + schema.string({ + validate: validateDurationV1, + meta: { + description: + 'Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.', + }, + }) + ) + ), + params: schema.recordOf(schema.string(), schema.maybe(schema.any()), { + defaultValue: {}, + meta: { description: 'The parameters for the rule.' }, + }), + schedule: schema.object( + { + interval: schema.string({ + validate: validateDurationV1, + meta: { description: 'The interval is specified in seconds, minutes, hours, or days.' }, + }), + }, + { + meta: { + description: + 'The check interval, which specifies how frequently the rule conditions are checked.', + }, + } + ), actions: schema.arrayOf(actionSchema, { defaultValue: [] }), notify_when: schema.maybe(schema.nullable(notifyWhenSchemaV1)), alert_delay: schema.maybe(alertDelaySchemaV1), diff --git a/x-pack/plugins/alerting/common/routes/rule/response/schemas/v1.ts b/x-pack/plugins/alerting/common/routes/rule/response/schemas/v1.ts index 2b6f09ef0dfd8..e78c9b88b5d64 100644 --- a/x-pack/plugins/alerting/common/routes/rule/response/schemas/v1.ts +++ b/x-pack/plugins/alerting/common/routes/rule/response/schemas/v1.ts @@ -27,7 +27,13 @@ export const notifyWhenSchema = schema.oneOf( schema.literal(ruleNotifyWhenV1.ACTIVE), schema.literal(ruleNotifyWhenV1.THROTTLE), ], - { validate: validateNotifyWhenV1 } + { + validate: validateNotifyWhenV1, + meta: { + description: + 'Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.', + }, + } ); const intervalScheduleSchema = schema.object({ @@ -183,9 +189,19 @@ export const ruleSnoozeScheduleSchema = schema.object({ skipRecurrences: schema.maybe(schema.arrayOf(schema.string())), }); -export const alertDelaySchema = schema.object({ - active: schema.number(), -}); +export const alertDelaySchema = schema.object( + { + active: schema.number({ + meta: { description: 'The number of consecutive runs that must meet the rule conditions.' }, + }), + }, + { + meta: { + description: + 'Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.', + }, + } +); export const ruleResponseSchema = schema.object({ id: schema.string(), diff --git a/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.test.ts b/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.test.ts index 2528a27f19f9e..b50025b415178 100644 --- a/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.test.ts +++ b/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.test.ts @@ -674,6 +674,36 @@ describe('getAlertsForNotification', () => { expect(delayedAlertsCount).toBe(2); }); + test('should remove the alert from recoveredAlerts and should not return the alert in currentRecoveredAlerts if the activeCount is less than the rule alertDelay', () => { + const alert1 = new Alert('1', { + meta: { activeCount: 1, uuid: 'uuid-1' }, + }); + const alert2 = new Alert('2', { meta: { uuid: 'uuid-2' } }); + + const { recoveredAlerts, currentRecoveredAlerts, delayedAlertsCount } = + getAlertsForNotification( + DEFAULT_FLAPPING_SETTINGS, + true, + 'default', + 5, + {}, + {}, + { + // recovered alerts + '1': alert1, + '2': alert2, + }, + { + // current recovered alerts + '1': alert1, + '2': alert2, + } + ); + expect(recoveredAlerts).toMatchInlineSnapshot(`Object {}`); + expect(currentRecoveredAlerts).toMatchInlineSnapshot(`Object {}`); + expect(delayedAlertsCount).toBe(0); + }); + test('should update active alert to look like a new alert if the activeCount is equal to the rule alertDelay', () => { const alert2 = new Alert('2', { meta: { uuid: 'uuid-2' } }); diff --git a/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.ts b/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.ts index c5c7ac017b2c1..c1974810b46d0 100644 --- a/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.ts +++ b/x-pack/plugins/alerting/server/lib/get_alerts_for_notification.ts @@ -54,6 +54,12 @@ export function getAlertsForNotification< for (const id of keys(currentRecoveredAlerts)) { const alert = recoveredAlerts[id]; + // if alert has not reached the alertDelay threshold don't recover the alert + if (alert.getActiveCount() < alertDelay) { + // remove from recovered alerts + delete recoveredAlerts[id]; + delete currentRecoveredAlerts[id]; + } alert.resetActiveCount(); if (flappingSettings.enabled) { const flapping = alert.getFlapping(); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx index fd317d09ddfd9..94fcf2a44044f 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx @@ -15,8 +15,9 @@ import { ReactEmbeddableRenderer, } from '@kbn/embeddable-plugin/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; -import React, { FC, useMemo } from 'react'; +import React, { FC } from 'react'; import ReactDOM from 'react-dom'; +import { omit } from 'lodash'; import { pluginServices } from '../../../public/services'; import { CANVAS_EMBEDDABLE_CLASSNAME } from '../../../common/lib'; import { RendererStrings } from '../../../i18n'; @@ -54,20 +55,21 @@ const renderReactEmbeddable = ({ core: CoreStart; }) => { // wrap in functional component to allow usage of hooks - const RendererWrapper: FC<{ canvasApi: CanvasContainerApi }> = ({ canvasApi }) => { + const RendererWrapper: FC<{}> = () => { const getAppContext = useGetAppContext(core); - useMemo(() => { - canvasApi.getAppContext = getAppContext; - }, [canvasApi, getAppContext]); - return ( ({ + ...container, + getAppContext, + getSerializedStateForChild: () => ({ + rawState: omit(input, 'disableTriggers'), + }), + })} key={`${type}_${uuid}`} - state={{ rawState: input }} onAnyStateChange={(newState) => { const newExpression = embeddableInputToExpression( newState.rawState as unknown as EmbeddableInput, @@ -87,7 +89,7 @@ const renderReactEmbeddable = ({ className={CANVAS_EMBEDDABLE_CLASSNAME} style={{ width: '100%', height: '100%', cursor: 'auto' }} > - + ); diff --git a/x-pack/plugins/canvas/public/components/hooks/use_canvas_api.tsx b/x-pack/plugins/canvas/public/components/hooks/use_canvas_api.tsx index 4eb6ccaacb5d9..3d1784bf65c82 100644 --- a/x-pack/plugins/canvas/public/components/hooks/use_canvas_api.tsx +++ b/x-pack/plugins/canvas/public/components/hooks/use_canvas_api.tsx @@ -9,7 +9,8 @@ import { useCallback, useMemo } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { BehaviorSubject } from 'rxjs'; -import { EmbeddableInput, ViewMode } from '@kbn/embeddable-plugin/common'; +import { EmbeddableInput } from '@kbn/embeddable-plugin/common'; +import { ViewMode } from '@kbn/presentation-publishing'; import { embeddableInputToExpression } from '../../../canvas_plugin_src/renderers/embeddable/embeddable_input_to_expression'; import { CanvasContainerApi } from '../../../types'; @@ -35,9 +36,9 @@ export const useCanvasApi: () => CanvasContainerApi = () => { [selectedPageId, dispatch] ); - const getCanvasApi = useCallback(() => { + const getCanvasApi = useCallback((): CanvasContainerApi => { return { - viewMode: new BehaviorSubject(ViewMode.EDIT), // always in edit mode + viewMode: new BehaviorSubject('edit'), // always in edit mode addNewPanel: async ({ panelType, initialState, @@ -47,7 +48,12 @@ export const useCanvasApi: () => CanvasContainerApi = () => { }) => { createNewEmbeddable(panelType, initialState); }, - } as CanvasContainerApi; + disableTriggers: true, + /** + * getSerializedStateForChild is left out here because we cannot access the state here. That method + * is injected in `x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx` + */ + } as unknown as CanvasContainerApi; }, [createNewEmbeddable]); return useMemo(() => getCanvasApi(), [getCanvasApi]); diff --git a/x-pack/plugins/canvas/types/embeddables.ts b/x-pack/plugins/canvas/types/embeddables.ts index 38aae5f33be7b..eaf206b05c47a 100644 --- a/x-pack/plugins/canvas/types/embeddables.ts +++ b/x-pack/plugins/canvas/types/embeddables.ts @@ -8,8 +8,8 @@ import type { TimeRange } from '@kbn/es-query'; import { Filter } from '@kbn/es-query'; import { EmbeddableInput as Input } from '@kbn/embeddable-plugin/common'; -import { HasAppContext, PublishesViewMode } from '@kbn/presentation-publishing'; -import { CanAddNewPanel } from '@kbn/presentation-containers'; +import { HasAppContext, HasDisableTriggers, PublishesViewMode } from '@kbn/presentation-publishing'; +import { CanAddNewPanel, HasSerializedChildState } from '@kbn/presentation-containers'; export type EmbeddableInput = Input & { timeRange?: TimeRange; @@ -17,4 +17,8 @@ export type EmbeddableInput = Input & { savedObjectId?: string; }; -export type CanvasContainerApi = PublishesViewMode & CanAddNewPanel & Partial; +export type CanvasContainerApi = PublishesViewMode & + CanAddNewPanel & + HasDisableTriggers & + HasSerializedChildState & + Partial; diff --git a/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts b/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts index db6883810d672..e973633210d9c 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts @@ -15,8 +15,8 @@ import { } from '../../../common/constants'; // TODO: consolidate both hooks into one hook with a dynamic key -export const getCspmStatsKey = ['csp_cspm_dashboard_stats']; -export const getKspmStatsKey = ['csp_kspm_dashboard_stats']; +export const CSPM_STATS_QUERY_KEY = ['csp_cspm_dashboard_stats']; +export const KSPM_STATS_QUERY_KEY = ['csp_kspm_dashboard_stats']; export const getStatsRoute = (policyTemplate: PosturePolicyTemplate) => { return STATS_ROUTE_PATH.replace('{policy_template}', policyTemplate); @@ -27,7 +27,7 @@ export const useCspmStatsApi = ( ) => { const { http } = useKibana().services; return useQuery( - getCspmStatsKey, + CSPM_STATS_QUERY_KEY, () => http.get(getStatsRoute(CSPM_POLICY_TEMPLATE), { version: '2' }), options @@ -39,7 +39,7 @@ export const useKspmStatsApi = ( ) => { const { http } = useKibana().services; return useQuery( - getKspmStatsKey, + KSPM_STATS_QUERY_KEY, () => http.get(getStatsRoute(KSPM_POLICY_TEMPLATE), { version: '2' }), options diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/change_csp_rule_state.ts b/x-pack/plugins/cloud_security_posture/public/pages/rules/change_csp_rule_state.ts deleted file mode 100644 index a574ec5f3efee..0000000000000 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/change_csp_rule_state.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { useQueryClient } from '@tanstack/react-query'; -import { getRuleStatesKey } from '../configurations/latest_findings/use_get_benchmark_rules_state_api'; -import { getCspmStatsKey, getKspmStatsKey } from '../../common/api'; -import { BENCHMARK_INTEGRATION_QUERY_KEY_V2 } from '../benchmarks/use_csp_benchmark_integrations'; -import { - CspBenchmarkRulesBulkActionRequestSchema, - RuleStateAttributes, -} from '../../../common/types/latest'; -import { CSP_BENCHMARK_RULES_BULK_ACTION_ROUTE_PATH } from '../../../common/constants'; - -export type RuleStateAttributesWithoutStates = Omit; -export const useChangeCspRuleState = () => { - const { http } = useKibana().services; - const queryClient = useQueryClient(); - - return async (actionOnRule: 'mute' | 'unmute', ruleIds: RuleStateAttributesWithoutStates[]) => { - const query = { - action: actionOnRule, - rules: ruleIds, - }; - - const cspRuleBulkActionResponse = await http?.post( - CSP_BENCHMARK_RULES_BULK_ACTION_ROUTE_PATH, - { - version: '1', - body: JSON.stringify(query), - } - ); - await queryClient.invalidateQueries(BENCHMARK_INTEGRATION_QUERY_KEY_V2); // causing rules counters refetch - await queryClient.invalidateQueries(getCspmStatsKey); // causing cloud dashboard refetch - await queryClient.invalidateQueries(getKspmStatsKey); // causing kubernetes dashboard refetch - await queryClient.invalidateQueries(getRuleStatesKey); // the rule states are part of the findings query key, invalidating them will cause the latest findings to refetch only after the rules states were changed - - return cspRuleBulkActionResponse; - }; -}; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.tsx index d50a351a0f1b6..c134e405f8a3c 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.tsx @@ -245,7 +245,6 @@ export const RulesContainer = () => { pageSize={rulesPageData.rules_page.length} isSearching={status === 'loading'} selectedRules={selectedRules} - refetchRulesStates={rulesStates.refetch} setEnabledDisabledItemsFilter={setEnabledDisabledItemsFilter} enabledDisabledItemsFilterState={enabledDisabledItemsFilter} setSelectAllRules={setSelectAllRules} @@ -268,16 +267,11 @@ export const RulesContainer = () => { }} selectedRuleId={params.ruleId} onRuleClick={navToRuleFlyout} - refetchRulesStates={rulesStates.refetch} selectedRules={selectedRules} setSelectedRules={setSelectedRules} /> {params.ruleId && rulesFlyoutData.metadata && ( - + )} ); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_flyout.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_flyout.tsx index 7168b1f3efc20..3777646917e4a 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_flyout.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_flyout.tsx @@ -29,7 +29,7 @@ import { CspBenchmarkRuleMetadata } from '../../../common/types/latest'; import { getRuleList } from '../configurations/findings_flyout/rule_tab'; import { getRemediationList } from '../configurations/findings_flyout/overview_tab'; import * as TEST_SUBJECTS from './test_subjects'; -import { useChangeCspRuleState } from './change_csp_rule_state'; +import { useChangeCspRuleState } from './use_change_csp_rule_state'; import { CspBenchmarkRulesWithStates } from './rules_container'; import { showChangeBenchmarkRuleStatesSuccessToast, @@ -43,7 +43,6 @@ export const RULES_FLYOUT_SWITCH_BUTTON = 'rule-flyout-switch-button'; interface RuleFlyoutProps { onClose(): void; rule: CspBenchmarkRulesWithStates; - refetchRulesStates: () => void; } const tabs = [ @@ -65,9 +64,9 @@ const tabs = [ type RuleTab = typeof tabs[number]['id']; -export const RuleFlyout = ({ onClose, rule, refetchRulesStates }: RuleFlyoutProps) => { +export const RuleFlyout = ({ onClose, rule }: RuleFlyoutProps) => { const [tab, setTab] = useState('overview'); - const postRequestChangeRulesStates = useChangeCspRuleState(); + const { mutate: mutateRuleState } = useChangeCspRuleState(); const { data: rulesData } = useFetchDetectionRulesByTags( getFindingsDetectionRuleSearchTags(rule.metadata) ); @@ -84,8 +83,10 @@ export const RuleFlyout = ({ onClose, rule, refetchRulesStates }: RuleFlyoutProp rule_id: rule.metadata.id, }; const nextRuleStates = isRuleMuted ? 'unmute' : 'mute'; - await postRequestChangeRulesStates(nextRuleStates, [rulesObjectRequest]); - refetchRulesStates(); + await mutateRuleState({ + newState: nextRuleStates, + ruleIds: [rulesObjectRequest], + }); showChangeBenchmarkRuleStatesSuccessToast(startServices, isRuleMuted, { numberOfRules: 1, numberOfDetectionRules: rulesData?.total || 0, diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx index a9e4b0501cfdf..05bed9ce85cd3 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { Criteria, EuiButtonEmpty, @@ -27,7 +27,7 @@ import { getFindingsDetectionRuleSearchTags } from '../../../common/utils/detect import { ColumnNameWithTooltip } from '../../components/column_name_with_tooltip'; import type { CspBenchmarkRulesWithStates, RulesState } from './rules_container'; import * as TEST_SUBJECTS from './test_subjects'; -import { RuleStateAttributesWithoutStates, useChangeCspRuleState } from './change_csp_rule_state'; +import { RuleStateUpdateRequest, useChangeCspRuleState } from './use_change_csp_rule_state'; import { showChangeBenchmarkRuleStatesSuccessToast } from '../../components/take_action'; import { fetchDetectionRulesByTags } from '../../common/api/use_fetch_detection_rules_by_tags'; @@ -41,7 +41,6 @@ type RulesTableProps = Pick< setPagination(pagination: Pick): void; onRuleClick: (ruleID: string) => void; selectedRuleId?: string; - refetchRulesStates: () => void; selectedRules: CspBenchmarkRulesWithStates[]; setSelectedRules: (rules: CspBenchmarkRulesWithStates[]) => void; onSortChange: (value: 'asc' | 'desc') => void; @@ -49,12 +48,9 @@ type RulesTableProps = Pick< type GetColumnProps = Pick< RulesTableProps, - 'onRuleClick' | 'refetchRulesStates' | 'selectedRules' | 'setSelectedRules' + 'onRuleClick' | 'selectedRules' | 'setSelectedRules' > & { - postRequestChangeRulesStates: ( - actionOnRule: 'mute' | 'unmute', - ruleIds: RuleStateAttributesWithoutStates[] - ) => void; + mutateRulesStates: (ruleStateUpdateRequest: RuleStateUpdateRequest) => void; items: CspBenchmarkRulesWithStates[]; setIsAllRulesSelectedThisPage: (isAllRulesSelected: boolean) => void; isAllRulesSelectedThisPage: boolean; @@ -75,7 +71,6 @@ export const RulesTable = ({ loading, error, selectedRuleId, - refetchRulesStates, selectedRules, setSelectedRules, onRuleClick, @@ -116,7 +111,7 @@ export const RulesTable = ({ const [isAllRulesSelectedThisPage, setIsAllRulesSelectedThisPage] = useState(false); - const postRequestChangeRulesStates = useChangeCspRuleState(); + const { mutate: mutateRulesStates } = useChangeCspRuleState(); const isCurrentPageRulesASubset = ( currentPageRulesArray: CspBenchmarkRulesWithStates[], @@ -140,35 +135,19 @@ export const RulesTable = ({ else setIsAllRulesSelectedThisPage(false); }, [items.length, selectedRules.length]); - const columns = useMemo(() => { - const startServices = { notifications, analytics, i18n: i18nStart, theme }; - return getColumns({ - refetchRulesStates, - postRequestChangeRulesStates, - selectedRules, - setSelectedRules, - items, - setIsAllRulesSelectedThisPage, - isAllRulesSelectedThisPage, - isCurrentPageRulesASubset, - onRuleClick, - http, - startServices, - }); - }, [ - refetchRulesStates, - postRequestChangeRulesStates, + const startServices = { notifications, analytics, i18n: i18nStart, theme }; + const columns = getColumns({ + mutateRulesStates, selectedRules, setSelectedRules, items, + setIsAllRulesSelectedThisPage, isAllRulesSelectedThisPage, + isCurrentPageRulesASubset, onRuleClick, - notifications, http, - analytics, - i18nStart, - theme, - ]); + startServices, + }); return ( <> @@ -189,8 +168,7 @@ export const RulesTable = ({ }; const getColumns = ({ - refetchRulesStates, - postRequestChangeRulesStates, + mutateRulesStates, selectedRules, setSelectedRules, items, @@ -316,18 +294,22 @@ const getColumns = ({ const changeCspRuleStateFn = async () => { if (rule?.metadata.benchmark.rule_number) { // Calling this function this way to make sure it didn't get called on every single row render, its only being called when user click on the switch button - const detectionRuleCount = ( + const detectionRulesForSelectedRule = ( await fetchDetectionRulesByTags( getFindingsDetectionRuleSearchTags(rule.metadata), { match: 'all' }, http ) ).total; - postRequestChangeRulesStates(nextRuleState, [rulesObjectRequest]); - refetchRulesStates(); + + mutateRulesStates({ + newState: nextRuleState, + ruleIds: [rulesObjectRequest], + }); + showChangeBenchmarkRuleStatesSuccessToast(startServices, isRuleMuted, { numberOfRules: 1, - numberOfDetectionRules: detectionRuleCount || 0, + numberOfDetectionRules: detectionRulesForSelectedRule || 0, }); } }; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx index 58a4ad46986eb..5aa8aae1dc590 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx @@ -26,7 +26,10 @@ import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; import { useKibana } from '../../common/hooks/use_kibana'; import { getFindingsDetectionRuleSearchTagsFromArrayOfRules } from '../../../common/utils/detection_rules'; -import { RuleStateAttributesWithoutStates, useChangeCspRuleState } from './change_csp_rule_state'; +import { + RuleStateAttributesWithoutStates, + useChangeCspRuleState, +} from './use_change_csp_rule_state'; import { CspBenchmarkRulesWithStates } from './rules_container'; import { MultiSelectFilter } from '../../common/component/multi_select_filter'; import { showChangeBenchmarkRuleStatesSuccessToast } from '../../components/take_action'; @@ -53,7 +56,6 @@ interface RulesTableToolbarProps { isSearching: boolean; pageSize: number; selectedRules: CspBenchmarkRulesWithStates[]; - refetchRulesStates: () => void; setEnabledDisabledItemsFilter: (filterState: string) => void; enabledDisabledItemsFilterState: string; setSelectAllRules: () => void; @@ -64,7 +66,6 @@ interface RuleTableCount { pageSize: number; total: number; selectedRules: CspBenchmarkRulesWithStates[]; - refetchRulesStates: () => void; setSelectAllRules: () => void; setSelectedRules: (rules: CspBenchmarkRulesWithStates[]) => void; } @@ -80,7 +81,6 @@ export const RulesTableHeader = ({ sectionSelectOptions, ruleNumberSelectOptions, selectedRules, - refetchRulesStates, setEnabledDisabledItemsFilter, enabledDisabledItemsFilterState, setSelectAllRules, @@ -198,7 +198,6 @@ export const RulesTableHeader = ({ pageSize={pageSize} total={totalRulesCount} selectedRules={selectedRules} - refetchRulesStates={refetchRulesStates} setSelectAllRules={setSelectAllRules} setSelectedRules={setSelectedRules} /> @@ -240,7 +239,6 @@ const CurrentPageOfTotal = ({ pageSize, total, selectedRules, - refetchRulesStates, setSelectAllRules, setSelectedRules, }: RuleTableCount) => { @@ -249,7 +247,8 @@ const CurrentPageOfTotal = ({ setIsPopoverOpen((e) => !e); }; - const { data: rulesData } = useFetchDetectionRulesByTags( + const { mutate: mutateRulesStates } = useChangeCspRuleState(); + const { data: detectionRulesForSelectedRules } = useFetchDetectionRulesByTags( getFindingsDetectionRuleSearchTagsFromArrayOfRules(selectedRules.map((rule) => rule.metadata)), { match: 'any' } ); @@ -257,7 +256,6 @@ const CurrentPageOfTotal = ({ const { notifications, analytics, i18n: i18nStart, theme } = useKibana().services; const startServices = { notifications, analytics, i18n: i18nStart, theme }; - const postRequestChangeRulesState = useChangeCspRuleState(); const changeRulesState = async (state: 'mute' | 'unmute') => { const bulkSelectedRules: RuleStateAttributesWithoutStates[] = selectedRules.map( (e: CspBenchmarkRulesWithStates) => ({ @@ -269,12 +267,14 @@ const CurrentPageOfTotal = ({ ); // Only do the API Call IF there are no undefined value for rule number in the selected rules if (!bulkSelectedRules.some((rule) => rule.rule_number === undefined)) { - await postRequestChangeRulesState(state, bulkSelectedRules); - refetchRulesStates(); + mutateRulesStates({ + newState: state, + ruleIds: bulkSelectedRules, + }); setIsPopoverOpen(false); showChangeBenchmarkRuleStatesSuccessToast(startServices, state !== 'mute', { numberOfRules: bulkSelectedRules.length, - numberOfDetectionRules: rulesData?.total || 0, + numberOfDetectionRules: detectionRulesForSelectedRules?.total || 0, }); } }; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/use_change_csp_rule_state.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_change_csp_rule_state.test.tsx new file mode 100644 index 0000000000000..cd205bb7f6b7b --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_change_csp_rule_state.test.tsx @@ -0,0 +1,333 @@ +/* + * 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. + */ +import React from 'react'; +import { act, renderHook } from '@testing-library/react-hooks'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { + useChangeCspRuleState, + createRulesWithUpdatedState, + RuleStateUpdateRequest, +} from './use_change_csp_rule_state'; +import { CSP_RULES_STATES_QUERY_KEY } from './use_csp_rules_state'; +import { BENCHMARK_INTEGRATION_QUERY_KEY_V2 } from '../benchmarks/use_csp_benchmark_integrations'; +import { CSPM_STATS_QUERY_KEY, KSPM_STATS_QUERY_KEY } from '../../common/api'; +import { CSP_BENCHMARK_RULES_BULK_ACTION_ROUTE_PATH } from '../../../common/constants'; +import { RuleStateAttributes } from '../../../common/types/rules/v4'; + +const initialRules = { + rule_1: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + muted: false, + }, + rule_2: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '2', + rule_id: 'rule_2', + muted: false, + }, + rule_3: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '3', + rule_id: 'rule_3', + muted: false, + }, +}; + +jest.mock('@kbn/kibana-react-plugin/public', () => ({ + useKibana: jest.fn().mockReturnValue({ + services: { + http: { + post: jest.fn(), + }, + }, + }), +})); + +const testWrapper = () => { + const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: false, + }, + }, + // this is needed to avoid the errors in the console that are cause by QueryClient` + logger: { + log: jest.fn(), + warn: jest.fn(), + error: () => {}, + }, + }); + + queryClient.setQueryData(CSP_RULES_STATES_QUERY_KEY, { ...initialRules }); + + return { + wrapper: ({ children }: { children: React.ReactNode | React.ReactNode[] }) => ( + {children} + ), + queryClient, + }; +}; + +describe('use_change_csp_rule_state', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should call http.post with the correct parameters', async () => { + const appMockRender = testWrapper(); + const httpPostSpy = jest.spyOn(useKibana().services.http!, 'post'); + + const { result, waitForNextUpdate } = await renderHook(() => useChangeCspRuleState(), { + wrapper: appMockRender.wrapper, + }); + + const mockRuleStateUpdateRequest: RuleStateUpdateRequest = { + newState: 'mute', + ruleIds: [ + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + }, + ], + }; + + act(() => { + result.current.mutate(mockRuleStateUpdateRequest); + }); + + await waitForNextUpdate(); + + expect(httpPostSpy).toHaveBeenCalledWith(CSP_BENCHMARK_RULES_BULK_ACTION_ROUTE_PATH, { + version: '1', + body: JSON.stringify({ + action: 'mute', + rules: [ + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + }, + ], + }), + }); + }); + + it('should cancel queries and update query data onMutate', async () => { + const appMockRender = testWrapper(); + const queryClientSpy = jest.spyOn(appMockRender.queryClient, 'cancelQueries'); + const queryClientGetSpy = jest.spyOn(appMockRender.queryClient, 'getQueryData'); + const mockSetQueryDataSpy = jest.spyOn(appMockRender.queryClient, 'setQueryData'); + + const { result, waitForNextUpdate } = await renderHook(() => useChangeCspRuleState(), { + wrapper: appMockRender.wrapper, + }); + + const mockRuleStateUpdateRequest: RuleStateUpdateRequest = { + newState: 'mute', + ruleIds: [ + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + }, + ], + }; + + act(() => { + result.current.mutate(mockRuleStateUpdateRequest); + }); + + await waitForNextUpdate(); + + const expectedMutatedRules = { + ...initialRules, + rule_1: { ...initialRules.rule_1, muted: true }, + }; + + expect(queryClientSpy).toHaveBeenCalled(); + expect(queryClientGetSpy).toHaveBeenCalled(); + expect(mockSetQueryDataSpy).toHaveBeenCalled(); + expect(mockSetQueryDataSpy).toHaveReturnedWith(expectedMutatedRules); + }); + + it('should invalidate queries onSettled', async () => { + const appMockRender = testWrapper(); + const mockInvalidateQueriesSpy = jest.spyOn(appMockRender.queryClient, 'invalidateQueries'); + + const { result, waitForNextUpdate } = await renderHook(() => useChangeCspRuleState(), { + wrapper: appMockRender.wrapper, + }); + + const mockRuleStateUpdateRequest: RuleStateUpdateRequest = { + newState: 'mute', + ruleIds: [ + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + }, + ], + }; + + act(() => { + result.current.mutate(mockRuleStateUpdateRequest); + }); + + await waitForNextUpdate(); + + expect(mockInvalidateQueriesSpy).toHaveBeenCalledWith(BENCHMARK_INTEGRATION_QUERY_KEY_V2); + expect(mockInvalidateQueriesSpy).toHaveBeenCalledWith(CSPM_STATS_QUERY_KEY); + expect(mockInvalidateQueriesSpy).toHaveBeenCalledWith(KSPM_STATS_QUERY_KEY); + expect(mockInvalidateQueriesSpy).toHaveBeenCalledWith(CSP_RULES_STATES_QUERY_KEY); + }); + + it('should restore previous query data onError', async () => { + const appMockRender = testWrapper(); + const mockSetQueryDataSpy = jest.spyOn(appMockRender.queryClient, 'setQueryData'); + + const { result, waitForNextUpdate } = await renderHook(() => useChangeCspRuleState(), { + wrapper: appMockRender.wrapper, + }); + + const mockRuleStateUpdateRequest: RuleStateUpdateRequest = { + newState: 'mute', + ruleIds: [ + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + // forcing an error by providing a ruleId that does not exist in the cache + rule_id: 'shouldnotexist', + }, + ], + }; + + act(() => { + result.current.mutate(mockRuleStateUpdateRequest); + }); + + await waitForNextUpdate(); + + expect(mockSetQueryDataSpy).toHaveBeenCalled(); + expect(mockSetQueryDataSpy).toHaveReturnedWith(initialRules); + }); + + it('creates the new set of cache rules in a muted state when calling createRulesWithUpdatedState', async () => { + const request: RuleStateUpdateRequest = { + newState: 'mute', + ruleIds: [ + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + }, + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '2', + rule_id: 'rule_2', + }, + ], + }; + + const updateRules: Record = { + rule_1: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + muted: true, + }, + rule_2: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '2', + rule_id: 'rule_2', + muted: true, + }, + }; + + const newRulesState = createRulesWithUpdatedState(request, initialRules); + expect(newRulesState).toEqual({ ...initialRules, ...updateRules }); + }); + + it('creates the new cache with rules in a unmute state', async () => { + const initialMutedRules: Record = { + rule_1: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + muted: true, + }, + rule_2: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '2', + rule_id: 'rule_2', + muted: true, + }, + rule_3: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '3', + rule_id: 'rule_3', + muted: false, + }, + }; + + const request: RuleStateUpdateRequest = { + newState: 'unmute', + ruleIds: [ + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + }, + { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '2', + rule_id: 'rule_2', + }, + ], + }; + + const updateRules: Record = { + rule_1: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '1', + rule_id: 'rule_1', + muted: false, + }, + rule_2: { + benchmark_id: 'benchmark_id', + benchmark_version: 'benchmark_version', + rule_number: '2', + rule_id: 'rule_2', + muted: false, + }, + }; + + const newRulesState = createRulesWithUpdatedState(request, initialMutedRules); + expect(newRulesState).toEqual({ ...initialMutedRules, ...updateRules }); + }); +}); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/use_change_csp_rule_state.ts b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_change_csp_rule_state.ts new file mode 100644 index 0000000000000..bbf175b107f6e --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_change_csp_rule_state.ts @@ -0,0 +1,100 @@ +/* + * 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. + */ + +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { useQueryClient, useMutation } from '@tanstack/react-query'; +import { CSP_RULES_STATES_QUERY_KEY } from './use_csp_rules_state'; +import { CSPM_STATS_QUERY_KEY, KSPM_STATS_QUERY_KEY } from '../../common/api'; +import { BENCHMARK_INTEGRATION_QUERY_KEY_V2 } from '../benchmarks/use_csp_benchmark_integrations'; +import { + CspBenchmarkRulesBulkActionRequestSchema, + RuleStateAttributes, +} from '../../../common/types/latest'; +import { CSP_BENCHMARK_RULES_BULK_ACTION_ROUTE_PATH } from '../../../common/constants'; + +export type RuleStateAttributesWithoutStates = Omit; +export interface RuleStateUpdateRequest { + newState: 'mute' | 'unmute'; + ruleIds: RuleStateAttributesWithoutStates[]; +} + +export const useChangeCspRuleState = () => { + const { http } = useKibana().services; + const queryClient = useQueryClient(); + + return useMutation({ + mutationFn: async (ruleStateUpdateRequest: RuleStateUpdateRequest) => { + await http?.post( + CSP_BENCHMARK_RULES_BULK_ACTION_ROUTE_PATH, + { + version: '1', + body: JSON.stringify({ + action: ruleStateUpdateRequest.newState, + rules: ruleStateUpdateRequest.ruleIds, + }), + } + ); + }, + onMutate: async (ruleStateUpdateRequest: RuleStateUpdateRequest) => { + // Cancel any outgoing refetches (so they don't overwrite our optimistic update) + await queryClient.cancelQueries(CSP_RULES_STATES_QUERY_KEY); + + // Snapshot the previous rules + const previousCspRules = queryClient.getQueryData(CSP_RULES_STATES_QUERY_KEY); + + // Optimistically update to the rules that have state changes + queryClient.setQueryData( + CSP_RULES_STATES_QUERY_KEY, + (currentRuleStates: Record | undefined) => { + if (!currentRuleStates) { + return currentRuleStates; + } + return createRulesWithUpdatedState(ruleStateUpdateRequest, currentRuleStates); + } + ); + + // Return a context object with the previous value + return { previousCspRules }; + }, + onSettled: () => { + queryClient.invalidateQueries(BENCHMARK_INTEGRATION_QUERY_KEY_V2); + queryClient.invalidateQueries(CSPM_STATS_QUERY_KEY); + queryClient.invalidateQueries(KSPM_STATS_QUERY_KEY); + queryClient.invalidateQueries(CSP_RULES_STATES_QUERY_KEY); + }, + onError: (err, variables, context) => { + if (context?.previousCspRules) { + queryClient.setQueryData(CSP_RULES_STATES_QUERY_KEY, context.previousCspRules); + } + }, + }); +}; + +export function createRulesWithUpdatedState( + ruleStateUpdateRequest: RuleStateUpdateRequest, + currentRuleStates: Record +) { + const updateRuleStates: Record = {}; + ruleStateUpdateRequest.ruleIds.forEach((ruleId) => { + const matchingRuleKey = Object.keys(currentRuleStates).find( + (key) => currentRuleStates[key].rule_id === ruleId.rule_id + ); + if (matchingRuleKey) { + const updatedRule = { + ...currentRuleStates[matchingRuleKey], + muted: ruleStateUpdateRequest.newState === 'mute', + }; + + updateRuleStates[matchingRuleKey] = updatedRule; + } + }); + + return { + ...currentRuleStates, + ...updateRuleStates, + }; +} diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules_state.ts b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules_state.ts index da34cf8b247c7..e712b130e1651 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules_state.ts +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules_state.ts @@ -10,13 +10,13 @@ import { CspBenchmarkRulesStates } from '../../../common/types/latest'; import { CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH } from '../../../common/constants'; import { useKibana } from '../../common/hooks/use_kibana'; -const QUERY_KEY_V1 = 'csp_rules_states_v1'; +export const CSP_RULES_STATES_QUERY_KEY = ['csp_rules_states_v1']; export const useCspGetRulesStates = () => { const { http } = useKibana().services; return useQuery( - [QUERY_KEY_V1], + CSP_RULES_STATES_QUERY_KEY, () => http.get(CSP_GET_BENCHMARK_RULES_STATE_ROUTE_PATH, { version: '1', diff --git a/x-pack/plugins/elastic_assistant/common/constants.ts b/x-pack/plugins/elastic_assistant/common/constants.ts index 77fd99c7d5eb6..5c5233eaaa6c8 100755 --- a/x-pack/plugins/elastic_assistant/common/constants.ts +++ b/x-pack/plugins/elastic_assistant/common/constants.ts @@ -15,9 +15,6 @@ export const POST_ACTIONS_CONNECTOR_EXECUTE = `${BASE_PATH}/actions/connector/{c // Attack discovery export const ATTACK_DISCOVERY = `${BASE_PATH}/attack_discovery`; -// Knowledge Base -export const KNOWLEDGE_BASE = `${BASE_PATH}/knowledge_base/{resource?}`; - // Model Evaluation export const EVALUATE = `${BASE_PATH}/evaluate`; diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts index 671cb1b2f0a88..0850938633322 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts @@ -5,7 +5,7 @@ * 2.0. */ import { httpServerMock } from '@kbn/core/server/mocks'; -import { CAPABILITIES, EVALUATE, KNOWLEDGE_BASE } from '../../common/constants'; +import { CAPABILITIES, EVALUATE } from '../../common/constants'; import { ConversationCreateProps, ConversationUpdateProps, @@ -16,6 +16,7 @@ import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, PostEvaluateRequestBodyInput, @@ -42,21 +43,21 @@ export const requestMock = { export const getGetKnowledgeBaseStatusRequest = (resource?: string) => requestMock.create({ method: 'get', - path: KNOWLEDGE_BASE, + path: ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, query: { resource }, }); export const getPostKnowledgeBaseRequest = (resource?: string) => requestMock.create({ method: 'post', - path: KNOWLEDGE_BASE, + path: ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, query: { resource }, }); export const getDeleteKnowledgeBaseRequest = (resource?: string) => requestMock.create({ method: 'delete', - path: KNOWLEDGE_BASE, + path: ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, query: { resource }, }); diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts index 78982d0437650..6c5d9b2bc4d57 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts @@ -17,6 +17,8 @@ import { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plugin/s import { conversationsDataClientMock, dataClientMock } from './data_clients.mock'; import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; import { AIAssistantDataClient } from '../ai_assistant_data_clients'; +import { AIAssistantKnowledgeBaseDataClient } from '../ai_assistant_data_clients/knowledge_base'; +import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; export const createMockClients = () => { const core = coreMock.createRequestHandlerContext(); @@ -27,11 +29,12 @@ export const createMockClients = () => { clusterClient: core.elasticsearch.client, elasticAssistant: { actions: actionsClientMock.create(), - getRegisteredFeatures: jest.fn(), + getRegisteredFeatures: jest.fn(() => defaultAssistantFeatures), getRegisteredTools: jest.fn(), logger: loggingSystemMock.createLogger(), telemetry: coreMock.createSetup().analytics, getAIAssistantConversationsDataClient: conversationsDataClientMock.create(), + getAIAssistantKnowledgeBaseDataClient: dataClientMock.create(), getAIAssistantPromptsDataClient: dataClientMock.create(), getAIAssistantAnonymizationFieldsDataClient: dataClientMock.create(), getSpaceId: jest.fn(), @@ -85,7 +88,7 @@ const createElasticAssistantRequestContextMock = ( ): jest.Mocked => { return { actions: clients.elasticAssistant.actions as unknown as ActionsPluginStart, - getRegisteredFeatures: jest.fn(), + getRegisteredFeatures: jest.fn((pluginName: string) => defaultAssistantFeatures), getRegisteredTools: jest.fn(), logger: clients.elasticAssistant.logger, @@ -106,6 +109,14 @@ const createElasticAssistantRequestContextMock = ( () => clients.elasticAssistant.getAIAssistantPromptsDataClient ) as unknown as jest.MockInstance, [], unknown> & (() => Promise), + getAIAssistantKnowledgeBaseDataClient: jest.fn( + () => clients.elasticAssistant.getAIAssistantKnowledgeBaseDataClient + ) as unknown as jest.MockInstance< + Promise, + [boolean], + unknown + > & + ((initializeKnowledgeBase: boolean) => Promise), getCurrentUser: jest.fn(), getServerBasePath: jest.fn(), getSpaceId: jest.fn(), diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts index 550d523db4c6f..38426dd06a36f 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts @@ -33,7 +33,7 @@ describe('AIAssistantConversationsDataClient', () => { logger, elasticsearchClientPromise: Promise.resolve(clusterClient), spaceId: 'default', - indexPatternsResorceName: '', + indexPatternsResourceName: '', currentUser: mockUser1, kibanaVersion: '8.8.0', }; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts index fa27331f6c6c5..4838c70882f19 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts @@ -30,7 +30,7 @@ describe('AIAssistantDataClient', () => { logger, elasticsearchClientPromise: Promise.resolve(clusterClient), spaceId: 'default', - indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + indexPatternsResourceName: '.kibana-elastic-ai-assistant-conversations', currentUser: mockUser1, kibanaVersion: '8.8.0', }; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.ts index 75f2b166f1468..5bc84e05c8087 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.ts @@ -21,7 +21,7 @@ export interface AIAssistantDataClientParams { kibanaVersion: string; spaceId: string; logger: Logger; - indexPatternsResorceName: string; + indexPatternsResourceName: string; currentUser: AuthenticatedUser | null; } @@ -38,7 +38,7 @@ export class AIAssistantDataClient { constructor(public readonly options: AIAssistantDataClientParams) { this.indexTemplateAndPattern = getIndexTemplateAndPattern( - this.options.indexPatternsResorceName, + this.options.indexPatternsResourceName, this.options.spaceId ?? DEFAULT_NAMESPACE_STRING ); this.currentUser = this.options.currentUser; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/create_knowledge_base_entry.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/create_knowledge_base_entry.ts new file mode 100644 index 0000000000000..5430bf597ebe7 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/create_knowledge_base_entry.ts @@ -0,0 +1,83 @@ +/* + * 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. + */ + +import { v4 as uuidv4 } from 'uuid'; +import { ElasticsearchClient, Logger } from '@kbn/core/server'; + +import { + KnowledgeBaseEntryCreateProps, + KnowledgeBaseEntryResponse, +} from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import { getKnowledgeBaseEntry } from './get_knowledge_base_entry'; +import { CreateKnowledgeBaseEntrySchema } from './types'; + +export interface CreateKnowledgeBaseEntryParams { + esClient: ElasticsearchClient; + logger: Logger; + knowledgeBaseIndex: string; + spaceId: string; + user: AuthenticatedUser; + knowledgeBaseEntry: KnowledgeBaseEntryCreateProps; +} + +export const createKnowledgeBaseEntry = async ({ + esClient, + knowledgeBaseIndex, + spaceId, + user, + knowledgeBaseEntry, + logger, +}: CreateKnowledgeBaseEntryParams): Promise => { + const createdAt = new Date().toISOString(); + const body = transformToCreateSchema(createdAt, spaceId, user, knowledgeBaseEntry); + try { + const response = await esClient.create({ + body, + id: uuidv4(), + index: knowledgeBaseIndex, + refresh: 'wait_for', + }); + + return await getKnowledgeBaseEntry({ + esClient, + knowledgeBaseIndex, + id: response._id, + logger, + user, + }); + } catch (err) { + logger.error( + `Error creating Knowledge Base Entry: ${err} with kbResource: ${knowledgeBaseEntry.metadata.kbResource}` + ); + throw err; + } +}; + +export const transformToCreateSchema = ( + createdAt: string, + spaceId: string, + user: AuthenticatedUser, + { metadata, text }: KnowledgeBaseEntryCreateProps +): CreateKnowledgeBaseEntrySchema => { + return { + '@timestamp': createdAt, + created_at: createdAt, + created_by: user.profile_uid ?? 'unknown', + updated_at: createdAt, + updated_by: user.profile_uid ?? 'unknown', + users: [ + { + id: user.profile_uid, + name: user.username, + }, + ], + namespace: spaceId, + metadata, + text, + }; +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/field_maps_configuration.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/field_maps_configuration.ts new file mode 100644 index 0000000000000..16b5b35a9b2bb --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/field_maps_configuration.ts @@ -0,0 +1,90 @@ +/* + * 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. + */ +import { FieldMap } from '@kbn/data-stream-adapter'; + +export const knowledgeBaseFieldMap: FieldMap = { + '@timestamp': { + type: 'date', + array: false, + required: false, + }, + id: { + type: 'keyword', + array: false, + required: true, + }, + created_at: { + type: 'date', + array: false, + required: false, + }, + created_by: { + type: 'keyword', + array: false, + required: false, + }, + updated_at: { + type: 'date', + array: false, + required: false, + }, + updated_by: { + type: 'keyword', + array: false, + required: false, + }, + users: { + type: 'nested', + array: true, + required: false, + }, + 'users.id': { + type: 'keyword', + array: false, + required: true, + }, + 'users.name': { + type: 'keyword', + array: false, + required: false, + }, + metadata: { + type: 'object', + array: false, + required: false, + }, + 'metadata.kbResource': { + type: 'keyword', + array: false, + required: false, + }, + 'metadata.required': { + type: 'boolean', + array: false, + required: false, + }, + 'metadata.source': { + type: 'keyword', + array: false, + required: false, + }, + text: { + type: 'text', + array: false, + required: true, + }, + vector: { + type: 'object', + array: false, + required: false, + }, + 'vector.tokens': { + type: 'rank_features', + array: false, + required: false, + }, +} as const; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/get_knowledge_base_entry.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/get_knowledge_base_entry.ts new file mode 100644 index 0000000000000..c021e022765d0 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/get_knowledge_base_entry.ts @@ -0,0 +1,78 @@ +/* + * 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. + */ + +import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { KnowledgeBaseEntryResponse } from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin/common'; +import { EsKnowledgeBaseEntrySchema } from './types'; +import { transformESSearchToKnowledgeBaseEntry } from './transforms'; + +export interface GetKnowledgeBaseEntryParams { + esClient: ElasticsearchClient; + logger: Logger; + knowledgeBaseIndex: string; + id: string; + user: AuthenticatedUser; +} + +export const getKnowledgeBaseEntry = async ({ + esClient, + logger, + knowledgeBaseIndex, + id, + user, +}: GetKnowledgeBaseEntryParams): Promise => { + const filterByUser = [ + { + nested: { + path: 'users', + query: { + bool: { + must: [ + { + match: user.profile_uid + ? { 'users.id': user.profile_uid } + : { 'users.name': user.username }, + }, + ], + }, + }, + }, + }, + ]; + try { + const response = await esClient.search({ + query: { + bool: { + must: [ + { + bool: { + should: [ + { + term: { + _id: id, + }, + }, + ], + }, + }, + ...filterByUser, + ], + }, + }, + _source: true, + ignore_unavailable: true, + index: knowledgeBaseIndex, + seq_no_primary_term: true, + }); + const knowledgeBaseEntry = transformESSearchToKnowledgeBaseEntry(response); + return knowledgeBaseEntry[0] ?? null; + } catch (err) { + logger.error(`Error fetching knowledge base entry: ${err} with id: ${id}`); + throw err; + } +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/helpers.ts new file mode 100644 index 0000000000000..dc7f64e1aeee1 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/helpers.ts @@ -0,0 +1,16 @@ +/* + * 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. + */ + +import { errors } from '@elastic/elasticsearch'; + +export const isModelAlreadyExistsError = (error: Error) => { + return ( + error instanceof errors.ResponseError && + (error.body.error.type === 'resource_not_found_exception' || + error.body.error.type === 'status_exception') + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/index.ts new file mode 100644 index 0000000000000..771ec35c07c51 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/index.ts @@ -0,0 +1,264 @@ +/* + * 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. + */ + +import { + MlTrainedModelDeploymentNodesStats, + MlTrainedModelStats, +} from '@elastic/elasticsearch/lib/api/types'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { KibanaRequest } from '@kbn/core-http-server'; +import type { Document } from 'langchain/document'; +import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import { KnowledgeBaseEntryResponse } from '@kbn/elastic-assistant-common'; +import pRetry from 'p-retry'; +import { AIAssistantDataClient, AIAssistantDataClientParams } from '..'; +import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; +import { loadESQL } from '../../lib/langchain/content_loaders/esql_loader'; +import { GetElser } from '../../types'; +import { transformToCreateSchema } from './create_knowledge_base_entry'; +import { EsKnowledgeBaseEntrySchema } from './types'; +import { transformESSearchToKnowledgeBaseEntry } from './transforms'; +import { ESQL_DOCS_LOADED_QUERY } from '../../routes/knowledge_base/constants'; +import { isModelAlreadyExistsError } from './helpers'; + +interface KnowledgeBaseDataClientParams extends AIAssistantDataClientParams { + ml: MlPluginSetup; + getElserId: GetElser; + getIsKBSetupInProgress: () => boolean; + ingestPipelineResourceName: string; + setIsKBSetupInProgress: (isInProgress: boolean) => void; +} +export class AIAssistantKnowledgeBaseDataClient extends AIAssistantDataClient { + constructor(public readonly options: KnowledgeBaseDataClientParams) { + super(options); + } + + public get isSetupInProgress() { + return this.options.getIsKBSetupInProgress(); + } + + /** + * Downloads and installs ELSER model if not already installed + * + * @param soClient SavedObjectsClientContract for installing ELSER so that ML SO's are in sync + */ + private installModel = async ({ soClient }: { soClient: SavedObjectsClientContract }) => { + const elserId = await this.options.getElserId(); + this.options.logger.debug(`Installing ELSER model '${elserId}'...`); + + try { + await this.options.ml + // TODO: Potentially plumb soClient through DataClient from pluginStart + .trainedModelsProvider({} as KibanaRequest, soClient) + .installElasticModel(elserId); + } catch (error) { + this.options.logger.error(`Error installing ELSER model '${elserId}':\n${error}`); + } + }; + + /** + * Returns whether ELSER is installed/ready to deploy + * + * @returns Promise indicating whether the model is installed + */ + public isModelInstalled = async (): Promise => { + const elserId = await this.options.getElserId(); + this.options.logger.debug(`Checking if ELSER model '${elserId}' is installed...`); + + try { + const esClient = await this.options.elasticsearchClientPromise; + const getResponse = await esClient.ml.getTrainedModels({ + model_id: elserId, + include: 'definition_status', + }); + return Boolean(getResponse.trained_model_configs[0]?.fully_defined); + } catch (error) { + if (!isModelAlreadyExistsError(error)) { + this.options.logger.error( + `Error checking if ELSER model '${elserId}' is installed:\n${error}` + ); + } + return false; + } + }; + + /** + * Deploy the ELSER model with default configuration + */ + private deployModel = async () => { + const elserId = await this.options.getElserId(); + this.options.logger.debug(`Deploying ELSER model '${elserId}'...`); + try { + const esClient = await this.options.elasticsearchClientPromise; + await esClient.ml.startTrainedModelDeployment({ + model_id: elserId, + wait_for: 'fully_allocated', + }); + } catch (error) { + if (!isModelAlreadyExistsError(error)) { + this.options.logger.error(`Error deploying ELSER model '${elserId}':\n${error}`); + } + this.options.logger.debug(`Error deploying ELSER model '${elserId}', model already deployed`); + } + }; + + /** + * Checks if the provided model is deployed and allocated in Elasticsearch + * + * @returns Promise indicating whether the model is deployed + */ + public isModelDeployed = async (): Promise => { + const elserId = await this.options.getElserId(); + this.options.logger.debug(`Checking if ELSER model '${elserId}' is deployed...`); + + try { + const esClient = await this.options.elasticsearchClientPromise; + const getResponse = await esClient.ml.getTrainedModelsStats({ + model_id: elserId, + }); + + // For standardized way of checking deployment status see: https://github.com/elastic/elasticsearch/issues/106986 + const isReadyESS = (stats: MlTrainedModelStats) => + stats.deployment_stats?.state === 'started' && + stats.deployment_stats?.allocation_status.state === 'fully_allocated'; + + const isReadyServerless = (stats: MlTrainedModelStats) => + (stats.deployment_stats?.nodes as unknown as MlTrainedModelDeploymentNodesStats[]).some( + (node) => node.routing_state.routing_state === 'started' + ); + + return getResponse.trained_model_stats.some( + (stats) => isReadyESS(stats) || isReadyServerless(stats) + ); + } catch (e) { + // Returns 404 if it doesn't exist + return false; + } + }; + + /** + * Downloads and deploys recommended ELSER (if not already), then loads ES|QL docs + * + * NOTE: Before automatically installing ELSER in the background, we should perform deployment resource checks + * Only necessary for ESS, as Serverless can always auto-install if `productTier === complete` + * See ml-team issue for providing 'dry run' flag to perform these checks: https://github.com/elastic/ml-team/issues/1208 + * + * @param options + * @param options.esStore ElasticsearchStore for loading ES|QL docs via LangChain loaders + * @param options.soClient SavedObjectsClientContract for installing ELSER so that ML SO's are in sync + * + * @returns Promise + */ + public setupKnowledgeBase = async ({ + esStore, + soClient, + }: { + esStore: ElasticsearchStore; + soClient: SavedObjectsClientContract; + }): Promise => { + if (this.options.getIsKBSetupInProgress()) { + this.options.logger.debug('Knowledge Base setup already in progress'); + return; + } + + this.options.logger.debug('Starting Knowledge Base setup...'); + this.options.setIsKBSetupInProgress(true); + const elserId = await this.options.getElserId(); + + try { + const isInstalled = await this.isModelInstalled(); + if (!isInstalled) { + await this.installModel({ soClient }); + await pRetry( + async () => + (await this.isModelInstalled()) + ? Promise.resolve() + : Promise.reject(new Error('Model not installed')), + { minTimeout: 10000, maxTimeout: 10000, retries: 10 } + ); + this.options.logger.debug(`ELSER model '${elserId}' successfully installed!`); + } else { + this.options.logger.debug(`ELSER model '${elserId}' is already installed`); + } + + const isDeployed = await this.isModelDeployed(); + if (!isDeployed) { + await this.deployModel(); + await pRetry( + async () => + (await this.isModelDeployed()) + ? Promise.resolve() + : Promise.reject(new Error('Model not deployed')), + { minTimeout: 2000, retries: 10 } + ); + this.options.logger.debug(`ELSER model '${elserId}' successfully deployed!`); + } else { + this.options.logger.debug(`ELSER model '${elserId}' is already deployed`); + } + + this.options.logger.debug(`Checking if Knowledge Base docs have been loaded...`); + const kbDocsLoaded = (await esStore.similaritySearch(ESQL_DOCS_LOADED_QUERY)).length > 0; + if (!kbDocsLoaded) { + this.options.logger.debug(`Loading KB docs...`); + await loadESQL(esStore, this.options.logger); + } else { + this.options.logger.debug(`Knowledge Base docs already loaded!`); + } + } catch (e) { + this.options.logger.error(`Error setting up Knowledge Base: ${e.message}`); + } + this.options.setIsKBSetupInProgress(false); + }; + + /** + * Adds LangChain Documents to the knowledge base + * + * @param documents + * @param authenticatedUser + */ + public addKnowledgeBaseDocuments = async ({ + documents, + }: { + documents: Document[]; + }): Promise => { + const writer = await this.getWriter(); + const changedAt = new Date().toISOString(); + const authenticatedUser = this.options.currentUser; + if (authenticatedUser == null) { + throw new Error( + 'Authenticated user not found! Ensure kbDataClient was initialized from a request.' + ); + } + // @ts-ignore + const { errors, docs_created: docsCreated } = await writer.bulk({ + documentsToCreate: documents.map((doc) => + transformToCreateSchema(changedAt, this.spaceId, authenticatedUser, { + // TODO: Update the LangChain Document Metadata type extension + metadata: { + kbResource: doc.metadata.kbResourcer ?? 'unknown', + required: doc.metadata.required ?? false, + source: doc.metadata.source ?? 'unknown', + }, + text: doc.pageContent, + }) + ), + authenticatedUser, + }); + const created = + docsCreated.length > 0 + ? await this.findDocuments({ + page: 1, + perPage: 10000, + filter: docsCreated.map((c) => `_id:${c}`).join(' OR '), + }) + : undefined; + this.options.logger.debug(`created: ${created?.data.hits.hits.length ?? '0'}`); + this.options.logger.debug(`errors: ${JSON.stringify(errors, null, 2)}`); + + return created?.data ? transformESSearchToKnowledgeBaseEntry(created?.data) : []; + }; +} diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/ingest_pipeline.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/ingest_pipeline.ts new file mode 100644 index 0000000000000..170fa0342f9d9 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/ingest_pipeline.ts @@ -0,0 +1,36 @@ +/* + * 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. + */ + +import { IngestPutPipelineRequest } from '@elastic/elasticsearch/lib/api/types'; + +export const knowledgeBaseIngestPipeline = ({ + id, + modelId, +}: { + id: string; + modelId: string; +}): IngestPutPipelineRequest => ({ + id, + description: 'Embedding pipeline for Elastic AI Assistant ELSER Knowledge Base', + processors: [ + { + inference: { + model_id: modelId, + target_field: 'vector', + field_map: { + text: 'text_field', + }, + inference_config: { + // @ts-expect-error + text_expansion: { + results_field: 'tokens', + }, + }, + }, + }, + ], +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/transforms.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/transforms.ts new file mode 100644 index 0000000000000..f185c5ba8fdc2 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/transforms.ts @@ -0,0 +1,96 @@ +/* + * 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. + */ + +import { estypes } from '@elastic/elasticsearch'; +import { KnowledgeBaseEntryResponse } from '@kbn/elastic-assistant-common'; +import { EsKnowledgeBaseEntrySchema } from './types'; + +export const transformESSearchToKnowledgeBaseEntry = ( + response: estypes.SearchResponse +): KnowledgeBaseEntryResponse[] => { + return response.hits.hits + .filter((hit) => hit._source !== undefined) + .map((hit) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const kbEntrySchema = hit._source!; + const kbEntry: KnowledgeBaseEntryResponse = { + timestamp: kbEntrySchema['@timestamp'], + id: hit._id, + createdAt: kbEntrySchema.created_at, + createdBy: kbEntrySchema.created_by, + updatedAt: kbEntrySchema.updated_at, + updatedBy: kbEntrySchema.updated_by, + users: + kbEntrySchema.users?.map((user) => ({ + id: user.id, + name: user.name, + })) ?? [], + ...(kbEntrySchema.metadata + ? { + metadata: { + kbResource: kbEntrySchema.metadata.kbResource, + source: kbEntrySchema.metadata.source, + required: kbEntrySchema.metadata.required, + }, + } + : {}), + namespace: kbEntrySchema.namespace, + text: kbEntrySchema.text, + ...(kbEntrySchema.vector + ? { + vector: { + modelId: kbEntrySchema.vector.model_id, + tokens: kbEntrySchema.vector.tokens, + }, + } + : {}), + }; + + return kbEntry; + }); +}; + +export const transformESToKnowledgeBase = ( + response: EsKnowledgeBaseEntrySchema[] +): KnowledgeBaseEntryResponse[] => { + return response.map((kbEntrySchema) => { + const kbEntry: KnowledgeBaseEntryResponse = { + timestamp: kbEntrySchema['@timestamp'], + id: kbEntrySchema.id, + createdAt: kbEntrySchema.created_at, + createdBy: kbEntrySchema.created_by, + updatedAt: kbEntrySchema.updated_at, + updatedBy: kbEntrySchema.updated_by, + users: + kbEntrySchema.users?.map((user) => ({ + id: user.id, + name: user.name, + })) ?? [], + ...(kbEntrySchema.metadata + ? { + metadata: { + kbResource: kbEntrySchema.metadata.kbResource, + source: kbEntrySchema.metadata.source, + required: kbEntrySchema.metadata.required, + }, + } + : {}), + namespace: kbEntrySchema.namespace, + text: kbEntrySchema.text, + ...(kbEntrySchema.vector + ? { + vector: { + modelId: kbEntrySchema.vector.model_id, + tokens: kbEntrySchema.vector.tokens, + }, + } + : {}), + }; + + return kbEntry; + }); +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/types.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/types.ts new file mode 100644 index 0000000000000..b3180d80223ce --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/types.ts @@ -0,0 +1,54 @@ +/* + * 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 interface EsKnowledgeBaseEntrySchema { + '@timestamp': string; + id: string; + created_at: string; + created_by: string; + updated_at: string; + updated_by: string; + users?: Array<{ + id?: string; + name?: string; + }>; + metadata?: { + kbResource: string; + source: string; + required: boolean; + }; + namespace: string; + text: string; + vector?: { + tokens: Record; + model_id: string; + }; +} + +export interface CreateKnowledgeBaseEntrySchema { + '@timestamp'?: string; + id?: string | undefined; + created_at: string; + created_by: string; + updated_at: string; + updated_by: string; + users: Array<{ + id?: string; + name?: string; + }>; + metadata?: { + kbResource: string; + source: string; + required: boolean; + }; + namespace: string; + text: string; + vector?: { + tokens: Record; + model_id: string; + }; +} diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.ts new file mode 100644 index 0000000000000..8503494cf1535 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.ts @@ -0,0 +1,111 @@ +/* + * 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. + */ + +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { once } from 'lodash/fp'; +import type { KibanaRequest } from '@kbn/core-http-server'; +import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import { knowledgeBaseIngestPipeline } from '../ai_assistant_data_clients/knowledge_base/ingest_pipeline'; +import { GetElser } from '../types'; + +/** + * Creates a function that returns the ELSER model ID + * + * @param ml + */ +export const createGetElserId = (ml: MlPluginSetup): GetElser => { + return once(async () => { + return ( + ( + await ml + // Force check to happen as internal user + .trainedModelsProvider({} as KibanaRequest, {} as SavedObjectsClientContract) + .getELSER() + ).model_id + ); + }); +}; + +interface PipelineExistsParams { + esClient: ElasticsearchClient; + id: string; +} + +/** + * Checks if the provided ingest pipeline exists in Elasticsearch + * + * @param params params + * @param params.esClient Elasticsearch client with privileges to check for ingest pipelines + * @param params.id ID of the ingest pipeline to check + * + * @returns Promise indicating whether the pipeline exists + */ +export const pipelineExists = async ({ esClient, id }: PipelineExistsParams): Promise => { + try { + const response = await esClient.ingest.getPipeline({ + id, + }); + return Object.keys(response).length > 0; + } catch (e) { + // The GET /_ingest/pipeline/{pipelineId} API returns an empty object w/ 404 Not Found. + return false; + } +}; + +interface CreatePipelineParams { + esClient: ElasticsearchClient; + id: string; + modelId: string; +} + +/** + * Create ingest pipeline for ELSER in Elasticsearch + * + * @param params params + * @param params.esClient Elasticsearch client with privileges to check for ingest pipelines + * @param params.id ID of the ingest pipeline + * @param params.modelId ID of the ELSER model + * + * @returns Promise indicating whether the pipeline was created + */ +export const createPipeline = async ({ + esClient, + id, + modelId, +}: CreatePipelineParams): Promise => { + try { + const response = await esClient.ingest.putPipeline( + knowledgeBaseIngestPipeline({ + id, + modelId, + }) + ); + + return response.acknowledged; + } catch (e) { + return false; + } +}; + +interface DeletePipelineParams { + esClient: ElasticsearchClient; + id: string; +} + +/** + * Delete ingest pipeline for ELSER in Elasticsearch + * + * @returns Promise indicating whether the pipeline was created + */ +export const deletePipeline = async ({ esClient, id }: DeletePipelineParams): Promise => { + const response = await esClient.ingest.deletePipeline({ + id, + }); + + return response.acknowledged; +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts index a96088b413dcf..dbdc01dcf9e57 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts @@ -14,8 +14,10 @@ import { AuthenticatedUser } from '@kbn/security-plugin/server'; import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; import { conversationsDataClientMock } from '../__mocks__/data_clients.mock'; import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; -import { AIAssistantService } from '.'; +import { AIAssistantService, AIAssistantServiceOpts } from '.'; import { retryUntil } from './create_resource_installation_helper.test'; +import { mlPluginMock } from '@kbn/ml-plugin/public/mocks'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; jest.mock('../ai_assistant_data_clients/conversations', () => ({ AIAssistantConversationsDataClient: jest.fn(), @@ -95,6 +97,7 @@ const mockUser1 = { describe('AI Assistant Service', () => { let pluginStop$: Subject; + let assistantServiceOpts: AIAssistantServiceOpts; beforeEach(() => { jest.resetAllMocks(); @@ -107,6 +110,14 @@ describe('AI Assistant Service', () => { ); clusterClient.indices.getAlias.mockImplementation(async () => GetAliasResponse); clusterClient.indices.getDataStream.mockImplementation(async () => GetDataStreamResponse); + assistantServiceOpts = { + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + ml: mlPluginMock.createSetupContract() as unknown as MlPluginSetup, // Missing SharedServices mock + taskManager: taskManagerMock.createSetup(), + }; }); afterEach(() => { @@ -116,13 +127,7 @@ describe('AI Assistant Service', () => { describe('AIAssistantService()', () => { test('should correctly initialize common resources', async () => { - const assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + const assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -140,13 +145,7 @@ describe('AI Assistant Service', () => { test('should log error and set initialized to false if creating/updating common component template throws error', async () => { clusterClient.cluster.putComponentTemplate.mockRejectedValueOnce(new Error('fail')); - const assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + const assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); @@ -169,13 +168,7 @@ describe('AI Assistant Service', () => { }); test('should create new AIAssistantConversationsDataClient', async () => { - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -192,7 +185,7 @@ describe('AI Assistant Service', () => { logger, elasticsearchClientPromise: Promise.resolve(clusterClient), spaceId: 'default', - indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + indexPatternsResourceName: '.kibana-elastic-ai-assistant-conversations', currentUser: mockUser1, kibanaVersion: '8.8.0', }); @@ -201,13 +194,7 @@ describe('AI Assistant Service', () => { test('should retry initializing common resources if common resource initialization failed', async () => { clusterClient.cluster.putComponentTemplate.mockRejectedValueOnce(new Error('fail')); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); @@ -234,7 +221,7 @@ describe('AI Assistant Service', () => { logger, elasticsearchClientPromise: Promise.resolve(clusterClient), spaceId: 'default', - indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + indexPatternsResourceName: '.kibana-elastic-ai-assistant-conversations', currentUser: mockUser1, kibanaVersion: '8.8.0', }); @@ -259,13 +246,7 @@ describe('AI Assistant Service', () => { return { acknowledged: true }; }); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); @@ -298,7 +279,7 @@ describe('AI Assistant Service', () => { expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ elasticsearchClientPromise: Promise.resolve(clusterClient), spaceId: 'default', - indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + indexPatternsResourceName: '.kibana-elastic-ai-assistant-conversations', currentUser: mockUser1, kibanaVersion: '8.8.0', logger, @@ -336,13 +317,7 @@ describe('AI Assistant Service', () => { mappings: {}, }, })); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -358,7 +333,7 @@ describe('AI Assistant Service', () => { expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ elasticsearchClientPromise: Promise.resolve(clusterClient), spaceId: 'default', - indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + indexPatternsResourceName: '.kibana-elastic-ai-assistant-conversations', currentUser: mockUser1, kibanaVersion: '8.8.0', logger, @@ -397,13 +372,7 @@ describe('AI Assistant Service', () => { return SimulateTemplateResponse; }); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -431,7 +400,7 @@ describe('AI Assistant Service', () => { expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ elasticsearchClientPromise: Promise.resolve(clusterClient), spaceId: 'default', - indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + indexPatternsResourceName: '.kibana-elastic-ai-assistant-conversations', currentUser: mockUser1, kibanaVersion: '8.8.0', logger, @@ -475,13 +444,7 @@ describe('AI Assistant Service', () => { }, })); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -523,13 +486,7 @@ describe('AI Assistant Service', () => { throw new Error(`fail ${++failCount}`); }); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil('error log called', async () => logger.error.mock.calls.length > 0, 1); @@ -574,13 +531,7 @@ describe('AI Assistant Service', () => { test('should return null if retrying common resources initialization fails again with same error', async () => { clusterClient.cluster.putComponentTemplate.mockRejectedValue(new Error('fail')); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); @@ -633,13 +584,7 @@ describe('AI Assistant Service', () => { })); clusterClient.indices.putIndexTemplate.mockRejectedValue(new Error('fail index template')); - assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -677,13 +622,7 @@ describe('AI Assistant Service', () => { .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) .mockResolvedValue({ acknowledged: true }); - const assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + const assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -697,13 +636,7 @@ describe('AI Assistant Service', () => { .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) .mockResolvedValue({ acknowledged: true }); - const assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + const assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -724,13 +657,7 @@ describe('AI Assistant Service', () => { .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) .mockResolvedValue({ acknowledged: true }); - const assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + const assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -750,13 +677,7 @@ describe('AI Assistant Service', () => { .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) .mockResolvedValue({ acknowledged: true }); - const assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + const assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', @@ -783,13 +704,7 @@ describe('AI Assistant Service', () => { hits: { hits: [], total: { value: 0 } }, }); - const assistantService = new AIAssistantService({ - logger, - elasticsearchClientPromise: Promise.resolve(clusterClient), - pluginStop$, - kibanaVersion: '8.8.0', - taskManager: taskManagerMock.createSetup(), - }); + const assistantService = new AIAssistantService(assistantServiceOpts); await retryUntil( 'AI Assistant service initialized', diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts index 9cc3efb03e195..619d9e9bca256 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts @@ -9,10 +9,11 @@ import { DataStreamSpacesAdapter, FieldMap } from '@kbn/data-stream-adapter'; import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; import type { Logger, ElasticsearchClient } from '@kbn/core/server'; import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; import { AuthenticatedUser } from '@kbn/security-plugin/server'; import { Subject } from 'rxjs'; import { getDefaultAnonymizationFields } from '../../common/anonymization'; -import { AssistantResourceNames } from '../types'; +import { AssistantResourceNames, GetElser } from '../types'; import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; import { InitializationPromise, @@ -25,6 +26,9 @@ import { conversationsFieldMap } from '../ai_assistant_data_clients/conversation import { assistantPromptsFieldMap } from '../ai_assistant_data_clients/prompts/field_maps_configuration'; import { assistantAnonymizationFieldsFieldMap } from '../ai_assistant_data_clients/anonymization_fields/field_maps_configuration'; import { AIAssistantDataClient } from '../ai_assistant_data_clients'; +import { knowledgeBaseFieldMap } from '../ai_assistant_data_clients/knowledge_base/field_maps_configuration'; +import { AIAssistantKnowledgeBaseDataClient } from '../ai_assistant_data_clients/knowledge_base'; +import { createGetElserId, createPipeline, pipelineExists } from './helpers'; const TOTAL_FIELDS_LIMIT = 2500; @@ -32,10 +36,11 @@ function getResourceName(resource: string) { return `.kibana-elastic-ai-assistant-${resource}`; } -interface AIAssistantServiceOpts { +export interface AIAssistantServiceOpts { logger: Logger; kibanaVersion: string; elasticsearchClientPromise: Promise; + ml: MlPluginSetup; taskManager: TaskManagerSetupContract; pluginStop$: Subject; } @@ -47,7 +52,7 @@ export interface CreateAIAssistantClientParams { } export type CreateDataStream = (params: { - resource: 'conversations' | 'prompts' | 'anonymizationFields'; + resource: 'anonymizationFields' | 'conversations' | 'knowledgeBase' | 'prompts'; fieldMap: FieldMap; kibanaVersion: string; spaceId?: string; @@ -55,20 +60,31 @@ export type CreateDataStream = (params: { export class AIAssistantService { private initialized: boolean; + // Temporary 'feature flag' to determine if we should initialize the knowledge base, toggled when accessing data client + private initializeKnowledgeBase: boolean = false; private isInitializing: boolean = false; + private getElserId: GetElser; private conversationsDataStream: DataStreamSpacesAdapter; + private knowledgeBaseDataStream: DataStreamSpacesAdapter; private promptsDataStream: DataStreamSpacesAdapter; private anonymizationFieldsDataStream: DataStreamSpacesAdapter; private resourceInitializationHelper: ResourceInstallationHelper; private initPromise: Promise; + private isKBSetupInProgress: boolean = false; constructor(private readonly options: AIAssistantServiceOpts) { this.initialized = false; + this.getElserId = createGetElserId(options.ml); this.conversationsDataStream = this.createDataStream({ resource: 'conversations', kibanaVersion: options.kibanaVersion, fieldMap: conversationsFieldMap, }); + this.knowledgeBaseDataStream = this.createDataStream({ + resource: 'knowledgeBase', + kibanaVersion: options.kibanaVersion, + fieldMap: knowledgeBaseFieldMap, + }); this.promptsDataStream = this.createDataStream({ resource: 'prompts', kibanaVersion: options.kibanaVersion, @@ -93,6 +109,13 @@ export class AIAssistantService { return this.initialized; } + public getIsKBSetupInProgress() { + return this.isKBSetupInProgress; + } + public setIsKBSetupInProgress(isInProgress: boolean) { + this.isKBSetupInProgress = isInProgress; + } + private createDataStream: CreateDataStream = ({ resource, kibanaVersion, fieldMap }) => { const newDataStream = new DataStreamSpacesAdapter(this.resourceNames.aliases[resource], { kibanaVersion, @@ -107,6 +130,19 @@ export class AIAssistantService { newDataStream.setIndexTemplate({ name: this.resourceNames.indexTemplate[resource], componentTemplateRefs: [this.resourceNames.componentTemplate[resource]], + // Apply `default_pipeline` if pipeline exists for resource + ...(resource in this.resourceNames.pipelines + ? { + template: { + settings: { + 'index.default_pipeline': + this.resourceNames.pipelines[ + resource as keyof typeof this.resourceNames.pipelines + ], + }, + }, + } + : {}), }); return newDataStream; @@ -124,6 +160,36 @@ export class AIAssistantService { pluginStop$: this.options.pluginStop$, }); + if (this.initializeKnowledgeBase) { + await this.knowledgeBaseDataStream.install({ + esClient, + logger: this.options.logger, + pluginStop$: this.options.pluginStop$, + }); + + // TODO: Pipeline creation is temporary as we'll be moving to semantic_text field once available in ES + const pipelineCreated = await pipelineExists({ + esClient, + id: this.resourceNames.pipelines.knowledgeBase, + }); + if (!pipelineCreated) { + this.options.logger.debug( + `Installing ingest pipeline - ${this.resourceNames.pipelines.knowledgeBase}` + ); + const response = await createPipeline({ + esClient, + id: this.resourceNames.pipelines.knowledgeBase, + modelId: await this.getElserId(), + }); + + this.options.logger.debug(`Installed ingest pipeline: ${response}`); + } else { + this.options.logger.debug( + `Ingest pipeline already exists - ${this.resourceNames.pipelines.knowledgeBase}` + ); + } + } + await this.promptsDataStream.install({ esClient, logger: this.options.logger, @@ -149,30 +215,30 @@ export class AIAssistantService { private readonly resourceNames: AssistantResourceNames = { componentTemplate: { conversations: getResourceName('component-template-conversations'), + knowledgeBase: getResourceName('component-template-knowledge-base'), prompts: getResourceName('component-template-prompts'), anonymizationFields: getResourceName('component-template-anonymization-fields'), - kb: getResourceName('component-template-kb'), }, aliases: { conversations: getResourceName('conversations'), + knowledgeBase: getResourceName('knowledge-base'), prompts: getResourceName('prompts'), anonymizationFields: getResourceName('anonymization-fields'), - kb: getResourceName('kb'), }, indexPatterns: { conversations: getResourceName('conversations*'), + knowledgeBase: getResourceName('knowledge-base*'), prompts: getResourceName('prompts*'), anonymizationFields: getResourceName('anonymization-fields*'), - kb: getResourceName('kb*'), }, indexTemplate: { conversations: getResourceName('index-template-conversations'), + knowledgeBase: getResourceName('index-template-knowledge-base'), prompts: getResourceName('index-template-prompts'), anonymizationFields: getResourceName('index-template-anonymization-fields'), - kb: getResourceName('index-template-kb'), }, pipelines: { - kb: getResourceName('kb-ingest-pipeline'), + knowledgeBase: getResourceName('ingest-pipeline-knowledge-base'), }, }; @@ -182,7 +248,7 @@ export class AIAssistantService { opts.spaceId ); - // If space evel resources initialization failed, retry + // If space level resources initialization failed, retry if (!initialized && error) { let initRetryPromise: Promise | undefined; @@ -236,11 +302,42 @@ export class AIAssistantService { elasticsearchClientPromise: this.options.elasticsearchClientPromise, spaceId: opts.spaceId, kibanaVersion: this.options.kibanaVersion, - indexPatternsResorceName: this.resourceNames.aliases.conversations, + indexPatternsResourceName: this.resourceNames.aliases.conversations, currentUser: opts.currentUser, }); } + public async createAIAssistantKnowledgeBaseDataClient( + opts: CreateAIAssistantClientParams & { initializeKnowledgeBase: boolean } + ): Promise { + // Note: Due to plugin lifecycle and feature flag registration timing, we need to pass in the feature flag here + // Remove this param and initialization when the `assistantKnowledgeBaseByDefault` feature flag is removed + if (opts.initializeKnowledgeBase) { + this.initializeKnowledgeBase = true; + await this.initializeResources(); + } + + const res = await this.checkResourcesInstallation(opts); + + if (res === null) { + return null; + } + + return new AIAssistantKnowledgeBaseDataClient({ + logger: this.options.logger.get('knowledgeBase'), + currentUser: opts.currentUser, + elasticsearchClientPromise: this.options.elasticsearchClientPromise, + indexPatternsResourceName: this.resourceNames.aliases.knowledgeBase, + ingestPipelineResourceName: this.resourceNames.pipelines.knowledgeBase, + getElserId: this.getElserId, + getIsKBSetupInProgress: this.getIsKBSetupInProgress.bind(this), + kibanaVersion: this.options.kibanaVersion, + ml: this.options.ml, + setIsKBSetupInProgress: this.setIsKBSetupInProgress.bind(this), + spaceId: opts.spaceId, + }); + } + public async createAIAssistantPromptsDataClient( opts: CreateAIAssistantClientParams ): Promise { @@ -255,7 +352,7 @@ export class AIAssistantService { elasticsearchClientPromise: this.options.elasticsearchClientPromise, spaceId: opts.spaceId, kibanaVersion: this.options.kibanaVersion, - indexPatternsResorceName: this.resourceNames.aliases.prompts, + indexPatternsResourceName: this.resourceNames.aliases.prompts, currentUser: opts.currentUser, }); } @@ -274,7 +371,7 @@ export class AIAssistantService { elasticsearchClientPromise: this.options.elasticsearchClientPromise, spaceId: opts.spaceId, kibanaVersion: this.options.kibanaVersion, - indexPatternsResorceName: this.resourceNames.aliases.anonymizationFields, + indexPatternsResourceName: this.resourceNames.aliases.anonymizationFields, currentUser: opts.currentUser, }); } @@ -308,6 +405,15 @@ export class AIAssistantService { await this.conversationsDataStream.installSpace(spaceId); } + if (this.initializeKnowledgeBase) { + const knowledgeBaseIndexName = await this.knowledgeBaseDataStream.getInstalledSpaceName( + spaceId + ); + if (!knowledgeBaseIndexName) { + await this.knowledgeBaseDataStream.installSpace(spaceId); + } + } + const promptsIndexName = await this.promptsDataStream.getInstalledSpaceName(spaceId); if (!promptsIndexName) { await this.promptsDataStream.installSpace(spaceId); @@ -334,7 +440,7 @@ export class AIAssistantService { elasticsearchClientPromise: this.options.elasticsearchClientPromise, spaceId, kibanaVersion: this.options.kibanaVersion, - indexPatternsResorceName: this.resourceNames.aliases.anonymizationFields, + indexPatternsResourceName: this.resourceNames.aliases.anonymizationFields, currentUser: null, }); diff --git a/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts index 83b4227275066..3cae3972c8bf6 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { v4 as uuidV4 } from 'uuid'; import type { BulkOperationContainer, BulkOperationType, @@ -241,7 +240,8 @@ export class DocumentsDataWriter implements DocumentsDataWriter { ): Promise => { const documentCreateBody = params.documentsToCreate ? params.documentsToCreate.flatMap((document) => [ - { create: { _index: this.options.index, _id: uuidV4() } }, + // Do not pre-gen _id for bulk create operations to avoid `version_conflict_engine_exception` + { create: { _index: this.options.index } }, document, ]) : []; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts index ae6540de5e271..86791cec5f5ce 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts @@ -34,6 +34,7 @@ import { KNOWLEDGE_BASE_EXECUTION_ERROR_EVENT, KNOWLEDGE_BASE_EXECUTION_SUCCESS_EVENT, } from '../../telemetry/event_based_telemetry'; +import { AIAssistantKnowledgeBaseDataClient } from '../../../ai_assistant_data_clients/knowledge_base'; interface CreatePipelineParams { id?: string; @@ -64,8 +65,8 @@ export const TERMS_QUERY_SIZE = 10000; export class ElasticsearchStore extends VectorStore { declare FilterType: QueryDslQueryContainer; - // Note: convert to { Client } from '@elastic/elasticsearch' for langchain contribution (removing Kibana dependency) private readonly esClient: ElasticsearchClient; + private readonly kbDataClient: AIAssistantKnowledgeBaseDataClient | undefined; private readonly index: string; private readonly logger: Logger; private readonly telemetry: AnalyticsServiceSetup; @@ -82,7 +83,8 @@ export class ElasticsearchStore extends VectorStore { logger: Logger, telemetry: AnalyticsServiceSetup, model?: string, - kbResource?: string | undefined + kbResource?: string | undefined, + kbDataClient?: AIAssistantKnowledgeBaseDataClient ) { super(new ElasticsearchEmbeddings(logger), { esClient, index }); this.esClient = esClient; @@ -91,6 +93,7 @@ export class ElasticsearchStore extends VectorStore { this.telemetry = telemetry; this.model = model ?? '.elser_model_2'; this.kbResource = kbResource ?? ESQL_RESOURCE; + this.kbDataClient = kbDataClient; } /** @@ -105,14 +108,16 @@ export class ElasticsearchStore extends VectorStore { documents: Document[], options?: Record ): Promise => { + // Code path for when `assistantKnowledgeBaseByDefault` FF is enabled + // Once removed replace addDocuments() w/ addDocumentsViaDataClient() + if (this.kbDataClient != null) { + return this.addDocumentsViaDataClient(documents, options); + } + const pipelineExists = await this.pipelineExists(); if (!pipelineExists) { await this.createPipeline(); } - const indexExists = await this.indexExists(); - if (!indexExists) { - await this.createIndex(); - } const operations = documents.flatMap(({ pageContent, metadata }) => [ { index: { _index: this.index, _id: uuid.v4() } }, @@ -139,6 +144,26 @@ export class ElasticsearchStore extends VectorStore { } }; + addDocumentsViaDataClient = async ( + documents: Document[], + options?: Record + ): Promise => { + if (!this.kbDataClient) { + this.logger.error('No kbDataClient provided'); + return []; + } + + try { + const response = await this.kbDataClient.addKnowledgeBaseDocuments({ + documents, + }); + return response.map((doc) => doc.id); + } catch (e) { + this.logger.error(`Error loading data into KB\n ${e}`); + return []; + } + }; + /** * Add vectors to the store. Returns a list of document IDs. * @@ -317,6 +342,13 @@ export class ElasticsearchStore extends VectorStore { * @returns Promise indicating whether the index was created */ deleteIndex = async (index?: string): Promise => { + // Code path for when `assistantKnowledgeBaseByDefault` FF is enabled + // We won't be supporting delete operations for the KB data stream going forward, so this can be removed along with the FF + if (this.kbDataClient != null) { + const response = await this.esClient.indices.deleteDataStream({ name: index ?? this.index }); + return response.acknowledged; + } + const response = await this.esClient.indices.delete({ index: index ?? this.index, }); @@ -332,8 +364,12 @@ export class ElasticsearchStore extends VectorStore { */ pipelineExists = async (pipelineId?: string): Promise => { try { + const id = + pipelineId ?? + this.kbDataClient?.options.ingestPipelineResourceName ?? + KNOWLEDGE_BASE_INGEST_PIPELINE; const response = await this.esClient.ingest.getPipeline({ - id: KNOWLEDGE_BASE_INGEST_PIPELINE, + id, }); return Object.keys(response).length > 0; } catch (e) { @@ -349,7 +385,10 @@ export class ElasticsearchStore extends VectorStore { */ createPipeline = async ({ id, description }: CreatePipelineParams = {}): Promise => { const response = await this.esClient.ingest.putPipeline({ - id: id ?? KNOWLEDGE_BASE_INGEST_PIPELINE, + id: + id ?? + this.kbDataClient?.options.ingestPipelineResourceName ?? + KNOWLEDGE_BASE_INGEST_PIPELINE, description: description ?? 'Embedding pipeline for Elastic AI Assistant ELSER Knowledge Base', processors: [ @@ -381,7 +420,10 @@ export class ElasticsearchStore extends VectorStore { */ deletePipeline = async (pipelineId?: string): Promise => { const response = await this.esClient.ingest.deletePipeline({ - id: pipelineId ?? KNOWLEDGE_BASE_INGEST_PIPELINE, + id: + pipelineId ?? + this.kbDataClient?.options.ingestPipelineResourceName ?? + KNOWLEDGE_BASE_INGEST_PIPELINE, }); return response.acknowledged; @@ -395,12 +437,17 @@ export class ElasticsearchStore extends VectorStore { */ async isModelInstalled(modelId?: string): Promise { try { + // Code path for when `assistantKnowledgeBaseByDefault` FF is enabled + if (this.kbDataClient != null) { + // esStore.isModelInstalled() is actually checking if the model is deployed, not installed, so do that instead + return this.kbDataClient.isModelDeployed(); + } + const getResponse = await this.esClient.ml.getTrainedModelsStats({ model_id: modelId ?? this.model, }); this.logger.debug(`modelId: ${modelId}`); - this.logger.debug(`getResponse: ${JSON.stringify(getResponse, null, 2)}`); // For standardized way of checking deployment status see: https://github.com/elastic/elasticsearch/issues/106986 const isReadyESS = (stats: MlTrainedModelStats) => diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts index 7e7d5cf561d5e..42ffad4779d1c 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts @@ -14,13 +14,15 @@ import { initializeAgentExecutorWithOptions } from 'langchain/agents'; import { mockActionResponse } from '../../../__mocks__/action_result_data'; import { langChainMessages } from '../../../__mocks__/lang_chain_messages'; -import { ESQL_RESOURCE } from '../../../routes/knowledge_base/constants'; +import { KNOWLEDGE_BASE_INDEX_PATTERN } from '../../../routes/knowledge_base/constants'; import { callAgentExecutor } from '.'; import { PassThrough, Stream } from 'stream'; import { ActionsClientChatOpenAI, ActionsClientLlm, } from '@kbn/elastic-assistant-common/impl/language_models'; +import { AgentExecutorParams } from '../executors/types'; +import { ElasticsearchStore } from '../elasticsearch_store/elasticsearch_store'; jest.mock('@kbn/elastic-assistant-common/impl/language_models', () => ({ ActionsClientChatOpenAI: jest.fn(), @@ -85,18 +87,23 @@ const mockActions: ActionsPluginStart = {} as ActionsPluginStart; const mockLogger = loggerMock.create(); const mockTelemetry = coreMock.createSetup().analytics; const esClientMock = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; -const defaultProps = { +const esStoreMock = new ElasticsearchStore( + esClientMock, + KNOWLEDGE_BASE_INDEX_PATTERN, + mockLogger, + mockTelemetry +); +const defaultProps: AgentExecutorParams = { actions: mockActions, isEnabledKnowledgeBase: true, connectorId: mockConnectorId, esClient: esClientMock, + esStore: esStoreMock, llmType: 'openai', langChainMessages, logger: mockLogger, onNewReplacements: jest.fn(), request: mockRequest, - kbResource: ESQL_RESOURCE, - telemetry: mockTelemetry, replacements: {}, }; const executorMock = initializeAgentExecutorWithOptions as jest.Mock; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts index f8e2f2426bf89..9c1ea6d5c36d5 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts @@ -17,8 +17,6 @@ import { ActionsClientLlm, } from '@kbn/elastic-assistant-common/impl/language_models'; import { getDefaultArguments } from '@kbn/elastic-assistant-common/impl/language_models/constants'; -import { ElasticsearchStore } from '../elasticsearch_store/elasticsearch_store'; -import { KNOWLEDGE_BASE_INDEX_PATTERN } from '../../../routes/knowledge_base/constants'; import { AgentExecutor } from '../executors/types'; import { withAssistantSpan } from '../tracers/with_assistant_span'; import { APMTracer } from '../tracers/apm_tracer'; @@ -38,9 +36,8 @@ export const callAgentExecutor: AgentExecutor = async ({ isEnabledKnowledgeBase, assistantTools = [], connectorId, - elserId, esClient, - kbResource, + esStore, langChainMessages, llmType, logger, @@ -50,7 +47,6 @@ export const callAgentExecutor: AgentExecutor = async ({ replacements, request, size, - telemetry, traceOptions, }) => { // TODO implement llmClass for bedrock streaming @@ -87,16 +83,6 @@ export const callAgentExecutor: AgentExecutor = async ({ returnMessages: true, }); - // ELSER backed ElasticsearchStore for Knowledge Base - const esStore = new ElasticsearchStore( - esClient, - KNOWLEDGE_BASE_INDEX_PATTERN, - logger, - telemetry, - elserId, - kbResource - ); - const modelExists = await esStore.isModelInstalled(); // Create a chain that uses the ELSER backed ElasticsearchStore, override k=10 for esql query generation for now diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts index 2b3d07708e2e1..2b5ef7350e628 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts @@ -11,8 +11,6 @@ import { BufferMemory, ChatMessageHistory } from 'langchain/memory'; import { ChainTool } from 'langchain/tools/chain'; import { ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/language_models'; -import { ElasticsearchStore } from '../elasticsearch_store/elasticsearch_store'; -import { KNOWLEDGE_BASE_INDEX_PATTERN } from '../../../routes/knowledge_base/constants'; import { AgentExecutor } from './types'; import { withAssistantSpan } from '../tracers/with_assistant_span'; import { APMTracer } from '../tracers/apm_tracer'; @@ -30,13 +28,11 @@ export const callOpenAIFunctionsExecutor: AgentExecutor = async ({ actions, connectorId, esClient, + esStore, langChainMessages, llmType, logger, request, - elserId, - kbResource, - telemetry, traceOptions, }) => { const llm = new ActionsClientLlm({ @@ -59,16 +55,6 @@ export const callOpenAIFunctionsExecutor: AgentExecutor = async ({ returnMessages: true, }); - // ELSER backed ElasticsearchStore for Knowledge Base - const esStore = new ElasticsearchStore( - esClient, - KNOWLEDGE_BASE_INDEX_PATTERN, - logger, - telemetry, - elserId, - kbResource - ); - const modelExists = await esStore.isModelInstalled(); if (!modelExists) { throw new Error( diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts index ce2833fa14480..8acd7f4fcdde2 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts @@ -11,12 +11,12 @@ import { BaseMessage } from '@langchain/core/messages'; import { Logger } from '@kbn/logging'; import { KibanaRequest, ResponseHeaders } from '@kbn/core-http-server'; import type { LangChainTracer } from '@langchain/core/tracers/tracer_langchain'; -import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; import { ExecuteConnectorRequestBody, Message, Replacements } from '@kbn/elastic-assistant-common'; import { StreamResponseWithHeaders } from '@kbn/ml-response-stream/server'; import { AnonymizationFieldResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import { ResponseBody } from '../types'; import type { AssistantTool } from '../../../types'; +import { ElasticsearchStore } from '../elasticsearch_store/elasticsearch_store'; export interface AgentExecutorParams { abortSignal?: AbortSignal; @@ -27,7 +27,7 @@ export interface AgentExecutorParams { assistantTools?: AssistantTool[]; connectorId: string; esClient: ElasticsearchClient; - kbResource: string | undefined; + esStore: ElasticsearchStore; langChainMessages: BaseMessage[]; llmType?: string; logger: Logger; @@ -41,9 +41,7 @@ export interface AgentExecutorParams { ) => Promise; request: KibanaRequest; size?: number; - elserId?: string; traceOptions?: TraceOptions; - telemetry: AnalyticsServiceSetup; } export interface StaticReturnType { diff --git a/x-pack/plugins/elastic_assistant/server/plugin.ts b/x-pack/plugins/elastic_assistant/server/plugin.ts index 53b05857beb4b..7a092928ce99a 100755 --- a/x-pack/plugins/elastic_assistant/server/plugin.ts +++ b/x-pack/plugins/elastic_assistant/server/plugin.ts @@ -24,6 +24,7 @@ import { RequestContextFactory } from './routes/request_context_factory'; import { PLUGIN_ID } from '../common/constants'; import { registerRoutes } from './routes/register_routes'; import { appContextService } from './services/app_context'; +import { createGetElserId } from './ai_assistant_service/helpers'; export class ElasticAssistantPlugin implements @@ -53,6 +54,7 @@ export class ElasticAssistantPlugin this.assistantService = new AIAssistantService({ logger: this.logger.get('service'), + ml: plugins.ml, taskManager: plugins.taskManager, kibanaVersion: this.kibanaVersion, elasticsearchClientPromise: core @@ -76,8 +78,8 @@ export class ElasticAssistantPlugin ); events.forEach((eventConfig) => core.analytics.registerEventType(eventConfig)); - // this.assistantService registerKBTask - registerRoutes(router, this.logger, plugins); + const getElserId = createGetElserId(plugins.ml); + registerRoutes(router, this.logger, getElserId); return { actions: plugins.actions, getRegisteredFeatures: (pluginName: string) => { diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts index 94788d2d1d926..47213cb0d278e 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts @@ -118,7 +118,7 @@ export const bulkActionAnonymizationFieldsRoute = ( ) => { router.versioned .post({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, options: { tags: ['access:securitySolution-updateAIAssistantAnonymization'], @@ -129,7 +129,7 @@ export const bulkActionAnonymizationFieldsRoute = ( }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { body: buildRouteValidationWithZod(PerformBulkActionRequestBody), diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts index 904a80d6a3ea4..c0383b1b3b38c 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts @@ -30,7 +30,7 @@ export const findAnonymizationFieldsRoute = ( ) => { router.versioned .get({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, options: { tags: ['access:elasticAssistant'], @@ -38,7 +38,7 @@ export const findAnonymizationFieldsRoute = ( }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { query: buildRouteValidationWithZod(FindAnonymizationFieldsRequestQuery), diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.test.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.test.ts index 0555b313f27f9..b3fb27fa835c1 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.test.ts @@ -9,7 +9,8 @@ import { postEvaluateRoute } from './post_evaluate'; import { serverMock } from '../../__mocks__/server'; import { requestContextMock } from '../../__mocks__/request_context'; import { getPostEvaluateRequest } from '../../__mocks__/request'; -import type { +import { + defaultAssistantFeatures, PostEvaluateRequestBodyInput, PostEvaluateRequestQueryInput, } from '@kbn/elastic-assistant-common'; @@ -45,6 +46,7 @@ describe('Post Evaluate Route', () => { describe('Capabilities', () => { it('returns a 404 if evaluate feature is not registered', async () => { context.elasticAssistant.getRegisteredFeatures.mockReturnValueOnce({ + ...defaultAssistantFeatures, assistantModelEvaluation: false, }); diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts index d1bf9dfa26ab1..46a3953370826 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts @@ -19,7 +19,7 @@ import { } from '@kbn/elastic-assistant-common'; import { ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/language_models'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; -import { ESQL_RESOURCE } from '../knowledge_base/constants'; +import { ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from '../knowledge_base/constants'; import { buildResponse } from '../../lib/build_response'; import { ElasticAssistantRequestHandlerContext, GetElser } from '../../types'; import { EVALUATE } from '../../../common/constants'; @@ -37,6 +37,7 @@ import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; * and reference your specific AgentExecutor function */ import { AGENT_EXECUTOR_MAP } from '../../lib/langchain/executors'; +import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; const DEFAULT_SIZE = 20; @@ -136,7 +137,7 @@ export const postEvaluateRoute = ( const esClient = (await context.core).elasticsearch.client.asCurrentUser; // Default ELSER model - const elserId = await getElser(request, (await context.core).savedObjects.getClient()); + const elserId = await getElser(); // Skeleton request from route to pass to the agents // params will be passed to the actions executor @@ -157,6 +158,27 @@ export const postEvaluateRoute = ( }, }; + // Create an ElasticsearchStore for KB interactions + // Setup with kbDataClient if `enableKnowledgeBaseByDefault` FF is enabled + const enableKnowledgeBaseByDefault = + assistantContext.getRegisteredFeatures(pluginName).assistantKnowledgeBaseByDefault; + const kbDataClient = enableKnowledgeBaseByDefault + ? (await assistantContext.getAIAssistantKnowledgeBaseDataClient(false)) ?? undefined + : undefined; + const kbIndex = + enableKnowledgeBaseByDefault && kbDataClient != null + ? kbDataClient.indexTemplateAndPattern.alias + : KNOWLEDGE_BASE_INDEX_PATTERN; + const esStore = new ElasticsearchStore( + esClient, + kbIndex, + logger, + telemetry, + elserId, + ESQL_RESOURCE, + kbDataClient + ); + // Create an array of executor functions to call in batches // One for each connector/model + agent combination // Hoist `langChainMessages` so they can be batched by dataset.input in the evaluator @@ -175,14 +197,12 @@ export const postEvaluateRoute = ( assistantTools, connectorId, esClient, - elserId, + esStore, isStream: false, langChainMessages, llmType: 'openai', logger, request: skeletonRequest, - kbResource: ESQL_RESOURCE, - telemetry, traceOptions: { exampleId, projectName, diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.test.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.test.ts index 0443bd1b3eedd..ad130cddc5560 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.test.ts @@ -36,7 +36,7 @@ describe('Delete Knowledge Base Route', () => { }); test('returns 500 if error is thrown when deleting resources', async () => { - context.core.elasticsearch.client.asCurrentUser.indices.delete.mockRejectedValue( + context.core.elasticsearch.client.asInternalUser.indices.delete.mockRejectedValue( new Error('Test error') ); const response = await server.inject( diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts index 6886b56f7ef32..6e81738a7376f 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts @@ -8,7 +8,10 @@ import { IRouter, KibanaRequest } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION } from '@kbn/elastic-assistant-common'; +import { + ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, +} from '@kbn/elastic-assistant-common'; import { DeleteKnowledgeBaseRequestParams, DeleteKnowledgeBaseResponse, @@ -16,9 +19,10 @@ import { import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { buildResponse } from '../../lib/build_response'; import { ElasticAssistantRequestHandlerContext } from '../../types'; -import { KNOWLEDGE_BASE } from '../../../common/constants'; import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; import { ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './constants'; +import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; +import { getKbResource } from './get_kb_resource'; /** * Delete Knowledge Base index, pipeline, and resources (collection of documents) @@ -30,11 +34,9 @@ export const deleteKnowledgeBaseRoute = ( router.versioned .delete({ access: 'internal', - path: KNOWLEDGE_BASE, + path: ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, options: { - // Note: Relying on current user privileges to scope an esClient. - // Add `access:kbnElasticAssistant` to limit API access to only users with assistant privileges - tags: [], + tags: ['access:elasticAssistant'], }, }) .addVersion( @@ -51,22 +53,43 @@ export const deleteKnowledgeBaseRoute = ( const assistantContext = await context.elasticAssistant; const logger = assistantContext.logger; const telemetry = assistantContext.telemetry; + const pluginName = getPluginNameFromRequest({ + request, + defaultPluginName: DEFAULT_PLUGIN_NAME, + logger, + }); + const enableKnowledgeBaseByDefault = + assistantContext.getRegisteredFeatures(pluginName).assistantKnowledgeBaseByDefault; try { - const kbResource = - request.params.resource != null - ? decodeURIComponent(request.params.resource) - : undefined; + const kbResource = getKbResource(request); - // Get a scoped esClient for deleting the Knowledge Base index, pipeline, and documents - const esClient = (await context.core).elasticsearch.client.asCurrentUser; - const esStore = new ElasticsearchStore( + const esClient = (await context.core).elasticsearch.client.asInternalUser; + let esStore = new ElasticsearchStore( esClient, KNOWLEDGE_BASE_INDEX_PATTERN, logger, telemetry ); + // Code path for when `assistantKnowledgeBaseByDefault` FF is enabled, only need an esStore w/ kbDataClient + if (enableKnowledgeBaseByDefault) { + const knowledgeBaseDataClient = + await assistantContext.getAIAssistantKnowledgeBaseDataClient(false); + if (!knowledgeBaseDataClient) { + return response.custom({ body: { success: false }, statusCode: 500 }); + } + esStore = new ElasticsearchStore( + esClient, + knowledgeBaseDataClient.indexTemplateAndPattern.alias, + logger, + telemetry, + 'elserId', // Not needed for delete ops + kbResource, + knowledgeBaseDataClient + ); + } + if (kbResource === ESQL_RESOURCE) { // For now, tearing down the Knowledge Base is fine, but will want to support removing specific assets based // on resource name or document query diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts new file mode 100644 index 0000000000000..0c31974a20785 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts @@ -0,0 +1,76 @@ +/* + * 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. + */ + +import type { IKibanaResponse } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + API_VERSIONS, + ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { + KnowledgeBaseEntryCreateProps, + KnowledgeBaseEntryResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/knowledge_base/common_attributes.gen'; +import { ElasticAssistantPluginRouter } from '../../../types'; +import { buildResponse } from '../../utils'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../../helpers'; + +export const createKnowledgeBaseEntryRoute = (router: ElasticAssistantPluginRouter): void => { + router.versioned + .post({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_ENTRIES_URL, + + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: API_VERSIONS.public.v1, + validate: { + request: { + body: buildRouteValidationWithZod(KnowledgeBaseEntryCreateProps), + }, + }, + }, + async (context, request, response): Promise> => { + const assistantResponse = buildResponse(response); + try { + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } + + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + + return assistantResponse.error({ + body: `knowledge base entry was not created`, + statusCode: 400, + }); + } catch (err) { + const error = transformError(err as Error); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.test.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.test.ts index f37f2a3ab2882..ba8992d9c19bd 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.test.ts @@ -10,6 +10,7 @@ import { serverMock } from '../../__mocks__/server'; import { requestContextMock } from '../../__mocks__/request_context'; import { getGetKnowledgeBaseStatusRequest } from '../../__mocks__/request'; import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; +import { AuthenticatedUser } from '@kbn/core-security-common'; describe('Get Knowledge Base Status Route', () => { let server: ReturnType; @@ -19,10 +20,18 @@ describe('Get Knowledge Base Status Route', () => { clients.core.elasticsearch.client = elasticsearchServiceMock.createScopedClusterClient(); const mockGetElser = jest.fn().mockResolvedValue('.elser_model_2'); + const mockUser = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; beforeEach(() => { server = serverMock.create(); ({ context } = requestContextMock.createTools()); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser); getKnowledgeBaseStatusRoute(server.router, mockGetElser); }); @@ -37,7 +46,7 @@ describe('Get Knowledge Base Status Route', () => { }); test('returns 500 if error is thrown in checking kb status', async () => { - context.core.elasticsearch.client.asCurrentUser.indices.exists.mockRejectedValue( + context.core.elasticsearch.client.asInternalUser.indices.exists.mockRejectedValue( new Error('Test error') ); const response = await server.inject( diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts index c7d83e8c24401..a8d2e96227d60 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts @@ -9,6 +9,7 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, ReadKnowledgeBaseRequestParams, ReadKnowledgeBaseResponse, } from '@kbn/elastic-assistant-common'; @@ -17,9 +18,9 @@ import { KibanaRequest } from '@kbn/core/server'; import { getKbResource } from './get_kb_resource'; import { buildResponse } from '../../lib/build_response'; import { ElasticAssistantPluginRouter, GetElser } from '../../types'; -import { KNOWLEDGE_BASE } from '../../../common/constants'; import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; import { ESQL_DOCS_LOADED_QUERY, ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './constants'; +import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; /** * Get the status of the Knowledge Base index, pipeline, and resources (collection of documents) @@ -34,11 +35,9 @@ export const getKnowledgeBaseStatusRoute = ( router.versioned .get({ access: 'internal', - path: KNOWLEDGE_BASE, + path: ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, options: { - // Note: Relying on current user privileges to scope an esClient. - // Add `access:kbnElasticAssistant` to limit API access to only users with assistant privileges - tags: [], + tags: ['access:elasticAssistant'], }, }) .addVersion( @@ -57,11 +56,10 @@ export const getKnowledgeBaseStatusRoute = ( const telemetry = assistantContext.telemetry; try { - // Get a scoped esClient for finding the status of the Knowledge Base index, pipeline, and documents - const esClient = (await context.core).elasticsearch.client.asCurrentUser; - const elserId = await getElser(request, (await context.core).savedObjects.getClient()); + const esClient = (await context.core).elasticsearch.client.asInternalUser; + const elserId = await getElser(); const kbResource = getKbResource(request); - const esStore = new ElasticsearchStore( + let esStore = new ElasticsearchStore( esClient, KNOWLEDGE_BASE_INDEX_PATTERN, logger, @@ -70,6 +68,37 @@ export const getKnowledgeBaseStatusRoute = ( kbResource ); + const pluginName = getPluginNameFromRequest({ + request, + defaultPluginName: DEFAULT_PLUGIN_NAME, + logger, + }); + const enableKnowledgeBaseByDefault = + assistantContext.getRegisteredFeatures(pluginName).assistantKnowledgeBaseByDefault; + + // Code path for when `assistantKnowledgeBaseByDefault` FF is enabled + let isSetupInProgress = false; + if (enableKnowledgeBaseByDefault) { + const kbDataClient = await assistantContext.getAIAssistantKnowledgeBaseDataClient( + false + ); + if (!kbDataClient) { + return response.custom({ body: { success: false }, statusCode: 500 }); + } + + // Use old status checks by overriding esStore to use kbDataClient + esStore = new ElasticsearchStore( + esClient, + kbDataClient.indexTemplateAndPattern.alias, + logger, + telemetry, + elserId, + kbResource, + kbDataClient + ); + isSetupInProgress = kbDataClient.isSetupInProgress; + } + const indexExists = await esStore.indexExists(); const pipelineExists = await esStore.pipelineExists(); const modelExists = await esStore.isModelInstalled(elserId); @@ -77,6 +106,7 @@ export const getKnowledgeBaseStatusRoute = ( const body: ReadKnowledgeBaseResponse = { elser_exists: modelExists, index_exists: indexExists, + is_setup_in_progress: isSetupInProgress, pipeline_exists: pipelineExists, }; diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.test.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.test.ts index ceb5f1b3879f6..547923b5c0d17 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.test.ts @@ -10,6 +10,7 @@ import { serverMock } from '../../__mocks__/server'; import { requestContextMock } from '../../__mocks__/request_context'; import { getPostKnowledgeBaseRequest } from '../../__mocks__/request'; import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; +import { AuthenticatedUser } from '@kbn/core-security-common'; describe('Post Knowledge Base Route', () => { let server: ReturnType; @@ -19,10 +20,18 @@ describe('Post Knowledge Base Route', () => { clients.core.elasticsearch.client = elasticsearchServiceMock.createScopedClusterClient(); const mockGetElser = jest.fn().mockResolvedValue('.elser_model_2'); + const mockUser = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; beforeEach(() => { server = serverMock.create(); ({ context } = requestContextMock.createTools()); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser); postKnowledgeBaseRoute(server.router, mockGetElser); }); @@ -38,7 +47,7 @@ describe('Post Knowledge Base Route', () => { }); test('returns 500 if error is thrown when creating resources', async () => { - context.core.elasticsearch.client.asCurrentUser.indices.exists.mockRejectedValue( + context.core.elasticsearch.client.asInternalUser.indices.exists.mockRejectedValue( new Error('Test error') ); const response = await server.inject( diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts index 17c2011fbc0f5..bc511d99eb63d 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts @@ -11,20 +11,26 @@ import { ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, CreateKnowledgeBaseRequestParams, CreateKnowledgeBaseResponse, + ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, } from '@kbn/elastic-assistant-common'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { IKibanaResponse, KibanaRequest } from '@kbn/core/server'; import { buildResponse } from '../../lib/build_response'; import { ElasticAssistantPluginRouter, GetElser } from '../../types'; -import { KNOWLEDGE_BASE } from '../../../common/constants'; import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; import { ESQL_DOCS_LOADED_QUERY, ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './constants'; import { getKbResource } from './get_kb_resource'; import { loadESQL } from '../../lib/langchain/content_loaders/esql_loader'; +import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; + +// Since we're awaiting on ELSER setup, this could take a bit (especially if ML needs to autoscale) +// Consider just returning if attempt was successful, and switch to client polling +const ROUTE_HANDLER_TIMEOUT = 10 * 60 * 1000; // 10 * 60 seconds = 10 minutes /** * Load Knowledge Base index, pipeline, and resources (collection of documents) * @param router + * @param getElser */ export const postKnowledgeBaseRoute = ( router: ElasticAssistantPluginRouter, @@ -33,11 +39,12 @@ export const postKnowledgeBaseRoute = ( router.versioned .post({ access: 'internal', - path: KNOWLEDGE_BASE, + path: ELASTIC_AI_ASSISTANT_KNOWLEDGE_BASE_URL, options: { - // Note: Relying on current user privileges to scope an esClient. - // Add `access:kbnElasticAssistant` to limit API access to only users with assistant privileges - tags: [], + tags: ['access:elasticAssistant'], + timeout: { + idleSocket: ROUTE_HANDLER_TIMEOUT, + }, }, }) .addVersion( @@ -58,12 +65,44 @@ export const postKnowledgeBaseRoute = ( const assistantContext = await context.elasticAssistant; const logger = assistantContext.logger; const telemetry = assistantContext.telemetry; + const elserId = await getElser(); + const core = await context.core; + const esClient = core.elasticsearch.client.asInternalUser; + const soClient = core.savedObjects.getClient(); + + const pluginName = getPluginNameFromRequest({ + request, + defaultPluginName: DEFAULT_PLUGIN_NAME, + logger, + }); + const enableKnowledgeBaseByDefault = + assistantContext.getRegisteredFeatures(pluginName).assistantKnowledgeBaseByDefault; try { - const core = await context.core; - // Get a scoped esClient for creating the Knowledge Base index, pipeline, and documents - const esClient = core.elasticsearch.client.asCurrentUser; - const elserId = await getElser(request, core.savedObjects.getClient()); + // Code path for when `assistantKnowledgeBaseByDefault` FF is enabled + if (enableKnowledgeBaseByDefault) { + const knowledgeBaseDataClient = + await assistantContext.getAIAssistantKnowledgeBaseDataClient(true); + if (!knowledgeBaseDataClient) { + return response.custom({ body: { success: false }, statusCode: 500 }); + } + + // Continue to use esStore for loading esql docs until `semantic_text` is available and we can test the new chunking strategy + const esStore = new ElasticsearchStore( + esClient, + knowledgeBaseDataClient.indexTemplateAndPattern.alias, + logger, + telemetry, + elserId, + getKbResource(request), + knowledgeBaseDataClient + ); + + await knowledgeBaseDataClient.setupKnowledgeBase({ esStore, soClient }); + + return response.ok({ body: { success: true } }); + } + const kbResource = getKbResource(request); const esStore = new ElasticsearchStore( esClient, diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts index 6c2be6b8c7120..ab9250047f7ef 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts @@ -23,6 +23,7 @@ import { PassThrough } from 'stream'; import { getConversationResponseMock } from '../ai_assistant_data_clients/conversations/update_conversation.test'; import { actionsClientMock } from '@kbn/actions-plugin/server/actions_client/actions_client.mock'; import { getFindAnonymizationFieldsResultWithSingleHit } from '../__mocks__/response'; +import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; const actionsClient = actionsClientMock.create(); jest.mock('../lib/build_response', () => ({ @@ -92,6 +93,7 @@ const mockContext = { getActionsClientWithRequest: jest.fn().mockResolvedValue(actionsClient), }, getRegisteredTools: jest.fn(() => []), + getRegisteredFeatures: jest.fn(() => defaultAssistantFeatures), logger: loggingSystemMock.createLogger(), telemetry: { ...coreMock.createSetup().analytics, reportEvent }, getCurrentUser: () => ({ diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts index e76b7cd337783..88eb632ce302e 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts @@ -31,7 +31,7 @@ import { POST_ACTIONS_CONNECTOR_EXECUTE } from '../../common/constants'; import { getLangChainMessages } from '../lib/langchain/helpers'; import { buildResponse } from '../lib/build_response'; import { ElasticAssistantRequestHandlerContext, GetElser } from '../types'; -import { ESQL_RESOURCE } from './knowledge_base/constants'; +import { ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './knowledge_base/constants'; import { callAgentExecutor } from '../lib/langchain/execute_custom_llm_chain'; import { DEFAULT_PLUGIN_NAME, @@ -41,6 +41,7 @@ import { import { getLangSmithTracer } from './evaluate/utils'; import { EsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; import { transformESSearchToAnonymizationFields } from '../ai_assistant_data_clients/anonymization_fields/helpers'; +import { ElasticsearchStore } from '../lib/langchain/elasticsearch_store/elasticsearch_store'; export const postActionsConnectorExecuteRoute = ( router: IRouter, @@ -315,7 +316,7 @@ export const postActionsConnectorExecuteRoute = ( []) as unknown as Array> ); - const elserId = await getElser(request, (await context.core).savedObjects.getClient()); + const elserId = await getElser(); const anonymizationFieldsRes = await anonymizationFieldsDataClient?.findDocuments({ @@ -323,6 +324,27 @@ export const postActionsConnectorExecuteRoute = ( page: 1, }); + // Create an ElasticsearchStore for KB interactions + // Setup with kbDataClient if `enableKnowledgeBaseByDefault` FF is enabled + const enableKnowledgeBaseByDefault = + assistantContext.getRegisteredFeatures(pluginName).assistantKnowledgeBaseByDefault; + const kbDataClient = enableKnowledgeBaseByDefault + ? (await assistantContext.getAIAssistantKnowledgeBaseDataClient(false)) ?? undefined + : undefined; + const kbIndex = + enableKnowledgeBaseByDefault && kbDataClient != null + ? kbDataClient.indexTemplateAndPattern.alias + : KNOWLEDGE_BASE_INDEX_PATTERN; + const esStore = new ElasticsearchStore( + esClient, + kbIndex, + logger, + telemetry, + elserId, + ESQL_RESOURCE, + kbDataClient + ); + const result: StreamResponseWithHeaders | StaticReturnType = await callAgentExecutor({ abortSignal, alertsIndexPattern: request.body.alertsIndexPattern, @@ -333,14 +355,13 @@ export const postActionsConnectorExecuteRoute = ( isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase ?? false, assistantTools, connectorId, - elserId, esClient, + esStore, isStream: // TODO implement llmClass for bedrock streaming // tracked here: https://github.com/elastic/security-team/issues/7363 request.body.subAction !== 'invokeAI' && actionTypeId === '.gen-ai', llmType: getLlmType(actionTypeId), - kbResource: ESQL_RESOURCE, langChainMessages, logger, onNewReplacements, @@ -348,7 +369,6 @@ export const postActionsConnectorExecuteRoute = ( request, replacements: request.body.replacements, size: request.body.size, - telemetry, traceOptions: { projectName: langSmithProject, tracers: getLangSmithTracer({ diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts index d90b01b78cfa7..cfcd6d8cc05d6 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts @@ -112,7 +112,7 @@ const buildBulkResponse = ( export const bulkPromptsRoute = (router: ElasticAssistantPluginRouter, logger: Logger) => { router.versioned .post({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, options: { tags: ['access:elasticAssistant'], @@ -123,7 +123,7 @@ export const bulkPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { body: buildRouteValidationWithZod(PerformBulkActionRequestBody), diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts index f0f198b54eaf3..df2ec323bc356 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts @@ -23,7 +23,7 @@ import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const findPromptsRoute = (router: ElasticAssistantPluginRouter, logger: Logger) => { router.versioned .get({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, options: { tags: ['access:elasticAssistant'], @@ -31,7 +31,7 @@ export const findPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { query: buildRouteValidationWithZod(FindPromptsRequestQuery), diff --git a/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts b/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts index 325f4a84ab8c7..fc0e30f4a925c 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts @@ -5,15 +5,10 @@ * 2.0. */ -import type { KibanaRequest, Logger, SavedObjectsClientContract } from '@kbn/core/server'; -import { once } from 'lodash/fp'; +import type { Logger } from '@kbn/core/server'; import { postAttackDiscoveryRoute } from './attack_discovery/post_attack_discovery'; -import { - ElasticAssistantPluginRouter, - ElasticAssistantPluginSetupDependencies, - GetElser, -} from '../types'; +import { ElasticAssistantPluginRouter, GetElser } from '../types'; import { createConversationRoute } from './user_conversations/create_route'; import { deleteConversationRoute } from './user_conversations/delete_route'; import { readConversationRoute } from './user_conversations/read_route'; @@ -36,7 +31,7 @@ import { findAnonymizationFieldsRoute } from './anonymization_fields/find_route' export const registerRoutes = ( router: ElasticAssistantPluginRouter, logger: Logger, - plugins: ElasticAssistantPluginSetupDependencies + getElserId: GetElser ) => { // Capabilities getCapabilitiesRoute(router); @@ -56,12 +51,6 @@ export const registerRoutes = ( // Knowledge Base deleteKnowledgeBaseRoute(router); - const getElserId: GetElser = once( - async (request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) => { - return (await plugins.ml.trainedModelsProvider(request, savedObjectsClient).getELSER()) - .model_id; - } - ); getKnowledgeBaseStatusRoute(router, getElserId); postKnowledgeBaseRoute(router, getElserId); diff --git a/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts b/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts index 82e21a8cd8690..0a0864882df16 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts @@ -81,6 +81,18 @@ export class RequestContextFactory implements IRequestContextFactory { telemetry: core.analytics, + // Note: Due to plugin lifecycle and feature flag registration timing, we need to pass in the feature flag here + // Remove `initializeKnowledgeBase` once 'assistantKnowledgeBaseByDefault' feature flag is removed + getAIAssistantKnowledgeBaseDataClient: memoize((initializeKnowledgeBase = false) => { + const currentUser = getCurrentUser(); + return this.assistantService.createAIAssistantKnowledgeBaseDataClient({ + spaceId: getSpaceId(), + logger: this.logger, + currentUser, + initializeKnowledgeBase, + }); + }), + getAIAssistantPromptsDataClient: memoize(() => { const currentUser = getCurrentUser(); return this.assistantService.createAIAssistantPromptsDataClient({ diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts index dad21069e84c0..796c0d617fe5d 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts @@ -22,7 +22,7 @@ import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const appendConversationMessageRoute = (router: ElasticAssistantPluginRouter) => { router.versioned .post({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, options: { tags: ['access:elasticAssistant'], @@ -30,7 +30,7 @@ export const appendConversationMessageRoute = (router: ElasticAssistantPluginRou }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { body: buildRouteValidationWithZod(AppendConversationMessageRequestBody), diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts index fafa5d6cc6e0e..0b41061265121 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts @@ -116,7 +116,7 @@ export const bulkActionConversationsRoute = ( ) => { router.versioned .post({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, options: { tags: ['access:elasticAssistant'], @@ -127,7 +127,7 @@ export const bulkActionConversationsRoute = ( }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { body: buildRouteValidationWithZod(PerformBulkActionRequestBody), diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts index 281775cfb4e15..e66c83f77510d 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts @@ -21,7 +21,7 @@ import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const createConversationRoute = (router: ElasticAssistantPluginRouter): void => { router.versioned .post({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, options: { @@ -30,7 +30,7 @@ export const createConversationRoute = (router: ElasticAssistantPluginRouter): v }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { body: buildRouteValidationWithZod(ConversationCreateProps), diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts index 5d761c09f682c..b39f898eaeaa1 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts @@ -19,7 +19,7 @@ import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const deleteConversationRoute = (router: ElasticAssistantPluginRouter) => { router.versioned .delete({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, options: { tags: ['access:elasticAssistant'], @@ -27,7 +27,7 @@ export const deleteConversationRoute = (router: ElasticAssistantPluginRouter) => }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { params: buildRouteValidationWithZod(DeleteConversationRequestParams), diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts index 6eda3e37645c5..8db36466c9bad 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts @@ -26,7 +26,7 @@ import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const findUserConversationsRoute = (router: ElasticAssistantPluginRouter) => { router.versioned .get({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, options: { tags: ['access:elasticAssistant'], @@ -34,7 +34,7 @@ export const findUserConversationsRoute = (router: ElasticAssistantPluginRouter) }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { query: buildRouteValidationWithZod(FindConversationsRequestQuery), diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts index dd540897b0ece..12020d7fa51d9 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts @@ -21,7 +21,7 @@ import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const readConversationRoute = (router: ElasticAssistantPluginRouter) => { router.versioned .get({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, options: { tags: ['access:elasticAssistant'], @@ -29,7 +29,7 @@ export const readConversationRoute = (router: ElasticAssistantPluginRouter) => { }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { params: buildRouteValidationWithZod(ReadConversationRequestParams), diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts index 213ea1e20a9ff..4a7fd5a9d67cb 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts @@ -24,7 +24,7 @@ import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const updateConversationRoute = (router: ElasticAssistantPluginRouter) => { router.versioned .put({ - access: 'public', + access: 'internal', path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, options: { tags: ['access:elasticAssistant'], @@ -32,7 +32,7 @@ export const updateConversationRoute = (router: ElasticAssistantPluginRouter) => }) .addVersion( { - version: API_VERSIONS.public.v1, + version: API_VERSIONS.internal.v1, validate: { request: { body: buildRouteValidationWithZod(ConversationUpdateProps), diff --git a/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts b/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts index 57ca4ea18651c..e91a0ec024c9e 100644 --- a/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts +++ b/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts @@ -102,6 +102,7 @@ describe('AppContextService', () => { it('should register and get features for a single plugin', () => { const pluginName = 'pluginName'; const features: AssistantFeatures = { + ...defaultAssistantFeatures, assistantModelEvaluation: true, }; @@ -116,10 +117,12 @@ describe('AppContextService', () => { it('should register and get features for multiple plugins', () => { const pluginOne = 'plugin1'; const featuresOne: AssistantFeatures = { + ...defaultAssistantFeatures, assistantModelEvaluation: true, }; const pluginTwo = 'plugin2'; const featuresTwo: AssistantFeatures = { + ...defaultAssistantFeatures, assistantModelEvaluation: false, }; @@ -134,9 +137,11 @@ describe('AppContextService', () => { it('should update features if registered again', () => { const pluginName = 'pluginName'; const featuresOne: AssistantFeatures = { + ...defaultAssistantFeatures, assistantModelEvaluation: true, }; const featuresTwo: AssistantFeatures = { + ...defaultAssistantFeatures, assistantModelEvaluation: false, }; diff --git a/x-pack/plugins/elastic_assistant/server/types.ts b/x-pack/plugins/elastic_assistant/server/types.ts index 63b62e8943c20..7278e104ac76a 100755 --- a/x-pack/plugins/elastic_assistant/server/types.ts +++ b/x-pack/plugins/elastic_assistant/server/types.ts @@ -17,7 +17,6 @@ import type { IRouter, KibanaRequest, Logger, - SavedObjectsClientContract, } from '@kbn/core/server'; import { type MlPluginSetup } from '@kbn/ml-plugin/server'; import { DynamicStructuredTool, Tool } from '@langchain/core/tools'; @@ -42,6 +41,7 @@ import { import { AIAssistantConversationsDataClient } from './ai_assistant_data_clients/conversations'; import type { GetRegisteredFeatures, GetRegisteredTools } from './services/app_context'; import { AIAssistantDataClient } from './ai_assistant_data_clients'; +import { AIAssistantKnowledgeBaseDataClient } from './ai_assistant_data_clients/knowledge_base'; export const PLUGIN_ID = 'elasticAssistant' as const; @@ -110,6 +110,9 @@ export interface ElasticAssistantApiRequestHandlerContext { getSpaceId: () => string; getCurrentUser: () => AuthenticatedUser | null; getAIAssistantConversationsDataClient: () => Promise; + getAIAssistantKnowledgeBaseDataClient: ( + initializeKnowledgeBase: boolean + ) => Promise; getAIAssistantPromptsDataClient: () => Promise; getAIAssistantAnonymizationFieldsDataClient: () => Promise; telemetry: AnalyticsServiceSetup; @@ -129,10 +132,7 @@ export type ElasticAssistantPluginCoreSetupDependencies = CoreSetup< ElasticAssistantPluginStart >; -export type GetElser = ( - request: KibanaRequest, - savedObjectsClient: SavedObjectsClientContract -) => Promise | never; +export type GetElser = () => Promise | never; export interface InitAssistantResult { assistantResourcesInstalled: boolean; @@ -144,30 +144,30 @@ export interface InitAssistantResult { export interface AssistantResourceNames { componentTemplate: { conversations: string; + knowledgeBase: string; prompts: string; anonymizationFields: string; - kb: string; }; indexTemplate: { conversations: string; + knowledgeBase: string; prompts: string; anonymizationFields: string; - kb: string; }; aliases: { conversations: string; + knowledgeBase: string; prompts: string; anonymizationFields: string; - kb: string; }; indexPatterns: { conversations: string; + knowledgeBase: string; prompts: string; anonymizationFields: string; - kb: string; }; pipelines: { - kb: string; + knowledgeBase: string; }; } diff --git a/x-pack/plugins/elastic_assistant/tsconfig.json b/x-pack/plugins/elastic_assistant/tsconfig.json index 20146c45df5fa..345949b866262 100644 --- a/x-pack/plugins/elastic_assistant/tsconfig.json +++ b/x-pack/plugins/elastic_assistant/tsconfig.json @@ -29,7 +29,6 @@ "@kbn/logging", "@kbn/ml-plugin", "@kbn/apm-utils", - "@kbn/core-analytics-server", "@kbn/elastic-assistant-common", "@kbn/core-http-router-server-mocks", "@kbn/data-stream-adapter", @@ -45,6 +44,8 @@ "@kbn/ml-response-stream", "@kbn/data-plugin", "@kbn/i18n", + "@kbn/core-security-common", + "@kbn/core-saved-objects-api-server", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/playground.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/playground.tsx index 8667c9641a704..e6882acb0ac3b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/playground.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/playground.tsx @@ -7,8 +7,6 @@ import React from 'react'; -import { useSearchParams } from 'react-router-dom-v5-compat'; - import { useValues } from 'kea'; import { EuiBetaBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; @@ -20,21 +18,13 @@ import { KibanaLogic } from '../../../shared/kibana'; import { EnterpriseSearchApplicationsPageTemplate } from '../layout/page_template'; export const Playground: React.FC = () => { - const [searchParams] = useSearchParams(); - const index: string | null = searchParams.has('default-index') - ? searchParams.get('default-index') - : null; const { searchPlayground } = useValues(KibanaLogic); if (!searchPlayground) { return null; } return ( - + { ({ serviceType }) => serviceType === connector.service_type )?.docsUrl; - const isBeta = - !connector.service_type || - Boolean(BETA_CONNECTORS.find(({ serviceType }) => serviceType === connector.service_type)); + const isBeta = Boolean( + BETA_CONNECTORS.find(({ serviceType }) => serviceType === connector.service_type) + ); return ( <> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx index ec2edf2df0450..095844b4e04d4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx @@ -10,6 +10,9 @@ import { useValues } from 'kea'; import { EuiBadge, + EuiButtonIcon, + EuiCode, + EuiCopy, EuiFlexGrid, EuiFlexGroup, EuiFlexItem, @@ -21,6 +24,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; import { Connector, ConnectorStatus, ElasticsearchIndex } from '@kbn/search-connectors'; @@ -127,40 +131,66 @@ export const ConnectorStats: React.FC = ({ connector, index } footer={ - - - - - - + + + -

- {i18n.translate( - 'xpack.enterpriseSearch.connectors.connectorStats.p.DocumentsLabel', - { - defaultMessage: '{documentAmount} Documents', - values: { - documentAmount: indexData?.count ?? 0, - }, - } - )} -

+ {connector.id}, + }} + />
+ + + {(copy) => ( + + )} + +
- - {seeDocumentsLabel} - + {[ConnectorStatus.CONNECTED, ConnectorStatus.CONFIGURED].includes( + connector.status + ) && connector.index_name ? ( + + {configureLabel} + + ) : ( + + {configureLabel} + + )}
} @@ -169,7 +199,7 @@ export const ConnectorStats: React.FC = ({ connector, index = ({ connector, index {connector.index_name} - + + + + + + + {i18n.translate('xpack.enterpriseSearch.content.conectors.indexHealth', { + defaultMessage: 'Healthy', + })} + + +
) : ( @@ -201,33 +242,40 @@ export const ConnectorStats: React.FC = ({ connector, index ) } footer={ - + + + + + + + + +

+ {i18n.translate( + 'xpack.enterpriseSearch.connectors.connectorStats.p.DocumentsLabel', + { + defaultMessage: '{documentAmount} Documents', + values: { + documentAmount: indexData?.count ?? 0, + }, + } + )} +

+
+
+
+
- {[ConnectorStatus.CONNECTED, ConnectorStatus.CONFIGURED].includes( - connector.status - ) && connector.index_name ? ( - - {configureLabel} - - ) : ( - - {configureLabel} - - )} + + {seeDocumentsLabel} +
} diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts index eabd377a43f13..1d240df3d9cf9 100644 --- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts +++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts @@ -14,7 +14,7 @@ import { schema } from '@kbn/config-schema'; import { i18n } from '@kbn/i18n'; -import { deleteConnectorById, deleteConnectorSecret } from '@kbn/search-connectors'; +import { deleteConnectorSecret, updateConnectorIndexName } from '@kbn/search-connectors'; import { fetchConnectorByIndexName, fetchConnectors, @@ -207,7 +207,8 @@ export function registerIndexRoutes({ } if (connector) { - await deleteConnectorById(client.asCurrentUser, connector.id); + // detach the deleted index without removing the connector + await updateConnectorIndexName(client.asCurrentUser, connector.id, null); if (connector.api_key_id) { await client.asCurrentUser.security.invalidateApiKey({ ids: [connector.api_key_id] }); } diff --git a/x-pack/plugins/fleet/common/constants/index.ts b/x-pack/plugins/fleet/common/constants/index.ts index 3c275f87e1aea..51d51db9e761f 100644 --- a/x-pack/plugins/fleet/common/constants/index.ts +++ b/x-pack/plugins/fleet/common/constants/index.ts @@ -56,4 +56,6 @@ export const DATA_TIERS = ['data_hot']; export const FLEET_ENROLLMENT_API_PREFIX = 'fleet-enrollment-api-keys'; +export const REQUEST_DIAGNOSTICS_TIMEOUT_MS = 3 * 60 * 60 * 1000; // 3 hours; + export * from './mappings'; diff --git a/x-pack/plugins/fleet/common/constants/routes.ts b/x-pack/plugins/fleet/common/constants/routes.ts index 9fe1f4b49d7d8..ee775ff1dbdd8 100644 --- a/x-pack/plugins/fleet/common/constants/routes.ts +++ b/x-pack/plugins/fleet/common/constants/routes.ts @@ -160,6 +160,7 @@ export const AGENT_API_ROUTES = { LIST_TAGS_PATTERN: `${API_ROOT}/agents/tags`, LIST_UPLOADS_PATTERN: `${API_ROOT}/agents/{agentId}/uploads`, GET_UPLOAD_FILE_PATTERN: `${API_ROOT}/agents/files/{fileId}/{fileName}`, + DELETE_UPLOAD_FILE_PATTERN: `${API_ROOT}/agents/files/{fileId}`, }; export const ENROLLMENT_API_KEY_ROUTES = { diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index 9a86cbe6f9fd1..5cbc85dd12ce1 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -2503,7 +2503,7 @@ ] } }, - "/agents/files@{fileId}@{fileName}": { + "/agents/files/{fileId}/{fileName}": { "parameters": [ { "schema": { @@ -2559,6 +2559,53 @@ "operationId": "get-agent-upload-file" } }, + "/agents/files/{fileId}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "fileId", + "in": "path", + "required": true + } + ], + "delete": { + "summary": "Delete file uploaded by agent", + "tags": [ + "Agents" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/error" + } + }, + "operationId": "delete-agent-upload-file" + } + }, "/agents/{agentId}/reassign": { "parameters": [ { @@ -7399,6 +7446,9 @@ }, "title": { "type": "string" + }, + "requires_root": { + "type": "boolean" } }, "required": [ diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index 16137b6f8dd27..f0f5bf761ada8 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -1581,7 +1581,7 @@ paths: operationId: agent-action-cancel parameters: - $ref: '#/components/parameters/kbn_xsrf' - /agents/files@{fileId}@{fileName}: + /agents/files/{fileId}/{fileName}: parameters: - schema: type: string @@ -1616,6 +1616,35 @@ paths: '400': $ref: '#/components/responses/error' operationId: get-agent-upload-file + /agents/files/{fileId}: + parameters: + - schema: + type: string + name: fileId + in: path + required: true + delete: + summary: Delete file uploaded by agent + tags: + - Agents + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + body: + type: object + properties: + id: + type: string + deleted: + type: boolean + '400': + $ref: '#/components/responses/error' + operationId: delete-agent-upload-file /agents/{agentId}/reassign: parameters: - schema: @@ -4747,6 +4776,8 @@ components: type: string title: type: string + requires_root: + type: boolean required: - name - version diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml index 02f302e025d67..5f8a2f578132e 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml @@ -51,7 +51,7 @@ properties: agents: type: number unprivileged_agents: - type: number + type: number agent_features: type: array items: diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml index b7b904badad08..7fb94651b9fee 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml @@ -13,6 +13,8 @@ properties: type: string title: type: string + requires_root: + type: boolean required: - name - version diff --git a/x-pack/plugins/fleet/common/openapi/entrypoint.yaml b/x-pack/plugins/fleet/common/openapi/entrypoint.yaml index 8feb15cb8698e..04203cc5d2e6b 100644 --- a/x-pack/plugins/fleet/common/openapi/entrypoint.yaml +++ b/x-pack/plugins/fleet/common/openapi/entrypoint.yaml @@ -77,8 +77,10 @@ paths: $ref: 'paths/agents@{agent_id}@actions.yaml' '/agents/{agentId}/actions/{actionId}/cancel': $ref: 'paths/agents@{agent_id}@actions@{action_id}@cancel.yaml' - '/agents/files@{fileId}@{fileName}': + '/agents/files/{fileId}/{fileName}': $ref: 'paths/agents@files@{file_id}@{file_name}.yaml' + '/agents/files/{fileId}': + $ref: 'paths/agents@files@{file_id}.yaml' '/agents/{agentId}/reassign': $ref: 'paths/agents@{agent_id}@reassign.yaml' '/agents/{agentId}/unenroll': diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}.yaml new file mode 100644 index 0000000000000..4507cb8ce456d --- /dev/null +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}.yaml @@ -0,0 +1,28 @@ +parameters: + - schema: + type: string + name: fileId + in: path + required: true +delete: + summary: Delete file uploaded by agent + tags: + - Agents + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + body: + type: object + properties: + id: + type: string + deleted: + type: boolean + '400': + $ref: ../components/responses/error.yaml + operationId: delete-agent-upload-file diff --git a/x-pack/plugins/fleet/common/services/package_helpers.test.ts b/x-pack/plugins/fleet/common/services/package_helpers.test.ts index 71d3a9018ed5e..0004ddfe40424 100644 --- a/x-pack/plugins/fleet/common/services/package_helpers.test.ts +++ b/x-pack/plugins/fleet/common/services/package_helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { isRootPrivilegesRequired } from './package_helpers'; +import { getRootIntegrations, isRootPrivilegesRequired } from './package_helpers'; describe('isRootPrivilegesRequired', () => { it('should return true if root privileges is required at root level', () => { @@ -38,3 +38,44 @@ describe('isRootPrivilegesRequired', () => { expect(res).toBe(false); }); }); + +describe('getRootIntegrations', () => { + it('should return packages that require root', () => { + const res = getRootIntegrations([ + { + package: { + requires_root: true, + name: 'auditd_manager', + title: 'Auditd Manager', + }, + } as any, + { + package: { + requires_root: false, + name: 'system', + title: 'System', + }, + } as any, + { + package: { + name: 'test', + title: 'Test', + }, + } as any, + { + package: { + requires_root: true, + name: 'auditd_manager', + title: 'Auditd Manager', + }, + } as any, + {} as any, + ]); + expect(res).toEqual([{ name: 'auditd_manager', title: 'Auditd Manager' }]); + }); + + it('should return empty array if no packages require root', () => { + const res = getRootIntegrations([]); + expect(res).toEqual([]); + }); +}); diff --git a/x-pack/plugins/fleet/common/services/package_helpers.ts b/x-pack/plugins/fleet/common/services/package_helpers.ts index 0282d218cec39..18c9368cd388a 100644 --- a/x-pack/plugins/fleet/common/services/package_helpers.ts +++ b/x-pack/plugins/fleet/common/services/package_helpers.ts @@ -5,7 +5,9 @@ * 2.0. */ -import type { PackageInfo } from '../types'; +import { uniqBy } from 'lodash'; + +import type { PackageInfo, PackagePolicy } from '../types'; /** * Return true if a package need Elastic Agent to be run as root/administrator @@ -16,3 +18,14 @@ export function isRootPrivilegesRequired(packageInfo: PackageInfo) { packageInfo.data_streams?.some((d) => d.agent?.privileges?.root) ); } + +export function getRootIntegrations( + packagePolicies: PackagePolicy[] +): Array<{ name: string; title: string }> { + return uniqBy( + packagePolicies + .map((policy) => policy.package) + .filter((pkg) => (pkg && pkg.requires_root) || false), + (pkg) => pkg!.name + ).map((pkg) => ({ name: pkg!.name, title: pkg!.title })); +} diff --git a/x-pack/plugins/fleet/common/services/routes.ts b/x-pack/plugins/fleet/common/services/routes.ts index 5d8f2c48914da..76b963949699a 100644 --- a/x-pack/plugins/fleet/common/services/routes.ts +++ b/x-pack/plugins/fleet/common/services/routes.ts @@ -236,6 +236,8 @@ export const agentRouteService = { '{fileName}', fileName ), + getAgentFileDeletePath: (fileId: string) => + AGENT_API_ROUTES.DELETE_UPLOAD_FILE_PATTERN.replace('{fileId}', fileId), getAgentsByActionsPath: () => AGENT_API_ROUTES.LIST_PATTERN, }; diff --git a/x-pack/plugins/fleet/common/types/models/agent.ts b/x-pack/plugins/fleet/common/types/models/agent.ts index 84636e380fd62..89b533c47341f 100644 --- a/x-pack/plugins/fleet/common/types/models/agent.ts +++ b/x-pack/plugins/fleet/common/types/models/agent.ts @@ -187,7 +187,7 @@ export interface AgentDiagnostics { name: string; createTime: string; filePath: string; - status: 'READY' | 'AWAITING_UPLOAD' | 'DELETED' | 'IN_PROGRESS' | 'FAILED'; + status: 'READY' | 'AWAITING_UPLOAD' | 'DELETED' | 'EXPIRED' | 'IN_PROGRESS' | 'FAILED'; actionId: string; error?: string; } diff --git a/x-pack/plugins/fleet/common/types/models/package_policy.ts b/x-pack/plugins/fleet/common/types/models/package_policy.ts index d7c21d3916188..08cff4870b27e 100644 --- a/x-pack/plugins/fleet/common/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/package_policy.ts @@ -13,6 +13,7 @@ export interface PackagePolicyPackage { title: string; version: string; experimental_data_stream_features?: ExperimentalDataStreamFeature[]; + requires_root?: boolean; } export interface PackagePolicyConfigRecordEntry { diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts index b175d336a8f23..bb69346bbdce4 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts @@ -54,6 +54,11 @@ export interface GetAgentUploadsResponse { items: AgentDiagnostics[]; } +export interface DeleteAgentUploadResponse { + id: string; + deleted: boolean; +} + export interface PostNewAgentActionRequest { body: { action: Omit; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx index 1198db3034dee..34b9ef59bd8c6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx @@ -11,13 +11,23 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import type { AgentPolicy } from '../../../types'; +import { UnprivilegedAgentsCallout } from '../create_package_policy_page/single_page_layout/confirm_modal'; export const ConfirmDeployAgentPolicyModal: React.FunctionComponent<{ onConfirm: () => void; onCancel: () => void; agentCount: number; agentPolicy: AgentPolicy; -}> = ({ onConfirm, onCancel, agentCount, agentPolicy }) => { + showUnprivilegedAgentsCallout?: boolean; + unprivilegedAgentsCount?: number; +}> = ({ + onConfirm, + onCancel, + agentCount, + agentPolicy, + showUnprivilegedAgentsCallout = false, + unprivilegedAgentsCount = 0, +}) => { return ( + {showUnprivilegedAgentsCallout && ( + <> + + + + )} = ( const [localIsManaged, setLocalIsManaged] = useState(props.isManaged); const [useLocalState, setUseLocalState] = useState(false); - const enrolledAgentIds = usePollingAgentCount(props.agentPolicy?.id || '', { + const { enrolledAgentIds } = usePollingAgentCount(props.agentPolicy?.id || '', { noLowerTimeLimit: true, pollImmediately: true, }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_managed.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_managed.tsx index 8419534a406f8..7b442a5af23a3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_managed.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_managed.tsx @@ -21,6 +21,8 @@ import { ManualInstructions } from '../../../../../../../../../components/enroll import { KubernetesManifestApplyStep } from '../../../../../../../../../components/agent_enrollment_flyout/steps/run_k8s_apply_command_step'; +import { getRootIntegrations } from '../../../../../../../../../../common/services'; + import type { InstallAgentPageProps } from './types'; export const InstallElasticAgentManagedPageStep: React.FC = (props) => { @@ -80,6 +82,7 @@ export const InstallElasticAgentManagedPageStep: React.FC fullCopyButton: true, fleetServerHost, onCopy: () => setCommandCopied(true), + rootIntegrations: getRootIntegrations(agentPolicy?.package_policies ?? []), }), ]; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx index f49aaefd65dd9..e2f92331759ac 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx @@ -12,6 +12,7 @@ import { safeDump } from 'js-yaml'; import type { FullAgentPolicy } from '../../../../../../../../../../common/types/models/agent_policy'; import { API_VERSIONS } from '../../../../../../../../../../common/constants'; +import { getRootIntegrations } from '../../../../../../../../../../common/services'; import { AgentStandaloneBottomBar, StandaloneModeWarningCallout, @@ -112,6 +113,7 @@ export const InstallElasticAgentStandalonePageStep: React.FC setCommandCopied(true), + rootIntegrations: getRootIntegrations(agentPolicy?.package_policies ?? []), }), ]; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/confirm_modal.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/confirm_modal.tsx new file mode 100644 index 0000000000000..8ae069de21e55 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/confirm_modal.tsx @@ -0,0 +1,81 @@ +/* + * 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. + */ + +import React from 'react'; +import { EuiCallOut, EuiConfirmModal } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; + +export interface UnprivilegedConfirmModalProps { + onConfirm: () => void; + onCancel: () => void; + agentPolicyName: string; + unprivilegedAgentsCount: number; +} + +export const UnprivilegedConfirmModal: React.FC = ({ + onConfirm, + onCancel, + agentPolicyName, + unprivilegedAgentsCount, +}: UnprivilegedConfirmModalProps) => { + return ( + + } + onCancel={onCancel} + onConfirm={onConfirm} + cancelButtonText={ + + } + confirmButtonText={ + + } + buttonColor="warning" + > + + + ); +}; + +export const UnprivilegedAgentsCallout: React.FC<{ + agentPolicyName: string; + unprivilegedAgentsCount: number; +}> = ({ agentPolicyName, unprivilegedAgentsCount }) => { + return ( + + + + ); +}; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx index b256349f5d6b9..f7b46d95f1e67 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx @@ -31,7 +31,10 @@ import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT, } from '../../../../../../../../common'; -import { getMaxPackageName } from '../../../../../../../../common/services'; +import { + getMaxPackageName, + isRootPrivilegesRequired, +} from '../../../../../../../../common/services'; import { useConfirmForceInstall } from '../../../../../../integrations/hooks'; import { validatePackagePolicy, validationHasErrors } from '../../services'; import type { PackagePolicyValidationResults } from '../../services'; @@ -266,6 +269,16 @@ export function useOnSubmit({ setFormState('CONFIRM'); return; } + if ( + packageInfo && + isRootPrivilegesRequired(packageInfo) && + (agentPolicy?.unprivileged_agents ?? 0) > 0 && + formState !== 'CONFIRM' && + formState !== 'CONFIRM_UNPRIVILEGED' + ) { + setFormState('CONFIRM_UNPRIVILEGED'); + return; + } let createdPolicy = overrideCreatedAgentPolicy; if (selectedPolicyTab === SelectedPolicyTab.NEW && !overrideCreatedAgentPolicy) { try { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx index e8ef63a7bfdbc..28f8c380eb2eb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx @@ -37,14 +37,28 @@ jest.mock('../../../../hooks', () => { sendGetAgentStatus: jest.fn().mockResolvedValue({ data: { results: { total: 0 } } }), useGetAgentPolicies: jest.fn().mockReturnValue({ data: { - items: [{ id: 'agent-policy-1', name: 'Agent policy 1', namespace: 'default' }], + items: [ + { + id: 'agent-policy-1', + name: 'Agent policy 1', + namespace: 'default', + unprivileged_agents: 1, + }, + ], }, error: undefined, isLoading: false, resendRequest: jest.fn(), } as any), sendGetOneAgentPolicy: jest.fn().mockResolvedValue({ - data: { item: { id: 'agent-policy-1', name: 'Agent policy 1', namespace: 'default' } }, + data: { + item: { + id: 'agent-policy-1', + name: 'Agent policy 1', + namespace: 'default', + unprivileged_agents: 1, + }, + }, }), useGetPackageInfoByKeyQuery: jest.fn(), sendGetSettings: jest.fn().mockResolvedValue({ @@ -129,16 +143,9 @@ describe('when on the package policy create page', () => { /> )); - let mockPackageInfo: any; - - beforeEach(() => { - testRenderer = createFleetTestRendererMock(); - mockApiCalls(testRenderer.startServices.http); - testRenderer.mountHistory.push(createPageUrlPath); - jest.mocked(useStartServices().application.navigateToApp).mockReset(); - - mockPackageInfo = { + function getMockPackageInfo(requiresRoot?: boolean) { + return { data: { item: { name: 'nginx', @@ -193,12 +200,25 @@ describe('when on the package policy create page', () => { latestVersion: '1.3.0', keepPoliciesUpToDate: false, status: 'not_installed', + agent: { + privileges: { + root: requiresRoot, + }, + }, }, }, isLoading: false, }; + } - (useGetPackageInfoByKeyQuery as jest.Mock).mockReturnValue(mockPackageInfo); + beforeEach(() => { + testRenderer = createFleetTestRendererMock(); + mockApiCalls(testRenderer.startServices.http); + testRenderer.mountHistory.push(createPageUrlPath); + + jest.mocked(useStartServices().application.navigateToApp).mockReset(); + + (useGetPackageInfoByKeyQuery as jest.Mock).mockReturnValue(getMockPackageInfo()); }); describe('and Route state is provided via Fleet HashRouter', () => { @@ -280,6 +300,73 @@ describe('when on the package policy create page', () => { vars: undefined, }; + test('should show unprivileged warning modal on submit if conditions match', async () => { + (useGetPackageInfoByKeyQuery as jest.Mock).mockReturnValue(getMockPackageInfo(true)); + await act(async () => { + render('agent-policy-1'); + }); + + let saveBtn: HTMLElement; + + await waitFor(() => { + saveBtn = renderResult.getByText(/Save and continue/).closest('button')!; + expect(saveBtn).not.toBeDisabled(); + }); + + await act(async () => { + fireEvent.click(saveBtn); + }); + + await waitFor(() => { + expect( + renderResult.getByText('Unprivileged agents enrolled to the selected policy') + ).toBeInTheDocument(); + expect(renderResult.getByTestId('unprivilegedAgentsCallout').textContent).toContain( + 'This integration requires Elastic Agents to have root privileges. There is 1 agent running in an unprivileged mode using Agent policy 1. To ensure that all data required by the integration can be collected, re-enroll the agent using an account with root privileges.' + ); + }); + + await waitFor(() => { + saveBtn = renderResult.getByText(/Add integration/).closest('button')!; + }); + + await act(async () => { + fireEvent.click(saveBtn); + }); + + expect(sendCreatePackagePolicy as jest.MockedFunction).toHaveBeenCalledTimes(1); + }); + + test('should show unprivileged warning and agents modal on submit if conditions match', async () => { + (useGetPackageInfoByKeyQuery as jest.Mock).mockReturnValue(getMockPackageInfo(true)); + (sendGetAgentStatus as jest.MockedFunction).mockResolvedValueOnce({ + data: { results: { total: 1 } }, + }); + await act(async () => { + render('agent-policy-1'); + }); + + await act(async () => { + fireEvent.click(renderResult.getByText(/Save and continue/).closest('button')!); + }); + + await waitFor(() => { + expect(renderResult.getByText('This action will update 1 agent')).toBeInTheDocument(); + expect( + renderResult.getByText('Unprivileged agents enrolled to the selected policy') + ).toBeInTheDocument(); + expect(renderResult.getByTestId('unprivilegedAgentsCallout').textContent).toContain( + 'This integration requires Elastic Agents to have root privileges. There is 1 agent running in an unprivileged mode using Agent policy 1. To ensure that all data required by the integration can be collected, re-enroll the agent using an account with root privileges.' + ); + }); + + await act(async () => { + fireEvent.click(renderResult.getAllByText(/Save and deploy changes/)[1].closest('button')!); + }); + + expect(sendCreatePackagePolicy as jest.MockedFunction).toHaveBeenCalled(); + }); + test('should create package policy on submit when query param agent policy id is set', async () => { await act(async () => { render('agent-policy-1'); @@ -384,10 +471,10 @@ describe('when on the package policy create page', () => { test('should create agent policy without sys monitoring when new hosts is selected for system integration', async () => { (useGetPackageInfoByKeyQuery as jest.Mock).mockReturnValue({ - ...mockPackageInfo, + ...getMockPackageInfo(), data: { item: { - ...mockPackageInfo.data!.item, + ...getMockPackageInfo().data!.item, name: 'system', }, }, @@ -472,7 +559,7 @@ describe('when on the package policy create page', () => { expect(renderResult.getByText(/Save and continue/).closest('button')!).toBeDisabled(); }); - test('should not show modal if agent policy has agents', async () => { + test('should show modal if agent policy has agents', async () => { (sendGetAgentStatus as jest.MockedFunction).mockResolvedValueOnce({ data: { results: { total: 1 } }, }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx index 572b7a4136ea5..2184693e6623a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx @@ -75,6 +75,7 @@ import { useDevToolsRequest, useOnSubmit, useSetupTechnology } from './hooks'; import { PostInstallCloudFormationModal } from './components/cloud_security_posture/post_install_cloud_formation_modal'; import { PostInstallGoogleCloudShellModal } from './components/cloud_security_posture/post_install_google_cloud_shell_modal'; import { PostInstallAzureArmTemplateModal } from './components/cloud_security_posture/post_install_azure_arm_template_modal'; +import { UnprivilegedConfirmModal } from './confirm_modal'; const StepsWithLessPadding = styled(EuiSteps)` .euiStep__content { @@ -436,6 +437,7 @@ export const CreatePackagePolicySinglePage: CreatePackagePolicyParams = ({ /> ); } + return ( @@ -445,8 +447,22 @@ export const CreatePackagePolicySinglePage: CreatePackagePolicyParams = ({ agentPolicy={agentPolicy} onConfirm={onSubmit} onCancel={() => setFormState('VALID')} + showUnprivilegedAgentsCallout={Boolean( + packageInfo && + isRootPrivilegesRequired(packageInfo) && + (agentPolicy?.unprivileged_agents ?? 0) > 0 + )} + unprivilegedAgentsCount={agentPolicy?.unprivileged_agents ?? 0} /> )} + {formState === 'CONFIRM_UNPRIVILEGED' && agentPolicy ? ( + setFormState('VALID')} + onConfirm={onSubmit} + unprivilegedAgentsCount={agentPolicy?.unprivileged_agents ?? 0} + agentPolicyName={agentPolicy?.name ?? ''} + /> + ) : null} {formState === 'SUBMITTED_NO_AGENTS' && agentPolicy && packageInfo && diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/types.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/types.ts index 1a203c8bf2e60..0d533597a60eb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/types.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/types.ts @@ -19,6 +19,7 @@ export type PackagePolicyFormState = | 'VALID' | 'INVALID' | 'CONFIRM' + | 'CONFIRM_UNPRIVILEGED' | 'LOADING' | 'SUBMITTED' | 'SUBMITTED_NO_AGENTS' diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/header/right_content.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/header/right_content.tsx index 743dd5186d3b5..5dd391450b0cb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/header/right_content.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/header/right_content.tsx @@ -19,6 +19,7 @@ import { EuiDescriptionListDescription, EuiLink, EuiToolTip, + EuiIconTip, } from '@elastic/eui'; import { useAuthz, useLink } from '../../../../../hooks'; @@ -26,6 +27,7 @@ import type { AgentPolicy } from '../../../../../types'; import { AgentPolicyActionMenu, LinkedAgentCount } from '../../../components'; import { AddAgentHelpPopover } from '../../../../../components'; import { FLEET_SERVER_PACKAGE } from '../../../../../../../../common/constants'; +import { getRootIntegrations } from '../../../../../../../../common/services'; export interface HeaderRightContentProps { isLoading: boolean; @@ -130,36 +132,55 @@ export const HeaderRightContent: React.FunctionComponent ) : ( - - - + + + + + + + + +
+ } + > + + +
+ {getRootIntegrations(agentPolicy.package_policies || []).length > 0 && + (agentPolicy.unprivileged_agents || 0) > 0 && ( + + + } /> - - - -
- } - > - - + )} + ), }, { isDivider: true }, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx index b96a2e75ec537..a2e0e6663e5cf 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx @@ -16,6 +16,7 @@ import { EuiBasicTable, EuiLink, EuiToolTip, + EuiIconTip, } from '@elastic/eui'; import type { CriteriaWithPagination } from '@elastic/eui/src/components/basic_table/basic_table'; import { i18n } from '@kbn/i18n'; @@ -23,6 +24,7 @@ import { FormattedMessage, FormattedDate } from '@kbn/i18n-react'; import { useHistory } from 'react-router-dom'; import type { AgentPolicy } from '../../../types'; +import { getRootIntegrations } from '../../../../../../common/services'; import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../../constants'; import { useAuthz, @@ -164,24 +166,45 @@ export const AgentPolicyListPage: React.FunctionComponent<{}> = () => { - {'('} - - } - > - - - {')'} + + } + > + + + ), + }} + /> + {getRootIntegrations(agentPolicy.package_policies || []).length > 0 && + (agentPolicy.unprivileged_agents || 0) > 0 && ( + + + } + /> + + )} ), }, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx index 1eaea92be9639..1bb7e1ee0ad00 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx @@ -5,13 +5,12 @@ * 2.0. */ -import type { EuiTableFieldDataColumnType } from '@elastic/eui'; -import { EuiPortal } from '@elastic/eui'; -import { EuiToolTip } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { + EuiPortal, + EuiToolTip, EuiBasicTable, EuiButton, - EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiIcon, @@ -20,9 +19,10 @@ import { EuiText, EuiSkeletonText, formatDate, + EuiSpacer, + EuiSwitch, } from '@elastic/eui'; import React, { useCallback, useEffect, useState } from 'react'; -import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; @@ -31,18 +31,16 @@ import { MINIMUM_DIAGNOSTICS_AGENT_VERSION, } from '../../../../../../../../common/services'; -import { sendGetAgentUploads, useAuthz, useLink, useStartServices } from '../../../../../hooks'; +import { + sendGetAgentUploads, + useAuthz, + useLink, + useStartServices, + sendDeleteAgentUpload, +} from '../../../../../hooks'; import type { AgentDiagnostics, Agent } from '../../../../../../../../common/types/models'; import { AgentRequestDiagnosticsModal } from '../../../components/agent_request_diagnostics_modal'; -const FlexStartEuiFlexItem = styled(EuiFlexItem)` - align-self: flex-start; -`; - -const MarginedIcon = styled(EuiIcon)` - margin-right: 7px; -`; - export interface AgentDiagnosticsProps { agent: Agent; } @@ -52,7 +50,9 @@ export const AgentDiagnosticsTab: React.FunctionComponent const { notifications } = useStartServices(); const { getAbsolutePath } = useLink(); const [isLoading, setIsLoading] = useState(true); - const [diagnosticsEntries, setDiagnosticEntries] = useState([]); + const [isShowingExpiredEntries, setIsShowingExpiredEntries] = useState(false); + const [visibleDiagnosticsEntries, setVisibleDiagnosticEntries] = useState([]); + const [allDiagnosticsEntries, setAllDiagnosticEntries] = useState([]); const [prevDiagnosticsEntries, setPrevDiagnosticEntries] = useState([]); const [loadInterval, setLoadInterval] = useState(10000); const [isRequestDiagnosticsModalOpen, setIsRequestDiagnosticsModalOpen] = useState(false); @@ -68,7 +68,7 @@ export const AgentDiagnosticsTab: React.FunctionComponent throw new Error('No data'); } const entries = uploadsResponse.data.items; - setDiagnosticEntries(entries); + setAllDiagnosticEntries(entries); setIsLoading(false); // query faster if an action is in progress, for quicker feedback @@ -93,6 +93,31 @@ export const AgentDiagnosticsTab: React.FunctionComponent } }, [agent.id, notifications.toasts, setLoadInterval]); + const deleteFile = (fileId: string) => { + sendDeleteAgentUpload(fileId).then(({ data, error }) => { + if (error || data?.deleted === false) { + notifications.toasts.addError(error || new Error('Request returned `deleted: false`'), { + title: i18n.translate( + 'xpack.fleet.requestDiagnostics.errorDeletingUploadNotificationTitle', + { + defaultMessage: 'Error deleting diagnostics file', + } + ), + }); + } else { + notifications.toasts.addSuccess({ + title: i18n.translate( + 'xpack.fleet.requestDiagnostics.successDeletingUploadNotificationTitle', + { + defaultMessage: 'Diagnostics file deleted', + } + ), + }); + } + loadData(); + }); + }; + useEffect(() => { loadData(); const interval: ReturnType | null = setInterval(async () => { @@ -109,9 +134,9 @@ export const AgentDiagnosticsTab: React.FunctionComponent }, [loadData, loadInterval]); useEffect(() => { - setPrevDiagnosticEntries(diagnosticsEntries); + setPrevDiagnosticEntries(allDiagnosticsEntries); if (prevDiagnosticsEntries.length > 0) { - diagnosticsEntries + allDiagnosticsEntries .filter((newEntry) => { const oldEntry = prevDiagnosticsEntries.find((entry) => entry.id === newEntry.id); return newEntry.status === 'READY' && (!oldEntry || oldEntry?.status !== 'READY'); @@ -130,17 +155,26 @@ export const AgentDiagnosticsTab: React.FunctionComponent ); }); } - }, [prevDiagnosticsEntries, diagnosticsEntries, notifications.toasts]); + }, [prevDiagnosticsEntries, allDiagnosticsEntries, notifications.toasts]); - const errorIcon = ; - const getErrorMessage = (error?: string) => (error ? `Error: ${error}` : ''); + useEffect(() => { + if (isShowingExpiredEntries) { + setVisibleDiagnosticEntries(allDiagnosticsEntries); + } else { + setVisibleDiagnosticEntries( + allDiagnosticsEntries.filter((entry) => entry.status !== 'EXPIRED') + ); + } + }, [allDiagnosticsEntries, isShowingExpiredEntries]); - const columns: Array> = [ + const columns: Array> = [ { field: 'id', - name: 'File', + name: i18n.translate('xpack.fleet.requestDiagnostics.tableColumns.fileLabelText', { + defaultMessage: 'File', + }), render: (id: string) => { - const currentItem = diagnosticsEntries.find((item) => item.id === id); + const currentItem = allDiagnosticsEntries.find((item) => item.id === id); return currentItem?.status === 'READY' ? (   {currentItem?.name} @@ -155,45 +189,81 @@ export const AgentDiagnosticsTab: React.FunctionComponent ) : ( - {currentItem?.status ? ( - -

Diagnostics status: {currentItem?.status}

-

{getErrorMessage(currentItem?.error)}

- - } - > - {errorIcon} -
- ) : ( - errorIcon - )} -   - {currentItem?.name} + + {currentItem?.error ? ( + + + } + > + + + + ) : currentItem?.status ? ( + + + + + + ) : null} + {currentItem?.name} +
); }, }, { field: 'id', - name: 'Date', + name: i18n.translate('xpack.fleet.requestDiagnostics.tableColumns.dateLabelText', { + defaultMessage: 'Date', + }), dataType: 'date', render: (id: string) => { - const currentItem = diagnosticsEntries.find((item) => item.id === id); + const currentItem = allDiagnosticsEntries.find((item) => item.id === id); return ( - + {formatDate(currentItem?.createTime, 'lll')} ); }, }, + { + name: i18n.translate('xpack.fleet.requestDiagnostics.tableColumns.actionsLabelText', { + defaultMessage: 'Actions', + }), + width: '70px', + actions: [ + { + type: 'icon', + icon: 'trash', + color: 'danger', + name: i18n.translate('xpack.fleet.requestDiagnostics.tableColumns.deleteButtonText', { + defaultMessage: 'Delete', + }), + available: (item: AgentDiagnostics) => item.status === 'READY', + description: i18n.translate( + 'xpack.fleet.requestDiagnostics.tableColumns.deleteButtonDesc', + { + defaultMessage: 'Delete diagnostics file', + } + ), + onClick: (item: AgentDiagnostics) => { + deleteFile(item.id); + }, + }, + ], + }, ]; const requestDiagnosticsButton = ( { setIsRequestDiagnosticsModalOpen(true); }} @@ -215,29 +285,27 @@ export const AgentDiagnosticsTab: React.FunctionComponent agentCount={1} onClose={() => { setIsRequestDiagnosticsModalOpen(false); + loadData(); }} /> )} - - - - } - > - - - - + +

+ +

+
+ + + {isAgentRequestDiagnosticsSupported(agent) ? ( requestDiagnosticsButton ) : ( @@ -253,15 +321,27 @@ export const AgentDiagnosticsTab: React.FunctionComponent {requestDiagnosticsButton} )} -
- - {isLoading ? ( - - ) : ( - items={diagnosticsEntries} columns={columns} /> - )} + + + + } + checked={isShowingExpiredEntries} + onChange={(e) => setIsShowingExpiredEntries(e.target.checked)} + />
+ + + {isLoading ? ( + + ) : ( + items={visibleDiagnosticsEntries} columns={columns} /> + )} ); }; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_request_diagnostics_modal/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_request_diagnostics_modal/index.tsx index 82bf1f1b31874..9ea94aaeb134a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_request_diagnostics_modal/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_request_diagnostics_modal/index.tsx @@ -125,7 +125,7 @@ export const AgentRequestDiagnosticsModal: React.FunctionComponent = ({

diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx index 021608e4ef656..40f0c8e70a59b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx @@ -29,6 +29,7 @@ import { PACKAGES_SAVED_OBJECT_TYPE, DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, FLEET_SERVER_HOST_SAVED_OBJECT_TYPE, + INGEST_SAVED_OBJECT_INDEX, } from '../../../../../../common/constants'; import { CodeBlock } from './code_block'; @@ -36,7 +37,7 @@ import { SavedObjectNamesCombo } from './saved_object_names_combo'; const fetchSavedObjects = async (type?: string, name?: string) => { if (!type || !name) return; - const path = `/.kibana/_search`; + const path = `/${INGEST_SAVED_OBJECT_INDEX}/_search`; const body = { query: { bool: { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_names_combo.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_names_combo.tsx index aa9d7cb011e83..356d591fa2bf6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_names_combo.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_names_combo.tsx @@ -12,9 +12,10 @@ import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { sendRequest } from '../../../hooks'; +import { INGEST_SAVED_OBJECT_INDEX } from '../../../../../../common/constants'; const fetchSavedObjectNames = async (type: string) => { - const path = `/.kibana/_search`; + const path = `/${INGEST_SAVED_OBJECT_INDEX}/_search`; const body = { size: 0, query: { diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_agent_enrollment.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_agent_enrollment.tsx index 342f5f8f73249..53448aefd44c6 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_agent_enrollment.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_agent_enrollment.tsx @@ -41,7 +41,10 @@ const POLLING_INTERVAL_MS = 5 * 1000; // 5 sec * @param policyId * @returns agentIds */ -export const usePollingAgentCount = (policyId: string, opts?: UsePollingAgentCountOptions) => { +export const usePollingAgentCount = ( + policyId: string, + opts?: UsePollingAgentCountOptions +): { enrolledAgentIds: string[] } => { const [agentIds, setAgentIds] = useState([]); const [didPollInitially, setDidPollInitially] = useState(false); const timeout = useRef(undefined); @@ -89,7 +92,7 @@ export const usePollingAgentCount = (policyId: string, opts?: UsePollingAgentCou isAborted = true; }; }, [agentIds, policyId, kuery, getNewAgentIds]); - return agentIds; + return { enrolledAgentIds: agentIds }; }; export const ConfirmAgentEnrollment: React.FunctionComponent = ({ diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/agent_enrollment_confirmation_step.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/agent_enrollment_confirmation_step.tsx index fc2ee7d131baf..761b662917d46 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/agent_enrollment_confirmation_step.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/agent_enrollment_confirmation_step.tsx @@ -65,19 +65,22 @@ export const AgentEnrollmentConfirmationStep = ({ : i18n.translate('xpack.fleet.agentEnrollment.stepAgentEnrollmentConfirmation', { defaultMessage: 'Confirm agent enrollment', }), - children: - !!isComplete || poll ? ( - - ) : ( - - ), + children: ( + <> + {!!isComplete || poll ? ( + + ) : ( + + )} + + ), status: !isComplete ? 'incomplete' : 'complete', }; }; diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx index 7cbe8125fcf38..615c6399b202f 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx @@ -14,6 +14,7 @@ import type { EuiContainedStepProps } from '@elastic/eui/src/components/steps/st import type { FullAgentPolicy } from '../../../../common/types/models/agent_policy'; import { API_VERSIONS } from '../../../../common/constants'; +import { getRootIntegrations } from '../../../../common/services'; import { fullAgentPolicyToYaml, agentPolicyRouteService } from '../../../services'; import { getGcpIntegrationDetailsFromAgentPolicy } from '../../cloud_security_posture/services'; @@ -168,6 +169,7 @@ export const StandaloneSteps: React.FunctionComponent = ({ installCommand: standaloneInstallCommands, isK8s, cloudSecurityIntegration, + rootIntegrations: getRootIntegrations(selectedPolicy?.package_policies ?? []), }) ); @@ -225,7 +227,7 @@ export const ManagedSteps: React.FunctionComponent = ({ const apiKeyData = apiKey?.data; const enrollToken = apiKey.data ? apiKey.data.item.api_key : ''; - const enrolledAgentIds = usePollingAgentCount(selectedPolicy?.id || ''); + const { enrolledAgentIds } = usePollingAgentCount(selectedPolicy?.id || ''); const agentVersion = useAgentVersion(); @@ -309,6 +311,7 @@ export const ManagedSteps: React.FunctionComponent = ({ cloudSecurityIntegration, fleetServerHost, enrollToken, + rootIntegrations: getRootIntegrations(selectedPolicy?.package_policies ?? []), }) ); } diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx index 2a9c0536f3389..566d73aff7fc9 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx @@ -29,6 +29,7 @@ export const InstallManagedAgentStep = ({ isComplete, fullCopyButton, onCopy, + rootIntegrations, }: { selectedApiKeyId?: string; apiKeyData?: GetOneEnrollmentAPIKeyResponse | null; @@ -40,6 +41,7 @@ export const InstallManagedAgentStep = ({ isComplete?: boolean; fullCopyButton?: boolean; onCopy?: () => void; + rootIntegrations?: Array<{ name: string; title: string }>; }): EuiContainedStepProps => { const nonCompleteStatus = selectedApiKeyId ? undefined : 'disabled'; const status = isComplete ? 'complete' : nonCompleteStatus; @@ -58,6 +60,7 @@ export const InstallManagedAgentStep = ({ onCopy={onCopy} fullCopyButton={fullCopyButton} fleetServerHost={fleetServerHost} + rootIntegrations={rootIntegrations} /> ) : ( diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx index 90ed25225b608..2e11cc165d4f7 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx @@ -23,6 +23,7 @@ export const InstallStandaloneAgentStep = ({ isComplete, fullCopyButton, onCopy, + rootIntegrations, }: { installCommand: CommandsByPlatform; isK8s?: K8sMode; @@ -30,6 +31,7 @@ export const InstallStandaloneAgentStep = ({ isComplete?: boolean; fullCopyButton?: boolean; onCopy?: () => void; + rootIntegrations?: Array<{ name: string; title: string }>; }): EuiContainedStepProps => { return { title: i18n.translate('xpack.fleet.agentEnrollment.stepEnrollAndRunAgentTitle', { @@ -43,6 +45,7 @@ export const InstallStandaloneAgentStep = ({ onCopy={onCopy} fullCopyButton={fullCopyButton} isManaged={false} + rootIntegrations={rootIntegrations} /> ), status: isComplete ? 'complete' : undefined, diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx index 44a251fefd7bc..372f81ca47f96 100644 --- a/x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx @@ -14,6 +14,8 @@ import { InstallationMessage } from '../agent_enrollment_flyout/installation_mes import type { K8sMode, CloudSecurityIntegration } from '../agent_enrollment_flyout/types'; import { PlatformSelector } from '../platform_selector'; +import { RootPrivilegesCallout } from './root_privileges_callout'; + interface Props { installCommand: CommandsByPlatform; isK8s: K8sMode | undefined; @@ -23,6 +25,7 @@ interface Props { fullCopyButton?: boolean; isManaged?: boolean; onCopy?: () => void; + rootIntegrations?: Array<{ name: string; title: string }>; } export const InstallSection: React.FunctionComponent = ({ @@ -34,10 +37,12 @@ export const InstallSection: React.FunctionComponent = ({ fullCopyButton = false, isManaged = true, onCopy, + rootIntegrations, }) => { return ( <> + { + function render(rootIntegrations?: Array<{ name: string; title: string }>) { + cleanup(); + const renderer = createFleetTestRendererMock(); + const results = renderer.render(); + + return results; + } + + it('should render callout requiring root privileges', async () => { + const renderResult = render([{ name: 'auditd_manager', title: 'Auditd Manager' }]); + + await waitFor(() => { + expect(renderResult.getByText('Root privileges required')).toBeInTheDocument(); + expect(renderResult.getByTestId('rootPrivilegesCallout').textContent).toContain( + 'This agent policy contains the following integrations that require Elastic Agents to have root privileges. To ensure that all data required by the integrations can be collected, enroll the agents using an account with root privileges.' + ); + expect(renderResult.getByText('Auditd Manager')).toBeInTheDocument(); + }); + }); +}); diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/root_privileges_callout.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/root_privileges_callout.tsx new file mode 100644 index 0000000000000..3c115a78567af --- /dev/null +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/root_privileges_callout.tsx @@ -0,0 +1,40 @@ +/* + * 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. + */ + +import React from 'react'; +import { EuiCallOut, EuiSpacer } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +export const RootPrivilegesCallout: React.FC<{ + rootIntegrations?: Array<{ name: string; title: string }>; +}> = ({ rootIntegrations = [] }) => { + return rootIntegrations.length > 0 ? ( + <> + + +

    + {rootIntegrations.map((item) => ( +
  • {item.title}
  • + ))} +
+ + + + ) : null; +}; diff --git a/x-pack/plugins/fleet/public/hooks/use_request/agents.ts b/x-pack/plugins/fleet/public/hooks/use_request/agents.ts index 7b9f8600dcd69..236c470cd15b7 100644 --- a/x-pack/plugins/fleet/public/hooks/use_request/agents.ts +++ b/x-pack/plugins/fleet/public/hooks/use_request/agents.ts @@ -17,6 +17,7 @@ import type { PostRequestBulkDiagnosticsRequest, PostRequestDiagnosticsRequest, PostRequestDiagnosticsResponse, + DeleteAgentUploadResponse, UpdateAgentRequest, } from '../../../common/types'; @@ -244,6 +245,15 @@ export function sendGetAgentUploads(agentId: string, options?: RequestOptions) { }); } +export function sendDeleteAgentUpload(fileId: string, options?: RequestOptions) { + return sendRequest({ + path: agentRouteService.getAgentFileDeletePath(fileId), + method: 'delete', + version: API_VERSIONS.public.v1, + ...options, + }); +} + export const useGetAgentUploads = (agentId: string, options?: RequestOptions) => { return useRequest({ path: agentRouteService.getListAgentUploads(agentId), diff --git a/x-pack/plugins/fleet/server/constants/index.ts b/x-pack/plugins/fleet/server/constants/index.ts index 55ad1f9881a8a..bf5179546c3f0 100644 --- a/x-pack/plugins/fleet/server/constants/index.ts +++ b/x-pack/plugins/fleet/server/constants/index.ts @@ -19,6 +19,7 @@ export { UNPRIVILEGED_AGENT_KUERY, PRIVILEGED_AGENT_KUERY, MAX_TIME_COMPLETE_INSTALL, + REQUEST_DIAGNOSTICS_TIMEOUT_MS, // Routes LIMITED_CONCURRENCY_ROUTE_TAG, PLUGIN_ID, diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts index f4d87b9193899..b292cc2f88c33 100644 --- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts @@ -35,6 +35,7 @@ import type { PostBulkUpdateAgentTagsRequestSchema, GetActionStatusRequestSchema, GetAgentUploadFileRequestSchema, + DeleteAgentUploadFileRequestSchema, PostRetrieveAgentsByActionsRequestSchema, } from '../../types'; import { defaultFleetErrorHandler } from '../../errors'; @@ -429,3 +430,17 @@ export const getAgentUploadFileHandler: RequestHandler< return defaultFleetErrorHandler({ error, response }); } }; + +export const deleteAgentUploadFileHandler: RequestHandler< + TypeOf +> = async (context, request, response) => { + const coreContext = await context.core; + const esClient = coreContext.elasticsearch.client.asInternalUser; + try { + const resp = await AgentService.deleteAgentUploadFile(esClient, request.params.fileId); + + return response.ok({ body: resp }); + } catch (error) { + return defaultFleetErrorHandler({ error, response }); + } +}; diff --git a/x-pack/plugins/fleet/server/routes/agent/index.ts b/x-pack/plugins/fleet/server/routes/agent/index.ts index 212397a5c3a99..640a9f69ed4d6 100644 --- a/x-pack/plugins/fleet/server/routes/agent/index.ts +++ b/x-pack/plugins/fleet/server/routes/agent/index.ts @@ -34,6 +34,7 @@ import { ListAgentUploadsRequestSchema, GetAgentUploadFileRequestSchema, PostRetrieveAgentsByActionsRequestSchema, + DeleteAgentUploadFileRequestSchema, } from '../../types'; import * as AgentService from '../../services/agents'; import type { FleetConfigType } from '../..'; @@ -57,6 +58,7 @@ import { getActionStatusHandler, getAgentUploadsHandler, getAgentUploadFileHandler, + deleteAgentUploadFileHandler, postAgentsReassignHandler, postRetrieveAgentsByActionsHandler, } from './handlers'; @@ -332,6 +334,21 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT getAgentUploadFileHandler ); + router.versioned + .delete({ + path: AGENT_API_ROUTES.DELETE_UPLOAD_FILE_PATTERN, + fleetAuthz: { + fleet: { readAgents: true }, + }, + }) + .addVersion( + { + version: API_VERSIONS.public.v1, + validate: { request: DeleteAgentUploadFileRequestSchema }, + }, + deleteAgentUploadFileHandler + ); + // Get agent status for policy router.versioned .get({ diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index f74366d924c96..457711b2646e7 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -86,6 +86,7 @@ import { } from './migrations/security_solution/to_v8_11_0_2'; import { settingsV1 } from './model_versions/v1'; import { packagePolicyV10OnWriteScanFix } from './model_versions/security_solution'; +import { migratePackagePolicySetRequiresRootToV8150 } from './migrations/to_v8_15_0'; /* * Saved object types and mappings @@ -433,6 +434,7 @@ export const getSavedObjectTypes = ( name: { type: 'keyword' }, title: { type: 'keyword' }, version: { type: 'keyword' }, + requires_root: { type: 'boolean' }, }, }, elasticsearch: { @@ -549,6 +551,20 @@ export const getSavedObjectTypes = ( }, ], }, + '11': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + package: { properties: { requires_root: { type: 'boolean' } } }, + }, + }, + { + type: 'data_backfill', + backfillFn: migratePackagePolicySetRequiresRootToV8150, + }, + ], + }, }, migrations: { '7.10.0': migratePackagePolicyToV7100, diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_15_0.test.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_15_0.test.ts new file mode 100644 index 0000000000000..656dfaddc75d6 --- /dev/null +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_15_0.test.ts @@ -0,0 +1,85 @@ +/* + * 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. + */ + +import { + createModelVersionTestMigrator, + type ModelVersionTestMigrator, +} from '@kbn/core-test-helpers-model-versions'; + +import type { SavedObject } from '@kbn/core-saved-objects-server'; + +import type { PackagePolicy } from '../../../common'; +import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../../common'; +import { getSavedObjectTypes } from '..'; + +const getPolicyDoc = (packageName: string): SavedObject => { + return { + id: 'mock-saved-object-id', + attributes: { + name: 'Some Policy Name', + package: { + name: packageName, + title: '', + version: '', + }, + id: 'package-policy-1', + policy_id: '', + enabled: true, + namespace: '', + revision: 0, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + inputs: [], + }, + type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + references: [], + }; +}; + +describe('8.15.0 Requires Root Package Policy migration', () => { + let migrator: ModelVersionTestMigrator; + + beforeEach(() => { + migrator = createModelVersionTestMigrator({ + type: getSavedObjectTypes()[PACKAGE_POLICY_SAVED_OBJECT_TYPE], + }); + }); + + describe('backfilling `requires_root`', () => { + it('should backfill `requires_root` field as `true` for `endpoint` package on Kibana update', () => { + const migratedPolicyConfigSO = migrator.migrate({ + document: getPolicyDoc('endpoint'), + fromVersion: 10, + toVersion: 11, + }); + + expect(migratedPolicyConfigSO.attributes.package?.requires_root).toBe(true); + }); + + it('should backfill `requires_root` field as `true` for `auditd_manager` package on Kibana update', () => { + const migratedPolicyConfigSO = migrator.migrate({ + document: getPolicyDoc('auditd_manager'), + fromVersion: 10, + toVersion: 11, + }); + + expect(migratedPolicyConfigSO.attributes.package?.requires_root).toBe(true); + }); + + it('should not backfill `requires_root` field as `true` for other package on Kibana update', () => { + const migratedPolicyConfigSO = migrator.migrate({ + document: getPolicyDoc('other'), + fromVersion: 10, + toVersion: 11, + }); + + expect(migratedPolicyConfigSO.attributes.package!.requires_root).toBe(undefined); + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_15_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_15_0.ts new file mode 100644 index 0000000000000..bd0771ab7b583 --- /dev/null +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_15_0.ts @@ -0,0 +1,39 @@ +/* + * 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. + */ + +import type { + SavedObjectModelDataBackfillFn, + SavedObjectUnsanitizedDoc, +} from '@kbn/core-saved-objects-server'; + +import type { PackagePolicy } from '../../../common'; + +// backfill existing package policies with packages requiring root in 8.15.0 +const ROOT_PACKAGES = [ + 'endpoint', + 'universal_profiling_agent', + 'system_audit', + 'network_traffic', + 'fim', + 'auditd_manager', +]; + +export const migratePackagePolicySetRequiresRootToV8150: SavedObjectModelDataBackfillFn< + PackagePolicy, + PackagePolicy +> = (packagePolicyDoc) => { + const updatedPackagePolicyDoc: SavedObjectUnsanitizedDoc = packagePolicyDoc; + + if ( + updatedPackagePolicyDoc.attributes.package && + ROOT_PACKAGES.includes(updatedPackagePolicyDoc.attributes.package.name) + ) { + updatedPackagePolicyDoc.attributes.package.requires_root = true; + } + + return { attributes: updatedPackagePolicyDoc.attributes }; +}; diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index a75028be59548..afa7b7c5d92de 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -383,7 +383,10 @@ class AgentPolicyService { throw new FleetError(agentPolicySO.error.message); } - const agentPolicy = { id: agentPolicySO.id, ...agentPolicySO.attributes }; + const agentPolicy = { + id: agentPolicySO.id, + ...agentPolicySO.attributes, + }; if (withPackagePolicies) { agentPolicy.package_policies = diff --git a/x-pack/plugins/fleet/server/services/agents/__snapshots__/uploads.test.ts.snap b/x-pack/plugins/fleet/server/services/agents/__snapshots__/uploads.test.ts.snap new file mode 100644 index 0000000000000..14afaaf1f8f07 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/__snapshots__/uploads.test.ts.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getAgentUploads should return right list of files 1`] = ` +Array [ + Object { + "actionId": "current-in-progress-action", + "error": undefined, + "filePath": "", + "id": "current-in-progress-action", + "status": "IN_PROGRESS", + }, + Object { + "actionId": "current-complete-action", + "error": undefined, + "filePath": "/api/fleet/agents/files/current-complete-file/current-complete-file.zip", + "id": "current-complete-file", + "status": "READY", + }, + Object { + "actionId": "expired-incomplete-action", + "error": undefined, + "filePath": "", + "id": "expired-incomplete-action", + "status": "EXPIRED", + }, + Object { + "actionId": "expired-complete-action", + "error": undefined, + "filePath": "/api/fleet/agents/files/expired-complete-file/expired-complete-file.zip", + "id": "expired-complete-file", + "status": "READY", + }, + Object { + "actionId": "current-error-action", + "error": "some diagnostics err", + "filePath": "", + "id": "current-error-action", + "status": "FAILED", + }, + Object { + "actionId": "expired-error-action", + "error": "some diagnostics err", + "filePath": "", + "id": "expired-error-action", + "status": "EXPIRED", + }, + Object { + "actionId": "old-complete-action", + "error": undefined, + "filePath": "/api/fleet/agents/files/old-complete-file/old-complete-file.zip", + "id": "old-complete-file", + "status": "READY", + }, +] +`; diff --git a/x-pack/plugins/fleet/server/services/agents/actions.ts b/x-pack/plugins/fleet/server/services/agents/actions.ts index 00a4d6de37d1b..bda3090f25d0e 100644 --- a/x-pack/plugins/fleet/server/services/agents/actions.ts +++ b/x-pack/plugins/fleet/server/services/agents/actions.ts @@ -43,13 +43,14 @@ export async function createAgentAction( newAgentAction: NewAgentAction ): Promise { const actionId = newAgentAction.id ?? uuidv4(); - const timestamp = new Date().toISOString(); + const now = Date.now(); + const timestamp = new Date(now).toISOString(); const body: FleetServerAgentAction = { '@timestamp': timestamp, expiration: newAgentAction.expiration === NO_EXPIRATION ? undefined - : newAgentAction.expiration ?? new Date(Date.now() + ONE_MONTH_IN_MS).toISOString(), + : newAgentAction.expiration ?? new Date(now + ONE_MONTH_IN_MS).toISOString(), agents: newAgentAction.agents, action_id: actionId, data: newAgentAction.data, diff --git a/x-pack/plugins/fleet/server/services/agents/index.ts b/x-pack/plugins/fleet/server/services/agents/index.ts index 2fad96c87bb79..6ffd24f5777cf 100644 --- a/x-pack/plugins/fleet/server/services/agents/index.ts +++ b/x-pack/plugins/fleet/server/services/agents/index.ts @@ -15,7 +15,7 @@ export * from './reassign'; export * from './update_agent_tags'; export * from './action_status'; export * from './request_diagnostics'; -export { getAgentUploads, getAgentUploadFile } from './uploads'; +export { getAgentUploads, getAgentUploadFile, deleteAgentUploadFile } from './uploads'; export { AgentServiceImpl } from './agent_service'; export type { AgentClient, AgentService } from './agent_service'; export { BulkActionsResolver } from './bulk_actions_resolver'; diff --git a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts index b297e4cb7c584..a6aa09ee2a36d 100644 --- a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts @@ -31,6 +31,7 @@ describe('requestDiagnostics', () => { body: expect.objectContaining({ agents: ['agent-in-regular-policy'], type: 'REQUEST_DIAGNOSTICS', + expiration: expect.anything(), }), index: '.fleet-actions', }) @@ -50,6 +51,7 @@ describe('requestDiagnostics', () => { body: expect.objectContaining({ agents: ['agent-in-regular-policy-newer', 'agent-in-regular-policy-newer2'], type: 'REQUEST_DIAGNOSTICS', + expiration: expect.anything(), }), index: '.fleet-actions', }) @@ -66,6 +68,7 @@ describe('requestDiagnostics', () => { body: expect.objectContaining({ agents: ['agent-in-regular-policy-newer', 'agent-in-regular-policy'], type: 'REQUEST_DIAGNOSTICS', + expiration: expect.anything(), }), index: '.fleet-actions', }) diff --git a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts index e2ed7e7ae8f1f..323af2ad29314 100644 --- a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts +++ b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts @@ -9,7 +9,7 @@ import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/ import type { RequestDiagnosticsAdditionalMetrics } from '../../../common/types'; -import { SO_SEARCH_LIMIT } from '../../constants'; +import { SO_SEARCH_LIMIT, REQUEST_DIAGNOSTICS_TIMEOUT_MS } from '../../constants'; import type { GetAgentsOptions } from '.'; import { getAgents, getAgentsByKuery } from './crud'; @@ -20,8 +20,6 @@ import { requestDiagnosticsBatch, } from './request_diagnostics_action_runner'; -const REQUEST_DIAGNOSTICS_TIMEOUT_MS = 3 * 60 * 1000; // 3 hours; - export async function requestDiagnostics( esClient: ElasticsearchClient, agentId: string, diff --git a/x-pack/plugins/fleet/server/services/agents/request_diagnostics_action_runner.ts b/x-pack/plugins/fleet/server/services/agents/request_diagnostics_action_runner.ts index a2d2d753eaa71..073297fabe8fa 100644 --- a/x-pack/plugins/fleet/server/services/agents/request_diagnostics_action_runner.ts +++ b/x-pack/plugins/fleet/server/services/agents/request_diagnostics_action_runner.ts @@ -9,11 +9,9 @@ import { v4 as uuidv4 } from 'uuid'; import type { ElasticsearchClient } from '@kbn/core/server'; import type { RequestDiagnosticsAdditionalMetrics } from '../../../common/types'; - import { isAgentRequestDiagnosticsSupported } from '../../../common/services'; - import type { Agent } from '../../types'; - +import { REQUEST_DIAGNOSTICS_TIMEOUT_MS } from '../../constants'; import { FleetError } from '../../errors'; import { ActionRunner } from './action_runner'; @@ -64,6 +62,7 @@ export async function requestDiagnosticsBatch( agents: agentIds, created_at: now, type: 'REQUEST_DIAGNOSTICS', + expiration: new Date(Date.now() + REQUEST_DIAGNOSTICS_TIMEOUT_MS).toISOString(), total, data: { additional_metrics: options.additionalMetrics, diff --git a/x-pack/plugins/fleet/server/services/agents/uploads.test.ts b/x-pack/plugins/fleet/server/services/agents/uploads.test.ts new file mode 100644 index 0000000000000..213b0cc217953 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/uploads.test.ts @@ -0,0 +1,134 @@ +/* + * 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. + */ + +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; + +import { AGENT_ACTIONS_INDEX, AGENT_ACTIONS_RESULTS_INDEX } from '../../../common'; +import { FILE_STORAGE_METADATA_AGENT_INDEX } from '../../constants'; + +import { appContextService } from '../app_context'; +import { createAppContextStartContractMock } from '../../mocks'; + +import { deleteAgentUploadFile, getAgentUploads } from './uploads'; +import { + AGENT_ACTIONS_FIXTURES, + AGENT_ACTIONS_RESULTS_FIXTURES, + FILES_METADATA_BY_ACTION_ID, +} from './uploads.test_fixtures'; + +describe('getAgentUploads', () => { + const esClient = {} as ElasticsearchClient; + + beforeAll(async () => { + appContextService.start(createAppContextStartContractMock()); + }); + + afterAll(() => { + appContextService.stop(); + }); + + it('should return right list of files', async () => { + esClient.search = jest.fn().mockImplementation(({ index, query }) => { + if (index === AGENT_ACTIONS_INDEX) { + return { hits: { hits: AGENT_ACTIONS_FIXTURES } }; + } + + if (index === AGENT_ACTIONS_RESULTS_INDEX) { + return { hits: { hits: AGENT_ACTIONS_RESULTS_FIXTURES } }; + } + + if (index === FILE_STORAGE_METADATA_AGENT_INDEX) { + const actionId = query.bool.filter.bool.must[1].term.action_id as string; + if (FILES_METADATA_BY_ACTION_ID[actionId]) { + return { hits: { hits: [FILES_METADATA_BY_ACTION_ID[actionId]] } }; + } else { + return { hits: { hits: [] } }; + } + } + }); + + const response = await getAgentUploads(esClient, 'agent-1'); + expect(response.length).toBe(7); + expect(response.filter((i) => i.status === 'DELETED').length).toBe(0); + response.forEach((item) => { + expect(item.name).toBeDefined(); + if (item.status === 'READY') { + expect(item.name).toEqual(`${item.id}.zip`); + } else { + expect(item.name).toMatch(new RegExp(`^elastic-agent-diagnostics-.*\.zip$`)); + } + }); + expect(response.map(({ createTime, name, ...rest }) => rest)).toMatchSnapshot(); + }); +}); + +describe('deleteAgentUploadFile', () => { + const esClient = {} as ElasticsearchClient; + const id = 'agent-upload-file-id'; + + beforeAll(async () => { + appContextService.start(createAppContextStartContractMock()); + }); + + afterAll(() => { + appContextService.stop(); + }); + + describe('should return success', () => { + it('if the file was deleted and metadata was updated normally', async () => { + esClient.deleteByQuery = jest.fn().mockResolvedValueOnce({ deleted: 1 }); + esClient.updateByQuery = jest.fn().mockResolvedValueOnce({ total: 1 }); + const response = await deleteAgentUploadFile(esClient, id); + expect(esClient.deleteByQuery).toHaveBeenCalledTimes(1); + expect(esClient.updateByQuery).toHaveBeenCalledTimes(1); + expect(response).toEqual({ id, deleted: true }); + }); + it('if no files needed to be deleted and metadata was updated normally', async () => { + esClient.deleteByQuery = jest.fn().mockResolvedValueOnce({ total: 0 }); + esClient.updateByQuery = jest.fn().mockResolvedValueOnce({ total: 1 }); + const response = await deleteAgentUploadFile(esClient, id); + expect(esClient.deleteByQuery).toHaveBeenCalledTimes(1); + expect(esClient.updateByQuery).toHaveBeenCalledTimes(1); + expect(response).toEqual({ id, deleted: true }); + }); + }); + + describe('should throw an error', () => { + it('if data file deletion failed due to ES client error', async () => { + esClient.deleteByQuery = jest.fn().mockRejectedValueOnce(new Error('some es error')); + esClient.updateByQuery = jest.fn(); + await expect(deleteAgentUploadFile(esClient, id)).rejects.toThrow('some es error'); + expect(esClient.deleteByQuery).toHaveBeenCalledTimes(1); + expect(esClient.updateByQuery).not.toHaveBeenCalled(); + }); + it('if data file deletion failed due to no files deleted', async () => { + esClient.deleteByQuery = jest.fn().mockResolvedValueOnce({ deleted: 0, total: 1 }); + esClient.updateByQuery = jest.fn(); + await expect(deleteAgentUploadFile(esClient, id)).rejects.toThrow( + `Failed to delete file ${id} from file storage data stream` + ); + expect(esClient.deleteByQuery).toHaveBeenCalledTimes(1); + expect(esClient.updateByQuery).not.toHaveBeenCalled(); + }); + it('if metadata deletion failed due to ES client error', async () => { + esClient.deleteByQuery = jest.fn().mockResolvedValueOnce({ total: 0 }); + esClient.updateByQuery = jest.fn().mockRejectedValueOnce(new Error('some es error')); + await expect(deleteAgentUploadFile(esClient, id)).rejects.toThrow('some es error'); + expect(esClient.deleteByQuery).toHaveBeenCalledTimes(1); + expect(esClient.updateByQuery).toHaveBeenCalledTimes(1); + }); + it('if metadata deletion failed due to no files deleted', async () => { + esClient.deleteByQuery = jest.fn().mockResolvedValueOnce({ total: 0 }); + esClient.updateByQuery = jest.fn().mockResolvedValueOnce({ total: 0 }); + await expect(deleteAgentUploadFile(esClient, id)).rejects.toThrow( + `Failed to update file ${id} metadata` + ); + expect(esClient.deleteByQuery).toHaveBeenCalledTimes(1); + expect(esClient.updateByQuery).toHaveBeenCalledTimes(1); + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/agents/uploads.test_fixtures.ts b/x-pack/plugins/fleet/server/services/agents/uploads.test_fixtures.ts new file mode 100644 index 0000000000000..c749601d2af62 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/uploads.test_fixtures.ts @@ -0,0 +1,173 @@ +/* + * 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. + */ +import Moment from 'moment'; + +export const AGENT_ACTIONS_FIXTURES = [ + { + _source: { + action_id: 'current-in-progress-action', + '@timestamp': Moment().subtract('5', 'minute').toISOString(), + expiration: Moment().add(1, 'day').toISOString(), + }, + }, + { + _source: { + action_id: 'current-complete-action', + '@timestamp': Moment().subtract('5', 'minute').toISOString(), + expiration: Moment().add(1, 'day').toISOString(), + }, + }, + { + _source: { + action_id: 'expired-incomplete-action', + '@timestamp': Moment().subtract(6, 'hour').toISOString(), + expiration: Moment().subtract(3, 'hour').toISOString(), + }, + }, + { + _source: { + action_id: 'expired-complete-action', + '@timestamp': Moment().subtract(6, 'hour').toISOString(), + expiration: Moment().subtract(3, 'hour').toISOString(), + }, + }, + { + _source: { + action_id: 'current-error-action', + '@timestamp': Moment().subtract('5', 'minute').toISOString(), + expiration: Moment().add(1, 'day').toISOString(), + }, + }, + { + _source: { + action_id: 'expired-error-action', + '@timestamp': Moment().subtract(6, 'hour').toISOString(), + expiration: Moment().subtract(3, 'hour').toISOString(), + }, + }, + { + _source: { + action_id: 'current-deleted-action', + '@timestamp': Moment().subtract('5', 'minute').toISOString(), + expiration: Moment().add(1, 'day').toISOString(), + }, + }, + { + _source: { + action_id: 'expired-deleted-action', + '@timestamp': Moment().subtract(6, 'hour').toISOString(), + expiration: Moment().subtract(3, 'hour').toISOString(), + }, + }, + { + _source: { + action_id: 'old-incomplete-action', + '@timestamp': Moment().subtract(90, 'day').toISOString(), + expiration: Moment().subtract(89, 'day').toISOString(), + }, + }, + { + _source: { + action_id: 'old-complete-action', + '@timestamp': Moment().subtract(90, 'day').toISOString(), + expiration: Moment().subtract(89, 'day').toISOString(), + }, + }, +]; + +export const AGENT_ACTIONS_RESULTS_FIXTURES = [ + { + _source: { + action_id: 'current-in-progress-action', + }, + }, + { + _source: { + action_id: 'current-complete-action', + data: { upload_id: 'current-complete-file' }, + }, + }, + { + _source: { + action_id: 'expired-incomplete-action', + }, + }, + { + _source: { + action_id: 'expired-complete-action', + data: { upload_id: 'expired-complete-file' }, + }, + }, + { + _source: { + action_id: 'current-error-action', + error: 'some diagnostics err', + }, + }, + { + _source: { + action_id: 'expired-error-action', + error: 'some diagnostics err', + }, + }, + { + _source: { + action_id: 'current-deleted-action', + data: { upload_id: 'current-deleted-file' }, + }, + }, + { + _source: { + action_id: 'expired-deleted-action', + data: { upload_id: 'expired-deleted-file' }, + }, + }, + { + _source: { + action_id: 'old-incomplete-action', + }, + }, + { + _source: { + action_id: 'old-complete-action', + data: { upload_id: 'old-complete-file' }, + }, + }, +]; + +export const FILES_METADATA_BY_ACTION_ID: Record = { + 'current-complete-action': { + _id: 'current-complete-file', + _source: { + file: { name: 'current-complete-file.zip', Status: 'READY' }, + }, + }, + 'expired-complete-action': { + _id: 'expired-complete-file', + _source: { + file: { name: 'expired-complete-file.zip', Status: 'READY' }, + }, + }, + 'current-deleted-action': { + _id: 'current-complete-file', + _source: { + file: { name: 'current-complete-file.zip', Status: 'DELETED' }, + }, + }, + 'expired-deleted-action': { + _id: 'expired-complete-file', + _source: { + file: { name: 'expired-complete-file.zip', Status: 'DELETED' }, + }, + }, + 'old-complete-action': { + _id: 'old-complete-file', + _source: { + file: { name: 'old-complete-file.zip', Status: 'READY' }, + }, + }, +}; diff --git a/x-pack/plugins/fleet/server/services/agents/uploads.ts b/x-pack/plugins/fleet/server/services/agents/uploads.ts index bc2c52e433473..27d0a52eeb3c7 100644 --- a/x-pack/plugins/fleet/server/services/agents/uploads.ts +++ b/x-pack/plugins/fleet/server/services/agents/uploads.ts @@ -20,12 +20,14 @@ import { AGENT_ACTIONS_RESULTS_INDEX, agentRouteService, } from '../../../common'; - +import type { DeleteAgentUploadResponse } from '../../../common/types'; import { FILE_STORAGE_DATA_AGENT_INDEX, FILE_STORAGE_METADATA_AGENT_INDEX, SO_SEARCH_LIMIT, } from '../../constants'; +import { updateFilesStatus } from '../files'; +import { FleetError } from '../../errors'; export async function getAgentUploads( esClient: ElasticsearchClient, @@ -48,7 +50,7 @@ export async function getAgentUploads( if (fileResponse.hits.hits.length === 0) { appContextService .getLogger() - .debug(`No matches for action_id ${actionId} and agent_id ${agentId}`); + .trace(`No matches for action_id ${actionId} and agent_id ${agentId}`); return; } return { @@ -70,6 +72,19 @@ export async function getAgentUploads( const results: AgentDiagnostics[] = []; for (const action of actions) { const file = await getFile(action.actionId); + + // File list is initially built from list of diagnostic actions. + // If file was deleted intentially by ILM policy or user based on the meta information, + // or if the meta information does not exist AND the action is old (new actions are + // ok to show because we want to show in progress files) + // skip returning this action/file information. + if ( + file?.Status === 'DELETED' || + (!file && Date.parse(action.timestamp!) < Date.now() - 89 * 24 * 3600 * 1000) + ) { + continue; + } + const fileName = file?.name ?? `elastic-agent-diagnostics-${moment @@ -78,7 +93,7 @@ export async function getAgentUploads( const filePath = file ? agentRouteService.getAgentFileDownloadLink(file.id, file.name) : ''; const isActionExpired = action.expiration ? Date.parse(action.expiration) < Date.now() : false; const status = - file?.Status ?? (action.error ? 'FAILED' : isActionExpired ? 'EXPIRED' : 'IN_PROGRESS'); + file?.Status ?? (isActionExpired ? 'EXPIRED' : action.error ? 'FAILED' : 'IN_PROGRESS'); const result = { actionId: action.actionId, id: file?.id ?? action.actionId, @@ -216,6 +231,61 @@ export async function getAgentUploadFile( } } +export async function deleteAgentUploadFile( + esClient: ElasticsearchClient, + id: string +): Promise { + try { + // We manually delete the documents from the data streams with `_delete_by_query` + // because data streams do not support single deletes. See: + // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html#data-streams-append-only + + // Delete the file from the file storage data stream + const filesDeleteResponse = await esClient.deleteByQuery({ + index: FILE_STORAGE_DATA_AGENT_INDEX, + refresh: true, + body: { + query: { + match: { + bid: id, // Use `bid` instead of `_id` because `_id` has additional suffixes + }, + }, + }, + }); + + if ( + !!( + (filesDeleteResponse.deleted && filesDeleteResponse.deleted > 0) || + filesDeleteResponse.total === 0 + ) + ) { + // Update the metadata to mark the file as deleted + const updateMetadataStatusResponse = ( + await updateFilesStatus( + esClient, + undefined, + { [FILE_STORAGE_METADATA_AGENT_INDEX]: new Set([id]) }, + 'DELETED' + ) + )[0]; + + if (updateMetadataStatusResponse.total === 0) { + throw new FleetError(`Failed to update file ${id} metadata`); + } + + return { + id, + deleted: true, + }; + } else { + throw new FleetError(`Failed to delete file ${id} from file storage data stream`); + } + } catch (error) { + appContextService.getLogger().error(error); + throw error; + } +} + export function getDownloadHeadersForFile(fileName: string): ResponseHeaders { return { 'content-type': 'application/octet-stream', diff --git a/x-pack/plugins/fleet/server/services/files/index.ts b/x-pack/plugins/fleet/server/services/files/index.ts index 48303c3611fc7..203bc374b2bf1 100644 --- a/x-pack/plugins/fleet/server/services/files/index.ts +++ b/x-pack/plugins/fleet/server/services/files/index.ts @@ -147,7 +147,7 @@ export async function fileIdsWithoutChunksByIndex( */ export function updateFilesStatus( esClient: ElasticsearchClient, - abortController: AbortController, + abortController: AbortController | undefined, fileIdsByIndex: FileIdsByIndex, status: FileStatus ): Promise { @@ -168,7 +168,7 @@ export function updateFilesStatus( lang: 'painless', }, }, - { signal: abortController.signal } + abortController ? { signal: abortController.signal } : {} ) .catch((err) => { Error.captureStackTrace(err); diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index 45753540af256..05ccacad3d704 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -328,6 +328,13 @@ class PackagePolicyClientImpl implements PackagePolicyClient { logger, }); } + + if (enrichedPackagePolicy.package && pkgInfo?.agent?.privileges?.root) { + enrichedPackagePolicy.package = { + ...enrichedPackagePolicy.package, + requires_root: pkgInfo?.agent?.privileges?.root ?? false, + }; + } } const isoDate = new Date().toISOString(); @@ -457,6 +464,13 @@ class PackagePolicyClientImpl implements PackagePolicyClient { : inputs; elasticsearch = pkgInfo?.elasticsearch; + + if (packagePolicy.package && pkgInfo?.agent?.privileges?.root) { + packagePolicy.package = { + ...packagePolicy.package, + requires_root: pkgInfo?.agent?.privileges?.root ?? false, + }; + } } policiesToCreate.push({ @@ -862,6 +876,13 @@ class PackagePolicyClientImpl implements PackagePolicyClient { assetsMap ); elasticsearchPrivileges = pkgInfo.elasticsearch?.privileges; + + if (restOfPackagePolicy.package && pkgInfo?.agent?.privileges?.root) { + restOfPackagePolicy.package = { + ...restOfPackagePolicy.package, + requires_root: pkgInfo?.agent?.privileges?.root ?? false, + }; + } } // Handle component template/mappings updates for experimental features, e.g. synthetic source @@ -1042,6 +1063,13 @@ class PackagePolicyClientImpl implements PackagePolicyClient { assetsMap ); elasticsearchPrivileges = pkgInfo.elasticsearch?.privileges; + + if (restOfPackagePolicy.package && pkgInfo?.agent?.privileges?.root) { + restOfPackagePolicy.package = { + ...restOfPackagePolicy.package, + requires_root: pkgInfo?.agent?.privileges?.root ?? false, + }; + } } } diff --git a/x-pack/plugins/fleet/server/types/models/package_policy.ts b/x-pack/plugins/fleet/server/types/models/package_policy.ts index b712986556068..fdde855717842 100644 --- a/x-pack/plugins/fleet/server/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/package_policy.ts @@ -105,6 +105,7 @@ const PackagePolicyBaseSchema = { title: schema.string(), version: schema.string(), experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeatures), + requires_root: schema.maybe(schema.boolean()), }) ), // Deprecated TODO create remove issue @@ -148,6 +149,7 @@ const CreatePackagePolicyProps = { title: schema.maybe(schema.string()), version: schema.string(), experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeatures), + requires_root: schema.maybe(schema.boolean()), }) ), // Deprecated TODO create remove issue @@ -222,6 +224,7 @@ export const SimplifiedCreatePackagePolicyRequestBodySchema = name: schema.string(), version: schema.string(), experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeatures), + requires_root: schema.maybe(schema.boolean()), }), }); diff --git a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts index 0ab7ece50f87f..4bbd065e23003 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts @@ -197,6 +197,12 @@ export const GetAgentUploadFileRequestSchema = { }), }; +export const DeleteAgentUploadFileRequestSchema = { + params: schema.object({ + fileId: schema.string(), + }), +}; + export const PostBulkAgentReassignRequestSchema = { body: schema.object({ policy_id: schema.string(), diff --git a/x-pack/plugins/lens/public/app_plugin/app.test.tsx b/x-pack/plugins/lens/public/app_plugin/app.test.tsx index 374d651c44d8f..8aebc4778e201 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.test.tsx @@ -186,8 +186,8 @@ describe('Lens App', () => { query: { query: '', language: 'lucene' }, filters: [pinnedFilter], resolvedDateRange: { - fromDate: '2021-01-10T04:00:00.000Z', - toDate: '2021-01-10T08:00:00.000Z', + fromDate: 'now-7d', + toDate: 'now', }, }), }); @@ -1117,8 +1117,8 @@ describe('Lens App', () => { lens: expect.objectContaining({ query: { query: '', language: 'lucene' }, resolvedDateRange: { - fromDate: '2021-01-10T04:00:00.000Z', - toDate: '2021-01-10T08:00:00.000Z', + fromDate: 'now-7d', + toDate: 'now', }, }), }); @@ -1154,8 +1154,8 @@ describe('Lens App', () => { lens: expect.objectContaining({ query: { query: 'new', language: 'lucene' }, resolvedDateRange: { - fromDate: '2021-01-09T04:00:00.000Z', - toDate: '2021-01-09T08:00:00.000Z', + fromDate: 'now-14d', + toDate: 'now-7d', }, }), }); @@ -1454,8 +1454,8 @@ describe('Lens App', () => { type: 'lens/setState', payload: { resolvedDateRange: { - fromDate: '2021-01-10T04:00:00.000Z', - toDate: '2021-01-10T08:00:00.000Z', + fromDate: 'now-7d', + toDate: 'now', }, searchSessionId: 'sessionId-2', }, diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx index 0f9794ac77f31..2cc7791f9f941 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx @@ -37,7 +37,11 @@ import { useLensDispatch, } from '../../../state_management'; import type { TypedLensByValueInput } from '../../../embeddable/embeddable_component'; -import { EXPRESSION_BUILD_ERROR_ID, extractReferencesFromState } from '../../../utils'; +import { + EXPRESSION_BUILD_ERROR_ID, + extractReferencesFromState, + getAbsoluteDateRange, +} from '../../../utils'; import { LayerConfiguration } from './layer_configuration_section'; import type { EditConfigPanelProps } from './types'; import { FlyoutWrapper } from './flyout_wrapper'; @@ -94,6 +98,10 @@ export function LensEditConfigurationFlyout({ const framePublicAPI = useLensSelector((state) => selectFramePublicAPI(state, datasourceMap)); + framePublicAPI.absDateRange = getAbsoluteDateRange( + startDependencies.data.query.timefilter.timefilter + ); + const layers = useMemo( () => activeDatasource.getLayers(datasourceState), [activeDatasource, datasourceState] diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx index d3f06e077d7f8..e182a3a84b979 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx @@ -109,6 +109,7 @@ export function FormulaEditor({ hasData, dateRange, uiSettings, + data, }: Omit, 'activeData'> & { dateHistogramInterval: ReturnType; hasData: boolean; @@ -452,7 +453,7 @@ export function FormulaEditor({ unifiedSearch, dataViews, dateHistogramInterval: baseIntervalRef.current, - dateRange, + timefilter: data.query.timefilter.timefilter, }); } } else { @@ -465,7 +466,7 @@ export function FormulaEditor({ unifiedSearch, dataViews, dateHistogramInterval: baseIntervalRef.current, - dateRange, + timefilter: data.query.timefilter.timefilter, }); } @@ -481,7 +482,7 @@ export function FormulaEditor({ ), }; }, - [indexPattern, visibleOperationsMap, unifiedSearch, dataViews, baseIntervalRef, dateRange] + [indexPattern, visibleOperationsMap, unifiedSearch, dataViews, data.query.timefilter.timefilter] ); const provideSignatureHelp = useCallback( diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.test.ts index 270aa5f2c1bb7..2dfe44f2086ff 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.test.ts @@ -5,11 +5,13 @@ * 2.0. */ +import moment from 'moment'; import { parse } from '@kbn/tinymath'; import { monaco } from '@kbn/monaco'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { tinymathFunctions } from '@kbn/lens-formula-docs'; +import { TimefilterContract } from '@kbn/data-plugin/public'; import { createMockedIndexPattern } from '../../../../mocks'; import { GenericOperationDefinition } from '../..'; import type { OperationMetadata, IndexPatternField } from '../../../../../../types'; @@ -210,8 +212,6 @@ The total number of documents. When you provide a field, the total number of fie }); describe('autocomplete', () => { - const dateRange = { fromDate: '2022-11-01T00:00:00.000Z', toDate: '2022-11-03T00:00:00.000Z' }; - function getSuggestionArgs({ expression, zeroIndexedOffset, @@ -232,7 +232,13 @@ The total number of documents. When you provide a field, the total number of fie operationDefinitionMap, unifiedSearch: unifiedSearchPluginMock.createStartContract(), dataViews: dataViewPluginMocks.createStartContract(), - dateRange, + timefilter: { + getTime: () => ({ from: '2022-11-01T00:00:00.000Z', to: '2022-11-03T00:00:00.000Z' }), + calculateBounds: () => ({ + min: moment('2022-11-01T00:00:00.000Z'), + max: moment('2022-11-03T00:00:00.000Z'), + }), + } as unknown as TimefilterContract, }; } it('should list all valid functions at the top level (fake test)', async () => { diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts index eac9f66c77107..a09bcaa245b17 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts @@ -24,7 +24,8 @@ import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { parseTimeShift } from '@kbn/data-plugin/common'; import { tinymathFunctions } from '@kbn/lens-formula-docs'; import moment from 'moment'; -import { nonNullable } from '../../../../../../utils'; +import { TimefilterContract } from '@kbn/data-plugin/public'; +import { getAbsoluteDateRange, nonNullable } from '../../../../../../utils'; import { DateRange } from '../../../../../../../common/types'; import type { IndexPattern } from '../../../../../../types'; import { memoizedGetAvailableOperationsByMetadata } from '../../../operations'; @@ -150,7 +151,7 @@ export async function suggest({ dataViews, unifiedSearch, dateHistogramInterval, - dateRange, + timefilter, }: { expression: string; zeroIndexedOffset: number; @@ -160,7 +161,7 @@ export async function suggest({ unifiedSearch: UnifiedSearchPublicPluginStart; dataViews: DataViewsPublicPluginStart; dateHistogramInterval?: number; - dateRange: DateRange; + timefilter: TimefilterContract; }): Promise { const text = expression.substr(0, zeroIndexedOffset) + MARKER + expression.substr(zeroIndexedOffset); @@ -170,6 +171,8 @@ export async function suggest({ const tokenInfo = getInfoAtZeroIndexedPosition(ast, zeroIndexedOffset); const tokenAst = tokenInfo?.ast; + const dateRange = getAbsoluteDateRange(timefilter); + const isNamedArgument = tokenInfo?.parent && typeof tokenAst !== 'number' && diff --git a/x-pack/plugins/lens/public/datasources/form_based/to_expression.ts b/x-pack/plugins/lens/public/datasources/form_based/to_expression.ts index feba325e5dfcf..743efc9cb8db7 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/to_expression.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/to_expression.ts @@ -22,6 +22,7 @@ import { ExpressionAstExpressionBuilder, ExpressionAstFunction, } from '@kbn/expressions-plugin/public'; +import { convertToAbsoluteDateRange } from '../../utils'; import type { DateRange } from '../../../common/types'; import { GenericIndexPatternColumn } from './form_based'; import { operationDefinitionMap } from './operations'; @@ -162,6 +163,8 @@ function getExpressionForLayer( const orderedColumnIds = esAggEntries.map(([colId]) => colId); let esAggsIdMap: Record = {}; + + const absDateRange = convertToAbsoluteDateRange(dateRange, nowInstant); const aggExpressionToEsAggsIdMap: Map = new Map(); esAggEntries.forEach(([colId, col], index) => { const def = operationDefinitionMap[col.operationType]; @@ -179,7 +182,7 @@ function getExpressionForLayer( ...col, timeShift: resolveTimeShift( col.timeShift, - dateRange, + absDateRange, histogramBarsTarget, hasDateHistogram ), @@ -207,7 +210,7 @@ function getExpressionForLayer( timeWindow: wrapInTimeFilter ? col.reducedTimeRange : undefined, timeShift: resolveTimeShift( col.timeShift, - dateRange, + absDateRange, histogramBarsTarget, hasDateHistogram ), @@ -216,7 +219,7 @@ function getExpressionForLayer( customMetric: buildExpression({ type: 'expression', chain: [aggAst] }), timeShift: resolveTimeShift( col.timeShift, - dateRange, + absDateRange, histogramBarsTarget, hasDateHistogram ), diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx index 5835c33c8d54a..679de93b8ae1b 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx @@ -392,6 +392,7 @@ describe('ConfigPanel', () => { a: expect.anything(), }, dateRange: expect.anything(), + absDateRange: expect.anything(), filters: [], now: expect.anything(), query: undefined, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx index 45b11b1c7724b..e0736b149fcbb 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx @@ -9,6 +9,7 @@ import React, { useCallback, useRef } from 'react'; import { CoreStart } from '@kbn/core/public'; import { ReactExpressionRendererType } from '@kbn/expressions-plugin/public'; import { type DragDropAction, DragDropIdentifier, RootDragDropProvider } from '@kbn/dom-drag-drop'; +import { getAbsoluteDateRange } from '../../utils'; import { trackUiCounterEvents } from '../../lens_ui_telemetry'; import { DatasourceMap, @@ -68,6 +69,10 @@ export function EditorFrame(props: EditorFrameProps) { selectFramePublicAPI(state, datasourceMap) ); + framePublicAPI.absDateRange = getAbsoluteDateRange( + props.plugins.data.query.timefilter.timefilter + ); + // Using a ref to prevent rerenders in the child components while keeping the latest state const getSuggestionForField = useRef<(field: DragDropIdentifier) => Suggestion | undefined>(); getSuggestionForField.current = (field: DragDropIdentifier) => { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx index c659d726f7b8a..c574d575bd5d9 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx @@ -772,6 +772,7 @@ export const VisualizationWrapper = ({ className="lnsExpressionRenderer__component" padding={displayOptions?.noPadding ? undefined : 'm'} expression={expression!} + allowCache={true} searchContext={searchContext} searchSessionId={searchSessionId} onEvent={onEvent} diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index 3206947c2a9b7..daf1d078894e9 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -663,6 +663,10 @@ export class Embeddable fromDate: mergedSearchContext.timeRange?.from ?? '', toDate: mergedSearchContext.timeRange?.to ?? '', }, + absDateRange: { + fromDate: mergedSearchContext.timeRange?.from ?? '', + toDate: mergedSearchContext.timeRange?.to ?? '', + }, activeData: this.activeData, }; diff --git a/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx b/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx index a8477a549d3ca..d16df5bf9d1e8 100644 --- a/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx +++ b/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx @@ -80,6 +80,7 @@ export function ExpressionWrapper({ className="lnsExpressionRenderer__component" padding={noPadding ? undefined : 's'} variables={variables} + allowCache={true} expression={expression} interactive={interactive} searchContext={searchContext} diff --git a/x-pack/plugins/lens/public/mocks/index.ts b/x-pack/plugins/lens/public/mocks/index.ts index f8bf55e3c2e8f..91da76b4acee6 100644 --- a/x-pack/plugins/lens/public/mocks/index.ts +++ b/x-pack/plugins/lens/public/mocks/index.ts @@ -37,6 +37,10 @@ export type FrameMock = jest.Mocked; export const createMockFramePublicAPI = (overrides: Partial = {}): FrameMock => ({ datasourceLayers: {}, dateRange: { + fromDate: 'now-1d', + toDate: 'now', + }, + absDateRange: { fromDate: '2022-03-17T08:25:00.000Z', toDate: '2022-04-17T08:25:00.000Z', }, diff --git a/x-pack/plugins/lens/public/mocks/store_mocks.tsx b/x-pack/plugins/lens/public/mocks/store_mocks.tsx index 354b6cbac53c5..c1c3ada4ddf1c 100644 --- a/x-pack/plugins/lens/public/mocks/store_mocks.tsx +++ b/x-pack/plugins/lens/public/mocks/store_mocks.tsx @@ -46,7 +46,7 @@ export const defaultState = { searchSessionId: 'sessionId-1', filters: [], query: { language: 'lucene', query: '' }, - resolvedDateRange: { fromDate: '2021-01-10T04:00:00.000Z', toDate: '2021-01-10T08:00:00.000Z' }, + resolvedDateRange: { fromDate: 'now-7d', toDate: 'now' }, isFullscreenDatasource: false, isSaveable: false, isLoading: false, diff --git a/x-pack/plugins/lens/public/state_management/__snapshots__/load_initial.test.tsx.snap b/x-pack/plugins/lens/public/state_management/__snapshots__/load_initial.test.tsx.snap index 68d4e7d57e983..a1ae0da676803 100644 --- a/x-pack/plugins/lens/public/state_management/__snapshots__/load_initial.test.tsx.snap +++ b/x-pack/plugins/lens/public/state_management/__snapshots__/load_initial.test.tsx.snap @@ -90,8 +90,8 @@ Object { "query": "", }, "resolvedDateRange": Object { - "fromDate": "2021-01-10T04:00:00.000Z", - "toDate": "2021-01-10T08:00:00.000Z", + "fromDate": "now-7d", + "toDate": "now", }, "searchSessionId": "sessionId-1", "sharingSavedObjectProps": Object { diff --git a/x-pack/plugins/lens/public/state_management/context_middleware/index.test.ts b/x-pack/plugins/lens/public/state_management/context_middleware/index.test.ts index 24254f4469f54..65a80bb539bf5 100644 --- a/x-pack/plugins/lens/public/state_management/context_middleware/index.test.ts +++ b/x-pack/plugins/lens/public/state_management/context_middleware/index.test.ts @@ -69,8 +69,8 @@ describe('contextMiddleware', () => { expect(store.dispatch).toHaveBeenCalledWith({ payload: { resolvedDateRange: { - fromDate: '2021-01-10T04:00:00.000Z', - toDate: '2021-01-10T08:00:00.000Z', + fromDate: 'now-2m', + toDate: 'now', }, searchSessionId: 'sessionId-1', }, diff --git a/x-pack/plugins/lens/public/state_management/selectors.ts b/x-pack/plugins/lens/public/state_management/selectors.ts index 58c7d981dcb41..2187302ae02e4 100644 --- a/x-pack/plugins/lens/public/state_management/selectors.ts +++ b/x-pack/plugins/lens/public/state_management/selectors.ts @@ -237,6 +237,7 @@ export const selectFramePublicAPI = createSelector( activeData, dataViews, ...context, + absDateRange: context.dateRange, }; } ); diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index 9175dce78ec17..9fab715a08d82 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -955,6 +955,7 @@ export interface FramePublicAPI { filters: Filter[]; datasourceLayers: DatasourceLayers; dateRange: DateRange; + absDateRange: DateRange; /** * Data of the chart currently rendered in the preview. * This data might be not available (e.g. if the chart can't be rendered) or outdated and belonging to another chart. diff --git a/x-pack/plugins/lens/public/utils.ts b/x-pack/plugins/lens/public/utils.ts index d16dacada6fe1..83d0b841d0b2a 100644 --- a/x-pack/plugins/lens/public/utils.ts +++ b/x-pack/plugins/lens/public/utils.ts @@ -18,6 +18,8 @@ import { emptyTitleText } from '@kbn/visualization-ui-components'; import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { ISearchStart } from '@kbn/data-plugin/public'; import type { DraggingIdentifier, DropType } from '@kbn/dom-drag-drop'; +import { getAbsoluteTimeRange } from '@kbn/data-plugin/common'; +import { DateRange } from '../common/types'; import type { Document } from './persistence/saved_object_store'; import { Datasource, @@ -46,6 +48,11 @@ export function getVisualizeGeoFieldMessage(fieldType: string) { } export const getResolvedDateRange = function (timefilter: TimefilterContract) { + const { from, to } = timefilter.getTime(); + return { fromDate: from, toDate: to }; +}; + +export const getAbsoluteDateRange = function (timefilter: TimefilterContract) { const { from, to } = timefilter.getTime(); const { min, max } = timefilter.calculateBounds({ from, @@ -54,6 +61,21 @@ export const getResolvedDateRange = function (timefilter: TimefilterContract) { return { fromDate: min?.toISOString() || from, toDate: max?.toISOString() || to }; }; +export const convertToAbsoluteDateRange = function (dateRange: DateRange, now: Date) { + const absRange = getAbsoluteTimeRange( + { + from: dateRange.fromDate as string, + to: dateRange.toDate as string, + }, + { forceNow: now } + ); + + return { + fromDate: absRange.from, + toDate: absRange.to, + }; +}; + export function containsDynamicMath(dateMathString: string) { return dateMathString.includes('now'); } diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.test.ts b/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.test.ts index d953814621aad..f6a601c06a163 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.test.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.test.ts @@ -16,7 +16,10 @@ describe('annotations helpers', () => { getStaticDate( [], createMockFramePublicAPI({ - dateRange: { fromDate: '2022-02-01T00:00:00.000Z', toDate: '2022-04-20T00:00:00.000Z' }, + absDateRange: { + fromDate: '2022-02-01T00:00:00.000Z', + toDate: '2022-04-20T00:00:00.000Z', + }, }) ) ).toBe('2022-03-12T00:00:00.000Z'); @@ -34,7 +37,10 @@ describe('annotations helpers', () => { }, ], createMockFramePublicAPI({ - dateRange: { fromDate: '2022-02-01T00:00:00.000Z', toDate: '2022-04-20T00:00:00.000Z' }, + absDateRange: { + fromDate: '2022-02-01T00:00:00.000Z', + toDate: '2022-04-20T00:00:00.000Z', + }, }) ) ).toBe('2022-03-12T00:00:00.000Z'); @@ -76,7 +82,10 @@ describe('annotations helpers', () => { }, ], createMockFramePublicAPI({ - dateRange: { fromDate: '2022-02-01T00:00:00.000Z', toDate: '2022-04-20T00:00:00.000Z' }, + absDateRange: { + fromDate: '2022-02-01T00:00:00.000Z', + toDate: '2022-04-20T00:00:00.000Z', + }, activeData, }) ) @@ -119,7 +128,10 @@ describe('annotations helpers', () => { }, ], createMockFramePublicAPI({ - dateRange: { fromDate: '2022-02-01T00:00:00.000Z', toDate: '2022-04-20T00:00:00.000Z' }, + absDateRange: { + fromDate: '2022-02-01T00:00:00.000Z', + toDate: '2022-04-20T00:00:00.000Z', + }, activeData, }) ) @@ -174,7 +186,10 @@ describe('annotations helpers', () => { }, ], createMockFramePublicAPI({ - dateRange: { fromDate: '2022-02-01T00:00:00.000Z', toDate: '2022-04-20T00:00:00.000Z' }, + absDateRange: { + fromDate: '2022-02-01T00:00:00.000Z', + toDate: '2022-04-20T00:00:00.000Z', + }, activeData, }) ) @@ -263,7 +278,10 @@ describe('annotations helpers', () => { createMockFramePublicAPI({ activeData, - dateRange: { fromDate: '2020-02-01T00:00:00.000Z', toDate: '2022-09-20T00:00:00.000Z' }, + absDateRange: { + fromDate: '2020-02-01T00:00:00.000Z', + toDate: '2022-09-20T00:00:00.000Z', + }, }) ) ).toBe('2020-08-24T12:06:40.000Z'); diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx index 0c821775dff20..7914bf81a717a 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx @@ -45,10 +45,10 @@ export const defaultRangeAnnotationLabel = i18n.translate( export function getStaticDate(dataLayers: XYDataLayerConfig[], frame: FramePublicAPI) { const dataLayersId = dataLayers.map(({ layerId }) => layerId); - const { activeData, dateRange } = frame; + const { activeData, absDateRange } = frame; - const dateRangeMinValue = moment(dateRange.fromDate).valueOf(); - const dateRangeMaxValue = moment(dateRange.toDate).valueOf(); + const dateRangeMinValue = moment(absDateRange.fromDate).valueOf(); + const dateRangeMaxValue = moment(absDateRange.toDate).valueOf(); const fallbackValue = moment((dateRangeMinValue + dateRangeMaxValue) / 2).toISOString(); if ( diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx index 4967dd7877dad..750b493ea4b69 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx @@ -846,6 +846,7 @@ describe('xy_visualization', () => { }, }, dateRange: { fromDate: '2022-04-10T00:00:00.000Z', toDate: '2022-04-20T00:00:00.000Z' }, + absDateRange: { fromDate: '2022-04-10T00:00:00.000Z', toDate: '2022-04-20T00:00:00.000Z' }, }; }); diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx index db4d43d01b963..a53b38dc38e33 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx @@ -111,12 +111,12 @@ export const AnnotationsPanel = ( const getEndTimestamp = ( datatableUtilities: DatatableUtilitiesService, startTime: string, - { activeData, dateRange }: FramePublicAPI, + { activeData, absDateRange }: FramePublicAPI, dataLayers: XYDataLayerConfig[] ) => { const startTimeNumber = moment(startTime).valueOf(); const dateRangeFraction = - (moment(dateRange.toDate).valueOf() - moment(dateRange.fromDate).valueOf()) * 0.1; + (moment(absDateRange.toDate).valueOf() - moment(absDateRange.fromDate).valueOf()) * 0.1; const fallbackValue = moment(startTimeNumber + dateRangeFraction).toISOString(); const dataLayersId = dataLayers.map(({ layerId }) => layerId); if ( diff --git a/x-pack/plugins/maps/public/trigger_actions/filter_by_map_extent/action.ts b/x-pack/plugins/maps/public/trigger_actions/filter_by_map_extent/action.ts index a368dc65b26fe..f0a55a20229cb 100644 --- a/x-pack/plugins/maps/public/trigger_actions/filter_by_map_extent/action.ts +++ b/x-pack/plugins/maps/public/trigger_actions/filter_by_map_extent/action.ts @@ -6,7 +6,12 @@ */ import { i18n } from '@kbn/i18n'; -import { type EmbeddableApiContext, apiHasType, apiIsOfType } from '@kbn/presentation-publishing'; +import { + type EmbeddableApiContext, + apiHasType, + apiIsOfType, + areTriggersDisabled, +} from '@kbn/presentation-publishing'; import { createAction } from '@kbn/ui-actions-plugin/public'; import { apiHasVisualizeConfig } from '@kbn/visualizations-plugin/public'; import { type FilterByMapExtentActionApi } from './types'; @@ -53,7 +58,7 @@ export const filterByMapExtentAction = createAction({ return 'filter'; }, isCompatible: async ({ embeddable }: EmbeddableApiContext) => { - if (!isApiCompatible(embeddable) || embeddable.disableTriggers) return false; + if (!isApiCompatible(embeddable) || areTriggersDisabled(embeddable)) return false; return ( apiIsOfType(embeddable, MAP_SAVED_OBJECT_TYPE) || (apiHasVisualizeConfig(embeddable) && isLegacyMapApi(embeddable)) diff --git a/x-pack/plugins/ml/public/application/components/help_popover/help_popover.tsx b/x-pack/plugins/ml/public/application/components/help_popover/help_popover.tsx index aa7bf496b1051..eccfe901d3c3b 100644 --- a/x-pack/plugins/ml/public/application/components/help_popover/help_popover.tsx +++ b/x-pack/plugins/ml/public/application/components/help_popover/help_popover.tsx @@ -51,7 +51,7 @@ export const HelpPopover: FC> = ({ > {title && {title}} - + {children} diff --git a/x-pack/plugins/ml/public/cases/anomaly_swim_lane_attachment.tsx b/x-pack/plugins/ml/public/cases/anomaly_swim_lane_attachment.tsx index 5a0429725eb79..08406d4acc44f 100644 --- a/x-pack/plugins/ml/public/cases/anomaly_swim_lane_attachment.tsx +++ b/x-pack/plugins/ml/public/cases/anomaly_swim_lane_attachment.tsx @@ -86,16 +86,16 @@ export const initComponent = memoize((fieldFormats: FieldFormatsStart) => { maybeId={inputProps.id} type={CASE_ATTACHMENT_TYPE_ID_ANOMALY_SWIMLANE} - state={{ - rawState: inputProps, - }} - parentApi={{ + getParentApi={() => ({ + getSerializedStateForChild: () => ({ + rawState: inputProps, + }), executionContext: { type: 'cases', description: caseData.title, id: caseData.id, }, - }} + })} /> ); diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx index 65e09e1ef0669..4765950b341f9 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx @@ -100,16 +100,14 @@ describe('getAnomalySwimLaneEmbeddableFactory', () => { maybeId={'maybe_id'} type={ANOMALY_SWIMLANE_EMBEDDABLE_TYPE} - state={{ - rawState, - }} onApiAvailable={onApiAvailable} - parentApi={{ + getParentApi={() => ({ + getSerializedStateForChild: () => ({ rawState }), executionContext: { type: 'dashboard', id: 'dashboard-id', }, - }} + })} /> ); diff --git a/x-pack/plugins/ml/public/shared_components/anomaly_swim_lane.tsx b/x-pack/plugins/ml/public/shared_components/anomaly_swim_lane.tsx index 18594d02c3cb3..b7748a753cc5c 100644 --- a/x-pack/plugins/ml/public/shared_components/anomaly_swim_lane.tsx +++ b/x-pack/plugins/ml/public/shared_components/anomaly_swim_lane.tsx @@ -9,6 +9,7 @@ import type { KibanaExecutionContext } from '@kbn/core/public'; import { ReactEmbeddableRenderer } from '@kbn/embeddable-plugin/public'; import type { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; import type { PublishesWritableUnifiedSearch } from '@kbn/presentation-publishing'; +import type { HasSerializedChildState } from '@kbn/presentation-containers'; import React, { useEffect, useMemo, useRef, type FC } from 'react'; import { BehaviorSubject } from 'rxjs'; import type { @@ -72,13 +73,16 @@ export const AnomalySwimLane: FC = ({ ); const parentApi = useMemo< - PublishesWritableUnifiedSearch & { executionContext: KibanaExecutionContext } + PublishesWritableUnifiedSearch & { + executionContext: KibanaExecutionContext; + } & HasSerializedChildState >(() => { const filters$ = new BehaviorSubject(filters); const query$ = new BehaviorSubject(query); const timeRange$ = new BehaviorSubject(timeRange); return { + getSerializedStateForChild: () => ({ rawState }), filters$, setFilters: (newFilters) => { filters$.next(newFilters); @@ -115,10 +119,7 @@ export const AnomalySwimLane: FC = ({ maybeId={id} type={ANOMALY_SWIMLANE_EMBEDDABLE_TYPE} - state={{ - rawState, - }} - parentApi={parentApi} + getParentApi={() => parentApi} onApiAvailable={(api) => { embeddableApi.current = api; }} diff --git a/x-pack/plugins/observability_solution/apm/common/service_groups.ts b/x-pack/plugins/observability_solution/apm/common/service_groups.ts index b93ecffc2ab5b..035aa06c83d32 100644 --- a/x-pack/plugins/observability_solution/apm/common/service_groups.ts +++ b/x-pack/plugins/observability_solution/apm/common/service_groups.ts @@ -5,9 +5,8 @@ * 2.0. */ -import { fromKueryExpression } from '@kbn/es-query'; +import { getKqlFieldNamesFromExpression } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; -import { getKueryFields } from './utils/get_kuery_fields'; import { AGENT_NAME, SERVICE_NAME, @@ -51,7 +50,7 @@ export function validateServiceGroupKuery(kuery: string): { message?: string; } { try { - const kueryFields = getKueryFields([fromKueryExpression(kuery)]); + const kueryFields = getKqlFieldNamesFromExpression(kuery); const unsupportedKueryFields = kueryFields.filter((fieldName) => !isSupportedField(fieldName)); if (unsupportedKueryFields.length === 0) { return { isValidFields: true, isValidSyntax: true }; diff --git a/x-pack/plugins/observability_solution/apm/common/utils/get_kuery_fields.test.ts b/x-pack/plugins/observability_solution/apm/common/utils/get_kuery_fields.test.ts deleted file mode 100644 index e8620c9580adf..0000000000000 --- a/x-pack/plugins/observability_solution/apm/common/utils/get_kuery_fields.test.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ -import { getKueryFields } from './get_kuery_fields'; -import { fromKueryExpression } from '@kbn/es-query'; - -describe('get kuery fields', () => { - it('returns single kuery field', () => { - const kuery = 'service.name: my-service'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual(['service.name']); - }); - - it('returns kuery fields with wildcard', () => { - const kuery = 'service.name: *'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual(['service.name']); - }); - - it('returns multiple fields used AND operator', () => { - const kuery = 'service.name: my-service AND service.environment: production'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual(['service.name', 'service.environment']); - }); - - it('returns multiple kuery fields with OR operator', () => { - const kuery = 'network.carrier.mcc: test or child.id: 33'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual(['network.carrier.mcc', 'child.id']); - }); - - it('returns multiple kuery fields with wildcard', () => { - const kuery = 'network.carrier.mcc:* or child.id: *'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual(['network.carrier.mcc', 'child.id']); - }); - - it('returns single kuery fields with gt operator', () => { - const kuery = 'transaction.duration.aggregate > 10'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual(['transaction.duration.aggregate']); - }); - - it('returns dublicate fields', () => { - const kueries = ['service.name: my-service', 'service.name: my-service and trace.id: trace']; - - const kueryNodes = kueries.map((kuery) => fromKueryExpression(kuery)); - expect(getKueryFields(kueryNodes)).toEqual(['service.name', 'service.name', 'trace.id']); - }); - - it('returns multiple fields with multiple logical operators', () => { - const kuery = - '(service.name:opbeans-* OR service.name:kibana) and (service.environment:production)'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual([ - 'service.name', - 'service.name', - 'service.environment', - ]); - }); - - it('do not return if kuery field is null', () => { - const kuery = 'opbean'; - const kueryNode = fromKueryExpression(kuery); - expect(getKueryFields([kueryNode])).toEqual([]); - }); -}); diff --git a/x-pack/plugins/observability_solution/apm/common/utils/get_kuery_fields.ts b/x-pack/plugins/observability_solution/apm/common/utils/get_kuery_fields.ts deleted file mode 100644 index 0318e5bf0fe20..0000000000000 --- a/x-pack/plugins/observability_solution/apm/common/utils/get_kuery_fields.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -import { KueryNode } from '@kbn/es-query'; -import { compact } from 'lodash'; - -export function getKueryFields(nodes: KueryNode[]): string[] { - const allFields = nodes - .map((node) => { - const { - arguments: [fieldNameArg], - } = node; - - if (fieldNameArg.type === 'function') { - return getKueryFields(node.arguments); - } - - return fieldNameArg.value; - }) - .flat(); - - return compact(allFields); -} diff --git a/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx b/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx index fae281c05b908..02273f0f43141 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx @@ -6,12 +6,25 @@ */ /* Error Rate */ -import { EuiFlexItem, EuiPanel, EuiFlexGroup, EuiTitle, EuiIconTip } from '@elastic/eui'; +import React from 'react'; +import chroma from 'chroma-js'; +import { + EuiFlexItem, + EuiPanel, + EuiFlexGroup, + EuiTitle, + EuiIconTip, + RecursivePartial, + useEuiTheme, + transparentize, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { BoolQuery } from '@kbn/es-query'; -import React from 'react'; -import { RecursivePartial } from '@elastic/eui'; +import { UI_SETTINGS } from '@kbn/data-plugin/public'; import { Theme } from '@elastic/charts'; +import { AlertActiveTimeRangeAnnotation, AlertAnnotation } from '@kbn/observability-alert-details'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { DEFAULT_DATE_FORMAT } from './constants'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { ChartType } from '../../../shared/charts/helper/get_timeseries_color'; import * as get_timeseries_color from '../../../shared/charts/helper/get_timeseries_color'; @@ -22,6 +35,7 @@ import { yLabelFormat } from './helpers'; import { usePreferredDataSourceAndBucketSize } from '../../../../hooks/use_preferred_data_source_and_bucket_size'; import { ApmDocumentType } from '../../../../../common/document_type'; import { TransactionTypeSelect } from './transaction_type_select'; +import { ViewInAPMButton } from './view_in_apm_button'; type ErrorRate = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/error_rate'>; @@ -50,6 +64,8 @@ function FailedTransactionChart({ timeZone, kuery = '', filters, + alertStart, + alertEnd, }: { transactionType: string; transactionTypes?: string[]; @@ -63,7 +79,13 @@ function FailedTransactionChart({ timeZone: string; kuery?: string; filters?: BoolQuery; + alertStart?: number; + alertEnd?: number; }) { + const { euiTheme } = useEuiTheme(); + const { + services: { uiSettings }, + } = useKibana(); const { currentPeriodColor: currentPeriodColorErrorRate } = get_timeseries_color.getTimeSeriesColor(ChartType.FAILED_TRANSACTION_RATE); @@ -127,6 +149,28 @@ function FailedTransactionChart({ }, ]; const showTransactionTypeSelect = setTransactionType && transactionTypes; + const getFailedTransactionChartAdditionalData = () => { + if (alertStart) { + return [ + , + , + ]; + } + }; return ( @@ -153,12 +197,28 @@ function FailedTransactionChart({ /> )} + + + + + + + )} + + + + + + + )} + + + + + + + + serviceNavigator.navigate({ + serviceName, + serviceOverviewTab: transactionName ? 'transactions' : undefined, + query: { + environment, + rangeFrom: from, + rangeTo: to, + kuery, + transactionName, + transactionType, + }, + }) + } + iconType="sortRight" + color="text" + > + + + ); +} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/unified_search_bar/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/unified_search_bar/index.tsx index a1b5b7b7557a1..4e86f331e520f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/unified_search_bar/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/unified_search_bar/index.tsx @@ -6,7 +6,14 @@ */ import React, { useCallback, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { Filter, fromKueryExpression, Query, TimeRange, toElasticsearchQuery } from '@kbn/es-query'; +import { + Filter, + fromKueryExpression, + getKqlFieldNamesFromExpression, + Query, + TimeRange, + toElasticsearchQuery, +} from '@kbn/es-query'; import { useHistory, useLocation } from 'react-router-dom'; import deepEqual from 'fast-deep-equal'; import { useKibana } from '@kbn/kibana-react-plugin/public'; @@ -27,7 +34,6 @@ import { useLegacyUrlParams } from '../../../context/url_params_context/use_url_ import { clearCache } from '../../../services/rest/call_api'; import { useTimeRangeId } from '../../../context/time_range_id/use_time_range_id'; import { toBoolean, toNumber } from '../../../context/url_params_context/helpers'; -import { getKueryFields } from '../../../../common/utils/get_kuery_fields'; import { SearchQueryActions } from '../../../services/telemetry'; export const DEFAULT_REFRESH_INTERVAL = 60000; @@ -228,7 +234,7 @@ export function UnifiedSearchBar({ if (!res) { return; } - const kueryFields = getKueryFields([fromKueryExpression(query?.query as string)]); + const kueryFields = getKqlFieldNamesFromExpression(query?.query as string); const existingQueryParams = toQuery(location.search); const updatedQueryWithTime = { diff --git a/x-pack/plugins/observability_solution/apm/public/embeddable/alerting/alerting_failed_transactions_chart/chart.tsx b/x-pack/plugins/observability_solution/apm/public/embeddable/alerting/alerting_failed_transactions_chart/chart.tsx index c0c92f46f9603..6dbb8fcc3a446 100644 --- a/x-pack/plugins/observability_solution/apm/public/embeddable/alerting/alerting_failed_transactions_chart/chart.tsx +++ b/x-pack/plugins/observability_solution/apm/public/embeddable/alerting/alerting_failed_transactions_chart/chart.tsx @@ -6,6 +6,8 @@ */ import React from 'react'; +import moment from 'moment'; +import { ALERT_END } from '@kbn/rule-data-utils'; import FailedTransactionChart from '../../../components/alerting/ui_components/alert_details_app_section/failed_transaction_chart'; import { useAlertingProps } from '../use_alerting_props'; import { TimeRangeCallout } from '../time_range_callout'; @@ -15,6 +17,7 @@ import type { EmbeddableApmAlertingVizProps } from '../types'; export function APMAlertingFailedTransactionsChart({ rule, + alert, serviceName, environment = ENVIRONMENT_ALL.value, rangeFrom = 'now-15m', @@ -24,6 +27,7 @@ export function APMAlertingFailedTransactionsChart({ kuery = '', filters, }: EmbeddableApmAlertingVizProps) { + const alertEnd = alert.fields[ALERT_END] ? moment(alert.fields[ALERT_END]).valueOf() : undefined; const { transactionType: currentTransactionType, transactionTypes, @@ -61,6 +65,8 @@ export function APMAlertingFailedTransactionsChart({ timeZone={timeZone} kuery={kuery} filters={filters} + alertStart={alert.start} + alertEnd={alertEnd} /> ); } diff --git a/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts b/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts index 61ac0b75c50fb..69c041a00374c 100644 --- a/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts +++ b/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts @@ -33,7 +33,10 @@ export const APMLocatorPayloadValidator = t.union([ }), }), t.type({ - query: environmentRt, + query: t.intersection([ + environmentRt, + t.partial({ kuery: t.string, rangeFrom: t.string, rangeTo: t.string }), + ]), }), ]), ]); diff --git a/x-pack/plugins/observability_solution/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts b/x-pack/plugins/observability_solution/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts index 7bf03245d039e..13dddf6c33bdc 100644 --- a/x-pack/plugins/observability_solution/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts +++ b/x-pack/plugins/observability_solution/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts @@ -5,7 +5,7 @@ * 2.0. */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { fromKueryExpression } from '@kbn/es-query'; +import { getKqlFieldNamesFromExpression } from '@kbn/es-query'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { createHash } from 'crypto'; import { flatten, merge, pickBy, sortBy, sum, uniq } from 'lodash'; @@ -54,7 +54,6 @@ import { SavedServiceGroup, } from '../../../../common/service_groups'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; -import { getKueryFields } from '../../../../common/utils/get_kuery_fields'; import { APMError } from '../../../../typings/es_schemas/ui/apm_error'; import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import { Span } from '../../../../typings/es_schemas/ui/span'; @@ -1409,11 +1408,10 @@ export const tasks: TelemetryTask[] = [ namespaces: ['*'], }); - const kueryNodes = response.saved_objects.map(({ attributes: { kuery } }) => - fromKueryExpression(kuery) - ); - - const kueryFields = getKueryFields(kueryNodes); + const kueryExpressions = response.saved_objects.map(({ attributes: { kuery } }) => kuery); + const kueryFields = kueryExpressions + .map(getKqlFieldNamesFromExpression) + .reduce((a, b) => a.concat(b), []); return { service_groups: { @@ -1435,11 +1433,12 @@ export const tasks: TelemetryTask[] = [ namespaces: ['*'], }); - const kueryNodes = response.saved_objects.map(({ attributes: { kuery } }) => - fromKueryExpression(kuery ?? '') + const kueryExpressions = response.saved_objects.map( + ({ attributes: { kuery } }) => kuery ?? '' ); - - const kueryFields = getKueryFields(kueryNodes); + const kueryFields = kueryExpressions + .map(getKqlFieldNamesFromExpression) + .reduce((a, b) => a.concat(b), []); return { custom_dashboards: { diff --git a/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx b/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx index 1383e1c49915e..c7f4b9f497a52 100644 --- a/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx +++ b/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx @@ -90,6 +90,13 @@ const dashboardsTab: Tab = { ), }; +const linkToApmTab: Tab = { + id: ContentTabIds.LINK_TO_APM, + name: i18n.translate('xpack.infra.assetDetails.tabs.linkToApm', { + defaultMessage: 'APM', + }), +}; + export const hostDetailsTabs: Tab[] = [ overviewTab, metadataTab, @@ -101,8 +108,11 @@ export const hostDetailsTabs: Tab[] = [ osqueryTab, dashboardsTab, ]; +export const hostDetailsFlyoutTabs: Tab[] = [...hostDetailsTabs, linkToApmTab]; + // Profiling and Logs tab would be added in next iteration export const containerDetailsTabs: Tab[] = [overviewTab, metadataTab]; +export const containerDetailsFlyoutTabs: Tab[] = [overviewTab, metadataTab, linkToApmTab]; export const getAssetDetailsTabs = (type: string): Tab[] => { switch (type) { @@ -114,3 +124,14 @@ export const getAssetDetailsTabs = (type: string): Tab[] => { return []; } }; + +export const getAssetDetailsFlyoutTabs = (type: string): Tab[] => { + switch (type) { + case 'host': + return hostDetailsFlyoutTabs; + case 'container': + return containerDetailsFlyoutTabs; + default: + return []; + } +}; diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/__stories__/decorator.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/__stories__/decorator.tsx index 5d75389d8d8c8..7a7f93a7c57f5 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/__stories__/decorator.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/__stories__/decorator.tsx @@ -152,6 +152,7 @@ export const DecorateWithKibanaContext: DecoratorFn = (story) => { telemetry: { reportAssetDetailsFlyoutViewed: () => {}, reportAssetDetailsPageViewed: () => {}, + reportAssetDashboardLoaded: () => {}, }, }; diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/constants.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/constants.ts index 81a82ecb30875..49a174ba22c1c 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/constants.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/constants.ts @@ -5,12 +5,18 @@ * 2.0. */ -import { INTEGRATION_NAME } from './types'; +import { INTEGRATION_NAME, ASSET_DETAILS_ASSET_TYPE } from './types'; export const ASSET_DETAILS_FLYOUT_COMPONENT_NAME = 'infraAssetDetailsFlyout'; export const ASSET_DETAILS_PAGE_COMPONENT_NAME = 'infraAssetDetailsPage'; export const APM_HOST_FILTER_FIELD = 'host.hostname'; +export const APM_CONTAINER_FILTER_FIELD = 'container.id'; + +export const APM_FILTER_FIELD_PER_ASSET_TYPE = { + [ASSET_DETAILS_ASSET_TYPE.container]: APM_CONTAINER_FILTER_FIELD, + [ASSET_DETAILS_ASSET_TYPE.host]: APM_HOST_FILTER_FIELD, +}; export const ASSET_DETAILS_URL_STATE_KEY = 'assetDetails'; diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx index 29c048c540a04..be98902ad9c57 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx @@ -22,11 +22,11 @@ import { usePluginConfig } from '../../../containers/plugin_config_context'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { useProfilingIntegrationSetting } from '../../../hooks/use_profiling_integration_setting'; import { CreateAlertRuleButton } from '../../shared/alerts/links/create_alert_rule_button'; -import { APM_HOST_FILTER_FIELD } from '../constants'; import { LinkToNodeDetails } from '../links'; import { ContentTabIds, type LinkOptions, type RouteState, type Tab, type TabIds } from '../types'; import { useAssetDetailsRenderPropsContext } from './use_asset_details_render_props'; import { useTabSwitcherContext } from './use_tab_switcher'; +import { getApmField } from '../utils'; type TabItem = NonNullable['tabs']>[number]; @@ -157,7 +157,7 @@ const useTabs = (tabs: Tab[]) => { app: 'apm', hash: 'traces', search: { - kuery: `${APM_HOST_FILTER_FIELD}:"${asset.name}"`, + kuery: `${getApmField(asset.type)}:"${asset.id}"`, }, }); diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx index c326015bfebf9..e297c2e6a2191 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx @@ -32,6 +32,8 @@ import { } from '@kbn/observability-shared-plugin/public'; import { useLocation } from 'react-router-dom'; import { decode } from '@kbn/rison'; +import { isEqual } from 'lodash'; +import type { AssetDashboardLoadedParams } from '../../../../services/telemetry/types'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { buildAssetIdFilter } from '../../../../utils/filters/build'; import type { @@ -56,17 +58,39 @@ export function Dashboards() { const { asset, renderMode } = useAssetDetailsRenderPropsContext(); const location = useLocation(); const { - services: { share }, + services: { share, telemetry }, } = useKibanaContextForPlugin(); const [dashboard, setDashboard] = useState(); const [customDashboards, setCustomDashboards] = useState([]); const [currentDashboard, setCurrentDashboard] = useState(); + const [trackingEventProperties, setTrackingEventProperties] = useState({}); const { data: allAvailableDashboards, status } = useDashboardFetcher(); const { metrics } = useDataViewsContext(); const [urlState, setUrlState] = useAssetDetailsUrlState(); + const trackOnlyOnceTheSameDashboardFilters = React.useRef(false); const { dashboards, loading, reload } = useFetchCustomDashboards({ assetType: asset.type }); + useEffect(() => { + trackOnlyOnceTheSameDashboardFilters.current = false; + if (currentDashboard) { + const currentEventTrackingProperties: AssetDashboardLoadedParams = { + assetType: asset.type, + state: currentDashboard.dashboardFilterAssetIdEnabled, + filtered_by: currentDashboard.dashboardFilterAssetIdEnabled ? ['assetId'] : [], + }; + if (isEqual(trackingEventProperties, currentEventTrackingProperties)) { + trackOnlyOnceTheSameDashboardFilters.current = true; + return; + } + + setTrackingEventProperties(currentEventTrackingProperties); + if (!trackOnlyOnceTheSameDashboardFilters.current) { + telemetry.reportAssetDashboardLoaded(currentEventTrackingProperties); + } + } + }, [asset.type, currentDashboard, telemetry, trackingEventProperties]); + useEffect(() => { const allAvailableDashboardsMap = new Map(); allAvailableDashboards.forEach((availableDashboard) => { @@ -99,9 +123,11 @@ export function Dashboards() { } }, [ allAvailableDashboards, + asset.type, currentDashboard?.dashboardSavedObjectId, dashboards, setUrlState, + telemetry, urlState?.dashboardId, ]); diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/types.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/types.ts index e51a7b53bda7d..35eea0faab44b 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/types.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/types.ts @@ -102,3 +102,8 @@ export enum INTEGRATION_NAME { kubernetesContainer = 'kubernetesContainer', docker = 'docker', } + +export enum ASSET_DETAILS_ASSET_TYPE { + container = 'container', + host = 'host', +} diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/utils.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/utils.ts index 1838e613e4402..6356b42fdf0bb 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/utils.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/utils.ts @@ -5,8 +5,9 @@ * 2.0. */ +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import type { InfraMetadata } from '../../../common/http_api'; -import { INTEGRATIONS } from './constants'; +import { INTEGRATIONS, APM_FILTER_FIELD_PER_ASSET_TYPE } from './constants'; export const toTimestampRange = ({ from, to }: { from: string; to: string }) => { const fromTs = new Date(from).getTime(); @@ -34,3 +35,14 @@ export const getIntegrationsAvailable = (metadata?: InfraMetadata | null) => { .filter(([_, fields]) => metadata?.features?.some((f) => fields.includes(f.name))) .map(([name]) => name); }; + +export const getApmField = (assetType: InventoryItemType): string => { + switch (assetType) { + case 'host': + return APM_FILTER_FIELD_PER_ASSET_TYPE.host; + case 'container': + return APM_FILTER_FIELD_PER_ASSET_TYPE.container; + default: + return ''; + } +}; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx index 8830324f1ce45..62e2d1de5c935 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { usePerformanceContext } from '@kbn/ebt-tools'; -import React, { useCallback } from 'react'; +import React, { useCallback, useMemo } from 'react'; import { useCurrentEuiBreakpoint } from '@elastic/eui'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; @@ -63,11 +63,20 @@ export const NodesOverview = ({ isAutoReloading, }: Props) => { const currentBreakpoint = useCurrentEuiBreakpoint(); - const [{ detailsItemId }, setFlyoutUrlState] = useAssetDetailsFlyoutState(); + const [{ detailsItemId, assetType }, setFlyoutUrlState] = useAssetDetailsFlyoutState(); const { onPageReady } = usePerformanceContext(); + const nodeName = useMemo( + () => nodes.find((node) => node.path[0].value === detailsItemId)?.name, + [detailsItemId, nodes] + ); + const closeFlyout = useCallback( - () => setFlyoutUrlState({ detailsItemId: null }), + () => + setFlyoutUrlState({ + detailsItemId: null, + assetType: null, + }), [setFlyoutUrlState] ); @@ -149,9 +158,10 @@ export const NodesOverview = ({ bottomMargin={bottomMargin} staticHeight={isStatic} /> - {nodeType === 'host' && detailsItemId && ( + {nodeType === assetType && detailsItemId && ( void; currentTime: number; @@ -24,20 +23,11 @@ interface Props { refreshInterval?: number; } -const flyoutTabs = [ - ...hostDetailsTabs, - { - id: ContentTabIds.LINK_TO_APM, - name: i18n.translate('xpack.infra.assetDetails.tabs.linkToApm', { - defaultMessage: 'APM', - }), - }, -]; - const ONE_HOUR = 60 * 60 * 1000; export const AssetDetailsFlyout = ({ assetName, + assetId, assetType, closeFlyout, currentTime, @@ -62,7 +52,7 @@ export const AssetDetailsFlyout = ({ return source ? ( { - if (nodeType === 'host') { - setFlyoutUrlState({ detailsItemId: node.name }); + if (nodeType === 'host' || showContainerAssetDetailPage) { + setFlyoutUrlState({ detailsItemId: node.id, assetType: nodeType }); } else { togglePopover(); } @@ -71,7 +77,7 @@ export const Node = ({ color={color} nodeName={node.name} value={value} - showBorder={detailsItemId === node.name || isPopoverOpen} + showBorder={detailsItemId === node.id || isPopoverOpen} /> ); diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/hooks/use_asset_details_flyout_url_state.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/hooks/use_asset_details_flyout_url_state.ts index 7847cfc0da268..10279312ed882 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/hooks/use_asset_details_flyout_url_state.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/hooks/use_asset_details_flyout_url_state.ts @@ -13,6 +13,7 @@ import { useUrlState } from '../../../../utils/use_url_state'; export const GET_DEFAULT_PROPERTIES: AssetDetailsFlyoutProperties = { detailsItemId: null, + assetType: null, }; const ASSET_DETAILS_FLYOUT_URL_STATE_KEY = 'assetDetailsFlyout'; @@ -35,6 +36,7 @@ export const useAssetDetailsFlyoutState = (): [ const AssetDetailsFlyoutStateRT = rt.type({ detailsItemId: rt.union([rt.string, rt.null]), + assetType: rt.union([rt.string, rt.null]), }); export type AssetDetailsFlyoutState = rt.TypeOf; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx index f0d7e9d487277..d8df6ef8b39fa 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx @@ -13,6 +13,7 @@ import React from 'react'; import { enableInfrastructureHostsView, enableInfrastructureProfilingIntegration, + enableInfrastructureAssetCustomDashboards, enableInfrastructureContainerAssetView, } from '@kbn/observability-plugin/common'; import { useEditableSettings } from '@kbn/observability-shared-plugin/public'; @@ -76,6 +77,12 @@ export function FeaturesConfigurationPanel({ onFieldChange={handleFieldChange} unsavedChange={unsavedChanges[enableInfrastructureHostsView]} /> + {featureFlags.profilingEnabled && ( => ({ reportAssetDetailsFlyoutViewed: jest.fn(), reportAssetDetailsPageViewed: jest.fn(), reportPerformanceMetricEvent: jest.fn(), + reportAssetDashboardLoaded: jest.fn(), }); diff --git a/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_client.ts b/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_client.ts index 2c8cac426635d..49c606419b702 100644 --- a/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_client.ts +++ b/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_client.ts @@ -8,6 +8,7 @@ import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; import { + AssetDashboardLoadedParams, AssetDetailsFlyoutViewedParams, AssetDetailsPageViewedParams, HostEntryClickedParams, @@ -73,6 +74,10 @@ export class TelemetryClient implements ITelemetryClient { this.analytics.reportEvent(InfraTelemetryEventTypes.ASSET_DETAILS_PAGE_VIEWED, params); }; + public reportAssetDashboardLoaded = (params: AssetDashboardLoadedParams) => { + this.analytics.reportEvent(InfraTelemetryEventTypes.ASSET_DASHBOARD_LOADED, params); + }; + public reportPerformanceMetricEvent = ( eventName: string, duration: number, diff --git a/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_events.ts b/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_events.ts index b83cbfe262e63..39b2389e71a44 100644 --- a/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_events.ts +++ b/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_events.ts @@ -187,6 +187,35 @@ const assetDetailsPageViewed: InfraTelemetryEvent = { }, }; +const assetDashboardLoaded: InfraTelemetryEvent = { + eventType: InfraTelemetryEventTypes.ASSET_DASHBOARD_LOADED, + schema: { + assetType: { + type: 'keyword', + _meta: { + description: 'Asset type for the selected asset.', + optional: false, + }, + }, + state: { + type: 'boolean', + _meta: { + description: 'If the dashboard is filtered or now', + optional: false, + }, + }, + filtered_by: { + type: 'array', + items: { + type: 'text', + _meta: { + description: 'Filters enabled for the dashboard added for an asset', + }, + }, + }, + }, +}; + export const infraTelemetryEvents = [ assetDetailsFlyoutViewed, assetDetailsPageViewed, @@ -195,4 +224,5 @@ export const infraTelemetryEvents = [ hostFlyoutRemoveFilter, hostFlyoutAddFilter, hostViewTotalHostCountRetrieved, + assetDashboardLoaded, ]; diff --git a/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_service.test.ts b/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_service.test.ts index 3fa8a9b447111..5862b20863ad5 100644 --- a/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_service.test.ts +++ b/x-pack/plugins/observability_solution/infra/public/services/telemetry/telemetry_service.test.ts @@ -237,4 +237,28 @@ describe('TelemetryService', () => { ); }); }); + + describe('#reportAssetDashboardLoaded', () => { + it('should report asset details viewed in full page with properties', async () => { + const setupParams = getSetupParams(); + service.setup(setupParams); + const telemetry = service.start(); + + telemetry.reportAssetDashboardLoaded({ + assetType: 'host', + state: true, + filtered_by: ['assetId'], + }); + + expect(setupParams.analytics.reportEvent).toHaveBeenCalledTimes(1); + expect(setupParams.analytics.reportEvent).toHaveBeenCalledWith( + InfraTelemetryEventTypes.ASSET_DASHBOARD_LOADED, + { + assetType: 'host', + state: true, + filtered_by: ['assetId'], + } + ); + }); + }); }); diff --git a/x-pack/plugins/observability_solution/infra/public/services/telemetry/types.ts b/x-pack/plugins/observability_solution/infra/public/services/telemetry/types.ts index 0556b20af0fb4..16bdb5658f740 100644 --- a/x-pack/plugins/observability_solution/infra/public/services/telemetry/types.ts +++ b/x-pack/plugins/observability_solution/infra/public/services/telemetry/types.ts @@ -20,6 +20,7 @@ export enum InfraTelemetryEventTypes { HOST_VIEW_TOTAL_HOST_COUNT_RETRIEVED = 'Host View Total Host Count Retrieved', ASSET_DETAILS_FLYOUT_VIEWED = 'Asset Details Flyout Viewed', ASSET_DETAILS_PAGE_VIEWED = 'Asset Details Page Viewed', + ASSET_DASHBOARD_LOADED = 'Asset Dashboard Loaded', } export interface HostsViewQuerySubmittedParams { @@ -53,13 +54,19 @@ export interface AssetDetailsFlyoutViewedParams { export interface AssetDetailsPageViewedParams extends AssetDetailsFlyoutViewedParams { integrations?: string[]; } +export interface AssetDashboardLoadedParams { + state: boolean; + assetType: string; + filtered_by?: string[]; +} export type InfraTelemetryEventParams = | HostsViewQuerySubmittedParams | HostEntryClickedParams | HostFlyoutFilterActionParams | HostsViewQueryHostsCountRetrievedParams - | AssetDetailsFlyoutViewedParams; + | AssetDetailsFlyoutViewedParams + | AssetDashboardLoadedParams; export interface PerformanceMetricInnerEvents { key1?: string; @@ -80,6 +87,7 @@ export interface ITelemetryClient { innerEvents: PerformanceMetricInnerEvents, meta: Record ): void; + reportAssetDashboardLoaded(params: AssetDashboardLoadedParams): void; } export type InfraTelemetryEvent = @@ -110,4 +118,8 @@ export type InfraTelemetryEvent = | { eventType: InfraTelemetryEventTypes.ASSET_DETAILS_PAGE_VIEWED; schema: RootSchema; + } + | { + eventType: InfraTelemetryEventTypes.ASSET_DASHBOARD_LOADED; + schema: RootSchema; }; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx index 22289706784e7..6f6eb54a333d1 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx @@ -20,6 +20,7 @@ import { ALERT_RULE_NAME, ALERT_RULE_CATEGORY, ALERT_START, + ALERT_RULE_EXECUTION_TIMESTAMP, } from '@kbn/rule-data-utils'; import { isEmpty } from 'lodash'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; @@ -97,6 +98,7 @@ export const getRenderCellValue = ({ return ; case TIMESTAMP: case ALERT_START: + case ALERT_RULE_EXECUTION_TIMESTAMP: return ; case ALERT_DURATION: return asDuration(Number(value)); diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/validation.test.ts b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/validation.test.ts index f1c5bc9576763..d4d68194a8492 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/validation.test.ts +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/validation.test.ts @@ -15,9 +15,7 @@ import { EQUATION_REGEX, validateCustomThreshold } from './validation'; const errorReason = 'this should appear as error reason'; jest.mock('@kbn/es-query', () => { - const actual = jest.requireActual('@kbn/es-query'); return { - ...actual, buildEsQuery: jest.fn(() => { // eslint-disable-next-line no-throw-literal throw { shortMessage: errorReason }; diff --git a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts index 152d4dc00b905..d732e8bcda76f 100644 --- a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts +++ b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts @@ -278,7 +278,7 @@ export const uiSettings: Record = { name: i18n.translate('xpack.observability.enableInfrastructureAssetCustomDashboards', { defaultMessage: 'Custom dashboards for asset details in Infrastructure', }), - value: false, + value: true, description: i18n.translate( 'xpack.observability.enableInfrastructureAssetCustomDashboardsDescription', { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/index.ts index dc8a9d46a7a06..e29aa4c2e1bc9 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/index.ts @@ -41,6 +41,7 @@ export { aiAssistantResponseLanguage, aiAssistantLogsIndexPattern, aiAssistantSimulatedFunctionCalling, + aiAssistantSearchConnectorIndexPattern, } from './ui_settings/settings_keys'; export { concatenateChatCompletionChunks } from './utils/concatenate_chat_completion_chunks'; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/ui_settings/settings_keys.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/ui_settings/settings_keys.ts index a57611079b279..1f6d4d173cfa8 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/ui_settings/settings_keys.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/ui_settings/settings_keys.ts @@ -10,3 +10,5 @@ export const aiAssistantLogsIndexPattern = 'observability:aiAssistantLogsIndexPa export const aiAssistantResponseLanguage = 'observability:aiAssistantResponseLanguage'; export const aiAssistantSimulatedFunctionCalling = 'observability:aiAssistantSimulatedFunctionCalling'; +export const aiAssistantSearchConnectorIndexPattern = + 'observability:aiAssistantSearchConnectorIndexPattern'; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts index 52d2511f9877f..e981e1ba15d89 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts @@ -82,6 +82,7 @@ export { aiAssistantResponseLanguage, aiAssistantLogsIndexPattern, aiAssistantSimulatedFunctionCalling, + aiAssistantSearchConnectorIndexPattern, } from '../common/ui_settings/settings_keys'; export const plugin: PluginInitializer< diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/index.ts index 344d46f557782..03b3f4ccdc766 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/index.ts @@ -22,6 +22,7 @@ export { aiAssistantResponseLanguage, aiAssistantLogsIndexPattern, aiAssistantSimulatedFunctionCalling, + aiAssistantSearchConnectorIndexPattern, } from '../common'; export { streamIntoObservable } from './service/util/stream_into_observable'; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts index ed5f9a9ee044d..add345ffce9c5 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import type { ActionsClient } from '@kbn/actions-plugin/server/actions_client'; -import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ElasticsearchClient, IUiSettingsClient, Logger } from '@kbn/core/server'; import type { DeeplyMockedKeys } from '@kbn/utility-types-jest'; import { waitFor } from '@testing-library/react'; import { last, merge, repeat } from 'lodash'; @@ -94,6 +94,10 @@ describe('Observability AI Assistant client', () => { get: jest.fn(), } as any; + const uiSettingsClientMock: DeeplyMockedKeys = { + get: jest.fn(), + } as any; + const internalUserEsClientMock: DeeplyMockedKeys = { search: jest.fn(), index: jest.fn(), @@ -172,6 +176,7 @@ describe('Observability AI Assistant client', () => { return new ObservabilityAIAssistantClient({ actionsClient: actionsClientMock, + uiSettingsClient: uiSettingsClientMock, esClient: { asInternalUser: internalUserEsClientMock, asCurrentUser: currentUserEsClientMock, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts index 0dc38698faa89..485beb7033d21 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts @@ -7,7 +7,7 @@ import type { SearchHit } from '@elastic/elasticsearch/lib/api/types'; import { notFound } from '@hapi/boom'; import type { ActionsClient } from '@kbn/actions-plugin/server'; -import type { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient, IUiSettingsClient } from '@kbn/core/server'; import type { Logger } from '@kbn/logging'; import type { PublicMethodsOf } from '@kbn/utility-types'; import { merge, omit } from 'lodash'; @@ -80,6 +80,7 @@ export class ObservabilityAIAssistantClient { constructor( private readonly dependencies: { actionsClient: PublicMethodsOf; + uiSettingsClient: IUiSettingsClient; namespace: string; esClient: { asInternalUser: ElasticsearchClient; @@ -659,6 +660,7 @@ export class ObservabilityAIAssistantClient { queries, categories, asCurrentUser: this.dependencies.esClient.asCurrentUser, + uiSettingsClient: this.dependencies.uiSettingsClient, }); }; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts index 31249f8f6d40f..318cf83b54373 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts @@ -276,12 +276,15 @@ export class ObservabilityAIAssistantService { // user will not be found when executed from system connector context const user = plugins.security.authc.getCurrentUser(request); + const soClient = coreStart.savedObjects.getScopedClient(request); + const basePath = coreStart.http.basePath.get(request); const { spaceId } = getSpaceIdFromPath(basePath, coreStart.http.basePath.serverBasePath); return new ObservabilityAIAssistantClient({ actionsClient: await plugins.actions.getActionsClientWithRequest(request), + uiSettingsClient: coreStart.uiSettings.asScopedToClient(soClient), namespace: spaceId, esClient: { asInternalUser: coreStart.elasticsearch.client.asInternalUser, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts index e0ba8bd48d478..04493f9af2dde 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts @@ -6,14 +6,15 @@ */ import { errors } from '@elastic/elasticsearch'; import { serverUnavailable, gatewayTimeout } from '@hapi/boom'; -import type { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient, IUiSettingsClient } from '@kbn/core/server'; import type { Logger } from '@kbn/logging'; import type { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; import pLimit from 'p-limit'; import pRetry from 'p-retry'; -import { map, orderBy } from 'lodash'; +import { isEmpty, map, orderBy } from 'lodash'; import { encode } from 'gpt-tokenizer'; import { MlTrainedModelDeploymentNodesStats } from '@elastic/elasticsearch/lib/api/types'; +import { aiAssistantSearchConnectorIndexPattern } from '../../../common'; import { INDEX_QUEUED_DOCUMENTS_TASK_ID, INDEX_QUEUED_DOCUMENTS_TASK_TYPE } from '..'; import { KnowledgeBaseEntry, KnowledgeBaseEntryRole, UserInstruction } from '../../../common/types'; import type { ObservabilityAIAssistantResourceNames } from '../types'; @@ -347,19 +348,55 @@ export class KnowledgeBaseService { })); } + private async getConnectorIndices( + client: ElasticsearchClient, + uiSettingsClient: IUiSettingsClient + ) { + // improve performance by running this in parallel with the `uiSettingsClient` request + const responsePromise = client.transport.request({ + method: 'GET', + path: '_connector', + querystring: { + filter_path: 'results.index_name', + }, + }); + + const customSearchConnectorIndex = await uiSettingsClient.get( + aiAssistantSearchConnectorIndexPattern + ); + + if (customSearchConnectorIndex) { + return customSearchConnectorIndex.split(','); + } + + const response = (await responsePromise) as { results: Array<{ index_name: string }> }; + const connectorIndices = response.results.map((result) => result.index_name); + + // preserve backwards compatibility with 8.14 (may not be needed in the future) + if (isEmpty(connectorIndices)) { + return ['search-*']; + } + + return connectorIndices; + } + private async recallFromConnectors({ queries, asCurrentUser, + uiSettingsClient, modelId, }: { queries: string[]; asCurrentUser: ElasticsearchClient; + uiSettingsClient: IUiSettingsClient; modelId: string; }): Promise { const ML_INFERENCE_PREFIX = 'ml.inference.'; + const connectorIndices = await this.getConnectorIndices(asCurrentUser, uiSettingsClient); + const fieldCaps = await asCurrentUser.fieldCaps({ - index: 'search*', + index: connectorIndices, fields: `${ML_INFERENCE_PREFIX}*`, allow_no_indices: true, types: ['sparse_vector'], @@ -404,7 +441,7 @@ export class KnowledgeBaseService { }); const response = await asCurrentUser.search({ - index: 'search-*', + index: connectorIndices, query: { bool: { should: esQueries, @@ -416,12 +453,14 @@ export class KnowledgeBaseService { }, }); - return response.hits.hits.map((hit) => ({ + const results = response.hits.hits.map((hit) => ({ text: JSON.stringify(hit._source), score: hit._score!, is_correction: false, id: hit._id, })); + + return results; } recall = async ({ @@ -430,12 +469,14 @@ export class KnowledgeBaseService { categories, namespace, asCurrentUser, + uiSettingsClient, }: { queries: string[]; categories?: string[]; user?: { name: string }; namespace: string; asCurrentUser: ElasticsearchClient; + uiSettingsClient: IUiSettingsClient; }): Promise<{ entries: RecalledEntry[]; }> => { @@ -457,6 +498,7 @@ export class KnowledgeBaseService { }), this.recallFromConnectors({ asCurrentUser, + uiSettingsClient, queries, modelId, }).catch((error) => { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_management/common/ui_settings.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_management/common/ui_settings.ts index d6a6db84d1084..682e66385d56b 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_management/common/ui_settings.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_management/common/ui_settings.ts @@ -12,6 +12,7 @@ import { aiAssistantLogsIndexPattern, aiAssistantResponseLanguage, aiAssistantSimulatedFunctionCalling, + aiAssistantSearchConnectorIndexPattern, } from '@kbn/observability-ai-assistant-plugin/common'; import { DEFAULT_LANGUAGE_OPTION, @@ -85,4 +86,22 @@ export const uiSettings: Record = { type: 'boolean', requiresPageReload: true, }, + [aiAssistantSearchConnectorIndexPattern]: { + category: ['observability'], + name: i18n.translate( + 'xpack.observabilityAiAssistantManagement.settingsTab.h3.searchConnectorIndexPatternLabel', + { defaultMessage: 'Search connector index pattern' } + ), + value: '', + description: i18n.translate( + 'xpack.observabilityAiAssistantManagement.settingsPage.searchConnectorIndexPatternDescription', + { + defaultMessage: + 'Index pattern used by the AI Assistant when querying search connectors indices (part of the knowledge base). By default the index for every search connector will be queried', + } + ), + schema: schema.string(), + type: 'string', + requiresPageReload: true, + }, }; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/ui_settings.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/ui_settings.tsx index 9621e77b6e675..d366a07240822 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/ui_settings.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/ui_settings.tsx @@ -11,6 +11,7 @@ import { aiAssistantLogsIndexPattern, aiAssistantResponseLanguage, aiAssistantSimulatedFunctionCalling, + aiAssistantSearchConnectorIndexPattern, } from '@kbn/observability-ai-assistant-plugin/public'; import { FieldRow, FieldRowProvider } from '@kbn/management-settings-components-field-row'; import { EuiSpacer } from '@elastic/eui'; @@ -22,6 +23,7 @@ const settingsKeys = [ aiAssistantLogsIndexPattern, aiAssistantResponseLanguage, aiAssistantSimulatedFunctionCalling, + aiAssistantSearchConnectorIndexPattern, ]; export function UISettings() { diff --git a/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/apm_alert_details.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/apm_alert_details.tsx index 86893aa0fb87e..4d1ff0d532fba 100644 --- a/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/apm_alert_details.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/apm_alert_details.tsx @@ -6,22 +6,26 @@ */ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import { GetSLOResponse, APMTransactionDurationIndicator } from '@kbn/slo-schema'; -import { APMEmbeddableRoot } from './embeddable_root'; +import { + APMEmbeddableRoot, + APMTransactionDurationSLOResponse, + APMErrorRateSLOResponse, +} from './embeddable_root'; import type { BurnRateRule, BurnRateAlert, TimeRange } from '../../../types'; -interface APMAlertDetailsProps { - slo: APMTransactionDurationSLOResponse; +interface APMAlertDetailsProps { + slo: IndicatorType; alert: BurnRateAlert; rule: BurnRateRule; dataTimeRange: TimeRange; } -export type APMTransactionDurationSLOResponse = GetSLOResponse & { - indicator: APMTransactionDurationIndicator; -}; - -export function APMAlertDetails({ slo, dataTimeRange, alert, rule }: APMAlertDetailsProps) { +export function APMLatencyAlertDetails({ + slo, + dataTimeRange, + alert, + rule, +}: APMAlertDetailsProps) { return ( ); } + +export function APMAvailabilityAlertDetails({ + slo, + dataTimeRange, + alert, + rule, +}: APMAlertDetailsProps) { + return ( + + + + + + + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/embeddable_root.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/embeddable_root.tsx index 535ba2e94e67c..c7f95d788e676 100644 --- a/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/embeddable_root.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/apm/embeddable_root.tsx @@ -8,7 +8,12 @@ import React from 'react'; import { v4 as uuidv4 } from 'uuid'; import { buildQueryFromFilters, Filter } from '@kbn/es-query'; import { ReactEmbeddableRenderer } from '@kbn/embeddable-plugin/public'; -import { GetSLOResponse, APMTransactionDurationIndicator } from '@kbn/slo-schema'; +import { + GetSLOResponse, + apmTransactionDurationIndicatorSchema, + APMTransactionDurationIndicator, + APMTransactionErrorRateIndicator, +} from '@kbn/slo-schema'; import type { BurnRateAlert, BurnRateRule, TimeRange } from '../../../types'; type EmbeddableId = @@ -18,18 +23,22 @@ type EmbeddableId = | 'APM_ALERTING_LATENCY_CHART_EMBEDDABLE' | 'APM_ALERTING_THROUGHPUT_CHART_EMBEDDABLE'; +export type APMTransactionDurationSLOResponse = GetSLOResponse & { + indicator: APMTransactionDurationIndicator; +}; + +export type APMErrorRateSLOResponse = GetSLOResponse & { + indicator: APMTransactionErrorRateIndicator; +}; + interface APMEmbeddableRootProps { - slo: APMTransactionDurationSLOResponse; + slo: APMTransactionDurationSLOResponse | APMErrorRateSLOResponse; dataTimeRange: TimeRange; embeddableId: EmbeddableId; alert: BurnRateAlert; rule: BurnRateRule; } -export type APMTransactionDurationSLOResponse = GetSLOResponse & { - indicator: APMTransactionDurationIndicator; -}; - export function APMEmbeddableRoot({ slo, dataTimeRange, @@ -40,6 +49,7 @@ export function APMEmbeddableRoot({ const filter = slo.indicator.params.filter; const isKueryFilter = typeof filter === 'string'; const groupingInput = getInputFromGroupings(slo); + const indicator = slo.indicator; const kuery = isKueryFilter ? filter : undefined; const allFilters = @@ -48,7 +58,7 @@ export function APMEmbeddableRoot({ : groupingInput.filters; const filters = buildQueryFromFilters(allFilters, undefined, undefined); const groupingsInput = getInputFromGroupings(slo); - const { transactionName, transactionType, environment, service } = slo.indicator.params; + const { transactionName, transactionType, environment, service } = indicator.params; const input = { id: uuidv4(), serviceName: service, @@ -57,7 +67,9 @@ export function APMEmbeddableRoot({ environment: environment !== '*' ? environment : undefined, rangeFrom: dataTimeRange.from.toISOString(), rangeTo: dataTimeRange.to.toISOString(), - latencyThresholdInMicroseconds: slo.indicator.params.threshold * 1000, + latencyThresholdInMicroseconds: apmTransactionDurationIndicatorSchema.is(indicator) + ? indicator.params.threshold * 1000 + : undefined, kuery, filters, alert, @@ -70,13 +82,15 @@ export function APMEmbeddableRoot({ return ( ({ getSerializedStateForChild: () => ({ rawState: input }) })} hidePanelChrome={true} /> ); } -const getInputFromGroupings = (slo: APMTransactionDurationSLOResponse) => { +const getInputFromGroupings = ( + slo: APMTransactionDurationSLOResponse | APMErrorRateSLOResponse +) => { const groupings = Object.entries(slo.groupings) as Array<[string, string]>; const input: { transactionName?: string; diff --git a/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/custom_panels.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/custom_panels.tsx index 534c037ff3540..e22cb7cd5a3fb 100644 --- a/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/custom_panels.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/custom_panels/custom_panels.tsx @@ -7,11 +7,14 @@ import React from 'react'; import type { GetSLOResponse } from '@kbn/slo-schema'; -import { APMAlertDetails } from './apm/apm_alert_details'; +import { APMLatencyAlertDetails, APMAvailabilityAlertDetails } from './apm/apm_alert_details'; import { CustomKqlPanels } from './custom_kql/custom_kql_panels'; import { getDataTimeRange } from '../../utils/time_range'; import type { BurnRateAlert, BurnRateRule } from '../../types'; -import type { APMTransactionDurationSLOResponse } from './apm/apm_alert_details'; +import type { + APMTransactionDurationSLOResponse, + APMErrorRateSLOResponse, +} from './apm/embeddable_root'; interface Props { alert: BurnRateAlert; @@ -26,13 +29,22 @@ export function CustomAlertDetailsPanel({ slo, alert, rule }: Props) { return ; case 'sli.apm.transactionDuration': return ( - ); + case 'sli.apm.transactionErrorRate': + return ( + + ); default: return null; } diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slo_card_item.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slo_card_item.tsx index ebdc068435a76..0808298b24a8b 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slo_card_item.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slo_card_item.tsx @@ -74,7 +74,6 @@ const getFirstGroupBy = (slo: SLOWithSummaryResponse) => { export function SloCardItem({ slo, rules, activeAlerts, historicalSummary, refetchRules }: Props) { const containerRef = React.useRef(null); - const [isMouseOver, setIsMouseOver] = useState(false); const [isActionsPopoverOpen, setIsActionsPopoverOpen] = useState(false); const [isAddRuleFlyoutOpen, setIsAddRuleFlyoutOpen] = useState(false); const [isEditRuleFlyoutOpen, setIsEditRuleFlyoutOpen] = useState(false); @@ -110,21 +109,25 @@ export function SloCardItem({ slo, rules, activeAlerts, historicalSummary, refet } - onMouseOver={() => { - if (!isMouseOver) { - setIsMouseOver(true); - } - }} - onMouseLeave={() => { - if (isMouseOver) { - setIsMouseOver(false); - } - }} paddingSize="none" css={css` height: 182px; overflow: hidden; position: relative; + + & .sloCardItemActions_hover { + pointer-events: none; + opacity: 0; + + &:focus-within { + pointer-events: auto; + opacity: 1; + } + } + &:hover .sloCardItemActions_hover { + pointer-events: auto; + opacity: 1; + } `} title={ slo.summary.summaryUpdatedAt @@ -151,7 +154,7 @@ export function SloCardItem({ slo, rules, activeAlerts, historicalSummary, refet /> } /> - {(isMouseOver || isActionsPopoverOpen) && ( +
- )} +
- setItemsPerPage(perPage)} - /> + {total > 0 && total > itemsPerPage ? ( + { + setPage(0); + setItemsPerPage(perPage); + }} + /> + ) : null} )} diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_view.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_view.tsx index 207be28bf7264..ffe7c1ede95b2 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_view.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_view.tsx @@ -93,7 +93,7 @@ export function GroupView({ /> ))} - {total > 0 ? ( + {total > 0 && total > perPage ? ( { - onStateChange({ perPage: newPerPage }); + onStateChange({ perPage: newPerPage, page: 0 }); }} /> diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.tsx index be10b99ae5531..49e49f09169bf 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.tsx @@ -98,7 +98,7 @@ export function SloList() { error={isError} sloView={view} /> - {total > 0 ? ( + {total > 0 && total > perPage ? ( { - onStateChange({ perPage: newPerPage }); + onStateChange({ perPage: newPerPage, page: 0 }); }} /> diff --git a/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/historical_summary_client.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/historical_summary_client.test.ts.snap index 2759ac43d2149..3b495e56db593 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/historical_summary_client.test.ts.snap +++ b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/historical_summary_client.test.ts.snap @@ -9423,6 +9423,146 @@ Object { `; exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 1`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.55648, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.44352, + }, + "sliValue": 0.972176, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 2`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.5574, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.4426, + }, + "sliValue": 0.97213, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 3`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.55834, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.44166, + }, + "sliValue": 0.972083, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 4`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.55926, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.44074, + }, + "sliValue": 0.972037, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 5`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.56018, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.43982, + }, + "sliValue": 0.971991, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 6`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.56112, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.43888, + }, + "sliValue": 0.971944, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 7`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.56204, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.43796, + }, + "sliValue": 0.971898, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 8`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.56296, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.43704, + }, + "sliValue": 0.971852, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 9`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.56388, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.43612, + }, + "sliValue": 0.971806, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 10`] = ` +Object { + "date": Any, + "errorBudget": Object { + "consumed": 0.56482, + "initial": 0.05, + "isEstimated": false, + "remaining": 0.43518, + }, + "sliValue": 0.971759, + "status": "HEALTHY", +} +`; + +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 11`] = ` Object { "date": Any, "errorBudget": Object { @@ -9436,7 +9576,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 2`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 12`] = ` Object { "date": Any, "errorBudget": Object { @@ -9450,7 +9590,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 3`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 13`] = ` Object { "date": Any, "errorBudget": Object { @@ -9464,7 +9604,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 4`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 14`] = ` Object { "date": Any, "errorBudget": Object { @@ -9478,7 +9618,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 5`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 15`] = ` Object { "date": Any, "errorBudget": Object { @@ -9492,7 +9632,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 6`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 16`] = ` Object { "date": Any, "errorBudget": Object { @@ -9506,7 +9646,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 7`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 17`] = ` Object { "date": Any, "errorBudget": Object { @@ -9520,7 +9660,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 8`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 18`] = ` Object { "date": Any, "errorBudget": Object { @@ -9534,7 +9674,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 9`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 19`] = ` Object { "date": Any, "errorBudget": Object { @@ -9548,7 +9688,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 10`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 20`] = ` Object { "date": Any, "errorBudget": Object { @@ -9562,7 +9702,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 11`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 21`] = ` Object { "date": Any, "errorBudget": Object { @@ -9576,7 +9716,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 12`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 22`] = ` Object { "date": Any, "errorBudget": Object { @@ -9590,7 +9730,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 13`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 23`] = ` Object { "date": Any, "errorBudget": Object { @@ -9604,7 +9744,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 14`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 24`] = ` Object { "date": Any, "errorBudget": Object { @@ -9618,7 +9758,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 15`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 25`] = ` Object { "date": Any, "errorBudget": Object { @@ -9632,7 +9772,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 16`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 26`] = ` Object { "date": Any, "errorBudget": Object { @@ -9646,7 +9786,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 17`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 27`] = ` Object { "date": Any, "errorBudget": Object { @@ -9660,7 +9800,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 18`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 28`] = ` Object { "date": Any, "errorBudget": Object { @@ -9674,7 +9814,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 19`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 29`] = ` Object { "date": Any, "errorBudget": Object { @@ -9688,7 +9828,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 20`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 30`] = ` Object { "date": Any, "errorBudget": Object { @@ -9702,7 +9842,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 21`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 31`] = ` Object { "date": Any, "errorBudget": Object { @@ -9716,7 +9856,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 22`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 32`] = ` Object { "date": Any, "errorBudget": Object { @@ -9730,7 +9870,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 23`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 33`] = ` Object { "date": Any, "errorBudget": Object { @@ -9744,7 +9884,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 24`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 34`] = ` Object { "date": Any, "errorBudget": Object { @@ -9758,7 +9898,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 25`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 35`] = ` Object { "date": Any, "errorBudget": Object { @@ -9772,7 +9912,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 26`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 36`] = ` Object { "date": Any, "errorBudget": Object { @@ -9786,7 +9926,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 27`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 37`] = ` Object { "date": Any, "errorBudget": Object { @@ -9800,7 +9940,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 28`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 38`] = ` Object { "date": Any, "errorBudget": Object { @@ -9814,7 +9954,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 29`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 39`] = ` Object { "date": Any, "errorBudget": Object { @@ -9828,7 +9968,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 30`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 40`] = ` Object { "date": Any, "errorBudget": Object { @@ -9842,7 +9982,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 31`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 41`] = ` Object { "date": Any, "errorBudget": Object { @@ -9856,7 +9996,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 32`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 42`] = ` Object { "date": Any, "errorBudget": Object { @@ -9870,7 +10010,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 33`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 43`] = ` Object { "date": Any, "errorBudget": Object { @@ -9884,7 +10024,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 34`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 44`] = ` Object { "date": Any, "errorBudget": Object { @@ -9898,7 +10038,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 35`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 45`] = ` Object { "date": Any, "errorBudget": Object { @@ -9912,7 +10052,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 36`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 46`] = ` Object { "date": Any, "errorBudget": Object { @@ -9926,7 +10066,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 37`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 47`] = ` Object { "date": Any, "errorBudget": Object { @@ -9940,7 +10080,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 38`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 48`] = ` Object { "date": Any, "errorBudget": Object { @@ -9954,7 +10094,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 39`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 49`] = ` Object { "date": Any, "errorBudget": Object { @@ -9968,7 +10108,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 40`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 50`] = ` Object { "date": Any, "errorBudget": Object { @@ -9982,7 +10122,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 41`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 51`] = ` Object { "date": Any, "errorBudget": Object { @@ -9996,7 +10136,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 42`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 52`] = ` Object { "date": Any, "errorBudget": Object { @@ -10010,7 +10150,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 43`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 53`] = ` Object { "date": Any, "errorBudget": Object { @@ -10024,7 +10164,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 44`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 54`] = ` Object { "date": Any, "errorBudget": Object { @@ -10038,7 +10178,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 45`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 55`] = ` Object { "date": Any, "errorBudget": Object { @@ -10052,7 +10192,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 46`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 56`] = ` Object { "date": Any, "errorBudget": Object { @@ -10066,7 +10206,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 47`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 57`] = ` Object { "date": Any, "errorBudget": Object { @@ -10080,7 +10220,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 48`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 58`] = ` Object { "date": Any, "errorBudget": Object { @@ -10094,7 +10234,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 49`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 59`] = ` Object { "date": Any, "errorBudget": Object { @@ -10108,7 +10248,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 50`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 60`] = ` Object { "date": Any, "errorBudget": Object { @@ -10122,7 +10262,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 51`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 61`] = ` Object { "date": Any, "errorBudget": Object { @@ -10136,7 +10276,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 52`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 62`] = ` Object { "date": Any, "errorBudget": Object { @@ -10150,7 +10290,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 53`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 63`] = ` Object { "date": Any, "errorBudget": Object { @@ -10164,7 +10304,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 54`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 64`] = ` Object { "date": Any, "errorBudget": Object { @@ -10178,7 +10318,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 55`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 65`] = ` Object { "date": Any, "errorBudget": Object { @@ -10192,7 +10332,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 56`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 66`] = ` Object { "date": Any, "errorBudget": Object { @@ -10206,7 +10346,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 57`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 67`] = ` Object { "date": Any, "errorBudget": Object { @@ -10220,7 +10360,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 58`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 68`] = ` Object { "date": Any, "errorBudget": Object { @@ -10234,7 +10374,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 59`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 69`] = ` Object { "date": Any, "errorBudget": Object { @@ -10248,7 +10388,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 60`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 70`] = ` Object { "date": Any, "errorBudget": Object { @@ -10262,7 +10402,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 61`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 71`] = ` Object { "date": Any, "errorBudget": Object { @@ -10276,7 +10416,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 62`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 72`] = ` Object { "date": Any, "errorBudget": Object { @@ -10290,7 +10430,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 63`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 73`] = ` Object { "date": Any, "errorBudget": Object { @@ -10304,7 +10444,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 64`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 74`] = ` Object { "date": Any, "errorBudget": Object { @@ -10318,7 +10458,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 65`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 75`] = ` Object { "date": Any, "errorBudget": Object { @@ -10332,7 +10472,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 66`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 76`] = ` Object { "date": Any, "errorBudget": Object { @@ -10346,7 +10486,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 67`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 77`] = ` Object { "date": Any, "errorBudget": Object { @@ -10360,7 +10500,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 68`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 78`] = ` Object { "date": Any, "errorBudget": Object { @@ -10374,7 +10514,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 69`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 79`] = ` Object { "date": Any, "errorBudget": Object { @@ -10388,7 +10528,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 70`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 80`] = ` Object { "date": Any, "errorBudget": Object { @@ -10402,7 +10542,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 71`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 81`] = ` Object { "date": Any, "errorBudget": Object { @@ -10416,7 +10556,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 72`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 82`] = ` Object { "date": Any, "errorBudget": Object { @@ -10430,7 +10570,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 73`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 83`] = ` Object { "date": Any, "errorBudget": Object { @@ -10444,7 +10584,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 74`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 84`] = ` Object { "date": Any, "errorBudget": Object { @@ -10458,7 +10598,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 75`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 85`] = ` Object { "date": Any, "errorBudget": Object { @@ -10472,7 +10612,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 76`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 86`] = ` Object { "date": Any, "errorBudget": Object { @@ -10486,7 +10626,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 77`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 87`] = ` Object { "date": Any, "errorBudget": Object { @@ -10500,7 +10640,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 78`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 88`] = ` Object { "date": Any, "errorBudget": Object { @@ -10514,7 +10654,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 79`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 89`] = ` Object { "date": Any, "errorBudget": Object { @@ -10528,7 +10668,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 80`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 90`] = ` Object { "date": Any, "errorBudget": Object { @@ -10542,7 +10682,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 81`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 91`] = ` Object { "date": Any, "errorBudget": Object { @@ -10556,7 +10696,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 82`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 92`] = ` Object { "date": Any, "errorBudget": Object { @@ -10570,7 +10710,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 83`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 93`] = ` Object { "date": Any, "errorBudget": Object { @@ -10584,7 +10724,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 84`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 94`] = ` Object { "date": Any, "errorBudget": Object { @@ -10598,7 +10738,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 85`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 95`] = ` Object { "date": Any, "errorBudget": Object { @@ -10612,7 +10752,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 86`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 96`] = ` Object { "date": Any, "errorBudget": Object { @@ -10626,7 +10766,7 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 87`] = ` +exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 97`] = ` Object { "date": Any, "errorBudget": Object { @@ -10640,146 +10780,6 @@ Object { } `; -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 88`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.6463, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.3537, - }, - "sliValue": 0.967685, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 89`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.64722, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.35278, - }, - "sliValue": 0.967639, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 90`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.64814, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.35186, - }, - "sliValue": 0.967593, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 91`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.64908, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.35092, - }, - "sliValue": 0.967546, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 92`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.65, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.35, - }, - "sliValue": 0.9675, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 93`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.65092, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.34908, - }, - "sliValue": 0.967454, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 94`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.65186, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.34814, - }, - "sliValue": 0.967407, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 95`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.65278, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.34722, - }, - "sliValue": 0.967361, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 96`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.6537, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.3463, - }, - "sliValue": 0.967315, - "status": "HEALTHY", -} -`; - -exports[`FetchHistoricalSummary Rolling and Timeslices SLOs returns the summary using the provided date range 97`] = ` -Object { - "date": Any, - "errorBudget": Object { - "consumed": 0.65462, - "initial": 0.05, - "isEstimated": false, - "remaining": 0.34538, - }, - "sliValue": 0.967269, - "status": "HEALTHY", -} -`; - exports[`FetchHistoricalSummary filters with the 'instanceId' when provided 1`] = ` Object { "date": Any, diff --git a/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.test.ts b/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.test.ts index 939b240f5d88f..d01d0f654bf54 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.test.ts @@ -46,7 +46,7 @@ const generateEsResponseForRollingSLO = (slo: SLODefinition, overridedRange?: Da ? rollingDurationInDays + overridedRangeInDays : rollingDurationInDays * 2; const numberOfBuckets = fullDuration * bucketsPerDay; - const startDay = moment().subtract(fullDuration, 'day').startOf('day'); + const startRange = moment().subtract(fullDuration, 'day').startOf('minute'); const bucketSizeInHour = moment .duration( fixedInterval.slice(0, -1), @@ -67,11 +67,11 @@ const generateEsResponseForRollingSLO = (slo: SLODefinition, overridedRange?: Da buckets: Array(numberOfBuckets) .fill(0) .map((_, index) => ({ - key_as_string: startDay + key_as_string: startRange .clone() .add(index * bucketSizeInHour, 'hours') .toISOString(), - key: startDay + key: startRange .clone() .add(index * bucketSizeInHour, 'hours') .format('x'), diff --git a/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.ts b/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.ts index 263111c944da3..3389783a41ef0 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.ts @@ -410,7 +410,7 @@ function getDateRange( queryRange: { from: moment(range.from) .subtract(timeWindow.duration.value, unit) - .startOf('day') + .startOf('minute') .toDate(), to: moment(range.to).startOf('minute').toDate(), }, @@ -420,14 +420,14 @@ function getDateRange( const now = moment(); return { range: { - from: now.clone().subtract(timeWindow.duration.value, unit).startOf('day').toDate(), + from: now.clone().subtract(timeWindow.duration.value, unit).startOf('minute').toDate(), to: now.clone().startOf('minute').toDate(), }, queryRange: { from: now .clone() .subtract(timeWindow.duration.value * 2, unit) - .startOf('day') + .startOf('minute') .toDate(), to: now.clone().startOf('minute').toDate(), }, diff --git a/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts index 6638567a92625..27fe443eed062 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts @@ -76,7 +76,8 @@ describe('ALL - Saved queries', { tags: ['@ess', '@serverless'] }, () => { }); }); - describe('prebuilt', () => { + // FAILING ES SERVERLESS PROMOTION: https://github.com/elastic/kibana/issues/169787 + describe.skip('prebuilt', () => { let packName: string; let packId: string; let savedQueryId: string; diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index 59f60f35cb717..4129717c6d791 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -24,6 +24,7 @@ export const config: PluginConfigDescriptor = { }, schema: ConfigSchema, deprecations: ({ unused }) => [ + unused('queue.indexInterval', { level: 'warning' }), // unused since 8.15 unused('capture.browser.chromium.maxScreenshotDimension', { level: 'warning' }), // unused since 7.8 unused('capture.browser.type', { level: 'warning' }), unused('poll.jobCompletionNotifier.intervalErrorMultiplier', { level: 'warning' }), // unused since 7.10 diff --git a/x-pack/plugins/reporting/server/deprecations/index.ts b/x-pack/plugins/reporting/server/deprecations/index.ts index 651defbb5d688..bca439532b3b0 100644 --- a/x-pack/plugins/reporting/server/deprecations/index.ts +++ b/x-pack/plugins/reporting/server/deprecations/index.ts @@ -20,7 +20,7 @@ export const registerDeprecations = ({ core.deprecations.registerDeprecations({ getDeprecations: async (ctx) => { return [ - ...(await getIlmPolicyDeprecationsInfo(ctx, { reportingCore })), + ...(await getIlmPolicyDeprecationsInfo(ctx)), ...(await getReportingRoleDeprecationsInfo(ctx, { reportingCore })), ]; }, diff --git a/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.test.ts b/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.test.ts index 9f0a10b861adb..233626d1b7b4c 100644 --- a/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.test.ts +++ b/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.test.ts @@ -7,10 +7,6 @@ import type { GetDeprecationsContext } from '@kbn/core/server'; import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { createMockConfigSchema } from '@kbn/reporting-mocks-server'; - -import { ReportingCore } from '../core'; -import { createMockReportingCore } from '../test_helpers'; import { getDeprecationsInfo } from './migrate_existing_indices_ilm_policy'; @@ -21,12 +17,10 @@ type ScopedClusterClientMock = ReturnType< describe("Migrate existing indices' ILM policy deprecations", () => { let esClient: ScopedClusterClientMock; let deprecationsCtx: GetDeprecationsContext; - let reportingCore: ReportingCore; beforeEach(async () => { esClient = elasticsearchServiceMock.createScopedClusterClient(); deprecationsCtx = { esClient, savedObjectsClient: savedObjectsClientMock.create() }; - reportingCore = await createMockReportingCore(createMockConfigSchema()); }); const createIndexSettings = (lifecycleName: string) => ({ @@ -47,7 +41,7 @@ describe("Migrate existing indices' ILM policy deprecations", () => { indexB: createIndexSettings('kibana-reporting'), }); - expect(await getDeprecationsInfo(deprecationsCtx, { reportingCore })).toMatchInlineSnapshot(` + expect(await getDeprecationsInfo(deprecationsCtx)).toMatchInlineSnapshot(` Array [ Object { "correctiveActions": Object { @@ -60,7 +54,7 @@ describe("Migrate existing indices' ILM policy deprecations", () => { ], }, "level": "warning", - "message": "New reporting indices will be managed by the \\"kibana-reporting\\" provisioned ILM policy. You must edit this policy to manage the report lifecycle. This change targets all indices prefixed with \\".reporting-*\\".", + "message": "New reporting indices will be managed by the \\"kibana-reporting\\" provisioned ILM policy. You must edit this policy to manage the report lifecycle. This change targets the hidden system index pattern \\".kibana-reporting*\\".", "title": "Found reporting indices managed by custom ILM policy.", }, ] @@ -73,14 +67,10 @@ describe("Migrate existing indices' ILM policy deprecations", () => { indexB: createIndexSettings('kibana-reporting'), }); - expect(await getDeprecationsInfo(deprecationsCtx, { reportingCore })).toMatchInlineSnapshot( - `Array []` - ); + expect(await getDeprecationsInfo(deprecationsCtx)).toMatchInlineSnapshot(`Array []`); esClient.asInternalUser.indices.getSettings.mockResponse({}); - expect(await getDeprecationsInfo(deprecationsCtx, { reportingCore })).toMatchInlineSnapshot( - `Array []` - ); + expect(await getDeprecationsInfo(deprecationsCtx)).toMatchInlineSnapshot(`Array []`); }); }); diff --git a/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.ts b/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.ts index 2fcba6c0ccf53..fce6e6475d76e 100644 --- a/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.ts +++ b/x-pack/plugins/reporting/server/deprecations/migrate_existing_indices_ilm_policy.ts @@ -8,24 +8,14 @@ import { DeprecationsDetails, GetDeprecationsContext } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { ILM_POLICY_NAME, INTERNAL_ROUTES } from '@kbn/reporting-common'; -import { ReportingCore } from '../core'; -import { deprecations } from '../lib/deprecations'; +import { REPORTING_DATA_STREAM_WILDCARD } from '@kbn/reporting-server'; +import { IlmPolicyManager } from '../lib/store'; -interface ExtraDependencies { - reportingCore: ReportingCore; -} - -export const getDeprecationsInfo = async ( - { esClient }: GetDeprecationsContext, - { reportingCore }: ExtraDependencies -): Promise => { - const store = await reportingCore.getStore(); - const indexPattern = store.getReportingIndexPattern(); - - const migrationStatus = await deprecations.checkIlmMigrationStatus({ - reportingCore, - elasticsearchClient: esClient.asInternalUser, - }); +export const getDeprecationsInfo = async ({ + esClient, +}: GetDeprecationsContext): Promise => { + const ilmPolicyManager = IlmPolicyManager.create({ client: esClient.asInternalUser }); + const migrationStatus = await ilmPolicyManager.checkIlmMigrationStatus(); if (migrationStatus !== 'ok') { return [ @@ -35,10 +25,10 @@ export const getDeprecationsInfo = async ( }), level: 'warning', message: i18n.translate('xpack.reporting.deprecations.migrateIndexIlmPolicyActionMessage', { - defaultMessage: `New reporting indices will be managed by the "{reportingIlmPolicy}" provisioned ILM policy. You must edit this policy to manage the report lifecycle. This change targets all indices prefixed with "{indexPattern}".`, + defaultMessage: `New reporting indices will be managed by the "{reportingIlmPolicy}" provisioned ILM policy. You must edit this policy to manage the report lifecycle. This change targets the hidden system index pattern "{indexPattern}".`, values: { reportingIlmPolicy: ILM_POLICY_NAME, - indexPattern, + indexPattern: REPORTING_DATA_STREAM_WILDCARD, }, }), correctiveActions: { diff --git a/x-pack/plugins/reporting/server/lib/content_stream.test.ts b/x-pack/plugins/reporting/server/lib/content_stream.test.ts index d4f179c5c9359..165c06baa579b 100644 --- a/x-pack/plugins/reporting/server/lib/content_stream.test.ts +++ b/x-pack/plugins/reporting/server/lib/content_stream.test.ts @@ -122,12 +122,12 @@ describe('ContentStream', () => { 'body.query.constant_score.filter.bool.must.0.term._id', 'something' ); - expect(request2).toHaveProperty('index', 'somewhere'); + expect(request2).toHaveProperty('index', '.reporting-*,.kibana-reporting*'); expect(request2).toHaveProperty( 'body.query.constant_score.filter.bool.must.0.term.parent_id', 'something' ); - expect(request3).toHaveProperty('index', 'somewhere'); + expect(request3).toHaveProperty('index', '.reporting-*,.kibana-reporting*'); expect(request3).toHaveProperty( 'body.query.constant_score.filter.bool.must.0.term.parent_id', 'something' @@ -293,8 +293,11 @@ describe('ContentStream', () => { 1, expect.objectContaining({ id: expect.any(String), - index: 'somewhere', + index: '.kibana-reporting', + op_type: 'create', + refresh: 'wait_for', body: { + '@timestamp': '1970-01-01T00:00:00.000Z', parent_id: 'something', output: { content: '34', @@ -307,8 +310,11 @@ describe('ContentStream', () => { 2, expect.objectContaining({ id: expect.any(String), - index: 'somewhere', + index: '.kibana-reporting', + op_type: 'create', + refresh: 'wait_for', body: { + '@timestamp': '1970-01-01T00:00:00.000Z', parent_id: 'something', output: { content: '56', @@ -335,9 +341,12 @@ describe('ContentStream', () => { 1, expect.objectContaining({ id: expect.any(String), - index: 'somewhere', + index: '.kibana-reporting', + op_type: 'create', + refresh: 'wait_for', body: { parent_id: 'something', + '@timestamp': '1970-01-01T00:00:00.000Z', output: { content: Buffer.from('456').toString('base64'), chunk: 1, @@ -349,9 +358,12 @@ describe('ContentStream', () => { 2, expect.objectContaining({ id: expect.any(String), - index: 'somewhere', + index: '.kibana-reporting', + op_type: 'create', + refresh: 'wait_for', body: { parent_id: 'something', + '@timestamp': '1970-01-01T00:00:00.000Z', output: { content: Buffer.from('78').toString('base64'), chunk: 2, diff --git a/x-pack/plugins/reporting/server/lib/content_stream.ts b/x-pack/plugins/reporting/server/lib/content_stream.ts index 17362516d2c9d..b3c113dd43c3b 100644 --- a/x-pack/plugins/reporting/server/lib/content_stream.ts +++ b/x-pack/plugins/reporting/server/lib/content_stream.ts @@ -8,9 +8,13 @@ import { Duplex } from 'stream'; import { v4 as uuidv4 } from 'uuid'; -import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { estypes } from '@elastic/elasticsearch'; import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import type { ReportSource } from '@kbn/reporting-common/types'; +import { + REPORTING_DATA_STREAM_ALIAS, + REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY, +} from '@kbn/reporting-server'; import type { ReportingCore } from '..'; const ONE_MB = 1024 * 1024; @@ -31,6 +35,7 @@ interface ChunkOutput { } interface ChunkSource { + '@timestamp': string; parent_id: string; output: ChunkOutput; } @@ -90,7 +95,7 @@ export class ContentStream extends Duplex { private async readHead() { const { id, index } = this.document; - const body: SearchRequest['body'] = { + const body: SearchRequest = { _source: { includes: ['output.content', 'output.size', 'jobtype'] }, query: { constant_score: { @@ -110,13 +115,14 @@ export class ContentStream extends Duplex { const hits = response?.hits?.hits?.[0]; this.jobSize = hits?._source?.output?.size; + this.logger.debug(`Reading job of size ${this.jobSize}`); return hits?._source?.output?.content; } private async readChunk() { - const { id, index } = this.document; - const body: SearchRequest['body'] = { + const { id } = this.document; + const body: SearchRequest = { _source: { includes: ['output.content'] }, query: { constant_score: { @@ -132,7 +138,10 @@ export class ContentStream extends Duplex { this.logger.debug(`Reading chunk #${this.chunksRead}.`); - const response = await this.client.search({ body, index }); + const response = await this.client.search({ + body, + index: REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY, + }); const hits = response?.hits?.hits?.[0]; return hits?._source?.output.content; @@ -179,10 +188,11 @@ export class ContentStream extends Duplex { } private async writeHead(content: string) { - this.logger.debug(`Updating report contents.`); + this.logger.debug(`Updating chunk #0 (${this.document.id}).`); const body = await this.client.update({ ...this.document, + refresh: 'wait_for', body: { doc: { output: { content }, @@ -194,16 +204,19 @@ export class ContentStream extends Duplex { } private async writeChunk(content: string) { - const { id: parentId, index } = this.document; + const { id: parentId } = this.document; const id = uuidv4(); this.logger.debug(`Writing chunk #${this.chunksWritten} (${id}).`); await this.client.index({ id, - index, + index: REPORTING_DATA_STREAM_ALIAS, + refresh: 'wait_for', + op_type: 'create', body: { parent_id: parentId, + '@timestamp': new Date(0).toISOString(), // required for data streams compatibility output: { content, chunk: this.chunksWritten, diff --git a/x-pack/plugins/reporting/server/lib/deprecations/check_ilm_migration_status.ts b/x-pack/plugins/reporting/server/lib/deprecations/check_ilm_migration_status.ts deleted file mode 100644 index aab4c1f0cecf4..0000000000000 --- a/x-pack/plugins/reporting/server/lib/deprecations/check_ilm_migration_status.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -import { IlmPolicyMigrationStatus } from '@kbn/reporting-common/url'; -import { ILM_POLICY_NAME } from '@kbn/reporting-common'; -import { IlmPolicyManager } from '../store/ilm_policy_manager'; -import type { DeprecationsDependencies } from './types'; - -export const checkIlmMigrationStatus = async ({ - reportingCore, - elasticsearchClient, -}: DeprecationsDependencies): Promise => { - const ilmPolicyManager = IlmPolicyManager.create({ client: elasticsearchClient }); - if (!(await ilmPolicyManager.doesIlmPolicyExist())) { - return 'policy-not-found'; - } - - const store = await reportingCore.getStore(); - const indexPattern = store.getReportingIndexPattern(); - - const reportingIndicesSettings = await elasticsearchClient.indices.getSettings({ - index: indexPattern, - }); - - const hasUnmanagedIndices = Object.values(reportingIndicesSettings).some((settings) => { - return ( - settings?.settings?.index?.lifecycle?.name !== ILM_POLICY_NAME && - settings?.settings?.['index.lifecycle']?.name !== ILM_POLICY_NAME - ); - }); - - return hasUnmanagedIndices ? 'indices-not-managed-by-policy' : 'ok'; -}; diff --git a/x-pack/plugins/reporting/server/lib/deprecations/index.ts b/x-pack/plugins/reporting/server/lib/deprecations/index.ts index 2ddc46663600f..a4d1ee919e1cc 100644 --- a/x-pack/plugins/reporting/server/lib/deprecations/index.ts +++ b/x-pack/plugins/reporting/server/lib/deprecations/index.ts @@ -9,7 +9,6 @@ import { errors } from '@elastic/elasticsearch'; import Boom from '@hapi/boom'; import { i18n } from '@kbn/i18n'; import { DeprecationsDetails, DocLinksServiceSetup } from '@kbn/core/server'; -import { checkIlmMigrationStatus } from './check_ilm_migration_status'; function deprecationError( title: string, @@ -83,7 +82,6 @@ function getDetailedErrorMessage(error: any): string { } export const deprecations = { - checkIlmMigrationStatus, deprecationError, getDetailedErrorMessage, getErrorStatusCode, diff --git a/x-pack/plugins/reporting/server/lib/deprecations/types.ts b/x-pack/plugins/reporting/server/lib/deprecations/types.ts index 6df429d2b2ed9..5f572f89911ef 100644 --- a/x-pack/plugins/reporting/server/lib/deprecations/types.ts +++ b/x-pack/plugins/reporting/server/lib/deprecations/types.ts @@ -6,9 +6,7 @@ */ import type { ElasticsearchClient } from '@kbn/core/server'; -import type { ReportingCore } from '../../core'; export interface DeprecationsDependencies { - reportingCore: ReportingCore; elasticsearchClient: ElasticsearchClient; } diff --git a/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/ilm_policy_manager.ts b/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/ilm_policy_manager.ts index 90bda652898f3..950d6ea5e84c6 100644 --- a/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/ilm_policy_manager.ts +++ b/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/ilm_policy_manager.ts @@ -5,12 +5,19 @@ * 2.0. */ +import type { estypes } from '@elastic/elasticsearch'; import type { ElasticsearchClient } from '@kbn/core/server'; import { ILM_POLICY_NAME } from '@kbn/reporting-common'; -import { reportingIlmPolicy } from './constants'; +import { IlmPolicyMigrationStatus } from '@kbn/reporting-common/types'; +import { + REPORTING_DATA_STREAM_ALIAS, + REPORTING_DATA_STREAM_COMPONENT_TEMPLATE, + REPORTING_DATA_STREAM_WILDCARD, + REPORTING_LEGACY_INDICES, +} from '@kbn/reporting-server'; /** - * Responsible for detecting and provisioning the reporting ILM policy. + * Responsible for detecting and provisioning the reporting ILM policy in stateful deployments. * * Uses the provided {@link ElasticsearchClient} to scope request privileges. */ @@ -21,6 +28,9 @@ export class IlmPolicyManager { return new IlmPolicyManager(opts.client); } + /** + * Check that the ILM policy exists + */ public async doesIlmPolicyExist(): Promise { try { await this.client.ilm.getLifecycle({ name: ILM_POLICY_NAME }); @@ -33,13 +43,95 @@ export class IlmPolicyManager { } } + /** + * This method is automatically called on the Stack Management > Reporting page, by the `` API for users with + * privilege to manage ILM, to notify them when attention is needed to update the policy for any reason. + */ + public async checkIlmMigrationStatus(): Promise { + if (!(await this.doesIlmPolicyExist())) { + return 'policy-not-found'; + } + + const [reportingDataStreamSettings, reportingLegacyIndexSettings] = await Promise.all([ + this.client.indices.getSettings({ + index: REPORTING_DATA_STREAM_WILDCARD, + }), + this.client.indices.getSettings({ + index: REPORTING_LEGACY_INDICES, + }), + ]); + + const hasUnmanaged = (settings: estypes.IndicesIndexState) => { + return ( + settings?.settings?.index?.lifecycle?.name !== ILM_POLICY_NAME && + settings?.settings?.['index.lifecycle']?.name !== ILM_POLICY_NAME + ); + }; + + const hasUnmanagedDataStream = Object.values(reportingDataStreamSettings).some(hasUnmanaged); + const hasUnmanagedIndices = Object.values(reportingLegacyIndexSettings).some(hasUnmanaged); + + return hasUnmanagedDataStream || hasUnmanagedIndices ? 'indices-not-managed-by-policy' : 'ok'; + } + /** * Create the Reporting ILM policy */ public async createIlmPolicy(): Promise { await this.client.ilm.putLifecycle({ name: ILM_POLICY_NAME, - body: reportingIlmPolicy, + policy: { phases: { hot: { actions: {} } } }, + }); + } + + /** + * Update the Data Stream index template with a link to the Reporting ILM policy + */ + public async linkIlmPolicy() { + const putTemplateAcknowledged = await this.client.cluster.putComponentTemplate({ + name: REPORTING_DATA_STREAM_COMPONENT_TEMPLATE, + template: { settings: { lifecycle: { name: ILM_POLICY_NAME } } }, + create: false, + }); + + let backingIndicesAcknowledged: { acknowledged: boolean | null } = { acknowledged: null }; + const backingIndicesExist = await this.client.indices.exists({ + index: REPORTING_DATA_STREAM_ALIAS, + expand_wildcards: ['hidden'], + }); + if (backingIndicesExist) { + backingIndicesAcknowledged = await this.client.indices.putSettings({ + index: REPORTING_DATA_STREAM_ALIAS, + settings: { lifecycle: { name: ILM_POLICY_NAME } }, + }); + } + + return { putTemplateResponse: putTemplateAcknowledged, backingIndicesAcknowledged }; + } + + /** + * Update datastream to use ILM policy. If legacy indices exist, this attempts to link + * the ILM policy to them as well. + */ + public async migrateIndicesToIlmPolicy() { + const { + putTemplateResponse: { acknowledged: putTemplateAcknowledged }, + backingIndicesAcknowledged: { acknowledged: backingIndicesAcknowledged }, + } = await this.linkIlmPolicy(); + + let legacyAcknowledged: boolean | null = null; + const legacyExists = await this.client.indices.exists({ + index: REPORTING_LEGACY_INDICES, + expand_wildcards: ['hidden'], }); + if (legacyExists) { + const { acknowledged } = await this.client.indices.putSettings({ + index: REPORTING_LEGACY_INDICES, + settings: { lifecycle: { name: ILM_POLICY_NAME } }, + }); + legacyAcknowledged = acknowledged; + } + + return { putTemplateAcknowledged, backingIndicesAcknowledged, legacyAcknowledged }; } } diff --git a/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/index.ts b/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/index.ts index 045a9ecb59997..a10b1dbb26151 100644 --- a/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/index.ts +++ b/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/index.ts @@ -5,5 +5,4 @@ * 2.0. */ -export { reportingIlmPolicy } from './constants'; export { IlmPolicyManager } from './ilm_policy_manager'; diff --git a/x-pack/plugins/reporting/server/lib/store/mapping.ts b/x-pack/plugins/reporting/server/lib/store/mapping.ts deleted file mode 100644 index 9accfd0c75184..0000000000000 --- a/x-pack/plugins/reporting/server/lib/store/mapping.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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 const mapping = { - meta: { - // We are indexing these properties with both text and keyword fields - // because that's what will be auto generated when an index already exists. - properties: { - // ID of the app this report: search, visualization or dashboard, etc - objectType: { - type: 'text', - fields: { - keyword: { - type: 'keyword', - ignore_above: 256, - }, - }, - }, - layout: { - type: 'text', - fields: { - keyword: { - type: 'keyword', - ignore_above: 256, - }, - }, - }, - isDeprecated: { - type: 'boolean', - }, - }, - }, - migration_version: { type: 'keyword' }, // new field (7.14) to distinguish reports that were scheduled with Task Manager - jobtype: { type: 'keyword' }, - payload: { type: 'object', enabled: false }, - priority: { type: 'byte' }, // TODO: remove: this is unused - timeout: { type: 'long' }, - process_expiration: { type: 'date' }, - created_by: { type: 'keyword' }, // `null` if security is disabled - created_at: { type: 'date' }, - started_at: { type: 'date' }, - completed_at: { type: 'date' }, - attempts: { type: 'short' }, - max_attempts: { type: 'short' }, - kibana_name: { type: 'keyword' }, - kibana_id: { type: 'keyword' }, - status: { type: 'keyword' }, - parent_id: { type: 'keyword' }, - output: { - type: 'object', - properties: { - error_code: { type: 'keyword' }, - chunk: { type: 'long' }, - content_type: { type: 'keyword' }, - size: { type: 'long' }, - content: { type: 'object', enabled: false }, - }, - }, - metrics: { - type: 'object', - properties: { - csv: { - type: 'object', - properties: { - rows: { type: 'long' }, - }, - }, - pdf: { - type: 'object', - properties: { - pages: { type: 'long' }, - cpu: { type: 'double' }, - cpuInPercentage: { type: 'double' }, - memory: { type: 'long' }, - memoryInMegabytes: { type: 'double' }, - }, - }, - png: { - type: 'object', - properties: { - cpu: { type: 'double' }, - cpuInPercentage: { type: 'double' }, - memory: { type: 'long' }, - memoryInMegabytes: { type: 'double' }, - }, - }, - }, - }, -} as const; diff --git a/x-pack/plugins/reporting/server/lib/store/report.test.ts b/x-pack/plugins/reporting/server/lib/store/report.test.ts index f6cbbade4df7b..ca1294f663da8 100644 --- a/x-pack/plugins/reporting/server/lib/store/report.test.ts +++ b/x-pack/plugins/reporting/server/lib/store/report.test.ts @@ -124,6 +124,9 @@ describe('Class Report', () => { it('throws error if converted to task JSON before being synced with ES storage', () => { const report = new Report({ jobtype: 'spam', payload: {} } as any); + // @ts-ignore null is not applicable to string + report._index = null; + expect(() => report.updateWithEsDoc(report)).toThrowErrorMatchingInlineSnapshot( `"Report object from ES has missing fields!"` ); diff --git a/x-pack/plugins/reporting/server/lib/store/report.ts b/x-pack/plugins/reporting/server/lib/store/report.ts index e62f4f2f20b58..6eb0960aedd93 100644 --- a/x-pack/plugins/reporting/server/lib/store/report.ts +++ b/x-pack/plugins/reporting/server/lib/store/report.ts @@ -10,6 +10,7 @@ import moment from 'moment'; import { v4 as uuidv4 } from 'uuid'; import { JOB_STATUS } from '@kbn/reporting-common'; +import { REPORTING_DATA_STREAM_ALIAS } from '@kbn/reporting-server'; import { ReportApiJSON, ReportDocumentHead, @@ -25,7 +26,7 @@ export const MIGRATION_VERSION = '7.14.0'; * Class for an ephemeral report document: possibly is not saved in Elasticsearch */ export class Report implements Partial { - public _index?: string; + public _index: string; public _id: string; public _primary_term?: number; // set by ES public _seq_no?: number; // set by ES @@ -63,7 +64,7 @@ export class Report implements Partial { */ constructor(opts: Partial & Partial, fields?: ReportFields) { this._id = opts._id != null ? opts._id : uuidv4(); - this._index = opts._index; + this._index = opts._index ?? REPORTING_DATA_STREAM_ALIAS; // Sets the value to the data stream, unless it's a stored report and we know the name of the backing index this._primary_term = opts._primary_term; this._seq_no = opts._seq_no; @@ -167,7 +168,7 @@ export class Report implements Partial { toApiJSON(): ReportApiJSON { return { id: this._id, - index: this._index!, + index: this._index ?? REPORTING_DATA_STREAM_ALIAS, kibana_name: this.kibana_name, kibana_id: this.kibana_id, jobtype: this.jobtype, diff --git a/x-pack/plugins/reporting/server/lib/store/store.test.ts b/x-pack/plugins/reporting/server/lib/store/store.test.ts index 946ceb4f105b0..826e13c0ac696 100644 --- a/x-pack/plugins/reporting/server/lib/store/store.test.ts +++ b/x-pack/plugins/reporting/server/lib/store/store.test.ts @@ -80,70 +80,6 @@ describe('ReportingStore', () => { ); }); - it('handles error creating the index', async () => { - // setup - mockEsClient.indices.exists.mockResponse(false); - mockEsClient.indices.create.mockRejectedValue(new Error('horrible error')); - - const store = new ReportingStore(mockCore, mockLogger); - const mockReport = new Report({ - _index: '.reporting-errortest', - jobtype: 'unknowntype', - payload: {}, - meta: {}, - } as any); - await expect(store.addReport(mockReport)).rejects.toMatchInlineSnapshot( - `[Error: horrible error]` - ); - }); - - /* Creating the index will fail, if there were multiple jobs staged in - * parallel and creation completed from another Kibana instance. Only the - * first request in line can successfully create it. - * In spite of that race condition, adding the new job in Elasticsearch is - * fine. - */ - it('ignores index creation error if the index already exists and continues adding the report', async () => { - // setup - mockEsClient.indices.exists.mockResponse(false); - mockEsClient.indices.create.mockRejectedValue(new Error('devastating error')); - - const store = new ReportingStore(mockCore, mockLogger); - const mockReport = new Report({ - _index: '.reporting-mock', - jobtype: 'unknowntype', - payload: {}, - meta: {}, - } as any); - await expect(store.addReport(mockReport)).rejects.toMatchInlineSnapshot( - `[Error: devastating error]` - ); - }); - - it('skips creating the index if already exists', async () => { - // setup - mockEsClient.indices.exists.mockResponse(false); - // will be triggered but ignored - mockEsClient.indices.create.mockRejectedValue(new Error('resource_already_exists_exception')); - - const store = new ReportingStore(mockCore, mockLogger); - const mockReport = new Report({ - created_by: 'user1', - jobtype: 'unknowntype', - payload: {}, - meta: {}, - } as any); - await expect(store.addReport(mockReport)).resolves.toMatchObject({ - _primary_term: undefined, - _seq_no: undefined, - attempts: 0, - created_by: 'user1', - jobtype: 'unknowntype', - payload: {}, - status: 'pending', - }); - }); - it('allows username string to be `false`', async () => { // setup mockEsClient.indices.exists.mockResponse(false); @@ -426,16 +362,14 @@ describe('ReportingStore', () => { expect(mockEsClient.ilm.getLifecycle).toHaveBeenCalledWith({ name: 'kibana-reporting' }); expect(mockEsClient.ilm.putLifecycle.mock.calls[0][0]).toMatchInlineSnapshot(` Object { - "body": Object { - "policy": Object { - "phases": Object { - "hot": Object { - "actions": Object {}, - }, + "name": "kibana-reporting", + "policy": Object { + "phases": Object { + "hot": Object { + "actions": Object {}, }, }, }, - "name": "kibana-reporting", } `); }); diff --git a/x-pack/plugins/reporting/server/lib/store/store.ts b/x-pack/plugins/reporting/server/lib/store/store.ts index 543045393a1b2..648230113780d 100644 --- a/x-pack/plugins/reporting/server/lib/store/store.ts +++ b/x-pack/plugins/reporting/server/lib/store/store.ts @@ -14,15 +14,16 @@ import type { ReportOutput, ReportSource, } from '@kbn/reporting-common/types'; -import { REPORTING_SYSTEM_INDEX } from '@kbn/reporting-server'; +import { + REPORTING_DATA_STREAM_ALIAS, + REPORTING_DATA_STREAM_COMPONENT_TEMPLATE, +} from '@kbn/reporting-server'; import moment from 'moment'; import type { Report } from '.'; import { SavedReport } from '.'; import type { ReportingCore } from '../..'; import type { ReportTaskParams } from '../tasks'; import { IlmPolicyManager } from './ilm_policy_manager'; -import { indexTimestamp } from './index_timestamp'; -import { mapping } from './mapping'; import { MIGRATION_VERSION } from './report'; type UpdateResponse = estypes.UpdateResponse; @@ -71,6 +72,7 @@ const sourceDoc = (doc: Partial): Partial => { return { ...doc, migration_version: MIGRATION_VERSION, + '@timestamp': new Date(0).toISOString(), // required for data streams compatibility }; }; @@ -103,16 +105,9 @@ const jobDebugMessage = (report: Report) => * - interface for downloading the report */ export class ReportingStore { - private readonly indexPrefix: string; // config setting of index prefix in system index name - private readonly indexInterval: string; // config setting of index prefix: how often to poll for pending work private client?: ElasticsearchClient; - config: ReportingCore['config']; constructor(private reportingCore: ReportingCore, private logger: Logger) { - this.config = reportingCore.getConfig(); - - this.indexPrefix = REPORTING_SYSTEM_INDEX; - this.indexInterval = this.config.queue.indexInterval; this.logger = logger.get('store'); } @@ -124,62 +119,28 @@ export class ReportingStore { return this.client; } - private async getIlmPolicyManager() { - const client = await this.getClient(); - return IlmPolicyManager.create({ client }); - } - - private async createIndex(indexName: string) { + private async createIlmPolicy() { const client = await this.getClient(); - const exists = await client.indices.exists({ index: indexName }); - - if (exists) { - return exists; + const ilmPolicyManager = IlmPolicyManager.create({ client }); + if (await ilmPolicyManager.doesIlmPolicyExist()) { + this.logger.debug(`Found ILM policy ${ILM_POLICY_NAME}; skipping creation.`); + } else { + this.logger.info(`Creating ILM policy for reporting data stream: ${ILM_POLICY_NAME}`); + await ilmPolicyManager.createIlmPolicy(); } - const indexSettings = this.config.statefulSettings.enabled - ? { - settings: { - number_of_shards: 1, - auto_expand_replicas: '0-1', - lifecycle: { - name: ILM_POLICY_NAME, - }, - }, - } - : {}; - - try { - await client.indices.create({ - index: indexName, - body: { - ...indexSettings, - mappings: { - properties: mapping, - }, - }, - }); - - return true; - } catch (error) { - const isIndexExistsError = error.message.match(/resource_already_exists_exception/); - if (isIndexExistsError) { - // Do not fail a job if the job runner hits the race condition. - this.logger.warn(`Automatic index creation failed: index already exists: ${error}`); - return; - } - - this.logger.error(error); - - throw error; - } + this.logger.info( + `Linking ILM policy to reporting data stream: ${REPORTING_DATA_STREAM_ALIAS}, component template: ${REPORTING_DATA_STREAM_COMPONENT_TEMPLATE}` + ); + await ilmPolicyManager.linkIlmPolicy(); } private async indexReport(report: Report): Promise { const doc = { - index: report._index!, + index: REPORTING_DATA_STREAM_ALIAS, id: report._id, refresh: 'wait_for' as estypes.Refresh, + op_type: 'create' as const, body: { ...report.toReportSource(), ...sourceDoc({ @@ -193,52 +154,23 @@ export class ReportingStore { return await client.index(doc); } - /* - * Called from addReport, which handles any errors - */ - private async refreshIndex(index: string) { - const client = await this.getClient(); - - return client.indices.refresh({ index }); - } - /** * Function to be called during plugin start phase. This ensures the environment is correctly * configured for storage of reports. */ public async start() { - if (!this.config.statefulSettings.enabled) { - return; - } - const ilmPolicyManager = await this.getIlmPolicyManager(); try { - if (await ilmPolicyManager.doesIlmPolicyExist()) { - this.logger.debug(`Found ILM policy ${ILM_POLICY_NAME}; skipping creation.`); - return; - } - this.logger.info(`Creating ILM policy for managing reporting indices: ${ILM_POLICY_NAME}`); - await ilmPolicyManager.createIlmPolicy(); + await this.createIlmPolicy(); } catch (e) { this.logger.error('Error in start phase'); - this.logger.error(e.body?.error); + this.logger.error(e); throw e; } } public async addReport(report: Report): Promise { - let index = report._index; - if (!index) { - const timestamp = indexTimestamp(this.indexInterval); - index = `${this.indexPrefix}-${timestamp}`; - report._index = index; - } - await this.createIndex(index); - try { report.updateWithEsDoc(await this.indexReport(report)); - - await this.refreshIndex(index); - return report as SavedReport; } catch (err) { this.reportingCore.getEventLogger(report).logError(err); @@ -402,8 +334,4 @@ export class ReportingStore { return body; } - - public getReportingIndexPattern(): string { - return `${this.indexPrefix}-*`; - } } diff --git a/x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts b/x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts index d8a0027c42d64..c77e04ec66c22 100644 --- a/x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts +++ b/x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts @@ -54,6 +54,8 @@ const getReportingHeaders = (output: TaskRunResult, exportType: ExportType) => { }; export function getDocumentPayloadFactory(reporting: ReportingCore) { + const { logger: _logger } = reporting.getPluginSetupDeps(); + const logger = _logger.get('download-report'); const exportTypesRegistry = reporting.getExportTypesRegistry(); async function getCompleted({ @@ -88,6 +90,8 @@ export function getDocumentPayloadFactory(reporting: ReportingCore) { const jobsQuery = jobsQueryFactory(reporting); const error = await jobsQuery.getError(id); + logger.debug(`Report job ${id} has failed. Sending statusCode: 500`); + return { statusCode: 500, content: { @@ -98,7 +102,9 @@ export function getDocumentPayloadFactory(reporting: ReportingCore) { }; } - function getIncomplete({ status }: ReportApiJSON): Payload { + function getIncomplete({ id, status }: ReportApiJSON): Payload { + logger.debug(`Report job ${id} is processing. Sending statusCode: 503`); + return { statusCode: 503, content: status, diff --git a/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts b/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts index d371d49970a72..56b0ac4677449 100644 --- a/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts +++ b/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts @@ -10,7 +10,7 @@ import type { ElasticsearchClient } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { JOB_STATUS } from '@kbn/reporting-common'; import type { ReportApiJSON, ReportSource } from '@kbn/reporting-common/types'; -import { REPORTING_SYSTEM_INDEX } from '@kbn/reporting-server'; +import { REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY } from '@kbn/reporting-server'; import type { ReportingCore } from '../../..'; import { Report } from '../../../lib/store'; import { runtimeFieldKeys, runtimeFields } from '../../../lib/store/runtime_fields'; @@ -54,10 +54,6 @@ export interface JobsQueryFactory { } export function jobsQueryFactory(reportingCore: ReportingCore): JobsQueryFactory { - function getIndex() { - return `${REPORTING_SYSTEM_INDEX}-*`; - } - async function execQuery< T extends (client: ElasticsearchClient) => Promise> | undefined> >(callback: T): Promise> | undefined> { @@ -96,7 +92,7 @@ export function jobsQueryFactory(reportingCore: ReportingCore): JobsQueryFactory }); const response = (await execQuery((elasticsearchClient) => - elasticsearchClient.search({ body, index: getIndex() }) + elasticsearchClient.search({ body, index: REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY }) )) as estypes.SearchResponse; return ( @@ -127,7 +123,7 @@ export function jobsQueryFactory(reportingCore: ReportingCore): JobsQueryFactory }; const response = await execQuery((elasticsearchClient) => - elasticsearchClient.count({ body, index: getIndex() }) + elasticsearchClient.count({ body, index: REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY }) ); return response?.count ?? 0; @@ -156,7 +152,10 @@ export function jobsQueryFactory(reportingCore: ReportingCore): JobsQueryFactory }); const response = await execQuery((elasticsearchClient) => - elasticsearchClient.search({ body, index: getIndex() }) + elasticsearchClient.search({ + body, + index: REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY, + }) ); const result = response?.hits?.hits?.[0]; @@ -187,7 +186,10 @@ export function jobsQueryFactory(reportingCore: ReportingCore): JobsQueryFactory }; const response = await execQuery((elasticsearchClient) => - elasticsearchClient.search({ body, index: getIndex() }) + elasticsearchClient.search({ + body, + index: REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY, + }) ); const hits = response?.hits?.hits?.[0]; const status = hits?._source?.status; diff --git a/x-pack/plugins/reporting/server/routes/internal/deprecations/deprecations.ts b/x-pack/plugins/reporting/server/routes/internal/deprecations/deprecations.ts index d35adf717cbb9..ae8ff7fd55cf1 100644 --- a/x-pack/plugins/reporting/server/routes/internal/deprecations/deprecations.ts +++ b/x-pack/plugins/reporting/server/routes/internal/deprecations/deprecations.ts @@ -6,11 +6,11 @@ */ import { errors } from '@elastic/elasticsearch'; import type { Logger, RequestHandler } from '@kbn/core/server'; -import { ILM_POLICY_NAME, INTERNAL_ROUTES } from '@kbn/reporting-common'; -import type { IlmPolicyStatusResponse } from '@kbn/reporting-common/url'; +import { INTERNAL_ROUTES } from '@kbn/reporting-common'; +import type { IlmPolicyStatusResponse } from '@kbn/reporting-common/types'; +import { REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY } from '@kbn/reporting-server'; import type { ReportingCore } from '../../../core'; import { IlmPolicyManager } from '../../../lib'; -import { deprecations } from '../../../lib/deprecations'; import { getCounters } from '../../common'; const getAuthzWrapper = @@ -24,15 +24,13 @@ const getAuthzWrapper = const { elasticsearch } = await ctx.core; - const store = await reporting.getStore(); - try { const body = await elasticsearch.client.asCurrentUser.security.hasPrivileges({ body: { index: [ { privileges: ['manage'], // required to do anything with the reporting indices - names: [store.getReportingIndexPattern()], + names: [REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY], allow_restricted_indices: true, }, ], @@ -65,15 +63,11 @@ export const registerDeprecationsRoutes = (reporting: ReportingCore, logger: Log authzWrapper(async ({ core }, req, res) => { const counters = getCounters(req.route.method, getStatusPath, reporting.getUsageCounter()); - const { - elasticsearch: { client: scopedClient }, - } = await core; - const checkIlmMigrationStatus = () => { - return deprecations.checkIlmMigrationStatus({ - reportingCore: reporting, - // We want to make the current status visible to all reporting users - elasticsearchClient: scopedClient.asInternalUser, - }); + const checkIlmMigrationStatus = async () => { + const { client: scopedClient } = (await core).elasticsearch; + + const ilmPolicyManager = IlmPolicyManager.create({ client: scopedClient.asInternalUser }); + return ilmPolicyManager.checkIlmMigrationStatus(); }; try { @@ -106,17 +100,15 @@ export const registerDeprecationsRoutes = (reporting: ReportingCore, logger: Log authzWrapper(async ({ core }, req, res) => { const counters = getCounters(req.route.method, migrateApiPath, reporting.getUsageCounter()); - const store = await reporting.getStore(); - const { - client: { asCurrentUser: client }, - } = (await core).elasticsearch; - - const scopedIlmPolicyManager = IlmPolicyManager.create({ - client, - }); - // First we ensure that the reporting ILM policy exists in the cluster try { + const { + client: { asCurrentUser }, + } = (await core).elasticsearch; + const scopedIlmPolicyManager = IlmPolicyManager.create({ + client: asCurrentUser, + }); + // We don't want to overwrite an existing reporting policy because it may contain alterations made by users if (!(await scopedIlmPolicyManager.doesIlmPolicyExist())) { await scopedIlmPolicyManager.createIlmPolicy(); @@ -125,24 +117,19 @@ export const registerDeprecationsRoutes = (reporting: ReportingCore, logger: Log return res.customError({ statusCode: e?.statusCode ?? 500, body: { message: e.message } }); } - const indexPattern = store.getReportingIndexPattern(); - // Second we migrate all of the existing indices to be managed by the reporting ILM policy try { - await client.indices.putSettings({ - index: indexPattern, - body: { - index: { - lifecycle: { - name: ILM_POLICY_NAME, - }, - }, - }, + const { + client: { asInternalUser }, + } = (await core).elasticsearch; + const unscopedIlmPolicyManager = IlmPolicyManager.create({ + client: asInternalUser, }); + const response = await unscopedIlmPolicyManager.migrateIndicesToIlmPolicy(); counters.usageCounter(); - return res.ok(); + return res.ok({ body: response }); } catch (err) { logger.error(err); diff --git a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts index a6f428d598262..f6ce39f34d0a1 100644 --- a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts +++ b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts @@ -245,6 +245,13 @@ describe('getAlertsForNotification', () => { ).toMatchInlineSnapshot(`Array []`); }); + test('should not return recovered alerts if the activeCount is less than the rule alertDelay', () => { + const trackedEvents = cloneDeep([alert1]); + expect( + getAlertsForNotification(DEFAULT_FLAPPING_SETTINGS, 5, trackedEvents, [], newEventParams) + ).toMatchInlineSnapshot(`Array []`); + }); + test('should update active alert to look like a new alert if the activeCount is equal to the rule alertDelay', () => { const trackedEvents = cloneDeep([alert5]); expect( diff --git a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts index 15dcedeaf88ca..73cbac1b2c90a 100644 --- a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts +++ b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts @@ -56,6 +56,10 @@ export function getAlertsForNotification( } } } else if (trackedEvent.event[ALERT_STATUS] === ALERT_STATUS_RECOVERED) { + // if alert has not reached the alertDelay threshold don't recover the alert + if (trackedEvent.activeCount < alertDelay) { + continue; + } trackedEvent.activeCount = 0; if (flappingSettings.enabled) { if (trackedEvent.flapping) { diff --git a/x-pack/plugins/search_connectors/common/connectors.ts b/x-pack/plugins/search_connectors/common/connectors.ts index dd96c11487279..647e1b3b6d266 100644 --- a/x-pack/plugins/search_connectors/common/connectors.ts +++ b/x-pack/plugins/search_connectors/common/connectors.ts @@ -708,7 +708,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ } ), iconPath: 'custom.svg', - isBeta: true, + isBeta: false, isNative: false, keywords: ['custom', 'connector', 'code'], name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.customConnector.name', { diff --git a/x-pack/plugins/search_notebooks/server/data/00_quick_start.json b/x-pack/plugins/search_notebooks/server/data/00_quick_start.json index bb5ee71326683..53b3ca4e55587 100644 --- a/x-pack/plugins/search_notebooks/server/data/00_quick_start.json +++ b/x-pack/plugins/search_notebooks/server/data/00_quick_start.json @@ -70,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "WHC3hHGW-wbI", "metadata": { "id": "WHC3hHGW-wbI" @@ -96,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "f38e0397", "metadata": { "colab": { @@ -137,17 +137,39 @@ }, { "cell_type": "markdown", - "id": "1462ebd8", - "metadata": { - "id": "1462ebd8" - }, + "id": "cb6ad7e9-0636-4cf3-a803-bf160fe16b33", + "metadata": {}, "source": [ - "Confirm that the client has connected with this test." + "### Enable Telemetry\n", + "\n", + "Knowing that you are using this notebook helps us decide where to invest our efforts to improve our products. We would like to ask you that you run the following code to let us gather anonymous usage statistics. See [telemetry.py](https://github.com/elastic/elasticsearch-labs/blob/main/telemetry/telemetry.py) for details. Thank you!" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, + "id": "3b04f442-729d-406d-b826-654483498df6", + "metadata": {}, + "outputs": [], + "source": [ + "!curl -O -s https://raw.githubusercontent.com/elastic/elasticsearch-labs/main/telemetry/telemetry.py\n", + "from telemetry import enable_telemetry\n", + "\n", + "client = enable_telemetry(client, \"00-quick-start\")" + ] + }, + { + "cell_type": "markdown", + "id": "d12b707c-e89d-4b43-bee5-edb1beb84839", + "metadata": {}, + "source": [ + "### Test the Client\n", + "Before you continue, confirm that the client has connected with this test." + ] + }, + { + "cell_type": "code", + "execution_count": 8, "id": "25c618eb", "metadata": { "colab": { @@ -161,7 +183,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'name': 'instance-0000000011', 'cluster_name': 'd1bd36862ce54c7b903e2aacd4cd7f0a', 'cluster_uuid': 'tIkh0X_UQKmMFQKSfUw-VQ', 'version': {'number': '8.9.0', 'build_flavor': 'default', 'build_type': 'docker', 'build_hash': '8aa461beb06aa0417a231c345a1b8c38fb498a0d', 'build_date': '2023-07-19T14:43:58.555259655Z', 'build_snapshot': False, 'lucene_version': '9.7.0', 'minimum_wire_compatibility_version': '7.17.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'You Know, for Search'}\n" + "{'name': 'instance-0000000000', 'cluster_name': 'a72482be54904952ba46d53c3def7740', 'cluster_uuid': 'g8BE52TtT32pGBbRzP_oKA', 'version': {'number': '8.12.2', 'build_flavor': 'default', 'build_type': 'docker', 'build_hash': '48a287ab9497e852de30327444b0809e55d46466', 'build_date': '2024-02-19T10:04:32.774273190Z', 'build_snapshot': False, 'lucene_version': '9.9.2', 'minimum_wire_compatibility_version': '7.17.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'You Know, for Search'}\n" ] } ], @@ -195,7 +217,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 9, "id": "_OAahfg-tqrf", "metadata": { "colab": { @@ -211,7 +233,7 @@ "ObjectApiResponse({'acknowledged': True})" ] }, - "execution_count": 5, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -232,7 +254,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "6bc95238", "metadata": { "id": "6bc95238" @@ -244,7 +266,7 @@ "ObjectApiResponse({'acknowledged': True, 'shards_acknowledged': True, 'index': 'book_index'})" ] }, - "execution_count": 11, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -281,7 +303,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "id": "008d723e", "metadata": { "id": "008d723e" @@ -290,10 +312,10 @@ { "data": { "text/plain": [ - "ObjectApiResponse({'took': 49, 'errors': False, 'items': [{'index': {'_index': 'book_index', '_id': 'HwOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 0, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IAOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 1, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IQOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 2, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IgOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 3, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IwOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 4, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JAOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 5, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JQOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 6, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JgOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 7, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JwOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 8, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'KAOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 9, '_primary_term': 1, 'status': 201}}]})" + "ObjectApiResponse({'errors': False, 'took': 88, 'items': [{'index': {'_index': 'book_index', '_id': 'caRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 0, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'cqRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 1, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'c6RpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 2, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'dKRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 3, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'daRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 4, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'dqRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 5, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'd6RpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 6, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'eKRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 7, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'eaRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 8, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'eqRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 9, '_primary_term': 1, 'status': 201}}]})" ] }, - "execution_count": 12, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -330,7 +352,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "id": "f12ce2c9", "metadata": { "id": "f12ce2c9" @@ -369,7 +391,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "id": "Df7hwcIjYwMT", "metadata": { "colab": { @@ -384,16 +406,16 @@ "output_type": "stream", "text": [ "\n", - "ID: JwOa7osBiUNHLMdf3q2r\n", + "ID: eaRpvY4BKY8PuI1qPluy\n", "Publication date: 2008-05-15\n", "Title: JavaScript: The Good Parts\n", "Summary: A deep dive into the parts of JavaScript that are essential to writing maintainable code\n", "Publisher: oreilly\n", "Reviews: 51\n", "Authors: ['douglas crockford']\n", - "Score: 0.80428284\n", + "Score: 0.8042828\n", "\n", - "ID: IwOa7osBiUNHLMdf3q2r\n", + "ID: daRpvY4BKY8PuI1qPluy\n", "Publication date: 2015-03-27\n", "Title: You Don't Know JS: Up & Going\n", "Summary: Introduction to JavaScript and programming as a whole\n", @@ -402,7 +424,7 @@ "Authors: ['kyle simpson']\n", "Score: 0.6989136\n", "\n", - "ID: JAOa7osBiUNHLMdf3q2r\n", + "ID: dqRpvY4BKY8PuI1qPluy\n", "Publication date: 2018-12-04\n", "Title: Eloquent JavaScript\n", "Summary: A modern introduction to programming\n", @@ -411,25 +433,25 @@ "Authors: ['marijn haverbeke']\n", "Score: 0.6796988\n", "\n", - "ID: HwOa7osBiUNHLMdf3q2r\n", + "ID: caRpvY4BKY8PuI1qPluy\n", "Publication date: 2019-10-29\n", "Title: The Pragmatic Programmer: Your Journey to Mastery\n", "Summary: A guide to pragmatic programming for software engineers and developers\n", "Publisher: addison-wesley\n", "Reviews: 30\n", "Authors: ['andrew hunt', 'david thomas']\n", - "Score: 0.62065494\n", + "Score: 0.6206549\n", "\n", - "ID: KAOa7osBiUNHLMdf3q2r\n", + "ID: eqRpvY4BKY8PuI1qPluy\n", "Publication date: 2012-06-27\n", "Title: Introduction to the Theory of Computation\n", "Summary: Introduction to the theory of computation and complexity theory\n", "Publisher: cengage learning\n", "Reviews: 33\n", "Authors: ['michael sipser']\n", - "Score: 0.6008769\n", + "Score: 0.60087687\n", "\n", - "ID: JgOa7osBiUNHLMdf3q2r\n", + "ID: eKRpvY4BKY8PuI1qPluy\n", "Publication date: 2011-05-13\n", "Title: The Clean Coder: A Code of Conduct for Professional Programmers\n", "Summary: A guide to professional conduct in the field of software engineering\n", @@ -438,7 +460,7 @@ "Authors: ['robert c. martin']\n", "Score: 0.571234\n", "\n", - "ID: JQOa7osBiUNHLMdf3q2r\n", + "ID: d6RpvY4BKY8PuI1qPluy\n", "Publication date: 1994-10-31\n", "Title: Design Patterns: Elements of Reusable Object-Oriented Software\n", "Summary: Guide to design patterns that can be used in any object-oriented language\n", @@ -447,32 +469,32 @@ "Authors: ['erich gamma', 'richard helm', 'ralph johnson', 'john vlissides']\n", "Score: 0.56499225\n", "\n", - "ID: IQOa7osBiUNHLMdf3q2r\n", + "ID: c6RpvY4BKY8PuI1qPluy\n", "Publication date: 2020-04-06\n", "Title: Artificial Intelligence: A Modern Approach\n", "Summary: Comprehensive introduction to the theory and practice of artificial intelligence\n", "Publisher: pearson\n", "Reviews: 39\n", "Authors: ['stuart russell', 'peter norvig']\n", - "Score: 0.56054837\n", + "Score: 0.5605484\n", "\n", - "ID: IgOa7osBiUNHLMdf3q2r\n", + "ID: dKRpvY4BKY8PuI1qPluy\n", "Publication date: 2008-08-11\n", "Title: Clean Code: A Handbook of Agile Software Craftsmanship\n", "Summary: A guide to writing code that is easy to read, understand and maintain\n", "Publisher: prentice hall\n", "Reviews: 55\n", "Authors: ['robert c. martin']\n", - "Score: 0.54226947\n", + "Score: 0.5422694\n", "\n", - "ID: IAOa7osBiUNHLMdf3q2r\n", + "ID: cqRpvY4BKY8PuI1qPluy\n", "Publication date: 2019-05-03\n", "Title: Python Crash Course\n", "Summary: A fast-paced, no-nonsense guide to programming in Python\n", "Publisher: no starch press\n", "Reviews: 42\n", "Authors: ['eric matthes']\n", - "Score: 0.5254088\n" + "Score: 0.52540874\n" ] } ], @@ -525,7 +547,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "id": "WoE0yTchfj3A", "metadata": { "id": "WoE0yTchfj3A" @@ -536,16 +558,16 @@ "output_type": "stream", "text": [ "\n", - "ID: HwOa7osBiUNHLMdf3q2r\n", + "ID: caRpvY4BKY8PuI1qPluy\n", "Publication date: 2019-10-29\n", "Title: The Pragmatic Programmer: Your Journey to Mastery\n", "Summary: A guide to pragmatic programming for software engineers and developers\n", "Publisher: addison-wesley\n", "Reviews: 30\n", "Authors: ['andrew hunt', 'david thomas']\n", - "Score: 0.62065494\n", + "Score: 0.6206549\n", "\n", - "ID: JQOa7osBiUNHLMdf3q2r\n", + "ID: d6RpvY4BKY8PuI1qPluy\n", "Publication date: 1994-10-31\n", "Title: Design Patterns: Elements of Reusable Object-Oriented Software\n", "Summary: Guide to design patterns that can be used in any object-oriented language\n", @@ -570,6 +592,14 @@ "\n", "pretty_response(response)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d9edaa20-b8e8-4ce4-99b1-58b81de29dd5", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -591,7 +621,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.3" + "version": "3.10.13" } }, "nbformat": 4, diff --git a/x-pack/plugins/search_notebooks/server/data/01_keyword_querying_filtering.json b/x-pack/plugins/search_notebooks/server/data/01_keyword_querying_filtering.json index 308b65782a379..fa05b7d00bb10 100644 --- a/x-pack/plugins/search_notebooks/server/data/01_keyword_querying_filtering.json +++ b/x-pack/plugins/search_notebooks/server/data/01_keyword_querying_filtering.json @@ -8,7 +8,7 @@ "source": [ "# Keyword querying and filtering\n", "\n", - "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/elasticsearch-labs/blob/main/search/01-keyword-querying-filtering.ipynb)\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/elastic/elasticsearch-labs/blob/main/notebooks/search/01-keyword-querying-filtering.ipynb)\n", "\n", "This interactive notebook will introduce you to the basic Elasticsearch queries, using the official Elasticsearch Python client. Before getting started on this section you should work through our [quick start](https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/search/00-quick-start.ipynb), as you will be using the same dataset." ] @@ -67,6 +67,44 @@ ")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Enable Telemetry\n", + "\n", + "Knowing that you are using this notebook helps us decide where to invest our efforts to improve our products. We would like to ask you that you run the following code to let us gather anonymous usage statistics. See [telemetry.py](https://github.com/elastic/elasticsearch-labs/blob/main/telemetry/telemetry.py) for details. Thank you!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!curl -O -s https://raw.githubusercontent.com/elastic/elasticsearch-labs/main/telemetry/telemetry.py\n", + "from telemetry import enable_telemetry\n", + "\n", + "client = enable_telemetry(client, \"01-keyword-querying-filtering\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Test the Client\n", + "Before you continue, confirm that the client has connected with this test." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(client.info())" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -899,7 +937,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.3" + "version": "3.10.13" }, "vscode": { "interpreter": { diff --git a/x-pack/plugins/search_notebooks/server/data/02_hybrid_search.json b/x-pack/plugins/search_notebooks/server/data/02_hybrid_search.json index c5e9fd22caad6..3dbe93a3b15c2 100644 --- a/x-pack/plugins/search_notebooks/server/data/02_hybrid_search.json +++ b/x-pack/plugins/search_notebooks/server/data/02_hybrid_search.json @@ -115,6 +115,27 @@ ")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Enable Telemetry\n", + "\n", + "Knowing that you are using this notebook helps us decide where to invest our efforts to improve our products. We would like to ask you that you run the following code to let us gather anonymous usage statistics. See [telemetry.py](https://github.com/elastic/elasticsearch-labs/blob/main/telemetry/telemetry.py) for details. Thank you!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!curl -O -s https://raw.githubusercontent.com/elastic/elasticsearch-labs/main/telemetry/telemetry.py\n", + "from telemetry import enable_telemetry\n", + "\n", + "client = enable_telemetry(client, \"02-hybrid-search\")" + ] + }, { "attachments": {}, "cell_type": "markdown", @@ -122,7 +143,8 @@ "id": "bRHbecNeEDL3" }, "source": [ - "Confirm that the client has connected with this test" + "### Test the Client\n", + "Before you continue, confirm that the client has connected with this test." ] }, { @@ -293,7 +315,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.3" + "version": "3.10.13" }, "vscode": { "interpreter": { diff --git a/x-pack/plugins/search_notebooks/server/data/03_elser.json b/x-pack/plugins/search_notebooks/server/data/03_elser.json index c6c5e6afcbc3f..303dfb3c8dcdd 100644 --- a/x-pack/plugins/search_notebooks/server/data/03_elser.json +++ b/x-pack/plugins/search_notebooks/server/data/03_elser.json @@ -117,6 +117,27 @@ ")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Enable Telemetry\n", + "\n", + "Knowing that you are using this notebook helps us decide where to invest our efforts to improve our products. We would like to ask you that you run the following code to let us gather anonymous usage statistics. See [telemetry.py](https://github.com/elastic/elasticsearch-labs/blob/main/telemetry/telemetry.py) for details. Thank you!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!curl -O -s https://raw.githubusercontent.com/elastic/elasticsearch-labs/main/telemetry/telemetry.py\n", + "from telemetry import enable_telemetry\n", + "\n", + "client = enable_telemetry(client, \"03-ELSER\")" + ] + }, { "attachments": {}, "cell_type": "markdown", @@ -124,7 +145,8 @@ "id": "bRHbecNeEDL3" }, "source": [ - "Confirm that the client has connected with this test" + "### Test the Client\n", + "Before you continue, confirm that the client has connected with this test." ] }, { @@ -539,7 +561,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.6" + "version": "3.10.13" }, "vscode": { "interpreter": { diff --git a/x-pack/plugins/search_notebooks/server/data/04_multilingual.json b/x-pack/plugins/search_notebooks/server/data/04_multilingual.json index 9b41984a69035..5071f103759c4 100644 --- a/x-pack/plugins/search_notebooks/server/data/04_multilingual.json +++ b/x-pack/plugins/search_notebooks/server/data/04_multilingual.json @@ -255,6 +255,27 @@ ")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Enable Telemetry\n", + "\n", + "Knowing that you are using this notebook helps us decide where to invest our efforts to improve our products. We would like to ask you that you run the following code to let us gather anonymous usage statistics. See [telemetry.py](https://github.com/elastic/elasticsearch-labs/blob/main/telemetry/telemetry.py) for details. Thank you!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!curl -O -s https://raw.githubusercontent.com/elastic/elasticsearch-labs/main/telemetry/telemetry.py\n", + "from telemetry import enable_telemetry\n", + "\n", + "client = enable_telemetry(client, \"04-multilingual\")" + ] + }, { "attachments": {}, "cell_type": "markdown", @@ -262,7 +283,8 @@ "id": "bRHbecNeEDL3" }, "source": [ - "Confirm that the client has connected with this test" + "### Test the Client\n", + "Before you continue, confirm that the client has connected with this test." ] }, { @@ -653,7 +675,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.3" + "version": "3.10.13" }, "vscode": { "interpreter": { diff --git a/x-pack/plugins/search_playground/public/chat_playground_overview.tsx b/x-pack/plugins/search_playground/public/chat_playground_overview.tsx index d40996ba91455..fc350356e873a 100644 --- a/x-pack/plugins/search_playground/public/chat_playground_overview.tsx +++ b/x-pack/plugins/search_playground/public/chat_playground_overview.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; -import { EuiBetaBadge, EuiFlexGroup, EuiFlexItem, EuiPageTemplate } from '@elastic/eui'; +import { EuiBetaBadge, EuiFlexGroup, EuiFlexItem, EuiPageTemplate, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { PlaygroundProvider } from './providers/playground_provider'; @@ -27,11 +27,7 @@ export const ChatPlaygroundOverview: React.FC = () => { ); return ( - + { grow={false} > .euiFlexGroup': { flexWrap: 'wrap' } }} pageTitle={ - - - + +

+ +

+
{ component="form" css={{ display: 'flex', flexGrow: 1 }} onSubmit={handleSubmit(onSubmit)} + data-test-subj="chatPage" > { isLoading={isSubmitting} isDisabled={!isValid} iconType={TelegramIcon} + data-test-subj="sendQuestionButton" /> ) } diff --git a/x-pack/plugins/search_playground/public/components/edit_context/edit_context_action.tsx b/x-pack/plugins/search_playground/public/components/edit_context/edit_context_action.tsx index 45e956472bf9a..6e9a638248660 100644 --- a/x-pack/plugins/search_playground/public/components/edit_context/edit_context_action.tsx +++ b/x-pack/plugins/search_playground/public/components/edit_context/edit_context_action.tsx @@ -22,7 +22,11 @@ export const EditContextAction: React.FC = () => { return ( <> {showFlyout && } - setShowFlyout(true)} disabled={selectedIndices?.length === 0}> + setShowFlyout(true)} + disabled={selectedIndices?.length === 0} + data-test-subj="editContextActionButton" + > = ({ onClose }) }, [usageTracker]); return ( - +

@@ -172,6 +172,7 @@ export const EditContextFlyout: React.FC = ({ onClose }) options={group.source_fields.map((field) => ({ value: field, inputDisplay: field, + 'data-test-subj': 'contextField', }))} valueOfSelected={tempSourceFields[index]?.[0]} onChange={(value) => updateSourceField(index, value)} diff --git a/x-pack/plugins/search_playground/public/components/message_list/user_message.tsx b/x-pack/plugins/search_playground/public/components/message_list/user_message.tsx index b2ad7d6e1b647..12c1d86283404 100644 --- a/x-pack/plugins/search_playground/public/components/message_list/user_message.tsx +++ b/x-pack/plugins/search_playground/public/components/message_list/user_message.tsx @@ -57,6 +57,7 @@ export const UserMessage: React.FC = ({ content, createdAt }) })} /> } + data-test-subj="userMessage" >

{content}

diff --git a/x-pack/plugins/search_playground/public/components/question_input.tsx b/x-pack/plugins/search_playground/public/components/question_input.tsx index 0077e2ac7bf73..cdc9d347e4ff8 100644 --- a/x-pack/plugins/search_playground/public/components/question_input.tsx +++ b/x-pack/plugins/search_playground/public/components/question_input.tsx @@ -66,6 +66,7 @@ export const QuestionInput: React.FC = ({ onChange={handleChange} disabled={isDisabled} resize="none" + data-test-subj="questionInput" />
= ({ disabled: selectedIndices.includes(index), }))} isClearable={false} + data-test-subj="selectIndicesComboBox" /> ); diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx index 5a270fe3d44dd..992ae7e574658 100644 --- a/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx +++ b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx @@ -34,7 +34,7 @@ export const SourcesPanelForStartChat: React.FC = () => { defaultMessage: "Select the Elasticsearch indices you'd like to query, providing additional context for the LLM.", })} - isValid={!!selectedIndices.length} + isValid={!!selectedIndices?.length} dataTestSubj="selectIndicesChatPanel" > {!!selectedIndices?.length && ( diff --git a/x-pack/plugins/search_playground/public/components/start_new_chat.test.tsx b/x-pack/plugins/search_playground/public/components/start_new_chat.test.tsx new file mode 100644 index 0000000000000..ed380e00eb1da --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/start_new_chat.test.tsx @@ -0,0 +1,123 @@ +/* + * 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. + */ + +import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; + +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { MemoryRouter, useSearchParams } from 'react-router-dom-v5-compat'; +import { StartNewChat } from './start_new_chat'; +import { useLoadConnectors } from '../hooks/use_load_connectors'; +import { useUsageTracker } from '../hooks/use_usage_tracker'; +import { AnalyticsEvents } from '../analytics/constants'; +import { useSourceIndicesFields } from '../hooks/use_source_indices_field'; +import { useKibana } from '../hooks/use_kibana'; +import { PlaygroundProvider } from '../providers/playground_provider'; + +jest.mock('../hooks/use_load_connectors'); +jest.mock('../hooks/use_usage_tracker'); +jest.mock('../hooks/use_source_indices_field', () => ({ + useSourceIndicesFields: jest.fn(() => ({ addIndex: jest.fn() })), +})); +jest.mock('react-router-dom-v5-compat', () => ({ + ...jest.requireActual('react-router-dom-v5-compat'), + useSearchParams: jest.fn(), +})); +jest.mock('../hooks/use_kibana'); + +const mockUseLoadConnectors = useLoadConnectors as jest.Mock; +const mockUseUsageTracker = useUsageTracker as jest.Mock; +const mockUseSearchParams = useSearchParams as jest.Mock; + +const renderWithForm = (ui: React.ReactElement) => { + const Wrapper: React.FC = ({ children }) => { + return ( + + {children} + + ); + }; + return render(ui, { wrapper: Wrapper }); +}; + +const mockConnectors = { + '1': { title: 'Connector 1' }, + '2': { title: 'Connector 2' }, +}; + +describe('StartNewChat', () => { + beforeEach(() => { + mockUseLoadConnectors.mockReturnValue({ data: [] }); + mockUseUsageTracker.mockReturnValue({ load: jest.fn() }); + mockUseSearchParams.mockReturnValue([new URLSearchParams()]); + + (useKibana as jest.Mock).mockReturnValue({ + services: { + triggersActionsUi: { + getAddConnectorFlyout: () => ( +
Add Connector Flyout
+ ), + }, + }, + }); + (useLoadConnectors as jest.Mock).mockReturnValue({ + data: mockConnectors, + refetch: jest.fn(), + isLoading: false, + isSuccess: true, + }); + }); + + it('renders correctly', () => { + renderWithForm( + + + + ); + + expect(screen.getByTestId('startNewChatTitle')).toBeInTheDocument(); + }); + + it('disables the start button when form conditions are not met', () => { + renderWithForm( + + + + ); + + const startButton = screen.getByTestId('startChatButton'); + expect(startButton).toBeDisabled(); + }); + + it('tracks the page load event', () => { + const usageTracker = { load: jest.fn() }; + mockUseUsageTracker.mockReturnValue(usageTracker); + + renderWithForm( + + + + ); + + expect(usageTracker.load).toHaveBeenCalledWith(AnalyticsEvents.startNewChatPageLoaded); + }); + + it('calls addIndex when default-index is present in searchParams', () => { + const addIndex = jest.fn(); + (useSourceIndicesFields as jest.Mock).mockReturnValue({ addIndex }); + const searchParams = new URLSearchParams({ 'default-index': 'test-index' }); + mockUseSearchParams.mockReturnValue([searchParams]); + + renderWithForm( + + + + ); + + expect(addIndex).toHaveBeenCalledWith('test-index'); + }); +}); diff --git a/x-pack/plugins/search_playground/public/components/start_new_chat.tsx b/x-pack/plugins/search_playground/public/components/start_new_chat.tsx index 0db891438cb3d..0df4485ec858c 100644 --- a/x-pack/plugins/search_playground/public/components/start_new_chat.tsx +++ b/x-pack/plugins/search_playground/public/components/start_new_chat.tsx @@ -15,14 +15,16 @@ import { useEuiTheme, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import React, { useEffect } from 'react'; +import React, { useEffect, useMemo } from 'react'; import { useFormContext } from 'react-hook-form'; +import { useSearchParams } from 'react-router-dom-v5-compat'; import { useUsageTracker } from '../hooks/use_usage_tracker'; import { useLoadConnectors } from '../hooks/use_load_connectors'; import { SourcesPanelForStartChat } from './sources_panel/sources_panel_for_start_chat'; import { SetUpConnectorPanelForStartChat } from './set_up_connector_panel_for_start_chat'; import { ChatFormFields } from '../types'; import { AnalyticsEvents } from '../analytics/constants'; +import { useSourceIndicesFields } from '../hooks/use_source_indices_field'; const maxWidthPage = 640; @@ -36,12 +38,23 @@ export const StartNewChat: React.FC = ({ onStartClick }) => { const { watch } = useFormContext(); const usageTracker = useUsageTracker(); + const [searchParams] = useSearchParams(); + const index = useMemo(() => searchParams.get('default-index'), [searchParams]); + const { addIndex } = useSourceIndicesFields(); + + useEffect(() => { + if (index) { + addIndex(index); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [index]); + useEffect(() => { usageTracker?.load(AnalyticsEvents.startNewChatPageLoaded); }, [usageTracker]); return ( - + = ({ onStartClick }) => { -

+

= ({ onStartClick }) => { - + { fill onClick={() => setShowFlyout(true)} disabled={!selectedIndices || selectedIndices?.length === 0} + data-test-subj="viewCodeActionButton" > = ({ onClose }) => { }, [usageTracker, selectedLanguage]); return ( - +

diff --git a/x-pack/plugins/search_playground/public/components/view_query/view_query_action.tsx b/x-pack/plugins/search_playground/public/components/view_query/view_query_action.tsx index 9b691283bab90..53d01dc81d614 100644 --- a/x-pack/plugins/search_playground/public/components/view_query/view_query_action.tsx +++ b/x-pack/plugins/search_playground/public/components/view_query/view_query_action.tsx @@ -20,7 +20,11 @@ export const ViewQueryAction: React.FC = () => { return ( <> {showFlyout && setShowFlyout(false)} />} - setShowFlyout(true)} disabled={selectedIndices?.length === 0}> + setShowFlyout(true)} + disabled={selectedIndices?.length === 0} + data-test-subj="viewQueryActionButton" + > = ({ onClose }) => }, [usageTracker]); return ( - +

@@ -216,6 +216,7 @@ export const ViewQueryFlyout: React.FC = ({ onClose }) => /> ), checked: checked ? 'on' : undefined, + 'data-test-subj': 'queryField', }; })} listProps={{ diff --git a/x-pack/plugins/search_playground/public/providers/playground_provider.tsx b/x-pack/plugins/search_playground/public/providers/playground_provider.tsx index 301bbfe89b2e4..562658b4b8bd5 100644 --- a/x-pack/plugins/search_playground/public/providers/playground_provider.tsx +++ b/x-pack/plugins/search_playground/public/providers/playground_provider.tsx @@ -8,25 +8,23 @@ import React, { FC, PropsWithChildren } from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { FormProvider, useForm } from 'react-hook-form'; -import { ChatForm, ChatFormFields } from '../types'; +import { ChatForm } from '../types'; const queryClient = new QueryClient({}); export interface PlaygroundProviderProps { children: React.ReactNode; - defaultValues?: Partial>; } export const PlaygroundProvider: FC> = ({ children, - defaultValues, }) => { const form = useForm({ defaultValues: { prompt: 'You are an assistant for question-answering tasks.', doc_size: 3, source_fields: {}, - indices: defaultValues?.indices || [], + indices: [], }, }); diff --git a/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts b/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts index cb409461d0a48..624f6e0aa637f 100644 --- a/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts +++ b/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts @@ -84,7 +84,16 @@ describe('getChatParams', () => { context: true, type: 'anthropic', }); - expect(ActionsClientLlm).toHaveBeenCalledWith(expect.anything()); + expect(ActionsClientLlm).toHaveBeenCalledWith({ + temperature: 0, + llmType: 'bedrock', + traceId: 'test-uuid', + request: expect.anything(), + logger: expect.anything(), + model: 'custom-model', + connectorId: '2', + actions: expect.anything(), + }); expect(result.chatPrompt).toContain('How does it work?'); }); diff --git a/x-pack/plugins/search_playground/server/lib/get_chat_params.ts b/x-pack/plugins/search_playground/server/lib/get_chat_params.ts index 2dba42c668c77..8a5aeb68c7e76 100644 --- a/x-pack/plugins/search_playground/server/lib/get_chat_params.ts +++ b/x-pack/plugins/search_playground/server/lib/get_chat_params.ts @@ -16,6 +16,7 @@ import type { PluginStartContract as ActionsPluginStartContract } from '@kbn/act import type { KibanaRequest, Logger } from '@kbn/core/server'; import { BaseLanguageModel } from '@langchain/core/language_models/base'; import type { Connector } from '@kbn/actions-plugin/server/application/connector/types'; +import { getDefaultArguments } from '@kbn/elastic-assistant-common/impl/language_models/constants'; import { Prompt } from '../../common/prompt'; export const getChatParams = async ( @@ -52,6 +53,7 @@ export const getChatParams = async ( model, traceId: uuidv4(), signal: abortSignal, + temperature: getDefaultArguments().temperature, // prevents the agent from retrying on failure // failure could be due to bad connector, we should deliver that result to the client asap maxRetries: 0, @@ -63,6 +65,7 @@ export const getChatParams = async ( }); break; case BEDROCK_CONNECTOR_ID: + const llmType = 'bedrock'; chatModel = new ActionsClientLlm({ actions, logger, @@ -70,6 +73,8 @@ export const getChatParams = async ( connectorId, model, traceId: uuidv4(), + llmType, + temperature: getDefaultArguments(llmType).temperature, }); chatPrompt = Prompt(prompt, { citations, diff --git a/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.test.ts b/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.test.ts index fb52b6145ea1c..a13e51603cc7b 100644 --- a/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.test.ts +++ b/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.test.ts @@ -44,7 +44,7 @@ describe('getValueForSelectedField', () => { ); }); - test('should return undefined for missing key', () => { + test('should return empty string for missing key', () => { const hit = { _index: 'sample-index', _id: '8jSNY48B6iHEi98DL1C-', @@ -58,6 +58,23 @@ describe('getValueForSelectedField', () => { }, }; - expect(getValueForSelectedField(hit._source, 'metadata.sources')).toBeUndefined(); + expect(getValueForSelectedField(hit._source, 'metadata.sources')).toBe(''); + }); + + test('should return empty string for nested key', () => { + const hit = { + _index: 'sample-index', + _id: '8jSNY48B6iHEi98DL1C-', + _score: 0.7789394, + _source: { + test: 'The Shawshank Redemption', + metadata: { + source: + 'Over the course of several years, two convicts form a friendship, seeking consolation and, eventually, redemption through basic compassion', + }, + }, + }; + + expect(getValueForSelectedField(hit._source, 'bla.sources')).toBe(''); }); }); diff --git a/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.ts b/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.ts index 6aab9cafb387a..6a2044f2943e4 100644 --- a/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.ts +++ b/x-pack/plugins/search_playground/server/utils/get_value_for_selected_field.ts @@ -5,7 +5,8 @@ * 2.0. */ -// @ts-ignore -export const getValueForSelectedField = (source, path: string): string => { - return path.split('.').reduce((acc, key) => acc[key], source); +import { get } from 'lodash'; + +export const getValueForSelectedField = (source: unknown, path: string): string => { + return get(source, path, ''); }; diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.gen.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.gen.ts index b037534248042..f17cb2a5ee0fb 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.gen.ts +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.gen.ts @@ -155,8 +155,8 @@ export const RiskScoreWeightGlobalShared = z.object({ type: z.literal('global_identifier'), }); -export type RiskScoreWeightGlobal = z.infer; -export const RiskScoreWeightGlobal = z.union([ +export type RiskScoreWeight = z.infer; +export const RiskScoreWeight = z.union([ RiskScoreWeightGlobalShared.merge( z.object({ host: RiskScoreEntityIdentifierWeights, @@ -171,34 +171,6 @@ export const RiskScoreWeightGlobal = z.union([ ), ]); -export type RiskScoreWeightCategoryShared = z.infer; -export const RiskScoreWeightCategoryShared = z.object({ - type: z.literal('risk_category'), - value: RiskScoreCategories, -}); - -export type RiskScoreWeightCategory = z.infer; -export const RiskScoreWeightCategory = z.union([ - RiskScoreWeightCategoryShared.merge( - z.object({ - host: RiskScoreEntityIdentifierWeights, - user: RiskScoreEntityIdentifierWeights.optional(), - }) - ), - RiskScoreWeightCategoryShared.merge( - z.object({ - host: RiskScoreEntityIdentifierWeights.optional(), - user: RiskScoreEntityIdentifierWeights, - }) - ), -]); - -/** - * Configuration used to tune risk scoring. Weights can be used to change the score contribution of risk inputs for hosts and users at both a global level and also for Risk Input categories (e.g. 'category_1'). - */ -export type RiskScoreWeight = z.infer; -export const RiskScoreWeight = z.union([RiskScoreWeightGlobal, RiskScoreWeightCategory]); - /** * A list of weights to be applied to the scoring calculation. */ diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.schema.yaml b/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.schema.yaml index 7b6634876d8a6..63aa739d2133d 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/common/common.schema.yaml @@ -201,7 +201,7 @@ components: enum: - global_identifier - RiskScoreWeightGlobal: + RiskScoreWeight: oneOf: - allOf: - $ref: '#/components/schemas/RiskScoreWeightGlobalShared' @@ -225,65 +225,12 @@ components: user: $ref: '#/components/schemas/RiskScoreEntityIdentifierWeights' - RiskScoreWeightCategoryShared: - x-inline: true - type: object - required: - - type - - value - properties: - type: - type: string - enum: - - risk_category - value: - $ref: '#/components/schemas/RiskScoreCategories' - - RiskScoreWeightCategory: - oneOf: - - allOf: - - $ref: '#/components/schemas/RiskScoreWeightCategoryShared' - - type: object - required: - - host - properties: - host: - $ref: '#/components/schemas/RiskScoreEntityIdentifierWeights' - user: - $ref: '#/components/schemas/RiskScoreEntityIdentifierWeights' - - - allOf: - - $ref: '#/components/schemas/RiskScoreWeightCategoryShared' - - type: object - required: - - user - properties: - host: - $ref: '#/components/schemas/RiskScoreEntityIdentifierWeights' - user: - $ref: '#/components/schemas/RiskScoreEntityIdentifierWeights' - - RiskScoreWeight: - description: "Configuration used to tune risk scoring. Weights can be used to change the score contribution of risk inputs for hosts and users at both a global level and also for Risk Input categories (e.g. 'category_1')." - oneOf: - - $ref: '#/components/schemas/RiskScoreWeightGlobal' - - $ref: '#/components/schemas/RiskScoreWeightCategory' - example: - type: 'risk_category' - value: 'category_1' - host: 0.8 - user: 0.4 - RiskScoreWeights: description: 'A list of weights to be applied to the scoring calculation.' type: array items: $ref: '#/components/schemas/RiskScoreWeight' example: - - type: 'risk_category' - value: 'category_1' - host: 0.8 - user: 0.4 - type: 'global_identifier' host: 0.5 user: 0.1 diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/common/risk_weights.schema.test.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/common/risk_weights.schema.test.ts index 59b0859300f88..e4afc38badd24 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/common/risk_weights.schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/common/risk_weights.schema.test.ts @@ -59,9 +59,7 @@ describe('risk weight schema', () => { const decoded = RiskScoreWeight.safeParse(payload) as SafeParseError; expect(decoded.success).toBeFalsy(); - expect(stringifyZodError(decoded.error)).toEqual( - 'host: Required, user: Required, type: Invalid literal value, expected "risk_category", value: Invalid literal value, expected "category_1", host: Required, and 3 more' - ); + expect(stringifyZodError(decoded.error)).toContain('host: Required, user: Required'); }); it('allows a single host weight', () => { @@ -123,44 +121,10 @@ describe('risk weight schema', () => { expect(decoded.success).toBeFalsy(); expect(stringifyZodError(decoded.error)).toEqual( - 'type: Invalid literal value, expected "global_identifier", host: Required, type: Invalid literal value, expected "global_identifier", value: Invalid literal value, expected "category_1", host: Required, and 1 more' + 'type: Invalid literal value, expected "global_identifier", host: Required, type: Invalid literal value, expected "global_identifier"' ); }); - it('rejects if neither host nor user weight are specified', () => { - const payload = { type, value: RiskCategories.category_1 }; - const decoded = RiskScoreWeight.safeParse(payload) as SafeParseError; - - expect(decoded.success).toBeFalsy(); - expect(stringifyZodError(decoded.error)).toEqual( - 'type: Invalid literal value, expected "global_identifier", host: Required, type: Invalid literal value, expected "global_identifier", user: Required, host: Required, and 1 more' - ); - }); - - it('allows a single host weight', () => { - const payload = { type, value: RiskCategories.category_1, host: 0.1 }; - const decoded = RiskScoreWeight.safeParse(payload) as SafeParseSuccess; - - expect(decoded.success).toBeTruthy(); - expect(decoded.data).toEqual(payload); - }); - - it('allows a single user weight', () => { - const payload = { type, value: RiskCategories.category_1, user: 0.1 }; - const decoded = RiskScoreWeight.safeParse(payload) as SafeParseSuccess; - - expect(decoded.success).toBeTruthy(); - expect(decoded.data).toEqual(payload); - }); - - it('allows both a host and user weight', () => { - const payload = { type, value: RiskCategories.category_1, user: 0.1, host: 0.5 }; - const decoded = RiskScoreWeight.safeParse(payload) as SafeParseSuccess; - - expect(decoded.success).toBeTruthy(); - expect(decoded.data).toEqual(payload); - }); - it('rejects a weight outside of 0-1', () => { const payload = { type, value: RiskCategories.category_1, host: -5 }; const decoded = RiskScoreWeight.safeParse(payload) as SafeParseError; @@ -170,47 +134,6 @@ describe('risk weight schema', () => { `host: Number must be greater than or equal to 0` ); }); - - it('removes extra keys if specified', () => { - const payload = { - type, - value: RiskCategories.category_1, - host: 0.1, - extra: 'even more', - }; - const decoded = RiskScoreWeight.safeParse(payload) as SafeParseSuccess; - - expect(decoded.success).toBeTruthy(); - expect(decoded.data).toEqual({ type, value: RiskCategories.category_1, host: 0.1 }); - }); - - describe('allowed category values', () => { - it('allows the alerts type for a category', () => { - const payload = { - type, - value: RiskCategories.category_1, - host: 0.1, - }; - const decoded = RiskScoreWeight.safeParse(payload) as SafeParseSuccess; - - expect(decoded.success).toBeTruthy(); - expect(decoded.data).toEqual(payload); - }); - - it('rejects an unknown category value', () => { - const payload = { - type, - value: 'unknown', - host: 0.1, - }; - const decoded = RiskScoreWeight.safeParse(payload) as SafeParseError; - - expect(decoded.success).toBeFalsy(); - expect(stringifyZodError(decoded.error)).toContain( - 'type: Invalid literal value, expected "global_identifier", type: Invalid literal value, expected "global_identifier", user: Required, value: Invalid literal value, expected "category_1", value: Invalid literal value, expected "category_1", and 1 more' - ); - }); - }); }); }); }); diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts index 12505dc87a2b0..e9da1b9a4df8c 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts @@ -29,10 +29,6 @@ import { wrapErrorAndRejectPromise, } from './utils'; -export interface SetupFleetForEndpointResponse { - endpointPackage: BulkInstallPackageInfo; -} - /** * Calls the fleet setup APIs and then installs the latest Endpoint package * @param kbnClient @@ -43,7 +39,7 @@ export const setupFleetForEndpoint = usageTracker.track( async (kbnClient: KbnClient, logger?: ToolingLog): Promise => { const log = logger ?? createToolingLogger(); - log.info(`setupFleetForEndpoint(): Setting up fleet for endpoint`); + log.debug(`setupFleetForEndpoint(): Setting up fleet for endpoint`); // Setup Fleet try { diff --git a/x-pack/plugins/security_solution/common/endpoint/format_axios_error.ts b/x-pack/plugins/security_solution/common/endpoint/format_axios_error.ts index 1f0c7da3bbad6..fa46f7940c17e 100644 --- a/x-pack/plugins/security_solution/common/endpoint/format_axios_error.ts +++ b/x-pack/plugins/security_solution/common/endpoint/format_axios_error.ts @@ -22,15 +22,18 @@ export class FormattedAxiosError extends Error { }; constructor(axiosError: AxiosError) { + const method = axiosError.config?.method ?? ''; + const url = axiosError.config?.url ?? ''; + super( `${axiosError.message}${ axiosError?.response?.data ? `: ${JSON.stringify(axiosError?.response?.data)}` : '' - }` + }${url ? `\n(Request: ${method} ${url})` : ''}` ); this.request = { - method: axiosError.config?.method ?? '?', - url: axiosError.config?.url ?? '?', + method, + url, data: axiosError.config?.data ?? '', }; diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 565177fa8b560..1ce693d5d4567 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -84,7 +84,7 @@ export const allowedExperimentalValues = Object.freeze({ * * Release: v8.14.0 */ - responseActionsSentinelOneV2Enabled: false, + responseActionsSentinelOneV2Enabled: true, /** Enables the `get-file` response action for SentinelOne */ responseActionsSentinelOneGetFileEnabled: false, @@ -138,6 +138,11 @@ export const allowedExperimentalValues = Object.freeze({ */ assistantModelEvaluation: false, + /** + * Enables the Assistant Knowledge Base by default, introduced in `8.15.0`. + */ + assistantKnowledgeBaseByDefault: false, + /** * Enables the new user details flyout displayed on the Alerts table. */ diff --git a/x-pack/plugins/security_solution/public/assistant/provider.test.tsx b/x-pack/plugins/security_solution/public/assistant/provider.test.tsx index 9ee276181b65e..3667e077a50c1 100644 --- a/x-pack/plugins/security_solution/public/assistant/provider.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/provider.test.tsx @@ -165,7 +165,7 @@ describe('createConversations', () => { ); await waitForNextUpdate(); expect(http.fetch.mock.calls[0][0]).toBe( - '/api/elastic_assistant/current_user/conversations/_bulk_action' + '/internal/elastic_assistant/current_user/conversations/_bulk_action' ); expect( http.fetch.mock.calls[0].length > 1 @@ -187,7 +187,7 @@ describe('createConversations', () => { ); await waitForNextUpdate(); expect(http.fetch.mock.calls[0][0]).toBe( - '/api/elastic_assistant/current_user/conversations/_bulk_action' + '/internal/elastic_assistant/current_user/conversations/_bulk_action' ); const createdConversations = http.fetch.mock.calls[0].length > 1 diff --git a/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.test.ts b/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.test.ts index e6b3b1886deec..9a00f462cd870 100644 --- a/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.test.ts +++ b/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.test.ts @@ -11,6 +11,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { useGetEndpointDetails } from '../../../management/hooks'; import { HostStatus } from '../../../../common/endpoint/types'; import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; +import { HOST_ENDPOINT_UNENROLLED_TOOLTIP } from './translations'; jest.mock('../../../common/hooks/use_experimental_features'); jest.mock('../../../management/hooks', () => ({ @@ -110,6 +111,17 @@ describe('#useResponderActionData', () => { ); expect(result.current.isDisabled).toEqual(true); }); + + it('should return responder menu item `disabled` when agentType is `endpoint` but no endpoint id is provided', () => { + const { result } = renderHook(() => + useResponderActionData({ + endpointId: '', + agentType: 'endpoint', + }) + ); + expect(result.current.isDisabled).toEqual(true); + expect(result.current.tooltip).toEqual(HOST_ENDPOINT_UNENROLLED_TOOLTIP); + }); }); describe('when agentType is `sentinel_one`', () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.ts b/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.ts index 820837393461a..8842eafbb13d7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.ts +++ b/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/use_responder_action_data.ts @@ -112,6 +112,10 @@ export const useResponderActionData = ({ } } + if (!endpointId) { + return [true, HOST_ENDPOINT_UNENROLLED_TOOLTIP]; + } + // Still loading host info if (isFetching) { return [true, LOADING_ENDPOINT_DATA_TOOLTIP]; @@ -141,6 +145,7 @@ export const useResponderActionData = ({ return [false, undefined]; }, [ isEndpointHost, + endpointId, isFetching, error, hostInfo?.host_status, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/__snapshots__/custom_timeline_data_grid_body.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/__snapshots__/custom_timeline_data_grid_body.test.tsx.snap index 3845ad9801abd..2c8c9d593b775 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/__snapshots__/custom_timeline_data_grid_body.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/__snapshots__/custom_timeline_data_grid_body.test.tsx.snap @@ -212,7 +212,7 @@ exports[`CustomTimelineDataGridBody should render exactly as snapshots 1`] = ` test added a note

note diff --git a/x-pack/plugins/security_solution/scripts/endpoint/agent_policy_generator/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/agent_policy_generator/index.ts index 104bf337be5d3..afe370e1bda72 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/agent_policy_generator/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/agent_policy_generator/index.ts @@ -59,7 +59,6 @@ const agentPolicyGenerator: RunFn = async ({ flags, log }) => { username: flags.username as string, password: flags.password as string, apiKey: flags.apikey as string, - noCertForSsl: true, log, }); diff --git a/x-pack/plugins/security_solution/scripts/endpoint/api_emulator/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/api_emulator/index.ts index 15a48654f2963..8c4d0eae4e5e7 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/api_emulator/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/api_emulator/index.ts @@ -79,7 +79,6 @@ const cliRunner: RunFn = async (cliContext) => { elasticsearchUrl, asSuperuser, log, - noCertForSsl: true, }); const coreServices: ExternalEdrServerEmulatorCoreServices = { diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts index 73cf96b5b6864..1eefe220c0d39 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts @@ -683,24 +683,32 @@ export const isFleetServerRunning = async ( const url = new URL(fleetServerUrl); url.pathname = '/api/status'; - return axios - .request({ - method: 'GET', - url: url.toString(), - responseType: 'json', - // Custom agent to ensure we don't get cert errors - httpsAgent: new https.Agent({ rejectUnauthorized: false }), - }) - .then((response) => { - log.debug(`Fleet server is up and running at [${fleetServerUrl}]. Status: `, response.data); - return true; - }) - .catch(catchAxiosErrorFormatAndThrow) - .catch((e) => { - log.debug(`Fleet server not up at [${fleetServerUrl}]`); - log.verbose(`Call to [${url.toString()}] failed with:`, e); - return false; - }); + return pRetry( + async () => { + return axios + .request({ + method: 'GET', + url: url.toString(), + responseType: 'json', + // Custom agent to ensure we don't get cert errors + httpsAgent: new https.Agent({ rejectUnauthorized: false }), + }) + .then((response) => { + log.debug( + `Fleet server is up and running at [${fleetServerUrl}]. Status: `, + response.data + ); + return true; + }) + .catch(catchAxiosErrorFormatAndThrow) + .catch((e) => { + log.debug(`Fleet server not up at [${fleetServerUrl}]`); + log.verbose(`Call to [${url.toString()}] failed with:`, e); + return false; + }); + }, + { maxTimeout: 10000 } + ); }; /** diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts index 8d1d2f5e61f49..317cae2882e57 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts @@ -58,10 +58,10 @@ import type { PostAgentUnenrollResponse, CopyAgentPolicyRequest, } from '@kbn/fleet-plugin/common/types'; -import nodeFetch from 'node-fetch'; import semver from 'semver'; import axios from 'axios'; import { userInfo } from 'os'; +import pRetry from 'p-retry'; import { isFleetServerRunning } from './fleet_server/fleet_server_services'; import { getEndpointPackageInfo } from '../../../common/endpoint/utils/package'; import type { DownloadAndStoreAgentResponse } from './agent_downloads_service'; @@ -79,6 +79,7 @@ import { FleetAgentGenerator } from '../../../common/endpoint/data_generators/fl const fleetGenerator = new FleetAgentGenerator(); const CURRENT_USERNAME = userInfo().username.toLowerCase(); const DEFAULT_AGENT_POLICY_NAME = `${CURRENT_USERNAME} test policy`; + /** A Fleet agent policy that includes integrations that don't actually require an agent to run on a host. Example: SenttinelOne */ export const DEFAULT_AGENTLESS_INTEGRATIONS_AGENT_POLICY_NAME = `${CURRENT_USERNAME} - agentless integrations`; @@ -411,14 +412,20 @@ export const getAgentVersionMatchingCurrentStack = async ( ); } - const agentVersions = await axios - .get('https://artifacts-api.elastic.co/v1/versions') - .then((response) => - map( - response.data.versions.filter(isValidArtifactVersion), - (version) => version.split('-SNAPSHOT')[0] - ) - ); + const agentVersions = await pRetry( + async () => { + return axios + .get('https://artifacts-api.elastic.co/v1/versions') + .catch(catchAxiosErrorFormatAndThrow) + .then((response) => + map( + response.data.versions.filter(isValidArtifactVersion), + (version) => version.split('-SNAPSHOT')[0] + ) + ); + }, + { maxTimeout: 10000 } + ); let version = semver.maxSatisfying(agentVersions, `<=${kbnStatus.version.number}`) ?? @@ -492,16 +499,16 @@ export const getAgentDownloadUrl = async ( log?.verbose(`Retrieving elastic agent download URL from:\n ${artifactSearchUrl}`); - const searchResult: ElasticArtifactSearchResponse = await nodeFetch(artifactSearchUrl).then( - (response) => { - if (!response.ok) { - throw new Error( - `Failed to search elastic's artifact repository: ${response.statusText} (HTTP ${response.status}) {URL: ${artifactSearchUrl})` - ); - } - - return response.json(); - } + const searchResult: ElasticArtifactSearchResponse = await pRetry( + async () => { + return axios + .get(artifactSearchUrl) + .catch(catchAxiosErrorFormatAndThrow) + .then((response) => { + return response.data; + }); + }, + { maxTimeout: 10000 } ); log?.verbose(searchResult); @@ -547,16 +554,16 @@ export const getLatestAgentDownloadVersion = async ( ): Promise => { const artifactsUrl = 'https://artifacts-api.elastic.co/v1/versions'; const semverMatch = `<=${version.replace(`-SNAPSHOT`, '')}`; - const artifactVersionsResponse: { versions: string[] } = await nodeFetch(artifactsUrl).then( - (response) => { - if (!response.ok) { - throw new Error( - `Failed to retrieve list of versions from elastic's artifact repository: ${response.statusText} (HTTP ${response.status}) {URL: ${artifactsUrl})` - ); - } - - return response.json(); - } + const artifactVersionsResponse: { versions: string[] } = await pRetry( + async () => { + return axios + .get<{ versions: string[] }>(artifactsUrl) + .catch(catchAxiosErrorFormatAndThrow) + .then((response) => { + return response.data; + }); + }, + { maxTimeout: 10000 } ); const stackVersionToArtifactVersion: Record = artifactVersionsResponse.versions diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts index a7dc1b7ecfe39..5d321ec09cc48 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts @@ -70,7 +70,7 @@ interface CreateRuntimeServicesOptions { log?: ToolingLog; asSuperuser?: boolean; /** If true, then a certificate will not be used when creating the Kbn/Es clients when url is `https` */ - noCertForSsl?: boolean; + useCertForSsl?: boolean; } class KbnClientExtended extends KbnClient { @@ -112,7 +112,7 @@ export const createRuntimeServices = async ({ esPassword: _esPassword, log = createToolingLogger(), asSuperuser = false, - noCertForSsl, + useCertForSsl = false, }: CreateRuntimeServicesOptions): Promise => { let username = _username; let password = _password; @@ -124,7 +124,7 @@ export const createRuntimeServices = async ({ url: kibanaUrl, username, password, - noCertForSsl, + useCertForSsl, log, }); @@ -149,7 +149,7 @@ export const createRuntimeServices = async ({ username: esUsername ?? username, password: esPassword ?? password, log, - noCertForSsl, + useCertForSsl, }) ); @@ -166,14 +166,14 @@ export const createRuntimeServices = async ({ const fleetURL = new URL(fleetServerUrl); return { - kbnClient: createKbnClient({ log, url: kibanaUrl, username, password, apiKey, noCertForSsl }), + kbnClient: createKbnClient({ log, url: kibanaUrl, username, password, apiKey, useCertForSsl }), esClient: createEsClient({ log, url: elasticsearchUrl, username: esUsername ?? username, password: esPassword ?? password, apiKey, - noCertForSsl, + useCertForSsl, }), log, localhostRealIp: getLocalhostRealIp(), @@ -222,7 +222,7 @@ export const createEsClient = ({ password, apiKey, log, - noCertForSsl, + useCertForSsl = false, }: { url: string; username: string; @@ -230,14 +230,14 @@ export const createEsClient = ({ /** If defined, both `username` and `password` will be ignored */ apiKey?: string; log?: ToolingLog; - noCertForSsl?: boolean; + useCertForSsl?: boolean; }): Client => { const isHttps = new URL(url).protocol.startsWith('https'); const clientOptions: ClientOptions = { node: buildUrlWithCredentials(url, apiKey ? '' : username, apiKey ? '' : password), }; - if (isHttps && !noCertForSsl) { + if (isHttps && useCertForSsl) { clientOptions.tls = { ca: [CA_CERTIFICATE], }; @@ -265,7 +265,7 @@ export const createKbnClient = ({ password, apiKey, log = createToolingLogger(), - noCertForSsl, + useCertForSsl = false, }: { url: string; username: string; @@ -273,7 +273,7 @@ export const createKbnClient = ({ /** If defined, both `username` and `password` will be ignored */ apiKey?: string; log?: ToolingLog; - noCertForSsl?: boolean; + useCertForSsl?: boolean; }): KbnClient => { const isHttps = new URL(url).protocol.startsWith('https'); const clientOptions: ConstructorParameters[0] = { @@ -282,7 +282,7 @@ export const createKbnClient = ({ url: buildUrlWithCredentials(url, username, password), }; - if (isHttps && !noCertForSsl) { + if (isHttps && useCertForSsl) { clientOptions.certificateAuthorities = [CA_CERTIFICATE]; } diff --git a/x-pack/plugins/security_solution/scripts/endpoint/env_data_loader/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/env_data_loader/index.ts index 4de4929b8c4c2..031541e8f5403 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/env_data_loader/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/env_data_loader/index.ts @@ -22,7 +22,6 @@ export const cli = () => { url: cliContext.flags.kibana as string, username: cliContext.flags.username as string, password: cliContext.flags.password as string, - noCertForSsl: true, }); const options = { diff --git a/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts b/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts index 3bce0126fbf29..d508f9bc605bf 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts @@ -10,6 +10,7 @@ import type { AxiosRequestConfig } from 'axios'; import axios from 'axios'; import type { KbnClient } from '@kbn/test'; import { SENTINELONE_CONNECTOR_ID } from '@kbn/stack-connectors-plugin/common/sentinelone/constants'; +import pRetry from 'p-retry'; import { dump } from '../common/utils'; import { type RuleResponse } from '../../../common/api/detection_engine'; import { createToolingLogger } from '../../../common/endpoint/data_loaders/utils'; @@ -86,13 +87,18 @@ export class S1Client { this.log.debug(`Request: `, requestOptions); - return axios - .request(requestOptions) - .then((response) => { - this.log.verbose(`Response: `, response); - return response.data; - }) - .catch(catchAxiosErrorFormatAndThrow); + return pRetry( + async () => { + return axios + .request(requestOptions) + .then((response) => { + this.log.verbose(`Response: `, response); + return response.data; + }) + .catch(catchAxiosErrorFormatAndThrow); + }, + { maxTimeout: 10000 } + ); } public buildUrl(path: string): string { diff --git a/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/index.ts index 2c179f6e853ab..d2f4190821413 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/index.ts @@ -111,7 +111,6 @@ const runCli: RunFn = async ({ log, flags }) => { url: kibanaUrl, username, password, - noCertForSsl: true, }); const runningS1VMs = ( diff --git a/x-pack/plugins/security_solution/server/config.ts b/x-pack/plugins/security_solution/server/config.ts index 19e8afe176c9a..3bfcf13a9104a 100644 --- a/x-pack/plugins/security_solution/server/config.ts +++ b/x-pack/plugins/security_solution/server/config.ts @@ -128,7 +128,7 @@ export const configSchema = schema.object({ * Complete External Response Actions task: Timeout value for how long the task should run */ completeExternalResponseActionsTaskTimeout: schema.string({ - defaultValue: '20m', + defaultValue: '5m', validate: isValidTaskManagerDuration, }), diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.ts index 8d77ddecbcf56..fd823928b6631 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.ts @@ -41,7 +41,7 @@ export class CompleteExternalResponseActionsTask { private log: Logger; private esClient: ElasticsearchClient | undefined = undefined; private cleanup: (() => void) | undefined; - private taskTimeout = '20m'; // Default. Real value comes from server config + private taskTimeout = '5m'; // Default. Real value comes from server config private taskInterval = '60s'; // Default. Real value comes from server config constructor(protected readonly options: CompleteExternalResponseActionsTaskConstructorOptions) { diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts index 6fbcb6ff3350b..df326a269f0a3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts @@ -106,6 +106,9 @@ describe('SentinelOneActionsClient class', () => { }); it('should write action request and response to endpoint indexes when `responseActionsSentinelOneV2Enabled` FF is Disabled', async () => { + // @ts-expect-error updating readonly attribute + classConstructorOptions.endpointService.experimentalFeatures.responseActionsSentinelOneV2Enabled = + false; await s1ActionsClient.isolate(createS1IsolationOptions()); expect(classConstructorOptions.esClient.index).toHaveBeenCalledTimes(2); @@ -237,6 +240,9 @@ describe('SentinelOneActionsClient class', () => { }); it('should write action request and response to endpoint indexes when `responseActionsSentinelOneV2Enabled` is Disabled', async () => { + // @ts-expect-error updating readonly attribute + classConstructorOptions.endpointService.experimentalFeatures.responseActionsSentinelOneV2Enabled = + false; await s1ActionsClient.release(createS1IsolationOptions()); expect(classConstructorOptions.esClient.index).toHaveBeenCalledTimes(2); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts index 3c930ec07e666..9f99a9ae4a561 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts @@ -13,10 +13,7 @@ import type { import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import { ALERT_RISK_SCORE, - ALERT_RULE_NAME, - ALERT_UUID, ALERT_WORKFLOW_STATUS, - EVENT_KIND, } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import type { RiskScoresPreviewResponse } from '../../../../common/api/entity_analytics/risk_engine/preview_route.gen'; import type { @@ -28,6 +25,7 @@ import { type IdentifierType, getRiskLevel, RiskCategories, + RiskWeightTypes, } from '../../../../common/entity_analytics/risk_engine'; import { withSecuritySpan } from '../../../utils/with_security_span'; import type { AssetCriticalityRecord } from '../../../../common/api/entity_analytics'; @@ -38,24 +36,13 @@ import { normalize, } from '../asset_criticality/helpers'; import { getAfterKeyForIdentifierType, getFieldForIdentifier } from './helpers'; -import { - buildCategoryCountDeclarations, - buildCategoryAssignment, - buildCategoryScoreDeclarations, - buildWeightingOfScoreByCategory, - getGlobalWeightForIdentifierType, -} from './risk_weights'; import type { CalculateRiskScoreAggregations, CalculateScoresParams, RiskScoreBucket, } from '../types'; -import { - MAX_INPUTS_COUNT, - RISK_SCORING_INPUTS_COUNT_MAX, - RISK_SCORING_SUM_MAX, - RISK_SCORING_SUM_VALUE, -} from './constants'; +import { RISK_SCORING_SUM_MAX, RISK_SCORING_SUM_VALUE } from './constants'; +import { getPainlessScripts, type PainlessScripts } from './painless'; const formatForResponse = ({ bucket, @@ -118,67 +105,22 @@ const filterFromRange = (range: CalculateScoresParams['range']): QueryDslQueryCo range: { '@timestamp': { lt: range.end, gte: range.start } }, }); -const buildReduceScript = ({ - globalIdentifierTypeWeight, -}: { - globalIdentifierTypeWeight?: number; -}): string => { - return ` - Map results = new HashMap(); - List inputs = []; - for (state in states) { - inputs.addAll(state.inputs) - } - Collections.sort(inputs, (a, b) -> b.get('weighted_score').compareTo(a.get('weighted_score'))); - - double num_inputs_to_score = Math.min(inputs.length, params.max_risk_inputs_per_identity); - results['notes'] = []; - if (num_inputs_to_score == params.max_risk_inputs_per_identity) { - results['notes'].add('Number of risk inputs (' + inputs.length + ') exceeded the maximum allowed (' + params.max_risk_inputs_per_identity + ').'); - } - - ${buildCategoryScoreDeclarations()} - ${buildCategoryCountDeclarations()} - - double total_score = 0; - double current_score = 0; - List risk_inputs = []; - for (int i = 0; i < num_inputs_to_score; i++) { - current_score = inputs[i].weighted_score / Math.pow(i + 1, params.p); - - if (i < ${MAX_INPUTS_COUNT}) { - inputs[i]["contribution"] = 100 * current_score / params.risk_cap; - risk_inputs.add(inputs[i]); - } - - ${buildCategoryAssignment()} - total_score += current_score; - } - - ${globalIdentifierTypeWeight != null ? `total_score *= ${globalIdentifierTypeWeight};` : ''} - double score_norm = 100 * total_score / params.risk_cap; - results['score'] = total_score; - results['normalized_score'] = score_norm; - results['risk_inputs'] = risk_inputs; - - return results; - `; -}; - const buildIdentifierTypeAggregation = ({ afterKeys, identifierType, pageSize, weights, alertSampleSizePerShard, + scriptedMetricPainless, }: { afterKeys: AfterKeys; identifierType: IdentifierType; pageSize: number; weights?: RiskScoreWeights; alertSampleSizePerShard: number; + scriptedMetricPainless: PainlessScripts; }): AggregationsAggregationContainer => { - const globalIdentifierTypeWeight = getGlobalWeightForIdentifierType({ identifierType, weights }); + const globalIdentifierTypeWeight = getGlobalWeightForIdentifierType(identifierType, weights); const identifierField = getFieldForIdentifier(identifierType); return { @@ -204,33 +146,15 @@ const buildIdentifierTypeAggregation = ({ aggs: { risk_details: { scripted_metric: { - init_script: 'state.inputs = []', - map_script: ` - Map fields = new HashMap(); - String category = doc['${EVENT_KIND}'].value; - double score = doc['${ALERT_RISK_SCORE}'].value; - double weighted_score = 0.0; - - fields.put('time', doc['@timestamp'].value); - fields.put('rule_name', doc['${ALERT_RULE_NAME}'].value); - - fields.put('category', category); - fields.put('index', doc['_index'].value); - fields.put('id', doc['${ALERT_UUID}'].value); - fields.put('score', score); - - ${buildWeightingOfScoreByCategory({ userWeights: weights, identifierType })} - fields.put('weighted_score', weighted_score); - - state.inputs.add(fields); - `, - combine_script: 'return state;', + init_script: scriptedMetricPainless.init, + map_script: scriptedMetricPainless.map, + combine_script: scriptedMetricPainless.combine, params: { - max_risk_inputs_per_identity: RISK_SCORING_INPUTS_COUNT_MAX, p: RISK_SCORING_SUM_VALUE, risk_cap: RISK_SCORING_SUM_MAX, + global_identifier_type_weight: globalIdentifierTypeWeight || 1, }, - reduce_script: buildReduceScript({ globalIdentifierTypeWeight }), + reduce_script: scriptedMetricPainless.reduce, }, }, }, @@ -286,6 +210,12 @@ const processScores = async ({ }); }; +export const getGlobalWeightForIdentifierType = ( + identifierType: IdentifierType, + weights?: RiskScoreWeights +): number | undefined => + weights?.find((weight) => weight.type === RiskWeightTypes.global)?.[identifierType]; + export const calculateRiskScores = async ({ afterKeys: userAfterKeys, assetCriticalityService, @@ -307,6 +237,7 @@ export const calculateRiskScores = async ({ } & CalculateScoresParams): Promise => withSecuritySpan('calculateRiskScores', async () => { const now = new Date().toISOString(); + const scriptedMetricPainless = await getPainlessScripts(); const filter = [ filterFromRange(range), { bool: { must_not: { term: { [ALERT_WORKFLOW_STATUS]: 'closed' } } } }, @@ -345,6 +276,7 @@ export const calculateRiskScores = async ({ pageSize, weights, alertSampleSizePerShard, + scriptedMetricPainless, }); return aggs; }, {} as Record), diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/constants.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/constants.ts index 73f93d71b11f9..6a691eac42734 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/constants.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/constants.ts @@ -16,11 +16,6 @@ export const RISK_SCORING_SUM_VALUE = 1.5; */ export const RISK_SCORING_SUM_MAX = 261.2; -/** - * The risk scoring algorithm can only process a finite number of risk inputs per identity; this value represents the maximum number of inputs that will be processed. - */ -export const RISK_SCORING_INPUTS_COUNT_MAX = 999999; - /** * This value represents the maximum possible risk score after normalization. */ diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/index.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/index.test.ts new file mode 100644 index 0000000000000..e21a6afeff326 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/index.test.ts @@ -0,0 +1,24 @@ +/* + * 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. + */ + +import { getPainlessScripts } from '.'; + +describe('getPainlessScripts', () => { + // to update snapshot run `yarn test:jest x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/index.test.ts -u` + test('Scripts should not have changed. If this change is intentional, ensure that Serverless scripted metric allowlists are updated', async () => { + const scripts = await getPainlessScripts(); + + expect(scripts).toMatchInlineSnapshot(` + Object { + "combine": "return state;", + "init": "state.inputs = []", + "map": "Map fields = new HashMap();fields.put('id', doc['kibana.alert.uuid'].value);fields.put('index', doc['_index'].value);fields.put('time', doc['@timestamp'].value);fields.put('rule_name', doc['kibana.alert.rule.name'].value);fields.put('category', doc['event.kind'].value);fields.put('score', doc['kibana.alert.risk_score'].value);state.inputs.add(fields); ", + "reduce": "Map results = new HashMap();results['notes'] = [];results['category_1_score'] = 0.0;results['category_1_count'] = 0;results['risk_inputs'] = [];results['score'] = 0.0;def inputs = states[0].inputs;Collections.sort(inputs, (a, b) -> b.get('score').compareTo(a.get('score')));for (int i = 0; i < inputs.length; i++) { double current_score = inputs[i].score / Math.pow(i + 1, params.p); if (i < 10) { inputs[i][\\"contribution\\"] = 100 * current_score / params.risk_cap; results['risk_inputs'].add(inputs[i]); } results['category_1_score'] += current_score; results['category_1_count'] += 1; results['score'] += current_score;}results['score'] *= params.global_identifier_type_weight;results['normalized_score'] = 100 * results['score'] / params.risk_cap;return results;", + } + `); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/index.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/index.ts new file mode 100644 index 0000000000000..896340262b21c --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/index.ts @@ -0,0 +1,40 @@ +/* + * 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. + */ + +import fs from 'fs'; +import { flow } from 'lodash'; + +const PHASES = ['init', 'map', 'combine', 'reduce'] as const; + +type Phase = typeof PHASES[number]; +export type PainlessScripts = Record; + +const removeNewlines = (content: string) => content.replace(/\n/g, ''); +const condenseMultipleSpaces = (content: string) => content.replace(/\s+/g, ' '); +const removeComments = (content: string) => content.replace(/\/\/.*/g, ''); +const minifyContent = flow(removeComments, removeNewlines, condenseMultipleSpaces); + +const readScript = async (phase: Phase) => { + const content = await fs.promises.readFile(`${__dirname}/risk_scoring_${phase}.painless`, 'utf8'); + return minifyContent(content); +}; + +let cache: PainlessScripts | undefined; + +export const getPainlessScripts = async (): Promise => { + if (cache) { + return cache; + } + + const [init, map, combine, reduce] = await Promise.all(PHASES.map(readScript)); + + // The cache will only ever have one value, so we can safely update it + // un-atomicly without worrying about lost updates. + // eslint-disable-next-line require-atomic-updates + cache = { init, map, combine, reduce }; + return cache; +}; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_combine.painless b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_combine.painless new file mode 100644 index 0000000000000..da2a75d569f18 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_combine.painless @@ -0,0 +1 @@ +return state; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_init.painless b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_init.painless new file mode 100644 index 0000000000000..5ee9376d701ad --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_init.painless @@ -0,0 +1 @@ +state.inputs = [] diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_map.painless b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_map.painless new file mode 100644 index 0000000000000..3d79df51be0e8 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_map.painless @@ -0,0 +1,8 @@ +Map fields = new HashMap(); +fields.put('id', doc['kibana.alert.uuid'].value); +fields.put('index', doc['_index'].value); +fields.put('time', doc['@timestamp'].value); +fields.put('rule_name', doc['kibana.alert.rule.name'].value); +fields.put('category', doc['event.kind'].value); +fields.put('score', doc['kibana.alert.risk_score'].value); +state.inputs.add(fields); \ No newline at end of file diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_reduce.painless b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_reduce.painless new file mode 100644 index 0000000000000..629a925522590 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/painless/risk_scoring_reduce.painless @@ -0,0 +1,41 @@ +Map results = new HashMap(); +results['notes'] = []; +results['category_1_score'] = 0.0; +results['category_1_count'] = 0; +results['risk_inputs'] = []; +results['score'] = 0.0; + +def inputs = states[0].inputs; + +// Currently the alerts index only has one shard so there will only be one state +// If there are multiple shards we will need these lines +// List inputs = []; +// for (state in states) { +// inputs.addAll(state.inputs) +// } + +// sorting is needed even though we sort in the parent query because the scripted metric +// agg does not guarantee order. +Collections.sort(inputs, (a, b) -> b.get('score').compareTo(a.get('score'))); + +for (int i = 0; i < inputs.length; i++) { + double current_score = inputs[i].score / Math.pow(i + 1, params.p); + + if (i < 10) { + inputs[i]["contribution"] = 100 * current_score / params.risk_cap; + results['risk_inputs'].add(inputs[i]); + } + +// every input is of type signal at the moment +// if (inputs[i].category == 'signal') { + results['category_1_score'] += current_score; + results['category_1_count'] += 1; +// } + + results['score'] += current_score; +} + +results['score'] *= params.global_identifier_type_weight; +results['normalized_score'] = 100 * results['score'] / params.risk_cap; + +return results; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts deleted file mode 100644 index 86bdc0d0e6be0..0000000000000 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* - * 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. - */ - -import { RiskWeightTypes, RiskCategories } from '../../../../common/entity_analytics/risk_engine'; -import { - buildCategoryAssignment, - buildCategoryWeights, - buildWeightingOfScoreByCategory, -} from './risk_weights'; - -describe('buildCategoryWeights', () => { - it('returns the default weights if nothing else is provided', () => { - const result = buildCategoryWeights(); - - expect(result).toEqual([ - { host: 1, type: RiskWeightTypes.riskCategory, user: 1, value: RiskCategories.category_1 }, - ]); - }); - - it('allows user weights to override defaults', () => { - const result = buildCategoryWeights([ - { - type: RiskWeightTypes.riskCategory, - value: RiskCategories.category_1, - host: 0.1, - user: 0.2, - }, - ]); - - expect(result).toEqual([ - { - host: 0.1, - type: RiskWeightTypes.riskCategory, - user: 0.2, - value: RiskCategories.category_1, - }, - ]); - }); - - it('uses default category weights if unspecified in user-provided weight', () => { - const result = buildCategoryWeights([ - { type: RiskWeightTypes.riskCategory, value: RiskCategories.category_1, host: 0.1 }, - ]); - - expect(result).toEqual([ - { host: 0.1, type: RiskWeightTypes.riskCategory, user: 1, value: RiskCategories.category_1 }, - ]); - }); -}); - -describe('buildCategoryAssignment', () => { - it('builds the expected assignment statement', () => { - const result = buildCategoryAssignment(); - - expect(result).toMatchInlineSnapshot( - `"if (inputs[i].category == 'signal') { results['category_1_score'] += current_score; results['category_1_count'] += 1; }"` - ); - }); -}); - -describe('buildWeightingOfScoreByCategory', () => { - it('returns default weights if no user values provided', () => { - const result = buildWeightingOfScoreByCategory({ identifierType: 'user' }); - - expect(result).toMatchInlineSnapshot( - `"if (category == 'signal') { weighted_score = score * 1; } else { weighted_score = score; }"` - ); - }); - - it('returns default weights if no weights provided', () => { - const result = buildWeightingOfScoreByCategory({ userWeights: [], identifierType: 'host' }); - - expect(result).toMatchInlineSnapshot( - `"if (category == 'signal') { weighted_score = score * 1; } else { weighted_score = score; }"` - ); - }); - - it('returns default weights if only global weights provided', () => { - const result = buildWeightingOfScoreByCategory({ - userWeights: [{ type: RiskWeightTypes.global, host: 0.1 }], - identifierType: 'host', - }); - - expect(result).toMatchInlineSnapshot( - `"if (category == 'signal') { weighted_score = score * 1; } else { weighted_score = score; }"` - ); - }); - - it('returns specified weight when a category weight is provided', () => { - const result = buildWeightingOfScoreByCategory({ - userWeights: [ - { - type: RiskWeightTypes.riskCategory, - value: RiskCategories.category_1, - host: 0.1, - user: 0.2, - }, - ], - identifierType: 'host', - }); - - expect(result).toMatchInlineSnapshot( - `"if (category == 'signal') { weighted_score = score * 0.1; } else { weighted_score = score; }"` - ); - }); - - it('returns a default weight when a category weight is provided but not the one being used', () => { - const result = buildWeightingOfScoreByCategory({ - userWeights: [ - { type: RiskWeightTypes.riskCategory, value: RiskCategories.category_1, host: 0.1 }, - ], - identifierType: 'user', - }); - - expect(result).toMatchInlineSnapshot( - `"if (category == 'signal') { weighted_score = score * 1; } else { weighted_score = score; }"` - ); - }); -}); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts deleted file mode 100644 index d0c7486324e30..0000000000000 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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. - */ - -import { keyBy, merge } from 'lodash'; -import type { - RiskScoreWeight, - RiskScoreWeightCategory, - RiskScoreWeightGlobal, - RiskScoreWeights, -} from '../../../../common/api/entity_analytics/common'; -import type { IdentifierType } from '../../../../common/entity_analytics/risk_engine'; -import { RiskCategories, RiskWeightTypes } from '../../../../common/entity_analytics/risk_engine'; - -const RISK_CATEGORIES = Object.values(RiskCategories); - -const DEFAULT_CATEGORY_WEIGHTS: RiskScoreWeights = RISK_CATEGORIES.map((category) => ({ - type: RiskWeightTypes.riskCategory, - value: category, - host: 1, - user: 1, -})); - -/* - * This function and its use can be deleted once we've replaced our use of event.kind with a proper risk category field. - */ -const convertCategoryToEventKindValue = (category?: string): string | undefined => - category === 'category_1' ? 'signal' : category; - -const isGlobalIdentifierTypeWeight = (weight: RiskScoreWeight): weight is RiskScoreWeightGlobal => - weight.type === RiskWeightTypes.global; -const isRiskCategoryWeight = (weight: RiskScoreWeight): weight is RiskScoreWeightCategory => - weight.type === RiskWeightTypes.riskCategory; - -export const getGlobalWeightForIdentifierType = ({ - identifierType, - weights, -}: { - identifierType: IdentifierType; - weights?: RiskScoreWeights; -}): number | undefined => { - return weights?.find(isGlobalIdentifierTypeWeight)?.[identifierType]; -}; - -const getRiskCategoryWeights = (weights?: RiskScoreWeights): RiskScoreWeightCategory[] => - weights?.filter(isRiskCategoryWeight) ?? []; - -const getWeightForIdentifierType = ( - weight: RiskScoreWeight, - identifierType: IdentifierType -): number => { - const configuredWeight = weight[identifierType]; - return typeof configuredWeight === 'number' ? configuredWeight : 1; -}; - -export const buildCategoryScoreDeclarations = (): string => { - return RISK_CATEGORIES.map((riskCategory) => `results['${riskCategory}_score'] = 0.0;`).join(''); -}; - -export const buildCategoryCountDeclarations = (): string => { - return RISK_CATEGORIES.map((riskCategory) => `results['${riskCategory}_count'] = 0;`).join(''); -}; - -export const buildCategoryWeights = (userWeights?: RiskScoreWeights): RiskScoreWeightCategory[] => { - const categoryWeights = getRiskCategoryWeights(userWeights); - - return Object.values( - merge({}, keyBy(DEFAULT_CATEGORY_WEIGHTS, 'value'), keyBy(categoryWeights, 'value')) - ); -}; - -export const buildCategoryAssignment = (): string => { - return RISK_CATEGORIES.map( - (category) => - `if (inputs[i].category == '${convertCategoryToEventKindValue( - category - )}') { results['${category}_score'] += current_score; results['${category}_count'] += 1; }` - ).join(' else '); -}; - -export const buildWeightingOfScoreByCategory = ({ - userWeights, - identifierType, -}: { - userWeights?: RiskScoreWeights; - identifierType: IdentifierType; -}): string => { - const otherClause = `weighted_score = score;`; - const categoryWeights = buildCategoryWeights(userWeights); - - return categoryWeights - .map( - (weight) => - `if (category == '${convertCategoryToEventKindValue( - weight.value - )}') { weighted_score = score * ${getWeightForIdentifierType(weight, identifierType)}; }` - ) - .join(' else ') - .concat(` else { ${otherClause} }`); -}; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts index a35f4978ebf2c..b5ff9c3487a07 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts @@ -8,10 +8,7 @@ import { loggerMock } from '@kbn/logging-mocks'; import { RISK_SCORE_PREVIEW_URL } from '../../../../../common/constants'; -import { - RiskCategories, - RiskWeightTypes, -} from '../../../../../common/entity_analytics/risk_engine'; +import { RiskWeightTypes } from '../../../../../common/entity_analytics/risk_engine'; import { serverMock, requestContextMock, @@ -171,8 +168,7 @@ describe('POST risk_engine/preview route', () => { const request = buildRequest({ weights: [ { - type: RiskWeightTypes.riskCategory, - value: RiskCategories.category_1, + type: RiskWeightTypes.global, host: 0.1, user: 0.2, }, @@ -186,8 +182,7 @@ describe('POST risk_engine/preview route', () => { expect.objectContaining({ weights: [ { - type: RiskWeightTypes.riskCategory, - value: RiskCategories.category_1, + type: RiskWeightTypes.global, host: 0.1, user: 0.2, }, @@ -200,8 +195,7 @@ describe('POST risk_engine/preview route', () => { const request = buildRequest({ weights: [ { - type: RiskWeightTypes.riskCategory, - value: RiskCategories.category_1, + type: RiskWeightTypes.global, host: 1.1, }, ], @@ -218,7 +212,6 @@ describe('POST risk_engine/preview route', () => { weights: [ { type: 'something new', - value: RiskCategories.category_1, host: 0.1, user: 0.2, }, diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts b/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts index 5b59282a320ea..f4cf62a4381b6 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts @@ -417,9 +417,7 @@ export class TelemetryReceiver implements ITelemetryReceiver { latest_metrics: { top_hits: { size: 1, - _source: { - excludes: ['*'], - }, + _source: false, sort: [ { '@timestamp': { @@ -521,6 +519,7 @@ export class TelemetryReceiver implements ITelemetryReceiver { const buckets = endpointMetadataResponse?.aggregations?.endpoint_metadata?.buckets ?? []; return buckets.reduce((cache, endpointAgentId) => { + // const id = endpointAgentId.latest_metadata.hits.hits[0]._id; const doc = endpointAgentId.latest_metadata.hits.hits[0]._source; cache.set(endpointAgentId.key, doc); return cache; diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index a2440482f537e..369648f037df2 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -566,6 +566,7 @@ export class Plugin implements ISecuritySolutionPlugin { // Assistant Tool and Feature Registration plugins.elasticAssistant.registerTools(APP_UI_ID, getAssistantTools()); plugins.elasticAssistant.registerFeatures(APP_UI_ID, { + assistantKnowledgeBaseByDefault: config.experimentalFeatures.assistantKnowledgeBaseByDefault, assistantModelEvaluation: config.experimentalFeatures.assistantModelEvaluation, }); plugins.elasticAssistant.registerFeatures('management', { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 017acbe370416..094c1f15bb567 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -686,7 +686,6 @@ "core.deprecations.elasticsearchUsername.manualSteps2": "Ajoutez le paramètre \"elasticsearch.serviceAccountToken\" à kibana.yml.", "core.deprecations.elasticsearchUsername.manualSteps3": "Supprimez \"elasticsearch.username\" et \"elasticsearch.password\" de kibana.yml.", "core.deprecations.noCorrectiveAction": "Ce déclassement ne peut pas être résolu automatiquement.", - "core.euiAbsoluteTab.dateFormatHint": "Appuyez sur la touche Entrée pour analyser l'élément en tant que date.", "core.euiAccordionChildrenLoading.message": "Chargement", "core.euiAutoRefresh.autoRefreshLabel": "Actualisation automatique", "core.euiAutoRefresh.buttonLabelOff": "L'actualisation automatique est désactivée", @@ -18596,7 +18595,6 @@ "xpack.fleet.fleetServerSetup.addFleetServerHostButton": "Ajouter un hôte", "xpack.fleet.fleetServerSetup.addFleetServerHostStepTitle": "Ajouter l'hôte de votre serveur Fleet", "xpack.fleet.fleetServerSetup.addFleetServerHostSuccessTitle": "Hôte du serveur Fleet ajouté", - "xpack.fleet.fleetServerSetup.calloutTitle": "Diagnostic de l'agent", "xpack.fleet.fleetServerSetup.cloudDeploymentLink": "Modifier le déploiement", "xpack.fleet.fleetServerSetup.cloudSetupTitle": "Activer un serveur Fleet", "xpack.fleet.fleetServerSetup.errorAddingFleetServerHostTitle": "Erreur lors de l'ajout de l'hôte du serveur Fleet", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index f03111faf3bd1..7afc75d976687 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -686,7 +686,6 @@ "core.deprecations.elasticsearchUsername.manualSteps2": "「elasticsearch.serviceAccountToken」設定をkibana.ymlに追加します。", "core.deprecations.elasticsearchUsername.manualSteps3": "kibana.ymlから「elasticsearch.username」と「elasticsearch.password」を削除します。", "core.deprecations.noCorrectiveAction": "この廃止予定は自動的に解決できません。", - "core.euiAbsoluteTab.dateFormatHint": "日付として解析するには、Enterキーを押してください。", "core.euiAccordionChildrenLoading.message": "読み込み中", "core.euiAutoRefresh.autoRefreshLabel": "自動更新", "core.euiAutoRefresh.buttonLabelOff": "自動更新はオフです", @@ -18573,7 +18572,6 @@ "xpack.fleet.fleetServerSetup.addFleetServerHostButton": "ホストの追加", "xpack.fleet.fleetServerSetup.addFleetServerHostStepTitle": "Fleetサーバーホストの追加", "xpack.fleet.fleetServerSetup.addFleetServerHostSuccessTitle": "追加されたFleetサーバーホスト", - "xpack.fleet.fleetServerSetup.calloutTitle": "エージェント診断", "xpack.fleet.fleetServerSetup.cloudDeploymentLink": "デプロイを編集", "xpack.fleet.fleetServerSetup.cloudSetupTitle": "Fleetサーバーを有効にする", "xpack.fleet.fleetServerSetup.errorAddingFleetServerHostTitle": "Fleetサーバーホストの追加エラー", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 968e567a714bd..95da09f4c580b 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -688,7 +688,6 @@ "core.deprecations.elasticsearchUsername.manualSteps2": "将“elasticsearch.serviceAccountToken”设置添加到 kibana.yml。", "core.deprecations.elasticsearchUsername.manualSteps3": "从 kibana.yml 中移除“elasticsearch.username”和“elasticsearch.password”。", "core.deprecations.noCorrectiveAction": "无法自动解决此弃用。", - "core.euiAbsoluteTab.dateFormatHint": "按 Enter 键解析为日期。", "core.euiAccordionChildrenLoading.message": "正在加载", "core.euiAutoRefresh.autoRefreshLabel": "自动刷新", "core.euiAutoRefresh.buttonLabelOff": "自动刷新已关闭", @@ -18602,7 +18601,6 @@ "xpack.fleet.fleetServerSetup.addFleetServerHostButton": "添加主机", "xpack.fleet.fleetServerSetup.addFleetServerHostStepTitle": "添加您的 Fleet 服务器主机", "xpack.fleet.fleetServerSetup.addFleetServerHostSuccessTitle": "已添加 Fleet 服务器主机", - "xpack.fleet.fleetServerSetup.calloutTitle": "代理诊断", "xpack.fleet.fleetServerSetup.cloudDeploymentLink": "编辑部署", "xpack.fleet.fleetServerSetup.cloudSetupTitle": "启用 Fleet 服务器", "xpack.fleet.fleetServerSetup.errorAddingFleetServerHostTitle": "添加 Fleet 服务器主机时出错", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/notify_badge/notify_badge.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/notify_badge/notify_badge.tsx index e09892471419b..72344122d90f2 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/notify_badge/notify_badge.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/notify_badge/notify_badge.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useCallback, useMemo, useState } from 'react'; +import React, { useCallback, useMemo, useState, useRef } from 'react'; import moment from 'moment'; import { EuiButton, @@ -91,6 +91,8 @@ export const RulesListNotifyBadge: React.FunctionComponent(null); + const { notifications: { toasts }, } = useKibana().services; @@ -192,6 +194,7 @@ export const RulesListNotifyBadge: React.FunctionComponent {formattedSnoozeText} @@ -210,6 +213,7 @@ export const RulesListNotifyBadge: React.FunctionComponent {formattedSnoozeText} @@ -232,6 +236,7 @@ export const RulesListNotifyBadge: React.FunctionComponent ); }, [isPopoverOpen, isLoading, isDisabled, showOnHover, openPopover]); @@ -248,6 +253,7 @@ export const RulesListNotifyBadge: React.FunctionComponent ); }, [isLoading, isDisabled, openPopover]); @@ -311,9 +317,10 @@ export const RulesListNotifyBadge: React.FunctionComponent focusTrapButtonRef.current?.focus()); } }, - [setRequestInFlightLoading, snoozeRule, onRuleChanged, toasts, closePopover] + [closePopover, snoozeRule, onRuleChanged, toasts] ); const onApplyUnsnooze = useCallback( @@ -328,9 +335,10 @@ export const RulesListNotifyBadge: React.FunctionComponent focusTrapButtonRef.current?.focus()); } }, - [setRequestInFlightLoading, unsnoozeRule, onRuleChanged, toasts, closePopover] + [closePopover, unsnoozeRule, onRuleChanged, toasts] ); const popover = ( diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx index 624e6e5f276e7..ddd836a4f0993 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useState, useEffect, useCallback } from 'react'; +import React, { useState, useCallback } from 'react'; import moment from 'moment'; import { i18n } from '@kbn/i18n'; import type { RuleSnooze } from '@kbn/alerting-plugin/common'; @@ -29,7 +29,6 @@ import { Rule, SnoozeSchedule, BulkOperationResponse } from '../../../../types'; import { ToastWithCircuitBreakerContent } from '../../../components/toast_with_circuit_breaker_content'; import { UntrackAlertsModal } from '../../common/components/untrack_alerts_modal'; -export type SnoozeUnit = 'm' | 'h' | 'd' | 'w' | 'M'; const SNOOZE_END_TIME_FORMAT = 'LL @ LT'; type DropdownRuleRecord = Pick< @@ -60,24 +59,16 @@ export const RuleStatusDropdown: React.FunctionComponent = ({ hideSnoozeOption = false, direction = 'column', }: ComponentOpts) => { - const [isEnabled, setIsEnabled] = useState(rule.enabled); - const [isSnoozed, setIsSnoozed] = useState(!hideSnoozeOption && isRuleSnoozed(rule)); - const { notifications: { toasts }, i18n: i18nStart, theme, } = useKibana().services; - useEffect(() => { - setIsEnabled(rule.enabled); - }, [rule.enabled]); - useEffect(() => { - if (!hideSnoozeOption) setIsSnoozed(isRuleSnoozed(rule)); - }, [rule, hideSnoozeOption]); const [isUpdating, setIsUpdating] = useState(false); const [isPopoverOpen, setIsPopoverOpen] = useState(false); const [isUntrackAlertsModalOpen, setIsUntrackAlertsModalOpen] = useState(false); + const isSnoozed = !hideSnoozeOption && isRuleSnoozed(rule); const onClickBadge = useCallback(() => setIsPopoverOpen((isOpen) => !isOpen), [setIsPopoverOpen]); const onClosePopover = useCallback(() => setIsPopoverOpen(false), [setIsPopoverOpen]); @@ -106,7 +97,6 @@ export const RuleStatusDropdown: React.FunctionComponent = ({ setIsUpdating(true); try { await enableRuleInternal(); - setIsEnabled(true); onRuleChanged(); } finally { setIsUpdating(false); @@ -118,7 +108,6 @@ export const RuleStatusDropdown: React.FunctionComponent = ({ setIsUpdating(true); try { await disableRule(untrack); - setIsEnabled(false); onRuleChanged(); } finally { setIsUpdating(false); @@ -181,11 +170,11 @@ export const RuleStatusDropdown: React.FunctionComponent = ({ [unsnoozeRule, onRuleChanged, onClosePopover] ); - const badgeColor = !isEnabled ? 'default' : isSnoozed ? 'warning' : 'primary'; - const badgeMessage = !isEnabled ? DISABLED : isSnoozed ? SNOOZED : ENABLED; + const badgeColor = !rule.enabled ? 'default' : isSnoozed ? 'warning' : 'primary'; + const badgeMessage = !rule.enabled ? DISABLED : isSnoozed ? SNOOZED : ENABLED; const remainingSnoozeTime = - isEnabled && isSnoozed ? ( + rule.enabled && isSnoozed ? ( = ({ { await ml.api.createAndRunAnomalyDetectionLookbackJob( testData.jobConfig, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts index 6b555198e5eff..aa81a4713a8af 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts @@ -92,7 +92,7 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide await esTestIndexTool.setup(); }); afterEach(async () => { - objectRemover.removeAll(); + await objectRemover.removeAll(); await esTestIndexTool.destroy(); }); after(async () => { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts index 7abc1b134f01d..e7461476a2996 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts @@ -19,8 +19,10 @@ const findTestUtils = ( supertest: SuperTestAgent, supertestWithoutAuth: any ) => { - describe.skip(describeType, () => { - afterEach(() => objectRemover.removeAll()); + describe(describeType, () => { + afterEach(async () => { + await objectRemover.removeAll(); + }); for (const scenario of UserAtSpaceScenarios) { const { user, space } = scenario; @@ -651,12 +653,12 @@ export default function createFindTests({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const supertestWithoutAuth = getService('supertestWithoutAuth'); - // Failing: See https://github.com/elastic/kibana/issues/182263 - // Failing: See https://github.com/elastic/kibana/issues/182284 - describe.skip('find', () => { + describe('find', () => { const objectRemover = new ObjectRemover(supertest); - afterEach(() => objectRemover.removeAll()); + afterEach(async () => { + await objectRemover.removeAll(); + }); findTestUtils('public', objectRemover, supertest, supertestWithoutAuth); findTestUtils('internal', objectRemover, supertest, supertestWithoutAuth); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_with_post.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_with_post.ts index 82956536c6d1a..b407ee072a78b 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_with_post.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_with_post.ts @@ -19,14 +19,14 @@ const findTestUtils = ( supertest: SuperTestAgent, supertestWithoutAuth: any ) => { - // FLAKY: https://github.com/elastic/kibana/issues/182314 - describe.skip(describeType, () => { - afterEach(() => objectRemover.removeAll()); + describe(describeType, () => { + afterEach(async () => { + await objectRemover.removeAll(); + }); for (const scenario of UserAtSpaceScenarios) { const { user, space } = scenario; - // FLAKY: https://github.com/elastic/kibana/issues/182314 - describe.skip(scenario.id, () => { + describe(scenario.id, () => { it('should handle find alert request appropriately', async () => { const { body: createdAlert } = await supertest .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) @@ -581,7 +581,9 @@ export default function createFindTests({ getService }: FtrProviderContext) { describe('find with post', () => { const objectRemover = new ObjectRemover(supertest); - afterEach(() => objectRemover.removeAll()); + afterEach(async () => { + await objectRemover.removeAll(); + }); findTestUtils('internal', objectRemover, supertest, supertestWithoutAuth); }); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alert_delay.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alert_delay.ts index 7062c1c65fd9c..e3f30d252495a 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alert_delay.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alert_delay.ts @@ -43,7 +43,7 @@ export default function createAlertDelayTests({ getService }: FtrProviderContext instance: [true, true, true, false, true], }; - const ruleId = await createRule(actionId, pattern, 20); + const ruleId = await createRule(actionId, pattern, 1); objectRemover.add(space.id, ruleId, 'rule', 'alerting'); let state = await getAlertState(start, ruleId); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts index 991ed513ee984..2bb97a60bf0c2 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts @@ -80,16 +80,17 @@ export default function createAlertsAsDataAlertDelayInstallResourcesTest({ conflicts: 'proceed', }); }); - afterEach(() => objectRemover.removeAll()); - after(async () => { - await objectRemover.removeAll(); - await esTestIndexTool.destroy(); + afterEach(async () => { + objectRemover.removeAll(); await es.deleteByQuery({ index: [alertsAsDataIndex, alwaysFiringAlertsAsDataIndex], query: { match_all: {} }, conflicts: 'proceed', }); }); + after(async () => { + await esTestIndexTool.destroy(); + }); it('should generate expected events with a alertDelay with AAD', async () => { const { body: createdAction } = await supertestWithoutAuth @@ -620,6 +621,138 @@ export default function createAlertsAsDataAlertDelayInstallResourcesTest({ // alert consecutive matches should match the active count expect(source[ALERT_CONSECUTIVE_MATCHES]).to.equal(4); }); + + it('should not recover alert if the activeCount did not reach the alertDelay threshold with AAD', async () => { + const { body: createdAction } = await supertestWithoutAuth + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'MY action', + connector_type_id: 'test.noop', + config: {}, + secrets: {}, + }) + .expect(200); + + // pattern of when the alert should fire + const pattern = { + instance: [true, false, true], + }; + + const response = await supertestWithoutAuth + .post(`${getUrlPrefix(Spaces.space1.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send( + getTestRuleData({ + rule_type_id: 'test.patternFiringAad', + schedule: { interval: '1d' }, + throttle: null, + notify_when: null, + params: { + pattern, + }, + actions: [ + { + id: createdAction.id, + group: 'default', + params: {}, + frequency: { + summary: false, + throttle: null, + notify_when: RuleNotifyWhen.CHANGE, + }, + }, + ], + alert_delay: { + active: 3, + }, + }) + ); + + expect(response.status).to.eql(200); + const ruleId = response.body.id; + objectRemover.add(Spaces.space1.id, ruleId, 'rule', 'alerting'); + + // -------------------------- + // RUN 1 - 0 new alerts + // -------------------------- + let events: IValidatedEvent[] = await waitForEventLogDocs( + ruleId, + new Map([['execute', { equal: 1 }]]) + ); + let executeEvent = events[0]; + expect(get(executeEvent, ACTIVE_PATH)).to.be(0); + expect(get(executeEvent, NEW_PATH)).to.be(0); + expect(get(executeEvent, RECOVERED_PATH)).to.be(0); + expect(get(executeEvent, ACTION_PATH)).to.be(0); + expect(get(executeEvent, DELAYED_PATH)).to.be(1); + + // Query for alerts + const alertDocsRun1 = await queryForAlertDocs(); + + // Get alert state from task document + let state: any = await getTaskState(ruleId); + expect(state.alertInstances.instance.meta.activeCount).to.equal(1); + expect(state.alertInstances.instance.state.patternIndex).to.equal(0); + + // After the first run, we should have 0 alert docs for the 0 active alerts + expect(alertDocsRun1.length).to.equal(0); + + // -------------------------- + // RUN 2 - 0 new alerts + // -------------------------- + let runSoon = await supertestWithoutAuth + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rule/${ruleId}/_run_soon`) + .set('kbn-xsrf', 'foo'); + expect(runSoon.status).to.eql(204); + + events = await waitForEventLogDocs(ruleId, new Map([['execute', { equal: 2 }]])); + executeEvent = events[1]; + expect(get(executeEvent, ACTIVE_PATH)).to.be(0); + expect(get(executeEvent, NEW_PATH)).to.be(0); + expect(get(executeEvent, RECOVERED_PATH)).to.be(0); + expect(get(executeEvent, ACTION_PATH)).to.be(0); + expect(get(executeEvent, DELAYED_PATH)).to.be(0); + + // Query for alerts + const alertDocsRun2 = await queryForAlertDocs(); + + // Get alert state from task document + state = await getTaskState(ruleId); + expect(state.alertInstances).to.eql({}); + expect(state.alertRecoveredInstances).to.eql({}); + expect(state.alertTypeState.patternIndex).to.equal(2); + + // After the second run, we should have 0 alert docs for the 0 recovered alerts + expect(alertDocsRun2.length).to.equal(0); + + // -------------------------- + // RUN 3 - 0 new alerts + // -------------------------- + runSoon = await supertestWithoutAuth + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rule/${ruleId}/_run_soon`) + .set('kbn-xsrf', 'foo'); + expect(runSoon.status).to.eql(204); + + events = await waitForEventLogDocs(ruleId, new Map([['execute', { equal: 3 }]])); + executeEvent = events[2]; + expect(get(executeEvent, ACTIVE_PATH)).to.be(0); + expect(get(executeEvent, NEW_PATH)).to.be(0); + expect(get(executeEvent, RECOVERED_PATH)).to.be(0); + expect(get(executeEvent, ACTION_PATH)).to.be(0); + expect(get(executeEvent, DELAYED_PATH)).to.be(1); + + // Query for alerts + const alertDocsRun3 = await queryForAlertDocs(); + + // Get alert state from task document + state = await getTaskState(ruleId); + expect(state.alertInstances.instance.meta.activeCount).to.equal(1); + expect(state.alertInstances.instance.state.patternIndex).to.equal(2); + + // After the third run, we should have 0 alert docs for the 0 active alerts + expect(alertDocsRun3.length).to.equal(0); + }); }); function testExpectRuleData( diff --git a/x-pack/test/api_integration/apis/slos/fetch_historical_summary.ts b/x-pack/test/api_integration/apis/slos/fetch_historical_summary.ts index 94cccf1e14938..b8ca6a03b3d8e 100644 --- a/x-pack/test/api_integration/apis/slos/fetch_historical_summary.ts +++ b/x-pack/test/api_integration/apis/slos/fetch_historical_summary.ts @@ -20,8 +20,8 @@ export default function ({ getService }: FtrProviderContext) { const sloApi = getService('slo'); const SLO_ID = 'slo-fake-1'; - // Failing: See https://github.com/elastic/kibana/issues/183750 - describe.skip('fetch historical summary', () => { + + describe('fetch historical summary', () => { before(async () => { const now = moment().startOf('minute'); const curr = now.clone().subtract(30, 'days'); @@ -81,7 +81,8 @@ export default function ({ getService }: FtrProviderContext) { }); expect(response[0].sloId).to.eql(SLO_ID); expect(response[0].instanceId).to.eql(ALL_VALUE); - expect(response[0].data).to.have.length(168); // 7 days * 24 hours/day * 1 bucket/hour + const numberOfBuckets = response[0].data.length; + expect(numberOfBuckets).to.be.within(168, 170); // 7 days * 24 hours/day * 1 bucket/hour + 2 extra bucket due to histogram agg rounding const last = response[0].data.pop(); expect(last?.errorBudget).to.eql({ consumed: 1, @@ -116,7 +117,8 @@ export default function ({ getService }: FtrProviderContext) { }); expect(response[0].sloId).to.eql(SLO_ID); expect(response[0].instanceId).to.eql(ALL_VALUE); - expect(response[0].data).to.have.length(168); // 7 days * 24 hours/day * 1 bucket/hour + const numberOfBuckets = response[0].data.length; + expect(numberOfBuckets).to.be.within(168, 170); // 7 days * 24 hours/day * 1 bucket/hour + 2 extra bucket due to histogram agg rounding const last = response[0].data.pop(); expect(last?.errorBudget).to.eql({ consumed: 0, diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_root_integrations.ts b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_root_integrations.ts new file mode 100644 index 0000000000000..1de66d530d184 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_root_integrations.ts @@ -0,0 +1,133 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { v4 as uuidv4 } from 'uuid'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { setupFleetAndAgents } from '../agents/services'; +import { skipIfNoDockerRegistry } from '../../helpers'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('agent policy with root integrations', () => { + skipIfNoDockerRegistry(providerContext); + before(async () => { + await esArchiver.load('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + }); + setupFleetAndAgents(providerContext); + + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + }); + + describe('root integrations', () => { + before(async () => { + await supertest + .post(`/api/fleet/epm/packages/auditd_manager/1.16.3`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); + }); + after(async () => { + await supertest + .delete(`/api/fleet/epm/packages/auditd_manager/1.16.3`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); + }); + + it('should have root integrations in agent policy response', async () => { + // Create agent policy + const { + body: { + item: { id: agentPolicyId }, + }, + } = await supertest + .post(`/api/fleet/agent_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `Test policy ${uuidv4()}`, + namespace: 'default', + monitoring_enabled: [], + }) + .expect(200); + + await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `auditd-${uuidv4()}`, + description: '', + namespace: 'default', + policy_id: agentPolicyId, + package: { + name: 'auditd_manager', + version: '1.16.3', + }, + inputs: [ + { + type: 'audit/auditd', + policy_template: 'auditd', + enabled: true, + streams: [ + { + enabled: true, + data_stream: { type: 'logs', dataset: 'auditd_manager.auditd' }, + vars: { + socket_type: { value: '', type: 'select' }, + immutable: { value: false, type: 'bool' }, + resolve_ids: { value: true, type: 'bool' }, + failure_mode: { value: 'silent', type: 'text' }, + audit_rules: { type: 'textarea' }, + audit_rule_files: { type: 'text' }, + preserve_original_event: { value: false, type: 'bool' }, + backlog_limit: { value: 8192, type: 'text' }, + rate_limit: { value: 0, type: 'text' }, + include_warnings: { value: false, type: 'bool' }, + backpressure_strategy: { value: 'auto', type: 'text' }, + tags: { value: ['auditd_manager-auditd'], type: 'text' }, + processors: { type: 'yaml' }, + }, + }, + ], + }, + ], + }) + .expect(200); + + // Fetch the agent policy + const { + body: { item: agentPolicy }, + } = await supertest + .get(`/api/fleet/agent_policies/${agentPolicyId}`) + .set('kbn-xsrf', 'xxxx'); + + // Check that the root integrations are correct + expect( + Object.values(agentPolicy.package_policies.map((policy: any) => policy.package)) + ).to.eql([ + { + name: 'auditd_manager', + title: 'Auditd Manager', + requires_root: true, + version: '1.16.3', + }, + ]); + + // Cleanup agent and package policy + await supertest + .post(`/api/fleet/agent_policies/delete`) + .send({ agentPolicyId }) + .set('kbn-xsrf', 'xxxx') + .expect(200); + }); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/index.js b/x-pack/test/fleet_api_integration/apis/agent_policy/index.js index 559367c1a6b81..66abbf8d6a5b3 100644 --- a/x-pack/test/fleet_api_integration/apis/agent_policy/index.js +++ b/x-pack/test/fleet_api_integration/apis/agent_policy/index.js @@ -11,5 +11,6 @@ export default function loadTests({ loadTestFile }) { loadTestFile(require.resolve('./agent_policy')); loadTestFile(require.resolve('./agent_policy_datastream_permissions')); loadTestFile(require.resolve('./privileges')); + loadTestFile(require.resolve('./agent_policy_root_integrations')); }); } diff --git a/x-pack/test/fleet_api_integration/apis/agents/request_diagnostics.ts b/x-pack/test/fleet_api_integration/apis/agents/request_diagnostics.ts index 70b1b2c20b1d1..45cca59da5e8e 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/request_diagnostics.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/request_diagnostics.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import moment from 'moment'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { setupFleetAndAgents } from './services'; @@ -39,6 +40,10 @@ export default function (providerContext: FtrProviderContext) { const actionStatus = body.items[0]; expect(actionStatus.nbAgentsActionCreated).to.eql(agentCount); + expect( + moment(actionStatus.expiration).diff(moment(actionStatus.creationTime), 'minutes') > 170 && + moment(actionStatus.expiration).diff(moment(actionStatus.creationTime), 'minutes') < 190 + ).to.eql(true); } it('should respond 403 if user lacks fleet read permissions', async () => { diff --git a/x-pack/test/fleet_api_integration/apis/agents/uploads.ts b/x-pack/test/fleet_api_integration/apis/agents/uploads.ts index 174d511674ef6..8ea34cc8c17de 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/uploads.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/uploads.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import Moment from 'moment'; import expect from '@kbn/expect'; import { AGENT_ACTIONS_INDEX, AGENT_ACTIONS_RESULTS_INDEX } from '@kbn/fleet-plugin/common'; import { @@ -24,86 +24,143 @@ export default function (providerContext: FtrProviderContext) { const ES_INDEX_OPTIONS = { headers: { 'X-elastic-product-origin': 'fleet' } }; const cleanupFiles = async () => { - await esClient.deleteByQuery({ - index: `${FILE_STORAGE_DATA_AGENT_INDEX},${FILE_STORAGE_METADATA_AGENT_INDEX}`, - refresh: true, - ignore_unavailable: true, - query: { - bool: { - filter: [ - { - ids: { - values: ['file1', 'file1.0'], - }, - }, - ], + await esClient.deleteByQuery( + { + index: `${AGENT_ACTIONS_INDEX},${AGENT_ACTIONS_RESULTS_INDEX}`, + refresh: true, + ignore_unavailable: true, + query: { + prefix: { + action_id: 'fleet_uploads_test', + }, }, }, - }); - }; + ES_INDEX_OPTIONS + ); - describe('fleet_uploads', () => { - skipIfNoDockerRegistry(providerContext); - setupFleetAndAgents(providerContext); + await esClient.deleteByQuery( + { + index: `${FILE_STORAGE_DATA_AGENT_INDEX},${FILE_STORAGE_METADATA_AGENT_INDEX}`, + refresh: true, + ignore_unavailable: true, + query: { + match_all: {}, + }, + }, + ES_INDEX_OPTIONS + ); + }; - before(async () => { - await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); - await getService('supertest').post(`/api/fleet/setup`).set('kbn-xsrf', 'xxx').send(); - await cleanupFiles(); + const createUploadBundle = async ( + fileName: string, + opts: { + agentId: string; + expired?: boolean; + inProgress?: boolean; + error?: string; + timestamp: string; + } = { + agentId: 'agent1', + expired: false, + inProgress: false, + timestamp: Moment(Moment.now()).toISOString(), + } + ) => { + const expiration = opts.expired + ? Moment(opts.timestamp).subtract(6, 'hour') + : Moment(opts.timestamp).add(6, 'hour'); - await esClient.create({ + await esClient.index( + { index: AGENT_ACTIONS_INDEX, - id: new Date().toISOString(), refresh: true, + op_type: 'create', body: { type: 'REQUEST_DIAGNOSTICS', - action_id: 'action1', - agents: ['agent1'], - '@timestamp': '2022-10-07T11:00:00.000Z', + action_id: `fleet_uploads_test-${fileName}-action`, + agents: [opts.agentId], + '@timestamp': opts.timestamp, + expiration, }, - }); + }, + ES_INDEX_OPTIONS + ); - await esClient.create( - { - index: AGENT_ACTIONS_RESULTS_INDEX, - id: new Date().toISOString(), - refresh: true, - body: { - action_id: 'action1', - agent_id: 'agent1', - '@timestamp': '2022-10-07T12:00:00.000Z', - data: { - upload_id: 'file1', - }, + await esClient.index( + { + index: AGENT_ACTIONS_RESULTS_INDEX, + refresh: true, + op_type: 'create', + body: { + action_id: `fleet_uploads_test-${fileName}-action`, + agent_id: opts.agentId, + '@timestamp': opts.timestamp, + data: { + upload_id: fileName, }, + error: opts.error, }, - ES_INDEX_OPTIONS - ); + }, + ES_INDEX_OPTIONS + ); - await esClient.index({ + if (opts.error || opts.inProgress) { + return; + } + + await esClient.index( + { index: FILE_STORAGE_METADATA_AGENT_INDEX, - id: 'file1', + id: fileName, refresh: true, op_type: 'create', body: { - '@timestamp': new Date().toISOString(), - upload_id: 'file1', - action_id: 'action1', - agent_id: 'agent1', + '@timestamp': opts.timestamp, + upload_id: fileName, + action_id: `fleet_uploads_test-${fileName}-action`, + agent_id: opts.agentId, file: { ChunkSize: 4194304, extension: 'zip', hash: {}, mime_type: 'application/zip', mode: '0644', - name: 'elastic-agent-diagnostics-2022-10-07T12-00-00Z-00.zip', - path: '/agent/elastic-agent-diagnostics-2022-10-07T12-00-00Z-00.zip', + name: `elastic-agent-diagnostics-file-name.zip`, + path: `/agent/elastic-agent-diagnostics-file-name.zip`, size: 24917, Status: 'READY', type: 'file', }, }, - }); + }, + ES_INDEX_OPTIONS + ); + + await esClient.index( + { + index: FILE_STORAGE_DATA_AGENT_INDEX, + id: `${fileName}.0`, + op_type: 'create', + refresh: true, + body: { + '@timestamp': opts.timestamp, + last: true, + bid: fileName, + data: 'test', + }, + }, + ES_INDEX_OPTIONS + ); + }; + + describe('fleet_uploads', () => { + skipIfNoDockerRegistry(providerContext); + setupFleetAndAgents(providerContext); + + before(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + await getService('supertest').post(`/api/fleet/setup`).set('kbn-xsrf', 'xxx').send(); + await cleanupFiles(); }); after(async () => { await Promise.all([ @@ -113,89 +170,136 @@ export default function (providerContext: FtrProviderContext) { }); it('should get agent uploads', async () => { - const { body } = await supertest - .get(`/api/fleet/agents/agent1/uploads`) + const fileName = 'file1'; + const agentId = 'agent1'; + const timestamp = Moment().toISOString(); + await createUploadBundle(fileName, { agentId, timestamp }); + const { + body: { items }, + } = await supertest + .get(`/api/fleet/agents/${agentId}/uploads`) .set('kbn-xsrf', 'xxx') .expect(200); - expect(body.items[0]).to.eql({ - actionId: 'action1', - createTime: '2022-10-07T11:00:00.000Z', - filePath: - '/api/fleet/agents/files/file1/elastic-agent-diagnostics-2022-10-07T12-00-00Z-00.zip', - id: 'file1', - name: 'elastic-agent-diagnostics-2022-10-07T12-00-00Z-00.zip', + const { id, filePath, ...rest } = items[0]; + expect(filePath).to.be.a('string'); + expect(rest).to.eql({ + actionId: `fleet_uploads_test-${fileName}-action`, + createTime: timestamp, + name: `elastic-agent-diagnostics-file-name.zip`, status: 'READY', }); }); it('should get agent uploaded file', async () => { - await esClient.index({ - index: FILE_STORAGE_DATA_AGENT_INDEX, - id: 'file1.0', - op_type: 'create', - refresh: true, - body: { - '@timestamp': new Date().toISOString(), - last: true, - bid: 'file1', - data: 'test', - }, - }); - + const fileName = 'file2'; + const agentId = 'agent2'; + const timestamp = Moment().toISOString(); + await createUploadBundle(fileName, { agentId, timestamp }); const { header } = await supertest - .get(`/api/fleet/agents/files/file1/elastic-agent-diagnostics-2022-10-07T12-00-00Z-00.zip`) + .get(`/api/fleet/agents/files/${fileName}/elastic-agent-diagnostics-somefilename.zip`) .set('kbn-xsrf', 'xxx') .expect(200); expect(header['content-type']).to.eql('application/octet-stream'); expect(header['content-disposition']).to.eql( - 'attachment; filename="elastic-agent-diagnostics-2022-10-07T12-00-00Z-00.zip"' + `attachment; filename="elastic-agent-diagnostics-somefilename.zip"` ); }); it('should return failed status with error message', async () => { - await esClient.create({ - index: AGENT_ACTIONS_INDEX, - id: new Date().toISOString(), - refresh: true, - body: { - type: 'REQUEST_DIAGNOSTICS', - action_id: 'action2', - agents: ['agent2'], - '@timestamp': '2022-10-07T11:00:00.000Z', - }, + const fileName = 'failed-file'; + const agentId = 'agent3'; + const timestamp = Moment().toISOString(); + await createUploadBundle(fileName, { agentId, error: 'rate limit exceeded', timestamp }); + const { body } = await supertest + .get(`/api/fleet/agents/${agentId}/uploads`) + .set('kbn-xsrf', 'xxx') + .expect(200); + + const { name, ...rest } = body.items[0]; + expect(name).to.be.a('string'); + expect(rest).to.eql({ + actionId: `fleet_uploads_test-${fileName}-action`, + createTime: timestamp, + filePath: '', + id: `fleet_uploads_test-${fileName}-action`, + status: 'FAILED', + error: 'rate limit exceeded', + }); + }); + + it('should return expired status', async () => { + const fileName = 'expired-failed'; + const agentId = 'agent4'; + const timestamp = Moment().toISOString(); + await createUploadBundle(fileName, { + agentId, + expired: true, + error: 'rate limit exceeded', + timestamp, }); - await esClient.create( - { - index: AGENT_ACTIONS_RESULTS_INDEX, - id: new Date().toISOString(), - refresh: true, - body: { - action_id: 'action2', - agent_id: 'agent2', - '@timestamp': '2022-10-07T12:00:00.000Z', - data: {}, - error: 'rate limit exceeded', - }, - }, - ES_INDEX_OPTIONS - ); const { body } = await supertest - .get(`/api/fleet/agents/agent2/uploads`) + .get(`/api/fleet/agents/${agentId}/uploads`) .set('kbn-xsrf', 'xxx') .expect(200); - expect(body.items[0]).to.eql({ - actionId: 'action2', - createTime: '2022-10-07T11:00:00.000Z', + const { name, ...rest } = body.items[0]; + expect(name).to.be.a('string'); + expect(rest).to.eql({ + actionId: `fleet_uploads_test-${fileName}-action`, + createTime: timestamp, filePath: '', - id: 'action2', - name: 'elastic-agent-diagnostics-2022-10-07T11-00-00Z-00.zip', - status: 'FAILED', + id: `fleet_uploads_test-${fileName}-action`, + status: 'EXPIRED', error: 'rate limit exceeded', }); }); + + it('should return in progress status', async () => { + const fileName = 'in-progress-file'; + const agentId = 'agent6'; + const timestamp = Moment().toISOString(); + await createUploadBundle(fileName, { agentId, inProgress: true, timestamp }); + const { + body: { items }, + } = await supertest + .get(`/api/fleet/agents/${agentId}/uploads`) + .set('kbn-xsrf', 'xxx') + .expect(200); + + const { id, name, ...rest } = items[0]; + expect(id).to.be.a('string'); + expect(name).to.be.a('string'); + expect(rest).to.eql({ + actionId: `fleet_uploads_test-${fileName}-action`, + createTime: timestamp, + filePath: '', + status: 'IN_PROGRESS', + }); + }); + + it('should delete agent uploaded file', async () => { + const fileName = 'to-delete-file'; + const agentId = 'agent7'; + const timestamp = Moment().toISOString(); + await createUploadBundle(fileName, { agentId, timestamp }); + + const { body } = await supertest + .delete(`/api/fleet/agents/files/${fileName}`) + .set('kbn-xsrf', 'xxx') + .expect(200); + + expect(body.deleted).to.eql(true); + }); + + it('should return error if file is not found for deletion', async () => { + const fileName = 'unknown-file'; + await supertest + .delete(`/api/fleet/agents/files/${fileName}`) + .set('kbn-xsrf', 'xxx') + .expect(400); + }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/auditd_manager/auditd_manager-1.16.3.zip b/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/auditd_manager/auditd_manager-1.16.3.zip new file mode 100644 index 0000000000000..5b9c055710eff Binary files /dev/null and b/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/auditd_manager/auditd_manager-1.16.3.zip differ diff --git a/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts b/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts index 1bb0ca927f9a2..9c1cf8ea59c51 100644 --- a/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts +++ b/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts @@ -42,6 +42,12 @@ export default function (providerContext: FtrProviderContext) { describe('should respond with correct enrollment settings', async function () { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/fleet/fleet_server'); + // package verification error without force + await supertest + .post(`/api/fleet/epm/packages/fleet_server`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/fleet/fleet_server'); diff --git a/x-pack/test/functional/apps/discover/reporting.ts b/x-pack/test/functional/apps/discover/reporting.ts index cc5a198cb5416..61ddea54a7cb1 100644 --- a/x-pack/test/functional/apps/discover/reporting.ts +++ b/x-pack/test/functional/apps/discover/reporting.ts @@ -36,14 +36,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.refresh(); }; - const getReport = async () => { + const getReport = async ({ timeout } = { timeout: 60 * 1000 }) => { // close any open notification toasts await toasts.dismissAll(); await PageObjects.reporting.openExportTab(); await PageObjects.reporting.clickGenerateReportButton(); - const url = await PageObjects.reporting.getReportURL(60000); + const url = await PageObjects.reporting.getReportURL(timeout); const res = await PageObjects.reporting.getResponse(url ?? ''); expect(res.status).to.equal(200); @@ -173,7 +173,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.saveSearch('large export'); // match file length, the beginning and the end of the csv file contents - const { text: csvFile } = await getReport(); + const { text: csvFile } = await getReport({ timeout: 80 * 1000 }); expect(csvFile.length).to.be(4826973); expectSnapshot(csvFile.slice(0, 5000)).toMatch(); expectSnapshot(csvFile.slice(-5000)).toMatch(); diff --git a/x-pack/test/functional/apps/rollup_job/rollup_jobs.js b/x-pack/test/functional/apps/rollup_job/rollup_jobs.js index 1b2ba0457e02b..3c33c9c31bc6b 100644 --- a/x-pack/test/functional/apps/rollup_job/rollup_jobs.js +++ b/x-pack/test/functional/apps/rollup_job/rollup_jobs.js @@ -23,7 +23,12 @@ export default function ({ getService, getPageObjects }) { remoteEs = getService('remoteEs'); } - describe('rollup job', function () { + // FLAKY: https://github.com/elastic/kibana/issues/183925 + // FLAKY: https://github.com/elastic/kibana/issues/183926 + // FLAKY: https://github.com/elastic/kibana/issues/183927 + // FLAKY: https://github.com/elastic/kibana/issues/183928 + // FLAKY: https://github.com/elastic/kibana/issues/104569 + describe.skip('rollup job', function () { // Since rollups can only be created once with the same name (even if you delete it), // we add the Date.now() to avoid name collision. const rollupJobName = 'rollup-to-be-' + Date.now(); diff --git a/x-pack/test/functional/apps/search_playground/config.ts b/x-pack/test/functional/apps/search_playground/config.ts new file mode 100644 index 0000000000000..d0d07ff200281 --- /dev/null +++ b/x-pack/test/functional/apps/search_playground/config.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +import { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + }; +} diff --git a/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/constants.ts b/x-pack/test/functional/apps/search_playground/index.ts similarity index 50% rename from x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/constants.ts rename to x-pack/test/functional/apps/search_playground/index.ts index cbbf21094d61f..f15cbe9179868 100644 --- a/x-pack/plugins/reporting/server/lib/store/ilm_policy_manager/constants.ts +++ b/x-pack/test/functional/apps/search_playground/index.ts @@ -4,15 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { FtrProviderContext } from '../../ftr_provider_context'; -import type { IlmPutLifecycleRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; - -export const reportingIlmPolicy: IlmPutLifecycleRequest['body'] = { - policy: { - phases: { - hot: { - actions: {}, - }, - }, - }, -}; +export default function ({ loadTestFile }: FtrProviderContext) { + describe('playground', async () => { + loadTestFile(require.resolve('./playground_overview.ess.ts')); + }); +} diff --git a/x-pack/test/functional/apps/search_playground/playground_overview.ess.ts b/x-pack/test/functional/apps/search_playground/playground_overview.ess.ts new file mode 100644 index 0000000000000..48f6d5e13cf88 --- /dev/null +++ b/x-pack/test/functional/apps/search_playground/playground_overview.ess.ts @@ -0,0 +1,94 @@ +/* + * 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. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; +import { createOpenAIConnector } from './utils/create_openai_connector'; +import { MachineLearningCommonAPIProvider } from '../../services/ml/common_api'; + +const indexName = 'basic_index'; +const esArchiveIndex = 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'; + +export default function (ftrContext: FtrProviderContext) { + const { getService, getPageObjects } = ftrContext; + const pageObjects = getPageObjects(['common', 'searchPlayground']); + const commonAPI = MachineLearningCommonAPIProvider(ftrContext); + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + const createIndex = async () => await esArchiver.load(esArchiveIndex); + let removeOpenAIConnector: () => Promise; + const createConnector = async () => { + removeOpenAIConnector = await createOpenAIConnector({ + supertest, + requestHeader: commonAPI.getCommonRequestHeader(), + }); + }; + + describe('Playground Overview', () => { + before(async () => { + await pageObjects.common.navigateToApp('enterpriseSearchApplications/playground'); + }); + + after(async () => { + await esArchiver.unload(esArchiveIndex); + await removeOpenAIConnector?.(); + }); + + describe('start chat page', () => { + it('playground app is loaded', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectPlaygroundStartChatPageComponentsToExist(); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectPlaygroundHeaderComponentsToExist(); + }); + + it('show no index callout', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectNoIndexCalloutExists(); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectCreateIndexButtonToExists(); + }); + + it('hide no index callout when index added', async () => { + await createIndex(); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectSelectIndex(indexName); + }); + + it('show add connector button', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectAddConnectorButtonExists(); + }); + + it('click add connector button opens connector flyout', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectOpenConnectorPagePlayground(); + }); + + it('hide gen ai panel when connector exists', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectHideGenAIPanelConnector( + createConnector + ); + }); + + it('show chat page', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectSelectIndex(indexName); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectToStartChatPage(); + }); + }); + + describe('chat page', () => { + it('chat works', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectChatWorks(); + }); + + it('open view code', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectOpenViewCode(); + }); + + it('show fields and code in view query', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectViewQueryHasFields(); + }); + + it('show edit context', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectEditContextOpens(); + }); + }); + }); +} diff --git a/x-pack/test/functional/apps/search_playground/utils/create_openai_connector.ts b/x-pack/test/functional/apps/search_playground/utils/create_openai_connector.ts new file mode 100644 index 0000000000000..864e424664785 --- /dev/null +++ b/x-pack/test/functional/apps/search_playground/utils/create_openai_connector.ts @@ -0,0 +1,50 @@ +/* + * 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. + */ + +import type SuperTest from 'supertest'; + +export async function createOpenAIConnector({ + supertest, + requestHeader = {}, + apiKeyHeader = {}, +}: { + supertest: SuperTest.Agent; + requestHeader?: Record; + apiKeyHeader?: Record; +}): Promise<() => Promise> { + const config = { + apiProvider: 'OpenAI', + defaultModel: 'gpt-4', + apiUrl: 'http://localhost:3002', + }; + + const connector: { id: string } | undefined = ( + await supertest + .post('/api/actions/connector') + .set(requestHeader) + .set(apiKeyHeader) + .send({ + name: 'test Open AI', + connector_type_id: '.gen-ai', + config, + secrets: { + apiKey: 'genAiApiKey', + }, + }) + .expect(200) + ).body; + + return async () => { + if (connector) { + await supertest + .delete(`/api/actions/connector/${connector.id}`) + .set(requestHeader) + .set(apiKeyHeader) + .expect(204); + } + }; +} diff --git a/x-pack/test/functional/page_objects/index.ts b/x-pack/test/functional/page_objects/index.ts index 7a459ad74f980..155bc0901ae4d 100644 --- a/x-pack/test/functional/page_objects/index.ts +++ b/x-pack/test/functional/page_objects/index.ts @@ -53,6 +53,7 @@ import { UptimePageObject } from './uptime_page'; import { UserProfilePageProvider } from './user_profile_page'; import { WatcherPageObject } from './watcher_page'; import { SearchProfilerPageProvider } from './search_profiler_page'; +import { SearchPlaygroundPageProvider } from './search_playground_page'; // just like services, PageObjects are defined as a map of // names to Providers. Merge in Kibana's or pick specific ones @@ -93,6 +94,7 @@ export const pageObjects = { roleMappings: RoleMappingsPageProvider, rollup: RollupPageObject, searchProfiler: SearchProfilerPageProvider, + searchPlayground: SearchPlaygroundPageProvider, searchSessionsManagement: SearchSessionsPageProvider, security: SecurityPageObject, shareSavedObjectsToSpace: ShareSavedObjectsToSpacePageProvider, diff --git a/x-pack/test/functional/page_objects/search_playground_page.ts b/x-pack/test/functional/page_objects/search_playground_page.ts new file mode 100644 index 0000000000000..35e0a8cc253d3 --- /dev/null +++ b/x-pack/test/functional/page_objects/search_playground_page.ts @@ -0,0 +1,114 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +export function SearchPlaygroundPageProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + const comboBox = getService('comboBox'); + const browser = getService('browser'); + + return { + PlaygroundStartChatPage: { + async expectPlaygroundStartChatPageComponentsToExist() { + await testSubjects.existOrFail('startChatPage'); + await testSubjects.existOrFail('selectIndicesChatPanel'); + await testSubjects.existOrFail('startChatButton'); + }, + + async expectPlaygroundHeaderComponentsToExist() { + await testSubjects.existOrFail('playground-header-actions'); + await testSubjects.existOrFail('playground-documentation-link'); + }, + + async expectCreateIndexButtonToMissed() { + await testSubjects.missingOrFail('createIndexButton'); + }, + + async expectCreateIndexButtonToExists() { + await testSubjects.existOrFail('createIndexButton'); + }, + + async expectNoIndexCalloutExists() { + await testSubjects.existOrFail('createIndexCallout'); + }, + + async expectSelectIndex(indexName: string) { + await browser.refresh(); + await testSubjects.missingOrFail('createIndexCallout'); + await testSubjects.existOrFail('selectIndicesComboBox'); + await comboBox.setCustom('selectIndicesComboBox', indexName); + }, + + async expectNoIndicesFieldsWarningExists() { + await testSubjects.existOrFail('NoIndicesFieldsMessage'); + }, + + async expectAddConnectorButtonExists() { + await testSubjects.existOrFail('setupGenAIConnectorButton'); + }, + + async expectOpenConnectorPagePlayground() { + await testSubjects.click('setupGenAIConnectorButton'); + await testSubjects.existOrFail('create-connector-flyout'); + }, + + async expectHideGenAIPanelConnector(createConnector: () => Promise) { + await createConnector(); + await browser.refresh(); + await testSubjects.missingOrFail('connectToLLMChatPanel'); + }, + + async expectToStartChatPage() { + expect(await testSubjects.isEnabled('startChatButton')).to.be(true); + await testSubjects.click('startChatButton'); + await testSubjects.existOrFail('chatPage'); + }, + }, + PlaygroundChatPage: { + async expectChatWorks() { + await testSubjects.existOrFail('questionInput'); + await testSubjects.setValue('questionInput', 'test question'); + await testSubjects.click('sendQuestionButton'); + await testSubjects.existOrFail('userMessage'); + }, + + async expectOpenViewCode() { + await testSubjects.click('viewCodeActionButton'); + await testSubjects.existOrFail('viewCodeFlyout'); + await testSubjects.click('euiFlyoutCloseButton'); + }, + + async expectViewQueryHasFields() { + await testSubjects.click('viewQueryActionButton'); + await testSubjects.existOrFail('viewQueryFlyout'); + const fields = await testSubjects.findAll('queryField'); + + expect(fields.length).to.be(1); + + const codeBlock = await testSubjects.find('ViewElasticsearchQueryResult'); + const code = await codeBlock.getVisibleText(); + expect(code.replace(/ /g, '')).to.be( + '{\n"retriever":{\n"standard":{\n"query":{\n"multi_match":{\n"query":"{query}",\n"fields":[\n"baz"\n]\n}\n}\n}\n}\n}' + ); + await testSubjects.click('euiFlyoutCloseButton'); + }, + + async expectEditContextOpens() { + await testSubjects.click('editContextActionButton'); + await testSubjects.existOrFail('editContextFlyout'); + await testSubjects.click('contextFieldsSelectable_basic_index'); + await testSubjects.existOrFail('contextField'); + const fields = await testSubjects.findAll('contextField'); + + expect(fields.length).to.be(1); + await testSubjects.click('euiFlyoutCloseButton'); + }, + }, + }; +} diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list/rules_list.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list/rules_list.ts index 06ccb3990b69f..e3324ccbc000a 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list/rules_list.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list/rules_list.ts @@ -49,8 +49,7 @@ export default ({ getPageObjects, getPageObject, getService }: FtrProviderContex return summary; }; - // FLAKY: https://github.com/elastic/kibana/issues/157623 - describe.skip('rules list', function () { + describe('rules list', function () { const assertRulesLength = async (length: number) => { return await retry.try(async () => { const rules = await pageObjects.triggersActionsUI.getAlertsList(); diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/config.ts b/x-pack/test/observability_ai_assistant_api_integration/common/config.ts index 351d43f4e30b2..559bb5d65dd2a 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/common/config.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/common/config.ts @@ -6,15 +6,15 @@ */ import { Config, FtrConfigProviderContext } from '@kbn/test'; -import supertest from 'supertest'; -import { format, UrlObject } from 'url'; +import { UrlObject } from 'url'; import { ObservabilityAIAssistantFtrConfigName } from '../configs'; import { getApmSynthtraceEsClient } from './create_synthtrace_client'; import { InheritedFtrProviderContext, InheritedServices } from './ftr_provider_context'; import { - createObservabilityAIAssistantApiClient, + getScopedApiClient, ObservabilityAIAssistantAPIClient, } from './observability_ai_assistant_api_client'; +import { editorUser, viewerUser } from './users/users'; export interface ObservabilityAIAssistantFtrConfig { name: ObservabilityAIAssistantFtrConfigName; @@ -22,10 +22,6 @@ export interface ObservabilityAIAssistantFtrConfig { kibanaConfig?: Record; } -async function getObservabilityAIAssistantAPIClient(kibanaServerUrl: string) { - return createObservabilityAIAssistantApiClient(supertest(kibanaServerUrl)); -} - export type CreateTestConfig = ReturnType; export interface CreateTest { @@ -33,8 +29,9 @@ export interface CreateTest { servers: any; services: InheritedServices & { observabilityAIAssistantAPIClient: () => Promise<{ - readUser: ObservabilityAIAssistantAPIClient; - writeUser: ObservabilityAIAssistantAPIClient; + adminUser: ObservabilityAIAssistantAPIClient; + viewerUser: ObservabilityAIAssistantAPIClient; + editorUser: ObservabilityAIAssistantAPIClient; }>; }; junit: { reportName: string }; @@ -56,7 +53,6 @@ export function createObservabilityAIAssistantAPIConfig({ const services = config.get('services') as InheritedServices; const servers = config.get('servers'); const kibanaServer = servers.kibana as UrlObject; - const kibanaServerUrl = format(kibanaServer); const apmSynthtraceKibanaClient = services.apmSynthtraceKibanaClient(); const createTest: Omit = { @@ -68,8 +64,9 @@ export function createObservabilityAIAssistantAPIConfig({ getApmSynthtraceEsClient(context, apmSynthtraceKibanaClient), observabilityAIAssistantAPIClient: async () => { return { - readUser: await getObservabilityAIAssistantAPIClient(kibanaServerUrl), - writeUser: await getObservabilityAIAssistantAPIClient(kibanaServerUrl), + adminUser: await getScopedApiClient(kibanaServer, 'elastic'), + viewerUser: await getScopedApiClient(kibanaServer, viewerUser.username), + editorUser: await getScopedApiClient(kibanaServer, editorUser.username), }; }, }, diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/observability_ai_assistant_api_client.ts b/x-pack/test/observability_ai_assistant_api_integration/common/observability_ai_assistant_api_client.ts index 865620a2d028a..005815b38057a 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/common/observability_ai_assistant_api_client.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/common/observability_ai_assistant_api_client.ts @@ -12,8 +12,20 @@ import type { } from '@kbn/observability-ai-assistant-plugin/public'; import { formatRequest } from '@kbn/server-route-repository'; import supertest from 'supertest'; -import { format } from 'url'; import { Subtract } from 'utility-types'; +import { format, UrlObject } from 'url'; +import { kbnTestConfig } from '@kbn/test'; +import { User } from './users/users'; + +export async function getScopedApiClient(kibanaServer: UrlObject, username: User['username']) { + const { password } = kbnTestConfig.getUrlParts(); + const baseUrlWithAuth = format({ + ...kibanaServer, + auth: `${username}:${password}`, + }); + + return createObservabilityAIAssistantApiClient(supertest(baseUrlWithAuth)); +} export function createObservabilityAIAssistantApiClient(st: supertest.Agent) { return ( diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/users/create_users_and_roles.ts b/x-pack/test/observability_ai_assistant_api_integration/common/users/create_users_and_roles.ts new file mode 100644 index 0000000000000..1492fa68114a2 --- /dev/null +++ b/x-pack/test/observability_ai_assistant_api_integration/common/users/create_users_and_roles.ts @@ -0,0 +1,33 @@ +/* + * 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. + */ + +import { InheritedFtrProviderContext } from '../ftr_provider_context'; +import { allUsers } from './users'; +import { allRoles } from './roles'; + +export async function createUsersAndRoles(getService: InheritedFtrProviderContext['getService']) { + const security = getService('security'); + const log = getService('log'); + + // create roles + await Promise.all( + allRoles.map(({ name, privileges }) => { + return security.role.create(name, privileges); + }) + ); + + // create users + await Promise.all( + allUsers.map((user) => { + log.info(`Creating user: ${user.username} with roles: ${user.roles.join(', ')}`); + return security.user.create(user.username, { + password: user.password, + roles: user.roles, + }); + }) + ); +} diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/users/roles.ts b/x-pack/test/observability_ai_assistant_api_integration/common/users/roles.ts new file mode 100644 index 0000000000000..ec5c9daac3ea9 --- /dev/null +++ b/x-pack/test/observability_ai_assistant_api_integration/common/users/roles.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +// Example role: +// export const allAccessRole: Role = { +// name: 'all_access', +// privileges: { +// elasticsearch: { +// indices: [ +// { +// names: ['*'], +// privileges: ['all'], +// }, +// ], +// }, +// kibana: [ +// { +// feature: { +// apm: ['all'], +// actions: ['all'], +// }, +// spaces: ['*'], +// }, +// ], +// }, +// }; + +export interface Role { + name: string; + privileges: { + elasticsearch?: { + cluster?: string[]; + indices?: Array<{ + names: string[]; + privileges: string[]; + }>; + }; + kibana?: Array<{ + spaces: string[]; + base?: string[]; + feature?: { + [featureId: string]: string[]; + }; + }>; + }; +} + +export const allRoles = []; diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/users/users.ts b/x-pack/test/observability_ai_assistant_api_integration/common/users/users.ts new file mode 100644 index 0000000000000..b6fa38e52e60b --- /dev/null +++ b/x-pack/test/observability_ai_assistant_api_integration/common/users/users.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import { kbnTestConfig } from '@kbn/test'; +const password = kbnTestConfig.getUrlParts().password!; + +export interface User { + username: 'elastic' | 'editor' | 'viewer'; + password: string; + roles: string[]; +} + +export const editorUser: User = { + username: 'editor', + password, + roles: ['editor'], +}; + +export const viewerUser: User = { + username: 'viewer', + password, + roles: ['viewer'], +}; + +export const allUsers = [editorUser, viewerUser]; diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts index 38303c3a53076..01f6e8cdd7bce 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts @@ -302,7 +302,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { )[0]?.conversation.id; await observabilityAIAssistantAPIClient - .writeUser({ + .adminUser({ endpoint: 'DELETE /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -378,7 +378,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { ).to.eql(0); const conversations = await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversations', }) .expect(200); @@ -422,7 +422,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { .complete(); const createResponse = await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'POST /internal/observability_ai_assistant/chat/complete', params: { body: { @@ -440,7 +440,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { conversationCreatedEvent = getConversationCreatedEvent(createResponse.body); const conversationId = conversationCreatedEvent.conversation.id; - const fullConversation = await observabilityAIAssistantAPIClient.readUser({ + const fullConversation = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -454,7 +454,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { .complete(); const updatedResponse = await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'POST /internal/observability_ai_assistant/chat/complete', params: { body: { @@ -484,7 +484,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { after(async () => { await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'DELETE /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts index d51edffc9a1a8..d334251d9114e 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts @@ -24,14 +24,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('Returns a 2xx for enterprise license', async () => { await observabilityAIAssistantAPIClient - .readUser({ + .editorUser({ endpoint: 'GET /internal/observability_ai_assistant/connectors', }) .expect(200); }); it('returns an empty list of connectors', async () => { - const res = await observabilityAIAssistantAPIClient.readUser({ + const res = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'GET /internal/observability_ai_assistant/connectors', }); @@ -55,7 +55,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }) .expect(200); - const res = await observabilityAIAssistantAPIClient.readUser({ + const res = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'GET /internal/observability_ai_assistant/connectors', }); diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts index 85c9eb725d47c..91a418b3000ee 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts @@ -48,7 +48,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('without conversations', () => { it('returns no conversations when listing', async () => { const response = await observabilityAIAssistantAPIClient - .readUser({ + .editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversations', }) .expect(200); @@ -58,7 +58,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns a 404 for updating conversations', async () => { await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'PUT /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -74,7 +74,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns a 404 for retrieving a conversation', async () => { await observabilityAIAssistantAPIClient - .readUser({ + .editorUser({ endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -92,7 +92,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { >; before(async () => { createResponse = await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversation', params: { body: { @@ -105,7 +105,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { after(async () => { await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'DELETE /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -116,7 +116,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { .expect(200); await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -141,14 +141,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { namespace: 'default', public: conversationCreate.public, user: { - name: 'elastic', + name: 'editor', }, }); }); it('returns a 404 for updating a non-existing conversation', async () => { await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'PUT /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -164,7 +164,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns a 404 for retrieving a non-existing conversation', async () => { await observabilityAIAssistantAPIClient - .readUser({ + .editorUser({ endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -177,7 +177,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the conversation that was created', async () => { const response = await observabilityAIAssistantAPIClient - .readUser({ + .editorUser({ endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -192,7 +192,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the created conversation when listing', async () => { const response = await observabilityAIAssistantAPIClient - .readUser({ + .editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversations', }) .expect(200); @@ -210,7 +210,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { before(async () => { updateResponse = await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'PUT /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { @@ -234,7 +234,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the updated conversation after get', async () => { const updateAfterCreateResponse = await observabilityAIAssistantAPIClient - .writeUser({ + .editorUser({ endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', params: { path: { diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/index.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/index.ts index 20e8338a55a3f..e0312d2f76019 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/index.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/index.ts @@ -6,6 +6,7 @@ */ import globby from 'globby'; import path from 'path'; +import { createUsersAndRoles } from '../common/users/create_users_and_roles'; import { FtrProviderContext } from '../common/ftr_provider_context'; const cwd = path.join(__dirname); @@ -18,6 +19,11 @@ export default function observabilityAIAssistantApiIntegrationTests({ const filePattern = '**/*.spec.ts'; const tests = globby.sync(filePattern, { cwd }); + // Creates roles and users before running tests + before(async () => { + await createUsersAndRoles(getService); + }); + tests.forEach((testName) => { describe(testName, () => { loadTestFile(require.resolve(`./${testName}`)); diff --git a/x-pack/test/observability_ai_assistant_functional/common/config.ts b/x-pack/test/observability_ai_assistant_functional/common/config.ts index 35a12f10861c4..e92bf3729cb40 100644 --- a/x-pack/test/observability_ai_assistant_functional/common/config.ts +++ b/x-pack/test/observability_ai_assistant_functional/common/config.ts @@ -7,10 +7,13 @@ import { FtrConfigProviderContext } from '@kbn/test'; import { merge } from 'lodash'; -import supertest from 'supertest'; -import { format, UrlObject } from 'url'; +import { UrlObject } from 'url'; import type { EBTHelpersContract } from '@kbn/analytics-ftr-helpers-plugin/common/types'; import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; +import { + editorUser, + viewerUser, +} from '../../observability_ai_assistant_api_integration/common/users/users'; import { KibanaEBTServerProvider, KibanaEBTUIProvider, @@ -21,7 +24,7 @@ import { createObservabilityAIAssistantAPIConfig, } from '../../observability_ai_assistant_api_integration/common/config'; import { - createObservabilityAIAssistantApiClient, + getScopedApiClient, ObservabilityAIAssistantAPIClient, } from '../../observability_ai_assistant_api_integration/common/observability_ai_assistant_api_client'; import { InheritedFtrProviderContext, InheritedServices } from '../ftr_provider_context'; @@ -33,11 +36,11 @@ export interface TestConfig extends CreateTestAPI { observabilityAIAssistantUI: ( context: InheritedFtrProviderContext ) => Promise; - observabilityAIAssistantAPIClient: () => Promise< - Awaited> & { - testUser: ObservabilityAIAssistantAPIClient; - } - >; + observabilityAIAssistantAPIClient: () => Promise<{ + adminUser: ObservabilityAIAssistantAPIClient; + viewerUser: ObservabilityAIAssistantAPIClient; + editorUser: ObservabilityAIAssistantAPIClient; + }>; kibana_ebt_server: (context: InheritedFtrProviderContext) => EBTHelpersContract; kibana_ebt_ui: (context: InheritedFtrProviderContext) => EBTHelpersContract; apmSynthtraceEsClient: ( @@ -63,6 +66,8 @@ export function createTestConfig( kibanaConfig, }); + const kibanaServer = baseConfig.servers.kibana as UrlObject; + return merge( { services: testConfig.get('services'), @@ -74,17 +79,10 @@ export function createTestConfig( observabilityAIAssistantUI: (context: InheritedFtrProviderContext) => ObservabilityAIAssistantUIProvider(context), observabilityAIAssistantAPIClient: async (context: InheritedFtrProviderContext) => { - const otherUsers = await baseConfig.services.observabilityAIAssistantAPIClient(); return { - ...otherUsers, - testUser: createObservabilityAIAssistantApiClient( - supertest( - format({ - ...(baseConfig.servers.kibana as UrlObject), - auth: `test_user:changeme`, - }) - ) - ), + adminUser: await getScopedApiClient(kibanaServer, 'elastic'), + viewerUser: await getScopedApiClient(kibanaServer, viewerUser.username), + editorUser: await getScopedApiClient(kibanaServer, editorUser.username), }; }, kibana_ebt_server: KibanaEBTServerProvider, diff --git a/x-pack/test/observability_ai_assistant_functional/common/ui/index.ts b/x-pack/test/observability_ai_assistant_functional/common/ui/index.ts index 17fd5f89c7d17..b7234648c8464 100644 --- a/x-pack/test/observability_ai_assistant_functional/common/ui/index.ts +++ b/x-pack/test/observability_ai_assistant_functional/common/ui/index.ts @@ -6,17 +6,16 @@ */ import type { PathsOf, TypeAsArgs, TypeOf } from '@kbn/typed-react-router-config'; +import { kbnTestConfig } from '@kbn/test'; import type { ObservabilityAIAssistantRoutes } from '@kbn/observability-ai-assistant-app-plugin/public/routes/config'; import qs from 'query-string'; -import type { Role } from '@kbn/security-plugin-types-common'; -import { OBSERVABILITY_AI_ASSISTANT_FEATURE_ID } from '@kbn/observability-ai-assistant-plugin/common/feature'; -import { APM_SERVER_FEATURE_ID } from '@kbn/apm-plugin/server'; +import { User } from '../../../observability_ai_assistant_api_integration/common/users/users'; import type { InheritedFtrProviderContext } from '../../ftr_provider_context'; export interface ObservabilityAIAssistantUIService { pages: typeof pages; auth: { - login: () => Promise; + login: (username: User['username']) => Promise; logout: () => Promise; }; router: { @@ -54,42 +53,20 @@ export async function ObservabilityAIAssistantUIProvider({ getPageObjects, getService, }: InheritedFtrProviderContext): Promise { - const browser = getService('browser'); - const deployment = getService('deployment'); - const security = getService('security'); - const pageObjects = getPageObjects(['common']); - - const roleDefinition: Role = { - name: 'observability-ai-assistant-functional-test-role', - elasticsearch: { - cluster: [], - indices: [], - run_as: [], - }, - kibana: [ - { - spaces: ['*'], - base: [], - feature: { - actions: ['all'], - [APM_SERVER_FEATURE_ID]: ['all'], - [OBSERVABILITY_AI_ASSISTANT_FEATURE_ID]: ['all'], - }, - }, - ], - }; + const pageObjects = getPageObjects(['common', 'security']); return { pages, auth: { - login: async () => { - await browser.navigateTo(deployment.getHostPort()); - await security.role.create(roleDefinition.name, roleDefinition); - await security.testUser.setRoles([roleDefinition.name, 'apm_user', 'viewer']); // performs a page reload + login: async (username: string) => { + const { password } = kbnTestConfig.getUrlParts(); + + await pageObjects.security.login(username, password, { + expectSpaceSelector: false, + }); }, logout: async () => { - await security.role.delete(roleDefinition.name); - await security.testUser.restoreDefaults(); + await pageObjects.security.forceLogout(); }, }, router: { diff --git a/x-pack/test/observability_ai_assistant_functional/tests/contextual_insights/index.spec.ts b/x-pack/test/observability_ai_assistant_functional/tests/contextual_insights/index.spec.ts index b1edc25053cc8..eb1056bbcd04b 100644 --- a/x-pack/test/observability_ai_assistant_functional/tests/contextual_insights/index.spec.ts +++ b/x-pack/test/observability_ai_assistant_functional/tests/contextual_insights/index.spec.ts @@ -101,7 +101,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte await Promise.all([ createSynthtraceErrors(), // create synthtrace - ui.auth.login(), // login + ui.auth.login('editor'), // login ]); }); diff --git a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts index 670903591287f..b7c33db0a4122 100644 --- a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts +++ b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts @@ -31,17 +31,17 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte const toasts = getService('toasts'); - const { header } = getPageObjects(['header', 'common']); + const { header } = getPageObjects(['header', 'security']); const flyoutService = getService('flyout'); async function deleteConversations() { - const response = await observabilityAIAssistantAPIClient.testUser({ + const response = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversations', }); for (const conversation of response.body.conversations) { - await observabilityAIAssistantAPIClient.testUser({ + await observabilityAIAssistantAPIClient.editorUser({ endpoint: `DELETE /internal/observability_ai_assistant/conversation/{conversationId}`, params: { path: { @@ -53,7 +53,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte } async function deleteConnectors() { - const response = await observabilityAIAssistantAPIClient.testUser({ + const response = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'GET /internal/observability_ai_assistant/connectors', }); @@ -66,7 +66,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte } async function createOldConversation() { - await observabilityAIAssistantAPIClient.testUser({ + await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversation', params: { body: { @@ -150,7 +150,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte proxy = await createLlmProxy(log); - await ui.auth.login(); + await ui.auth.login('editor'); await ui.router.goto('/conversations/new', { path: {}, query: {} }); }); @@ -204,7 +204,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte }); it('creates a connector', async () => { - const response = await observabilityAIAssistantAPIClient.testUser({ + const response = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'GET /internal/observability_ai_assistant/connectors', }); @@ -264,7 +264,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte }); it('creates a conversation and updates the URL', async () => { - const response = await observabilityAIAssistantAPIClient.testUser({ + const response = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversations', }); @@ -331,7 +331,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte }); it('does not create another conversation', async () => { - const response = await observabilityAIAssistantAPIClient.testUser({ + const response = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversations', }); @@ -339,7 +339,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte }); it('appends to the existing one', async () => { - const response = await observabilityAIAssistantAPIClient.testUser({ + const response = await observabilityAIAssistantAPIClient.editorUser({ endpoint: 'POST /internal/observability_ai_assistant/conversations', }); @@ -398,7 +398,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte expect(conversation.conversation.title).to.eql('My title'); expect(conversation.namespace).to.eql('default'); expect(conversation.public).to.eql(false); - expect(conversation.user?.name).to.eql('test_user'); + expect(conversation.user?.name).to.eql('editor'); const { messages } = conversation; @@ -475,7 +475,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte expect(conversation.conversation.title).to.eql('My old conversation'); expect(conversation.namespace).to.eql('default'); expect(conversation.public).to.eql(false); - expect(conversation.user?.name).to.eql('test_user'); + expect(conversation.user?.name).to.eql('editor'); const { messages } = conversation; diff --git a/x-pack/test/observability_ai_assistant_functional/tests/index.ts b/x-pack/test/observability_ai_assistant_functional/tests/index.ts index 9a2e4902d7366..07e81d9488592 100644 --- a/x-pack/test/observability_ai_assistant_functional/tests/index.ts +++ b/x-pack/test/observability_ai_assistant_functional/tests/index.ts @@ -7,6 +7,7 @@ import globby from 'globby'; import path from 'path'; +import { createUsersAndRoles } from '../../observability_ai_assistant_api_integration/common/users/create_users_and_roles'; import { FtrProviderContext } from '../../observability_ai_assistant_api_integration/common/ftr_provider_context'; const cwd = path.join(__dirname); @@ -19,6 +20,11 @@ export default function observabilityAIAssistantFunctionalTests({ const filePattern = '**/*.spec.ts'; const tests = globby.sync(filePattern, { cwd }); + // Creates roles and users before running tests + before(async () => { + await createUsersAndRoles(getService); + }); + tests.forEach((testName) => { describe(testName, () => { loadTestFile(require.resolve(`./${testName}`)); diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts index bafcb03cbe211..163c416bea314 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts @@ -131,6 +131,7 @@ export default function ({ getService }: FtrProviderContext) { 'cases-telemetry-task', 'cloud_security_posture-stats_task', 'dashboard_telemetry', + 'endpoint:complete-external-response-actions', 'endpoint:metadata-check-transforms-task', 'endpoint:user-artifact-packager', 'fleet:check-deleted-files-task', diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/datastream.ts b/x-pack/test/reporting_api_integration/reporting_and_security/datastream.ts new file mode 100644 index 0000000000000..f116110db78f1 --- /dev/null +++ b/x-pack/test/reporting_api_integration/reporting_and_security/datastream.ts @@ -0,0 +1,67 @@ +/* + * 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. + */ + +import { expect } from 'expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default function ({ getService }: FtrProviderContext) { + const reportingAPI = getService('reportingAPI'); + const supertest = getService('supertest'); + + describe('Data Stream', () => { + before(async () => { + await reportingAPI.initEcommerce(); + + // for this test, we don't need to wait for the job to finish or verify the result + await reportingAPI.postJob( + `/api/reporting/generate/csv_searchsource?jobParams=%28browserTimezone%3AUTC%2Ccolumns%3A%21%28%29%2CobjectType%3Asearch%2CsearchSource%3A%28fields%3A%21%28%28field%3A%27%2A%27%2Cinclude_unmapped%3Atrue%29%29%2Cfilter%3A%21%28%28meta%3A%28field%3A%27%40timestamp%27%2Cindex%3A%27logstash-%2A%27%2Cparams%3A%28%29%29%2Cquery%3A%28range%3A%28%27%40timestamp%27%3A%28format%3Astrict_date_optional_time%2Cgte%3A%272015-09-22T09%3A17%3A53.728Z%27%2Clte%3A%272015-09-22T09%3A30%3A50.786Z%27%29%29%29%29%2C%28%27%24state%27%3A%28store%3AappState%29%2Cmeta%3A%28alias%3A%21n%2Cdisabled%3A%21f%2Cindex%3A%27logstash-%2A%27%2Ckey%3Aquery%2Cnegate%3A%21f%2Ctype%3Acustom%2Cvalue%3A%27%7B%22bool%22%3A%7B%22minimum_should_match%22%3A1%2C%22should%22%3A%5B%7B%22match_phrase%22%3A%7B%22%40tags%22%3A%22info%22%7D%7D%5D%7D%7D%27%29%2Cquery%3A%28bool%3A%28minimum_should_match%3A1%2Cshould%3A%21%28%28match_phrase%3A%28%27%40tags%27%3Ainfo%29%29%29%29%29%29%29%2Cindex%3A%27logstash-%2A%27%2Cquery%3A%28language%3Akuery%2Cquery%3A%27%27%29%2Csort%3A%21%28%28%27%40timestamp%27%3A%28format%3Astrict_date_optional_time%2Corder%3Adesc%29%29%29%29%2Ctitle%3A%27A%20saved%20search%20with%20match_phrase%20filter%20and%20no%20columns%20selected%27%2Cversion%3A%278.15.0%27%29` + ); + }); + + after(async () => { + await reportingAPI.deleteAllReports(); + await reportingAPI.teardownEcommerce(); + }); + + it('uses the datastream configuration without set policy', async () => { + const { body } = await supertest + .get(`/api/index_management/data_streams/.kibana-reporting`) + .set('kbn-xsrf', 'xxx') + .set('x-elastic-internal-origin', 'xxx') + .expect(200); + + expect(body).toEqual({ + _meta: { + description: 'default kibana reporting template installed by elasticsearch', + managed: true, + }, + name: '.kibana-reporting', + indexTemplateName: '.kibana-reporting', + timeStampField: { name: '@timestamp' }, + indices: [ + { + name: expect.any(String), + uuid: expect.any(String), + managedBy: 'Index Lifecycle Management', + preferILM: true, + }, + ], + generation: 1, + health: 'green', + ilmPolicyName: 'kibana-reporting', + maxTimeStamp: 0, + privileges: { delete_index: true, manage_data_stream_lifecycle: true }, + hidden: true, + lifecycle: { enabled: true }, + nextGenerationManagedBy: 'Index Lifecycle Management', + storageSize: expect.any(String), + storageSizeBytes: expect.any(Number), + }); + }); + }); +} diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/ilm_migration_apis.ts b/x-pack/test/reporting_api_integration/reporting_and_security/ilm_migration_apis.ts index f3e1223c26084..0442917012f49 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/ilm_migration_apis.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/ilm_migration_apis.ts @@ -42,7 +42,8 @@ export default function ({ getService }: FtrProviderContext) { cluster: ['manage_ilm'], indices: [ { names: ['ecommerce'], privileges: ['read'], allow_restricted_indices: false }, - { names: ['.reporting-*'], privileges: ['all'], allow_restricted_indices: true }, + { names: ['.reporting-*'], privileges: ['all'], allow_restricted_indices: true }, // plain indices (from old version) + { names: ['.kibana-reporting'], privileges: ['all'], allow_restricted_indices: true }, // data stream ], run_as: [], }, diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/index.ts b/x-pack/test/reporting_api_integration/reporting_and_security/index.ts index 2d968295f09be..14c33bced7601 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/index.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/index.ts @@ -22,6 +22,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./bwc_existing_indexes')); loadTestFile(require.resolve('./security_roles_privileges')); loadTestFile(require.resolve('./generate_csv_discover')); + loadTestFile(require.resolve('./datastream')); loadTestFile(require.resolve('./csv_v2')); loadTestFile(require.resolve('./csv_v2_esql')); loadTestFile(require.resolve('./network_policy')); diff --git a/x-pack/plugins/reporting/server/lib/store/index_timestamp.ts b/x-pack/test/reporting_api_integration/services/index_timestamp.ts similarity index 100% rename from x-pack/plugins/reporting/server/lib/store/index_timestamp.ts rename to x-pack/test/reporting_api_integration/services/index_timestamp.ts diff --git a/x-pack/test/reporting_api_integration/services/scenarios.ts b/x-pack/test/reporting_api_integration/services/scenarios.ts index a2bc7e57dc8d7..253c0d36354ce 100644 --- a/x-pack/test/reporting_api_integration/services/scenarios.ts +++ b/x-pack/test/reporting_api_integration/services/scenarios.ts @@ -5,12 +5,16 @@ * 2.0. */ +import type { LoadActionPerfOptions } from '@kbn/es-archiver'; +import { INTERNAL_ROUTES } from '@kbn/reporting-common'; +import type { JobParamsCSV } from '@kbn/reporting-export-types-csv-common'; import type { JobParamsPDFDeprecated } from '@kbn/reporting-export-types-pdf-common'; import type { JobParamsPNGV2 } from '@kbn/reporting-export-types-png-common'; -import type { JobParamsCSV } from '@kbn/reporting-export-types-csv-common'; +import { + REPORTING_DATA_STREAM_WILDCARD, + REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY, +} from '@kbn/reporting-server'; import rison from '@kbn/rison'; -import { LoadActionPerfOptions } from '@kbn/es-archiver'; -import { INTERNAL_ROUTES } from '@kbn/reporting-common'; import { FtrProviderContext } from '../ftr_provider_context'; function removeWhitespace(str: string) { @@ -64,7 +68,6 @@ export function createScenarios({ getService }: Pick { await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce'); await kibanaServer.importExport.unload(ecommerceSOPath); - await deleteAllReports(); }; const initLogs = async () => { @@ -211,7 +214,7 @@ export function createScenarios({ getService }: Pick { await esSupertest - .post('/.reporting*/_delete_by_query') + .post(`/${REPORTING_DATA_STREAM_WILDCARD_WITH_LEGACY}/_delete_by_query`) .send({ query: { match_all: {} } }) .expect(200); }); @@ -248,7 +251,7 @@ export function createScenarios({ getService }: Pick { }); }); - context('with category weights', () => { - it('weights risk inputs from different categories according to the category weight', async () => { - const documentId = uuidv4(); - const userSignal = buildDocument( - { 'event.kind': 'signal', 'user.name': 'user-1' }, - documentId - ); - const hostSignal = buildDocument( - { 'event.kind': 'signal', 'host.name': 'host-1' }, - documentId - ); - await indexListOfDocuments(Array(50).fill(userSignal).concat(Array(50).fill(hostSignal))); - - await createAndSyncRuleAndAlerts({ - query: `id: ${documentId}`, - alerts: 100, - riskScore: 100, - }); - const { scores } = await previewRiskScores({ - body: { - weights: [{ type: 'risk_category', value: 'category_1', host: 0.4, user: 0.8 }], - }, - }); - - expect(sanitizeScores(scores.host!)).to.eql([ - { - calculated_level: 'Low', - calculated_score: 93.2375911647125, - calculated_score_norm: 35.695861854790394, - category_1_score: 35.69586185479039, - category_1_count: 50, - id_field: 'host.name', - id_value: 'host-1', - }, - ]); - - expect(sanitizeScores(scores.user!)).to.eql([ - { - calculated_level: 'High', - calculated_score: 186.475182329425, - calculated_score_norm: 71.39172370958079, - category_1_score: 71.39172370958077, - category_1_count: 50, - id_field: 'user.name', - id_value: 'user-1', - }, - ]); - }); - }); - describe('@skipInServerless with asset criticality data', () => { const assetCriticalityRoutes = assetCriticalityRouteHelpersFactory(supertest); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts index 61c409f63a5dc..07be6f79efd45 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts @@ -134,7 +134,8 @@ describe('Add endpoint exception from rule details', { tags: ['@ess', '@serverle }); }); - describe('with exception items', () => { + // FLAKY: https://github.com/elastic/kibana/issues/179582 + describe.skip('with exception items', () => { beforeEach(() => { createEndpointExceptionList().then((response) => { createEndpointExceptionListItem({ diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts index 521c786bcbb21..63ba3e876c7d4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts @@ -52,7 +52,8 @@ describe( deleteAlertsAndRules(); }); - describe('with suppression configured', () => { + // FLAKY: https://github.com/elastic/kibana/issues/183941 + describe.skip('with suppression configured', () => { beforeEach(() => { createRule({ ...rule, diff --git a/x-pack/test/security_solution_endpoint/apps/integrations_feature_flag/artifact_entries_list.ts b/x-pack/test/security_solution_endpoint/apps/integrations_feature_flag/artifact_entries_list.ts index 46e333e10779d..cd5c5694c33a8 100644 --- a/x-pack/test/security_solution_endpoint/apps/integrations_feature_flag/artifact_entries_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/integrations_feature_flag/artifact_entries_list.ts @@ -52,7 +52,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { .set('kbn-xsrf', 'true'); }; - describe('For each artifact list under management', function () { + // Failing: See https://github.com/elastic/kibana/issues/183860 + describe.skip('For each artifact list under management', function () { targetTags(this, ['@ess', '@serverless']); this.timeout(60_000 * 5); diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 4634b40c74518..2df784cd0c8ba 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -175,5 +175,6 @@ "@kbn/esql-utils", "@kbn/search-types", "@kbn/analytics-ftr-helpers-plugin", + "@kbn/reporting-server", ] } diff --git a/x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts b/x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts new file mode 100644 index 0000000000000..1d336ec504250 --- /dev/null +++ b/x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts @@ -0,0 +1,84 @@ +/* + * 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. + */ + +import { expect } from 'expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const reportingAPI = getService('svlReportingApi'); + const supertest = getService('supertest'); + + const archives: Record = { + ecommerce: { + data: 'x-pack/test/functional/es_archives/reporting/ecommerce', + savedObjects: 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce', + }, + }; + + describe('Data Stream', () => { + before(async () => { + await esArchiver.load(archives.ecommerce.data); + await kibanaServer.importExport.load(archives.ecommerce.savedObjects); + + // for this test, we don't need to wait for the job to finish or verify the result + await reportingAPI.createReportJobInternal('csv_searchsource', { + browserTimezone: 'UTC', + objectType: 'search', + searchSource: { + index: '5193f870-d861-11e9-a311-0fa548c5f953', + query: { language: 'kuery', query: '' }, + version: true, + }, + title: 'Ecommerce Data', + version: '8.15.0', + }); + }); + + after(async () => { + await reportingAPI.deleteAllReports(); + await esArchiver.unload(archives.ecommerce.data); + await kibanaServer.importExport.unload(archives.ecommerce.savedObjects); + }); + + it('uses the datastream configuration with set ILM policy', async () => { + const { body } = await supertest + .get(`/api/index_management/data_streams/.kibana-reporting`) + .set('kbn-xsrf', 'xxx') + .set('x-elastic-internal-origin', 'xxx') + .expect(200); + + expect(body).toEqual({ + _meta: { + description: 'default kibana reporting template installed by elasticsearch', + managed: true, + }, + name: '.kibana-reporting', + indexTemplateName: '.kibana-reporting', + generation: 1, + health: 'green', + hidden: true, + indices: [ + { + name: expect.any(String), + uuid: expect.any(String), + managedBy: 'Data stream lifecycle', + preferILM: true, + }, + ], + lifecycle: { enabled: true }, + maxTimeStamp: 0, + nextGenerationManagedBy: 'Data stream lifecycle', + privileges: { delete_index: true, manage_data_stream_lifecycle: true }, + timeStampField: { name: '@timestamp' }, + storageSize: expect.any(String), + storageSizeBytes: expect.any(Number), + }); + }); + }); +} diff --git a/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts b/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts index 89e5f5a0de4a7..0450ec2a3ff30 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts @@ -730,7 +730,9 @@ export default function ({ getService }: FtrProviderContext) { }, }) ); - await reportingAPI.waitForJobToFinish(res.path); + await reportingAPI.waitForJobToFinish(res.path, undefined, undefined, { + timeout: 80 * 1000, + }); const csvFile = await reportingAPI.getCompletedJobOutput(res.path); expect((csvFile as string).length).to.be(4826973); expectSnapshot(createPartialCsv(csvFile)).toMatch(); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/reporting/index.ts b/x-pack/test_serverless/api_integration/test_suites/common/reporting/index.ts index 3d776ec490abd..790a98257552e 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/reporting/index.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/reporting/index.ts @@ -13,5 +13,6 @@ export default ({ loadTestFile }: FtrProviderContext) => { loadTestFile(require.resolve('./management')); loadTestFile(require.resolve('./generate_csv_discover')); + loadTestFile(require.resolve('./datastream')); }); }; diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/slos/fetch_historical_summary.ts b/x-pack/test_serverless/api_integration/test_suites/observability/slos/fetch_historical_summary.ts index 32992e5a3b07b..75d8ae3af1f3c 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/slos/fetch_historical_summary.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/slos/fetch_historical_summary.ts @@ -82,7 +82,8 @@ export default function ({ getService }: FtrProviderContext) { }); expect(response[0].sloId).to.eql(SLO_ID); expect(response[0].instanceId).to.eql(ALL_VALUE); - expect(response[0].data).to.have.length(168); // 7 days * 24 hours/day * 1 bucket/hour + const numberOfBuckets = response[0].data.length; + expect(numberOfBuckets).to.be.within(168, 170); // 7 days * 24 hours/day * 1 bucket/hour + 2 extra bucket due to histogram agg rounding const last = response[0].data.pop(); expect(last?.errorBudget).to.eql({ consumed: 1, @@ -117,7 +118,8 @@ export default function ({ getService }: FtrProviderContext) { }); expect(response[0].sloId).to.eql(SLO_ID); expect(response[0].instanceId).to.eql(ALL_VALUE); - expect(response[0].data).to.have.length(168); // 7 days * 24 hours/day * 1 bucket/hour + const numberOfBuckets = response[0].data.length; + expect(numberOfBuckets).to.be.within(168, 170); // 7 days * 24 hours/day * 1 bucket/hour + 2 extra bucket due to histogram agg rounding const last = response[0].data.pop(); expect(last?.errorBudget).to.eql({ consumed: 0, diff --git a/x-pack/test_serverless/functional/page_objects/index.ts b/x-pack/test_serverless/functional/page_objects/index.ts index ebc85de7d332c..f1604d48508e2 100644 --- a/x-pack/test_serverless/functional/page_objects/index.ts +++ b/x-pack/test_serverless/functional/page_objects/index.ts @@ -21,7 +21,6 @@ import { SvlRuleDetailsPageProvider } from './svl_rule_details_ui_page'; import { SvlSearchConnectorsPageProvider } from './svl_search_connectors_page'; import { SvlManagementPageProvider } from './svl_management_page'; import { SvlIngestPipelines } from './svl_ingest_pipelines'; -import { SvlPlaygroundPageProvider } from './svl_playground_page'; export const pageObjects = { ...xpackFunctionalPageObjects, @@ -39,5 +38,4 @@ export const pageObjects = { svlRuleDetailsUI: SvlRuleDetailsPageProvider, svlManagementPage: SvlManagementPageProvider, svlIngestPipelines: SvlIngestPipelines, - svlPlaygroundUI: SvlPlaygroundPageProvider, }; diff --git a/x-pack/test_serverless/functional/page_objects/svl_playground_page.ts b/x-pack/test_serverless/functional/page_objects/svl_playground_page.ts deleted file mode 100644 index e0c26c031eb50..0000000000000 --- a/x-pack/test_serverless/functional/page_objects/svl_playground_page.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -import { FtrProviderContext } from '../ftr_provider_context'; - -export function SvlPlaygroundPageProvider({ getService }: FtrProviderContext) { - const testSubjects = getService('testSubjects'); - return { - PlaygrounStartChatPage: { - async expectPlaygroundStartChatPageComponentsToExist() { - await testSubjects.existOrFail('chat-playground-home-page-title'); - await testSubjects.existOrFail('selectIndicesChatPanel'); - await testSubjects.existOrFail('startChatButton'); - }, - - async expectPlaygroundHeaderComponentsToExist() { - await testSubjects.existOrFail('playground-header-actions'); - await testSubjects.existOrFail('playground-documentation-link'); - }, - }, - }; -} diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts b/x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts index 3a4cee55dad94..b5eb49519ce31 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts @@ -35,14 +35,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.refresh(); }; - const getReport = async () => { + const getReport = async ({ timeout } = { timeout: 60 * 1000 }) => { // close any open notification toasts await toasts.dismissAll(); await PageObjects.reporting.openExportTab(); await PageObjects.reporting.clickGenerateReportButton(); - const url = await PageObjects.reporting.getReportURL(60000); + const url = await PageObjects.reporting.getReportURL(timeout); // TODO: Fetch CSV client side in Serverless since `PageObjects.reporting.getResponse()` // doesn't work because it relies on `SecurityService.testUserSupertest` const res: { status: number; contentType: string | null; text: string } = @@ -184,7 +184,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.saveSearch('large export'); // match file length, the beginning and the end of the csv file contents - const { text: csvFile } = await getReport(); + const { text: csvFile } = await getReport({ timeout: 80 * 1000 }); expect(csvFile.length).to.be(4826973); expectSnapshot(csvFile.slice(0, 5000)).toMatch(); expectSnapshot(csvFile.slice(-5000)).toMatch(); diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts index 9688c177c2e73..2f2c40932ceaf 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts @@ -31,7 +31,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const to = '2024-01-01T12:00:00.000Z'; const excludeKeysFromServerless = ['size']; // https://github.com/elastic/kibana/issues/178954 - describe('Dataset quality flyout', function () { + // FLAKY: https://github.com/elastic/kibana/issues/183771 + describe.skip('Dataset quality flyout', function () { this.tags(['failsOnMKI']); // Failing https://github.com/elastic/kibana/issues/183495 before(async () => { diff --git a/x-pack/test_serverless/functional/test_suites/search/playground_overview.ts b/x-pack/test_serverless/functional/test_suites/search/playground_overview.ts index f726287de0fb7..40a36362a585e 100644 --- a/x-pack/test_serverless/functional/test_suites/search/playground_overview.ts +++ b/x-pack/test_serverless/functional/test_suites/search/playground_overview.ts @@ -5,24 +5,147 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; +import type SuperTest from 'supertest'; import { testHasEmbeddedConsole } from './embedded_console'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials } from '../../../shared/services'; + +const indexName = 'basic_index'; +const esArchiveIndex = 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'; +async function createOpenAIConnector({ + supertest, + requestHeader = {}, + apiKeyHeader = {}, +}: { + supertest: SuperTest.Agent; + requestHeader?: Record; + apiKeyHeader?: Record; +}): Promise<() => Promise> { + const config = { + apiProvider: 'OpenAI', + defaultModel: 'gpt-4', + apiUrl: 'http://localhost:3002', + }; + + const connector: { id: string } | undefined = ( + await supertest + .post('/api/actions/connector') + .set(requestHeader) + .set(apiKeyHeader) + .send({ + name: 'test Open AI', + connector_type_id: '.gen-ai', + config, + secrets: { + apiKey: 'genAiApiKey', + }, + }) + .expect(200) + ).body; + + return async () => { + if (connector) { + await supertest + .delete(`/api/actions/connector/${connector.id}`) + .set(requestHeader) + .set(apiKeyHeader) + .expect(204); + } + }; +} + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const pageObjects = getPageObjects(['svlCommonPage', 'svlCommonNavigation', 'searchPlayground']); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const esArchiver = getService('esArchiver'); + const createIndex = async () => await esArchiver.load(esArchiveIndex); + let roleAuthc: RoleCredentials; + + describe('Serverless Playground Overview', function () { + // see details: https://github.com/elastic/kibana/issues/183893 + this.tags(['failsOnMKI']); + + let removeOpenAIConnector: () => Promise; + let createConnector: () => Promise; -export default function ({ getPageObjects }: FtrProviderContext) { - const pageObjects = getPageObjects(['svlCommonPage', 'svlCommonNavigation', 'svlPlaygroundUI']); - describe('Playground', function () { before(async () => { await pageObjects.svlCommonPage.login(); - await pageObjects.svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'searchPlayground' }); + await pageObjects.svlCommonNavigation.sidenav.clickLink({ + deepLinkId: 'searchPlayground', + }); + + const requestHeader = svlCommonApi.getInternalRequestHeader(); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + createConnector = async () => { + removeOpenAIConnector = await createOpenAIConnector({ + supertest: supertestWithoutAuth, + requestHeader, + apiKeyHeader: roleAuthc.apiKeyHeader, + }); + }; }); after(async () => { + await removeOpenAIConnector?.(); + await esArchiver.unload(esArchiveIndex); + await svlUserManager.invalidateApiKeyForRole(roleAuthc); await pageObjects.svlCommonPage.forceLogout(); }); - it('playground app is loaded', async () => { - await pageObjects.svlPlaygroundUI.PlaygrounStartChatPage.expectPlaygroundStartChatPageComponentsToExist(); - await pageObjects.svlPlaygroundUI.PlaygrounStartChatPage.expectPlaygroundHeaderComponentsToExist(); + describe('start chat page', () => { + it('playground app is loaded', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectPlaygroundStartChatPageComponentsToExist(); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectPlaygroundHeaderComponentsToExist(); + }); + + it('show no index callout', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectNoIndexCalloutExists(); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectCreateIndexButtonToMissed(); + }); + + it('hide no index callout when index added', async () => { + await createIndex(); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectSelectIndex(indexName); + }); + + it('show add connector button', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectAddConnectorButtonExists(); + }); + + it('click add connector button opens connector flyout', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectOpenConnectorPagePlayground(); + }); + + it('hide gen ai panel when connector exists', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectHideGenAIPanelConnector( + createConnector + ); + }); + + it('show chat page', async () => { + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectSelectIndex(indexName); + await pageObjects.searchPlayground.PlaygroundStartChatPage.expectToStartChatPage(); + }); + }); + + describe('chat page', () => { + it('chat works', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectChatWorks(); + }); + + it('open view code', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectOpenViewCode(); + }); + + it('show fields and code in view query', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectViewQueryHasFields(); + }); + + it('show edit context', async () => { + await pageObjects.searchPlayground.PlaygroundChatPage.expectEditContextOpens(); + }); }); it('has embedded console', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/security/ml/trained_models_list.ts b/x-pack/test_serverless/functional/test_suites/security/ml/trained_models_list.ts index 8e6928b9817a2..745f2b8d4a65f 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ml/trained_models_list.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ml/trained_models_list.ts @@ -11,10 +11,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const svlMl = getService('svlMl'); const PageObjects = getPageObjects(['svlCommonPage']); - // failsOnMKI, see https://github.com/elastic/kibana/issues/180481 describe('Trained models list', function () { - this.tags(['failsOnMKI']); - before(async () => { await PageObjects.svlCommonPage.login(); await ml.api.syncSavedObjects(); diff --git a/yarn.lock b/yarn.lock index 63f50a8f16e93..c0bec897b08f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1735,10 +1735,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@94.3.0": - version "94.3.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-94.3.0.tgz#77c07701128b6443e2ea55e2462ef0ccadd64582" - integrity sha512-qJTLrQYe11MPTX+8AqifJVYLDyO8VqdFWqPVJRYel11l/FvJOqyQi50x+xQK8I7h73TF50xywtUHCfhfkqpbYg== +"@elastic/eui@94.5.0-backport.1": + version "94.5.0-backport.1" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-94.5.0-backport.1.tgz#b26b06c9d4823b80b6c2a4457edfd6cd0cb8ebad" + integrity sha512-K6xVQYZjhdZyHNANw4H45ONw2pbZEJtaKr3Aul+dIQmYSRs0NgZbZyjt5fiLMaHJz2EFIpDEZMFccW6l0Aiukg== dependencies: "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202" @@ -11437,6 +11437,11 @@ acorn-import-assertions@^1.9.0: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== +acorn-import-attributes@^1.9.5: + version "1.9.5" + resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" + integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== + acorn-jsx@^5.3.1, acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -15940,10 +15945,10 @@ elastic-apm-node@3.46.0: traverse "^0.6.6" unicode-byte-truncate "^1.0.0" -elastic-apm-node@^4.5.3: - version "4.5.3" - resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-4.5.3.tgz#8015f1525f6cd45daef6a48a88d93dbaf5899212" - integrity sha512-FE+srHVTtvDp/SfY76yxSIupCU8Z30WuOx1Yf3plUXeyLuKqq9YRk6uX0Jleb1jfwG58lvabpeU0u9YmS1YdrA== +elastic-apm-node@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-4.5.4.tgz#add7c5a53f8a4ec29989e3365c9f2053ec64a20d" + integrity sha512-PqX8a5PdWo+mtH1Vn+xjmhJpa2RE9zbKDKFkKoENKG118KVgukxhFlVIpb3qrht9aeRkPxHqQsPNtNV3ljPjew== dependencies: "@elastic/ecs-pino-format" "^1.5.0" "@opentelemetry/api" "^1.4.1" @@ -15963,7 +15968,7 @@ elastic-apm-node@^4.5.3: fast-safe-stringify "^2.0.7" fast-stream-to-buffer "^1.0.0" http-headers "^3.0.2" - import-in-the-middle "1.7.3" + import-in-the-middle "1.7.4" json-bigint "^1.0.0" lru-cache "^10.0.1" measured-reporting "^1.51.1" @@ -19269,13 +19274,13 @@ import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-in-the-middle@1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.7.3.tgz#ffa784cdd57a47d2b68d2e7dd33070ff06baee43" - integrity sha512-R2I11NRi0lI3jD2+qjqyVlVEahsejw7LDnYEbGb47QEFjczE3bZYsmWheCTQA+LFs2DzOQxR7Pms7naHW1V4bQ== +import-in-the-middle@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz#508da6e91cfa84f210dcdb6c0a91ab0c9e8b3ebc" + integrity sha512-Lk+qzWmiQuRPPulGQeK5qq0v32k2bHnWrRPFgqyvhw7Kkov5L6MOLOIU3pcWeujc9W4q54Cp3Q2WV16eQkc7Bg== dependencies: acorn "^8.8.2" - acorn-import-assertions "^1.9.0" + acorn-import-attributes "^1.9.5" cjs-module-lexer "^1.2.2" module-details-from-path "^1.0.3"