From ecf7a14b17f2eb3ae747f311a6f766ed07586619 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 11 Nov 2021 20:46:37 +0100 Subject: [PATCH 01/23] Lens functional test: Avoid triggering below-the-fold issue (#118321) * use sum to avoid triggering below-the-fold issue * stabilize operation selection --- x-pack/test/functional/page_objects/lens_page.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index 7f175b6d83ab6..710d11d3f7586 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -20,6 +20,8 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont const browser = getService('browser'); const dashboardAddPanel = getService('dashboardAddPanel'); + const FORMULA_TAB_HEIGHT = 40; + const PageObjects = getPageObjects([ 'common', 'header', @@ -131,7 +133,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont : `lns-indexPatternDimension-${opts.operation}`; await retry.try(async () => { await testSubjects.exists(operationSelector); - await testSubjects.click(operationSelector); + await testSubjects.click(operationSelector, undefined, FORMULA_TAB_HEIGHT); }); } if (opts.field) { From 36a82e481aaaba076da8cdce4c3938d23519ddac Mon Sep 17 00:00:00 2001 From: Andrew Tate Date: Thu, 11 Nov 2021 14:03:00 -0600 Subject: [PATCH 02/23] Datatable Embeddable Supports Ephemeral Sort (#117742) --- .../__snapshots__/table_basic.test.tsx.snap | 26 +++-- .../components/columns.tsx | 24 ++--- .../components/table_basic.test.tsx | 2 +- .../components/table_basic.tsx | 6 +- .../public/editor_frame_service/service.tsx | 13 ++- .../public/embeddable/embeddable.test.tsx | 98 +++++++++++++++++++ .../lens/public/embeddable/embeddable.tsx | 97 ++++++++++++++---- .../public/embeddable/embeddable_factory.ts | 4 + x-pack/plugins/lens/public/plugin.ts | 3 + x-pack/test/functional/apps/lens/index.ts | 1 + .../functional/apps/lens/table_dashboard.ts | 55 +++++++++++ 11 files changed, 279 insertions(+), 50 deletions(-) create mode 100644 x-pack/test/functional/apps/lens/table_dashboard.ts diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap b/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap index 7e3c8c3342e4c..bf8497e686e96 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap +++ b/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap @@ -487,7 +487,7 @@ exports[`DatatableComponent it renders the title and value 1`] = ` `; -exports[`DatatableComponent it should render hide and reset actions on header even when it is in read only mode 1`] = ` +exports[`DatatableComponent it should render hide, reset, and sort actions on header even when it is in read only mode 1`] = ` { ).toMatchSnapshot(); }); - test('it should render hide and reset actions on header even when it is in read only mode', () => { + test('it should render hide, reset, and sort actions on header even when it is in read only mode', () => { const { data, args } = sampleArgs(); expect( diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx index 6be69e5d4d236..f627a3ef8ff91 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx @@ -103,11 +103,9 @@ export const DatatableComponent = (props: DatatableRenderProps) => { const onEditAction = useCallback( (data: LensSortAction['data'] | LensResizeAction['data'] | LensToggleAction['data']) => { - if (renderMode === 'edit') { - dispatchEvent({ name: 'edit', data }); - } + dispatchEvent({ name: 'edit', data }); }, - [dispatchEvent, renderMode] + [dispatchEvent] ); const onRowContextMenuClick = useCallback( (data: LensTableRowContextMenuEvent['data']) => { diff --git a/x-pack/plugins/lens/public/editor_frame_service/service.tsx b/x-pack/plugins/lens/public/editor_frame_service/service.tsx index d97cfd3cbca23..b585d03e12f8f 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/service.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/service.tsx @@ -61,16 +61,19 @@ export class EditorFrameService { private readonly datasources: Array Promise)> = []; private readonly visualizations: Array Promise)> = []; + private loadDatasources = () => collectAsyncDefinitions(this.datasources); + public loadVisualizations = () => collectAsyncDefinitions(this.visualizations); + /** * This method takes a Lens saved object as returned from the persistence helper, * initializes datsources and visualization and creates the current expression. - * This is an asynchronous process and should only be triggered once for a saved object. + * This is an asynchronous process. * @param doc parsed Lens saved object */ public documentToExpression = async (doc: Document) => { const [resolvedDatasources, resolvedVisualizations] = await Promise.all([ - collectAsyncDefinitions(this.datasources), - collectAsyncDefinitions(this.visualizations), + this.loadDatasources(), + this.loadVisualizations(), ]); const { persistedStateToExpression } = await import('../async_services'); @@ -92,8 +95,8 @@ export class EditorFrameService { public start(core: CoreStart, plugins: EditorFrameStartPlugins): EditorFrameStart { const createInstance = async (): Promise => { const [resolvedDatasources, resolvedVisualizations] = await Promise.all([ - collectAsyncDefinitions(this.datasources), - collectAsyncDefinitions(this.visualizations), + this.loadDatasources(), + this.loadVisualizations(), ]); const { EditorFrame } = await import('../async_services'); diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx index 4c247c031eac0..59d6325e1c0ce 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx @@ -25,6 +25,7 @@ import { LensAttributeService } from '../lens_attribute_service'; import { OnSaveProps } from '../../../../../src/plugins/saved_objects/public/save_modal'; import { act } from 'react-dom/test-utils'; import { inspectorPluginMock } from '../../../../../src/plugins/inspector/public/mocks'; +import { Visualization } from '../types'; jest.mock('../../../../../src/plugins/inspector/public/', () => ({ isAvailable: false, @@ -125,6 +126,7 @@ describe('embeddable', () => { }, inspector: inspectorPluginMock.createStartContract(), getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -165,6 +167,7 @@ describe('embeddable', () => { inspector: inspectorPluginMock.createStartContract(), capabilities: { canSaveDashboards: true, canSaveVisualizations: true }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -209,6 +212,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -255,6 +259,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -297,6 +302,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -336,6 +342,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -378,6 +385,7 @@ describe('embeddable', () => { indexPatternService: {} as IndexPatternsContract, capabilities: { canSaveDashboards: true, canSaveVisualizations: true }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -427,6 +435,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -474,6 +483,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -528,6 +538,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -583,6 +594,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -641,6 +653,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -683,6 +696,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -725,6 +739,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -767,6 +782,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -824,6 +840,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -897,6 +914,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -945,6 +963,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -993,6 +1012,7 @@ describe('embeddable', () => { canSaveVisualizations: true, }, getTrigger, + visualizationMap: {}, documentToExpression: () => Promise.resolve({ ast: { @@ -1016,4 +1036,82 @@ describe('embeddable', () => { expect(onTableRowClick).toHaveBeenCalledWith({ name: 'test' }); expect(onTableRowClick).toHaveBeenCalledTimes(1); }); + + it('handles edit actions ', async () => { + const editedVisualizationState = { value: 'edited' }; + const onEditActionMock = jest.fn().mockReturnValue(editedVisualizationState); + const documentToExpressionMock = jest.fn().mockImplementation(async (document) => { + const isStateEdited = document.state.visualization.value === 'edited'; + return { + ast: { + type: 'expression', + chain: [ + { + type: 'function', + function: isStateEdited ? 'edited' : 'not_edited', + arguments: {}, + }, + ], + }, + errors: undefined, + }; + }); + + const visDocument: Document = { + state: { + visualization: {}, + datasourceStates: {}, + query: { query: '', language: 'lucene' }, + filters: [], + }, + references: [], + title: 'My title', + visualizationType: 'lensDatatable', + }; + + const embeddable = new Embeddable( + { + timefilter: dataPluginMock.createSetupContract().query.timefilter.timefilter, + attributeService: attributeServiceMockFromSavedVis(visDocument), + expressionRenderer, + basePath, + inspector: inspectorPluginMock.createStartContract(), + indexPatternService: {} as IndexPatternsContract, + capabilities: { + canSaveDashboards: true, + canSaveVisualizations: true, + }, + getTrigger, + visualizationMap: { + [visDocument.visualizationType as string]: { + onEditAction: onEditActionMock, + } as unknown as Visualization, + }, + documentToExpression: documentToExpressionMock, + }, + { id: '123' } as unknown as LensEmbeddableInput + ); + + // SETUP FRESH STATE + await embeddable.initializeSavedVis({ id: '123' } as LensEmbeddableInput); + embeddable.render(mountpoint); + + await new Promise((resolve) => setTimeout(resolve, 0)); + + expect(expressionRenderer).toHaveBeenCalledTimes(1); + expect(expressionRenderer.mock.calls[0][0]!.expression).toBe(`not_edited`); + + // TEST EDIT EVENT + await embeddable.handleEvent({ name: 'edit' }); + + expect(onEditActionMock).toHaveBeenCalledTimes(1); + expect(documentToExpressionMock).toHaveBeenCalled(); + + const docToExpCalls = documentToExpressionMock.mock.calls; + const editedVisDocument = docToExpCalls[docToExpCalls.length - 1][0]; + expect(editedVisDocument.state.visualization).toEqual(editedVisualizationState); + + expect(expressionRenderer).toHaveBeenCalledTimes(2); + expect(expressionRenderer.mock.calls[1][0]!.expression).toBe(`edited`); + }); }); diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index 7faf873cf0b0a..563e10bb03abd 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -47,10 +47,13 @@ import { UiActionsStart } from '../../../../../src/plugins/ui_actions/public'; import { isLensBrushEvent, isLensFilterEvent, + isLensEditEvent, isLensTableRowContextMenuClickEvent, LensBrushEvent, LensFilterEvent, LensTableRowContextMenuEvent, + VisualizationMap, + Visualization, } from '../types'; import { IndexPatternsContract } from '../../../../../src/plugins/data/public'; @@ -97,6 +100,7 @@ export interface LensEmbeddableDeps { documentToExpression: ( doc: Document ) => Promise<{ ast: Ast | null; errors: ErrorMessage[] | undefined }>; + visualizationMap: VisualizationMap; indexPatternService: IndexPatternsContract; expressionRenderer: ReactExpressionRendererType; timefilter: TimefilterContract; @@ -109,6 +113,17 @@ export interface LensEmbeddableDeps { spaces?: SpacesPluginStart; } +const getExpressionFromDocument = async ( + document: Document, + documentToExpression: LensEmbeddableDeps['documentToExpression'] +) => { + const { ast, errors } = await documentToExpression(document); + return { + expression: ast ? toExpression(ast) : null, + errors, + }; +}; + export class Embeddable extends AbstractEmbeddable implements ReferenceOrValueEmbeddable @@ -260,6 +275,29 @@ export class Embeddable return this.lensInspector.adapters; } + private maybeAddConflictError( + errors: ErrorMessage[], + sharingSavedObjectProps?: SharingSavedObjectProps + ) { + const ret = [...errors]; + + if (sharingSavedObjectProps?.outcome === 'conflict' && !!this.deps.spaces) { + ret.push({ + shortMessage: i18n.translate('xpack.lens.embeddable.legacyURLConflict.shortMessage', { + defaultMessage: `You've encountered a URL conflict`, + }), + longMessage: ( + + ), + }); + } + + return ret; + } + async initializeSavedVis(input: LensEmbeddableInput) { const attrs: ResolvedLensSavedObjectAttributes | false = await this.deps.attributeService .unwrapAttributes(input) @@ -278,23 +316,14 @@ export class Embeddable type: this.type, savedObjectId: (input as LensByReferenceInput)?.savedObjectId, }; - const { ast, errors } = await this.deps.documentToExpression(this.savedVis); - this.errors = errors; - if (sharingSavedObjectProps?.outcome === 'conflict' && this.deps.spaces) { - const conflictError = { - shortMessage: i18n.translate('xpack.lens.embeddable.legacyURLConflict.shortMessage', { - defaultMessage: `You've encountered a URL conflict`, - }), - longMessage: ( - - ), - }; - this.errors = this.errors ? [...this.errors, conflictError] : [conflictError]; - } - this.expression = ast ? toExpression(ast) : null; + + const { expression, errors } = await getExpressionFromDocument( + this.savedVis, + this.deps.documentToExpression + ); + this.expression = expression; + this.errors = errors && this.maybeAddConflictError(errors, sharingSavedObjectProps); + if (this.errors) { this.logError('validation'); } @@ -432,7 +461,17 @@ export class Embeddable return output; } - handleEvent = (event: ExpressionRendererEvent) => { + private get onEditAction(): Visualization['onEditAction'] { + const visType = this.savedVis?.visualizationType; + + if (!visType) { + return; + } + + return this.deps.visualizationMap[visType].onEditAction; + } + + handleEvent = async (event: ExpressionRendererEvent) => { if (!this.deps.getTrigger || this.input.disableTriggers) { return; } @@ -468,9 +507,29 @@ export class Embeddable this.input.onTableRowClick(event.data as unknown as LensTableRowContextMenuEvent['data']); } } + + // We allow for edit actions in the Embeddable for display purposes only (e.g. changing the datatable sort order). + // No state changes made here with an edit action are persisted. + if (isLensEditEvent(event) && this.onEditAction) { + if (!this.savedVis) return; + + // have to dance since this.savedVis.state is readonly + const newVis = JSON.parse(JSON.stringify(this.savedVis)) as Document; + newVis.state.visualization = this.onEditAction(newVis.state.visualization, event); + this.savedVis = newVis; + + const { expression, errors } = await getExpressionFromDocument( + this.savedVis, + this.deps.documentToExpression + ); + this.expression = expression; + this.errors = errors; + + this.reload(); + } }; - async reload() { + reload() { if (!this.savedVis || !this.isInitialized || this.isDestroyed) { return; } diff --git a/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts b/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts index e51ec4c3e5588..811f391e32f9a 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts +++ b/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts @@ -25,6 +25,7 @@ import { DOC_TYPE } from '../../common/constants'; import { ErrorMessage } from '../editor_frame_service/types'; import { extract, inject } from '../../common/embeddable_factory'; import type { SpacesPluginStart } from '../../../spaces/public'; +import { VisualizationMap } from '../types'; export interface LensEmbeddableStartServices { timefilter: TimefilterContract; @@ -39,6 +40,7 @@ export interface LensEmbeddableStartServices { documentToExpression: ( doc: Document ) => Promise<{ ast: Ast | null; errors: ErrorMessage[] | undefined }>; + visualizationMap: VisualizationMap; spaces?: SpacesPluginStart; } @@ -85,6 +87,7 @@ export class EmbeddableFactory implements EmbeddableFactoryDefinition { timefilter, expressionRenderer, documentToExpression, + visualizationMap, uiActions, coreHttp, attributeService, @@ -108,6 +111,7 @@ export class EmbeddableFactory implements EmbeddableFactoryDefinition { getTrigger: uiActions?.getTrigger, getTriggerCompatibleActions: uiActions?.getTriggerCompatibleActions, documentToExpression, + visualizationMap, capabilities: { canSaveDashboards: Boolean(capabilities.dashboard?.showWriteControls), canSaveVisualizations: Boolean(capabilities.visualize.save), diff --git a/x-pack/plugins/lens/public/plugin.ts b/x-pack/plugins/lens/public/plugin.ts index 1532b2b099104..fb0a922c7e9a2 100644 --- a/x-pack/plugins/lens/public/plugin.ts +++ b/x-pack/plugins/lens/public/plugin.ts @@ -201,6 +201,8 @@ export class LensPlugin { plugins.fieldFormats.deserialize ); + const visualizationMap = await this.editorFrameService!.loadVisualizations(); + return { attributeService: getLensAttributeService(coreStart, plugins), capabilities: coreStart.application.capabilities, @@ -208,6 +210,7 @@ export class LensPlugin { timefilter: plugins.data.query.timefilter.timefilter, expressionRenderer: plugins.expressions.ReactExpressionRenderer, documentToExpression: this.editorFrameService!.documentToExpression, + visualizationMap, indexPatternService: plugins.data.indexPatterns, uiActions: plugins.uiActions, usageCollection, diff --git a/x-pack/test/functional/apps/lens/index.ts b/x-pack/test/functional/apps/lens/index.ts index 79f9b8f645c1a..26fb100adf133 100644 --- a/x-pack/test/functional/apps/lens/index.ts +++ b/x-pack/test/functional/apps/lens/index.ts @@ -70,6 +70,7 @@ export default function ({ getService, loadTestFile, getPageObjects }: FtrProvid this.tags(['ciGroup16', 'skipFirefox']); loadTestFile(require.resolve('./add_to_dashboard')); + loadTestFile(require.resolve('./table_dashboard')); loadTestFile(require.resolve('./table')); loadTestFile(require.resolve('./runtime_fields')); loadTestFile(require.resolve('./dashboard')); diff --git a/x-pack/test/functional/apps/lens/table_dashboard.ts b/x-pack/test/functional/apps/lens/table_dashboard.ts new file mode 100644 index 0000000000000..6e76d816fa6a6 --- /dev/null +++ b/x-pack/test/functional/apps/lens/table_dashboard.ts @@ -0,0 +1,55 @@ +/* + * 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 default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['lens', 'visualize', 'dashboard']); + const listingTable = getService('listingTable'); + const retry = getService('retry'); + + const checkTableSorting = async () => { + // Sort by number + await PageObjects.lens.changeTableSortingBy(2, 'ascending'); + await PageObjects.lens.waitForVisualization(); + expect(await PageObjects.lens.getDatatableCellText(0, 2)).to.eql('17,246'); + // Now sort by IP + await PageObjects.lens.changeTableSortingBy(0, 'ascending'); + await PageObjects.lens.waitForVisualization(); + expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('78.83.247.30'); + // Change the sorting + await PageObjects.lens.changeTableSortingBy(0, 'descending'); + await PageObjects.lens.waitForVisualization(); + expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('169.228.188.120'); + // Remove the sorting + await retry.try(async () => { + await PageObjects.lens.changeTableSortingBy(0, 'none'); + await PageObjects.lens.waitForVisualization(); + expect(await PageObjects.lens.isDatatableHeaderSorted(0)).to.eql(false); + }); + }; + + describe('lens table on dashboard', () => { + it('should sort a table by column in dashboard edit mode', async () => { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('lnsXYvis'); + await PageObjects.lens.clickVisualizeListItemTitle('lnsXYvis'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.switchToVisualization('lnsDatatable'); + await PageObjects.lens.save('New Table', true, false, false, 'new'); + + await checkTableSorting(); + }); + + it('should sort a table by column in dashboard view mode', async () => { + await PageObjects.dashboard.saveDashboard('Dashboard with a Lens Table'); + + await checkTableSorting(); + }); + }); +} From 19a4a955acd52874d5ae29f9f2365e27dfe7a153 Mon Sep 17 00:00:00 2001 From: mgiota Date: Thu, 11 Nov 2021 21:26:57 +0100 Subject: [PATCH 03/23] 110640 tests for alert bulk actions (#117264) * bulk actions test cases outline * helpers to filter alerts per rule type (reason) * add proper apm indices/privileges to observability functional tests * cleanup * add apm archive data * add correct apm archive data, add helper to select checkbox per solution & cleanup * enable more tests * cleanup * tests for bulk container * more tests for bulk container * fix eslint issues * fix failing unit tests (use ~= for multiple space separated values) * remove unused value * fix typescript error with container.querySelector * remove apm test archive data * use getByTestId in the tests * fix security cypress tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../cypress/screens/alerts.ts | 2 +- .../body/control_columns/checkbox.test.tsx | 4 +- .../t_grid/body/control_columns/checkbox.tsx | 6 +- .../observability/alerts/bulk_actions.ts | 52 +++++ .../services/observability/alerts/index.ts | 4 + .../services/observability/users.ts | 15 +- .../apps/observability/alerts/bulk_actions.ts | 203 ++++++++++++++++++ .../apps/observability/index.ts | 1 + 8 files changed, 282 insertions(+), 5 deletions(-) create mode 100644 x-pack/test/functional/services/observability/alerts/bulk_actions.ts create mode 100644 x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts diff --git a/x-pack/plugins/security_solution/cypress/screens/alerts.ts b/x-pack/plugins/security_solution/cypress/screens/alerts.ts index a46f65acaf971..0d2eab221b49a 100644 --- a/x-pack/plugins/security_solution/cypress/screens/alerts.ts +++ b/x-pack/plugins/security_solution/cypress/screens/alerts.ts @@ -12,7 +12,7 @@ export const ALERTS = '[data-test-subj="events-viewer-panel"] [data-test-subj="e export const ALERTS_COUNT = '[data-test-subj="events-viewer-panel"] [data-test-subj="server-side-event-count"]'; -export const ALERT_CHECKBOX = '[data-test-subj="select-event"].euiCheckbox__input'; +export const ALERT_CHECKBOX = '[data-test-subj~="select-event"].euiCheckbox__input'; export const ALERT_GRID_CELL = '[data-test-subj="dataGridRowCell"]'; diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.test.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.test.tsx index c5aba4506f39d..56d2df3754fa8 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.test.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.test.tsx @@ -45,8 +45,8 @@ describe('checkbox control column', () => { const { getByTestId } = render( ); - - fireEvent.click(getByTestId('select-event')); + const checkbox = getByTestId(/^select-event/); + fireEvent.click(checkbox); expect(onRowSelected).toHaveBeenCalled(); }); diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.tsx index 0d750a002914b..6feb972b9a813 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/control_columns/checkbox.tsx @@ -7,6 +7,7 @@ import { EuiCheckbox, EuiLoadingSpinner } from '@elastic/eui'; import React, { useCallback } from 'react'; +import { ALERT_RULE_PRODUCER } from '@kbn/rule-data-utils'; import { ActionProps, HeaderActionProps } from '../../../../../common'; import * as i18n from './translations'; @@ -18,7 +19,10 @@ export const RowCheckBox = ({ columnValues, disabled, loadingEventIds, + data, }: ActionProps) => { + const ruleProducers = data.find((d) => d.field === ALERT_RULE_PRODUCER)?.value ?? []; + const ruleProducer = ruleProducers[0]; const handleSelectEvent = useCallback( (event: React.ChangeEvent) => { if (!disabled) { @@ -35,7 +39,7 @@ export const RowCheckBox = ({ ) : ( { + return await find.allByCssSelector(testSubjects.getCssSelector(`~${CHECKBOX_SELECTOR}`)); + }; + + const missingCheckboxSelectorOrFail = async () => { + return await testSubjects.missingOrFail(`~${CHECKBOX_SELECTOR}`); + }; + + const getCheckboxSelectorPerProducer = async (producer: string) => { + return await find.allByCssSelector( + testSubjects.getCssSelector(`~${CHECKBOX_PRODUCER_SELECTOR}-${producer}`) + ); + }; + + const getBulkActionsContainer = async () => { + return await testSubjects.find(BULK_ACTIONS_CONTAINER); + }; + + const getBulkActionsContainerOrFail = async () => { + return await testSubjects.existOrFail(BULK_ACTIONS_CONTAINER); + }; + + const getBulkActionsButton = async () => { + return await testSubjects.find(SELECTED_BULK_ACTIONS_BUTTON); + }; + + return { + getCheckboxSelector, + getCheckboxSelectorPerProducer, + missingCheckboxSelectorOrFail, + getBulkActionsContainer, + getBulkActionsContainerOrFail, + getBulkActionsButton, + }; +} diff --git a/x-pack/test/functional/services/observability/alerts/index.ts b/x-pack/test/functional/services/observability/alerts/index.ts index f2b5173dfe5b0..b287388856524 100644 --- a/x-pack/test/functional/services/observability/alerts/index.ts +++ b/x-pack/test/functional/services/observability/alerts/index.ts @@ -8,6 +8,7 @@ import { ObservabilityAlertsPaginationProvider } from './pagination'; import { ObservabilityAlertsCommonProvider } from './common'; import { ObservabilityAlertsAddToCaseProvider } from './add_to_case'; +import { ObservabilityAlertsBulkActionsProvider } from './bulk_actions'; import { FtrProviderContext } from '../../../ftr_provider_context'; @@ -15,9 +16,12 @@ export function ObservabilityAlertsProvider(context: FtrProviderContext) { const common = ObservabilityAlertsCommonProvider(context); const pagination = ObservabilityAlertsPaginationProvider(context); const addToCase = ObservabilityAlertsAddToCaseProvider(context); + const bulkActions = ObservabilityAlertsBulkActionsProvider(context); + return { common, pagination, addToCase, + bulkActions, }; } diff --git a/x-pack/test/functional/services/observability/users.ts b/x-pack/test/functional/services/observability/users.ts index 78e8b3346cc67..7cb98603548ba 100644 --- a/x-pack/test/functional/services/observability/users.ts +++ b/x-pack/test/functional/services/observability/users.ts @@ -72,7 +72,20 @@ const defineBasicObservabilityRole = ( ...((features.infrastructure?.length ?? 0) > 0 ? [{ names: ['metricbeat-*', 'metrics-*'], privileges: ['all'] }] : []), - ...((features.apm?.length ?? 0) > 0 ? [{ names: ['apm-*'], privileges: ['all'] }] : []), + ...((features.apm?.length ?? 0) > 0 + ? [ + { + names: [ + 'apm-*', + 'logs-apm*', + 'metrics-apm*', + 'traces-apm*', + 'observability-annotations', + ], + privileges: ['read', 'view_index_metadata'], + }, + ] + : []), ...((features.uptime?.length ?? 0) > 0 ? [{ names: ['heartbeat-*,synthetics-*'], privileges: ['all'] }] : []), diff --git a/x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts b/x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts new file mode 100644 index 0000000000000..749324a39ba20 --- /dev/null +++ b/x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts @@ -0,0 +1,203 @@ +/* + * 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. + */ +/* + * 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'; + +async function asyncForEach(array: T[], callback: (item: T, index: number) => void) { + for (let index = 0; index < array.length; index++) { + await callback(array[index], index); + } +} + +export default ({ getService, getPageObjects }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const observability = getService('observability'); + + const retry = getService('retry'); + + describe('Observability alerts / Bulk actions', function () { + this.tags('includeFirefox'); + before(async () => { + await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); + await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs'); + await esArchiver.load( + 'x-pack/test/apm_api_integration/common/fixtures/es_archiver/apm_8.0.0' + ); + }); + + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/infra/metrics_and_logs'); + await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); + await esArchiver.unload( + 'x-pack/test/apm_api_integration/common/fixtures/es_archiver/apm_8.0.0' + ); + }); + + describe('When user has all priviledges for logs app', () => { + before(async () => { + await observability.users.setTestUserRole( + observability.users.defineBasicObservabilityRole({ + logs: ['all'], + }) + ); + await observability.alerts.common.navigateToTimeWithData(); + }); + + after(async () => { + await observability.users.restoreDefaultTestUserRole(); + }); + + it('logs checkboxes are enabled', async () => { + const logsCheckboxes = + await observability.alerts.bulkActions.getCheckboxSelectorPerProducer('logs'); + + await asyncForEach(logsCheckboxes, async (checkbox, index) => { + expect(await checkbox.isEnabled()).to.be(true); + }); + }); + + describe('when checkbox is clicked', async () => { + it('shows bulk actions container', async () => { + const logsCheckboxes = + await observability.alerts.bulkActions.getCheckboxSelectorPerProducer('logs'); + await logsCheckboxes[0].click(); + await observability.alerts.bulkActions.getBulkActionsContainerOrFail(); + }); + + describe('when selected bulk action button is clicked', async () => { + it('opens overflow menu with workflow status options', async () => { + await retry.try(async () => { + await (await observability.alerts.bulkActions.getBulkActionsButton()).click(); + }); + }); + }); + }); + }); + + describe('When user has all priviledges for apm app', () => { + before(async () => { + await observability.users.setTestUserRole( + observability.users.defineBasicObservabilityRole({ + apm: ['all'], + }) + ); + await observability.alerts.common.navigateToTimeWithData(); + }); + + after(async () => { + await observability.users.restoreDefaultTestUserRole(); + }); + + it('apm checkboxes are enabled', async () => { + const apmCheckboxes = await observability.alerts.bulkActions.getCheckboxSelectorPerProducer( + 'apm' + ); + + await asyncForEach(apmCheckboxes, async (checkbox, index) => { + expect(await checkbox.isEnabled()).to.be(true); + }); + }); + + describe('when checkbox is clicked', async () => { + it('shows bulk actions container', async () => { + const apmCheckboxes = + await observability.alerts.bulkActions.getCheckboxSelectorPerProducer('apm'); + await apmCheckboxes[0].click(); + await observability.alerts.bulkActions.getBulkActionsContainerOrFail(); + }); + + describe('when selected bulk action button is clicked', async () => { + it('opens overflow menu with workflow status options', async () => { + await retry.try(async () => { + await (await observability.alerts.bulkActions.getBulkActionsButton()).click(); + }); + }); + }); + }); + }); + + describe('When user has read permissions for logs', () => { + before(async () => { + await observability.users.setTestUserRole( + observability.users.defineBasicObservabilityRole({ + logs: ['read'], + }) + ); + await observability.alerts.common.navigateToTimeWithData(); + }); + + after(async () => { + await observability.users.restoreDefaultTestUserRole(); + }); + + it('checkbox is not visible', async () => { + await observability.alerts.bulkActions.missingCheckboxSelectorOrFail(); + }); + }); + + describe('When user has read permissions for apm', () => { + before(async () => { + await observability.users.setTestUserRole( + observability.users.defineBasicObservabilityRole({ + apm: ['read'], + }) + ); + await observability.alerts.common.navigateToTimeWithData(); + }); + + after(async () => { + await observability.users.restoreDefaultTestUserRole(); + }); + + it('checkbox is not displayed', async () => { + await observability.alerts.bulkActions.missingCheckboxSelectorOrFail(); + }); + }); + + describe('When user has mixed permissions for observability apps', () => { + before(async () => { + await observability.users.setTestUserRole( + observability.users.defineBasicObservabilityRole({ + logs: ['all'], + apm: ['read'], + observabilityCases: ['read'], + }) + ); + await observability.alerts.common.navigateToTimeWithData(); + }); + + after(async () => { + await observability.users.restoreDefaultTestUserRole(); + }); + + it('apm checkboxes are disabled', async () => { + const apmCheckboxes = await observability.alerts.bulkActions.getCheckboxSelectorPerProducer( + 'apm' + ); + + await asyncForEach(apmCheckboxes, async (checkbox, index) => { + expect(await checkbox.isEnabled()).to.be(false); + }); + }); + + it('logs checkboxes are enabled', async () => { + const logsCheckboxes = + await observability.alerts.bulkActions.getCheckboxSelectorPerProducer('logs'); + + await asyncForEach(logsCheckboxes, async (checkbox, index) => { + expect(await checkbox.isEnabled()).to.be(true); + }); + }); + }); + }); +}; diff --git a/x-pack/test/observability_functional/apps/observability/index.ts b/x-pack/test/observability_functional/apps/observability/index.ts index 898c7afb9a726..f2483e5f1401b 100644 --- a/x-pack/test/observability_functional/apps/observability/index.ts +++ b/x-pack/test/observability_functional/apps/observability/index.ts @@ -18,5 +18,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./alerts/pagination')); loadTestFile(require.resolve('./alerts/add_to_case')); loadTestFile(require.resolve('./alerts/state_synchronization')); + loadTestFile(require.resolve('./alerts/bulk_actions')); }); } From 44477a409c6347a27699435387624a689706d970 Mon Sep 17 00:00:00 2001 From: Devon Thomson Date: Thu, 11 Nov 2021 15:58:42 -0500 Subject: [PATCH 04/23] [Dashboard] [Functional Tests] Unskip Filtering Tests (#117944) Unskip dashboard filtering tests --- .../viewport/dashboard_viewport.tsx | 15 +++--- .../apps/dashboard/dashboard_filtering.ts | 25 +++++----- .../dashboard/current/kibana/data.json | 47 ++---------------- .../services/dashboard/expectations.ts | 48 ++++++++++++------- ...index_data_visualizer_grid_in_dashboard.ts | 19 +++++--- 5 files changed, 66 insertions(+), 88 deletions(-) diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx index 1f4cd3952e7a5..611a426dd4d71 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx +++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { Subscription } from 'rxjs'; -import { PanelState, ViewMode } from '../../../services/embeddable'; +import { ViewMode } from '../../../services/embeddable'; import { DashboardContainer, DashboardReactContextValue } from '../dashboard_container'; import { DashboardGrid } from '../grid'; import { context } from '../../../services/kibana_react'; @@ -26,7 +26,7 @@ interface State { useMargins: boolean; title: string; description?: string; - panels: { [key: string]: PanelState }; + panelCount: number; isEmbeddedExternally?: boolean; } @@ -48,7 +48,7 @@ export class DashboardViewport extends React.Component { - const { isFullScreenMode, useMargins, title, description, isEmbeddedExternally } = + const { isFullScreenMode, useMargins, title, description, isEmbeddedExternally, panels } = this.props.container.getInput(); if (this.mounted) { this.setState({ + panelCount: Object.values(panels).length, + isEmbeddedExternally, isFullScreenMode, description, useMargins, title, - isEmbeddedExternally, }); } }); @@ -94,13 +95,13 @@ export class DashboardViewport extends React.Component
{ @@ -115,13 +114,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('saved search is filtered', async () => { - await dashboardExpect.savedSearchRowCount(0); + await dashboardExpect.savedSearchRowsMissing(); }); - // TODO: Uncomment once https://github.com/elastic/kibana/issues/22561 is fixed - // it('timelion is filtered', async () => { - // await dashboardExpect.timelionLegendCount(0); - // }); + it('timelion is filtered', async () => { + await dashboardExpect.timelionLegendCount(0); + }); it('vega is filtered', async () => { await dashboardExpect.vegaTextsDoNotExist(['5,000']); @@ -177,13 +175,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('saved search is filtered', async () => { - await dashboardExpect.savedSearchRowCount(0); + await dashboardExpect.savedSearchRowsMissing(); }); - // TODO: Uncomment once https://github.com/elastic/kibana/issues/22561 is fixed - // it('timelion is filtered', async () => { - // await dashboardExpect.timelionLegendCount(0); - // }); + it('timelion is filtered', async () => { + await dashboardExpect.timelionLegendCount(0); + }); it('vega is filtered', async () => { await dashboardExpect.vegaTextsDoNotExist(['5,000']); @@ -206,7 +203,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('area, bar and heatmap charts', async () => { - await dashboardExpect.seriesElementCount(3); + await dashboardExpect.seriesElementCount(2); }); it('data tables', async () => { @@ -238,7 +235,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('saved searches', async () => { - await dashboardExpect.savedSearchRowCount(1); + await dashboardExpect.savedSearchRowsExist(); }); it('vega', async () => { diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json index 599ffbadaaea7..45e26f1599b6c 100644 --- a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json +++ b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json @@ -2316,7 +2316,7 @@ "title": "Filter Bytes Test: tsvb top n with bytes filter", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: tsvb top n with bytes filter\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"Filter Bytes Test:>100\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"split_color_mode\":\"gradient\"},{\"id\":\"4fd5b150-4194-11e8-a461-7d278185cba4\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"4fd5b151-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"Filter Bytes Test:>3000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + "visState":"{\"title\":\"Filter Bytes Test: tsvb top n with bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"Filter Bytes Test:>100\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"4fd5b150-4194-11e8-a461-7d278185cba4\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"4fd5b151-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"Filter Bytes Test:>3000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" } }, "type": "_doc" @@ -2379,7 +2379,7 @@ "title": "Filter Bytes Test: tsvb time series with bytes filter split by clientip", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: tsvb time series with bytes filter split by clientip\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false},\"aggs\":[]}" + "visState":"{\"title\":\"Filter Bytes Test: tsvb time series with bytes filter split by clientip\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" } }, "type": "_doc" @@ -2600,45 +2600,6 @@ } } -{ - "type": "doc", - "value": { - "id": "visualization:63983430-4192-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:36.275Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"US\",\"params\":{\"query\":\"US\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"US\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"Filter Bytes Test:>5000\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting", - "uiStateJSON": "{\"mapZoom\":7,\"mapCenter\":[42.98857645832184,-75.49804687500001]}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Heatmap\",\"isDesaturated\":true,\"addTooltip\":true,\"heatClusterSize\":1.5,\"legendPosition\":\"bottomright\",\"mapZoom\":2,\"mapCenter\":[0,0],\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"isFilteredByCollar\":true,\"useGeocentroid\":true,\"precision\":4}}]}" - } - }, - "type": "_doc" - } -} - { "type": "doc", "value": { @@ -2817,7 +2778,7 @@ "title": "Filter Bytes Test: tsvb metric with custom interval and bytes filter", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: tsvb metric with custom interval and bytes filter\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":1,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1d\",\"value_template\":\"{{value}} custom template\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + "visState":"{\"title\":\"Filter Bytes Test: tsvb metric with custom interval and bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":1,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1d\",\"value_template\":\"{{value}} custom template\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":0,\"isModelInvalid\":false,\"bar_color_rules\":[{\"id\":\"71f4e260-4186-11ec-8262-619fbabeae59\"}]}}" } }, "type": "_doc" @@ -2846,7 +2807,7 @@ "title": "Filter Bytes Test: tsvb markdown", "uiStateJSON": "{}", "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"label\":\"\",\"var_name\":\"\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"markdown\":\"{{bytes_1000.last.formatted}}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}" + "visState":"{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"label\":\"\",\"var_name\":\"\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"markdown\":\"{{bytes_1000.last.formatted}}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" } }, "type": "_doc" diff --git a/test/functional/services/dashboard/expectations.ts b/test/functional/services/dashboard/expectations.ts index 0a689c0091edc..d4b462d2a68f4 100644 --- a/test/functional/services/dashboard/expectations.ts +++ b/test/functional/services/dashboard/expectations.ts @@ -155,30 +155,34 @@ export class DashboardExpectService extends FtrService { async emptyTagCloudFound() { this.log.debug(`DashboardExpect.emptyTagCloudFound()`); const tagCloudVisualizations = await this.testSubjects.findAll('tagCloudVisualization'); - const tagCloudsHaveContent = await Promise.all( - tagCloudVisualizations.map(async (tagCloud) => { - return await this.find.descendantExistsByCssSelector('text', tagCloud); - }) - ); - expect(tagCloudsHaveContent.indexOf(false)).to.be.greaterThan(-1); + if (tagCloudVisualizations.length > 0) { + const tagCloudsHaveContent = await Promise.all( + tagCloudVisualizations.map(async (tagCloud) => { + return await this.find.descendantExistsByCssSelector('text', tagCloud); + }) + ); + expect(tagCloudsHaveContent.indexOf(false)).to.be.greaterThan(-1); + } } async tagCloudWithValuesFound(values: string[]) { this.log.debug(`DashboardExpect.tagCloudWithValuesFound(${values})`); const tagCloudVisualizations = await this.testSubjects.findAll('tagCloudVisualization'); - const matches = await Promise.all( - tagCloudVisualizations.map(async (tagCloud) => { - const tagCloudData = await this.tagCloud.getTextTagByElement(tagCloud); - for (let i = 0; i < values.length; i++) { - const valueExists = tagCloudData.includes(values[i]); - if (!valueExists) { - return false; + if (tagCloudVisualizations.length > 0) { + const matches = await Promise.all( + tagCloudVisualizations.map(async (tagCloud) => { + const tagCloudData = await this.tagCloud.getTextTagByElement(tagCloud); + for (let i = 0; i < values.length; i++) { + const valueExists = tagCloudData.includes(values[i]); + if (!valueExists) { + return false; + } } - } - return true; - }) - ); - expect(matches.indexOf(true)).to.be.greaterThan(-1); + return true; + }) + ); + expect(matches.indexOf(true)).to.be.greaterThan(-1); + } } async goalAndGuageLabelsExist(labels: string[]) { @@ -232,6 +236,14 @@ export class DashboardExpectService extends FtrService { }); } + async savedSearchRowsExist() { + this.testSubjects.existOrFail('docTableExpandToggleColumn'); + } + + async savedSearchRowsMissing() { + this.testSubjects.missingOrFail('docTableExpandToggleColumn'); + } + async dataTableRowCount(expectedCount: number) { this.log.debug(`DashboardExpect.dataTableRowCount(${expectedCount})`); await this.retry.try(async () => { diff --git a/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer_grid_in_dashboard.ts b/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer_grid_in_dashboard.ts index 97c6c06bc3225..5684c2acd5bac 100644 --- a/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer_grid_in_dashboard.ts +++ b/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer_grid_in_dashboard.ts @@ -12,7 +12,14 @@ import { farequoteLuceneFiltersSearchTestData } from './index_test_data'; const SHOW_FIELD_STATISTICS = 'discover:showFieldStatistics'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'settings', 'dashboard']); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'timePicker', + 'settings', + 'dashboard', + 'header', + ]); const ml = getService('ml'); const retry = getService('retry'); const dashboardAddPanel = getService('dashboardAddPanel'); @@ -55,10 +62,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.clickNewDashboard(); await dashboardAddPanel.addSavedSearch(savedSearchTitle); - await PageObjects.dashboard.waitForRenderComplete(); + await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.timePicker.setAbsoluteRange(startTime, endTime); - await PageObjects.dashboard.waitForRenderComplete(); + await PageObjects.header.waitUntilLoadingHasFinished(); for (const fieldRow of testData.expected.metricFields as Array< Required @@ -91,13 +98,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.gotoDashboardEditMode(dashboardTitle); - await PageObjects.dashboard.waitForRenderComplete(); + await PageObjects.header.waitUntilLoadingHasFinished(); await dashboardAddPanel.addSavedSearch(savedSearchTitle); - await PageObjects.dashboard.waitForRenderComplete(); + await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.timePicker.setAbsoluteRange(startTime, endTime); - await PageObjects.dashboard.waitForRenderComplete(); + await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.discover.assertFieldStatsTableNotExists(); await PageObjects.dashboard.saveDashboard(dashboardTitle); From 643241d54cbc05557359acb198fcd57af681e80b Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Thu, 11 Nov 2021 15:22:49 -0600 Subject: [PATCH 05/23] skip flaky suite. #118417 --- x-pack/test/accessibility/apps/ml.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/accessibility/apps/ml.ts b/x-pack/test/accessibility/apps/ml.ts index fd05d2af07747..eb086b86b9146 100644 --- a/x-pack/test/accessibility/apps/ml.ts +++ b/x-pack/test/accessibility/apps/ml.ts @@ -13,7 +13,8 @@ export default function ({ getService }: FtrProviderContext) { const a11y = getService('a11y'); const ml = getService('ml'); - describe('ml', () => { + // FLAKY https://github.com/elastic/kibana/issues/118417 + describe.skip('ml', () => { const esArchiver = getService('esArchiver'); before(async () => { From c0eb21b5f1fb7984e6e2b8e031b45b79b6aa3d0b Mon Sep 17 00:00:00 2001 From: Claudio Procida Date: Thu, 11 Nov 2021 22:52:11 +0100 Subject: [PATCH 06/23] [RAC] Makes selection of existing cases more intentional (#117683) * Adds footer buttons to add to case modal dialog * Uses a button to select a case * Augments props passed to cases table columns * Removes unused i18n strings * Removes unnecessary default argument * Updates all cases unit test * Restores cancel button in cases modal * Updates Cypress test * Formats translation file * UX review feedback * UX review feedback: cancel button * Review feedback Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../all_cases/all_cases_generic.tsx | 38 ++++--------- .../public/components/all_cases/columns.tsx | 55 +++++++++++++++++++ .../components/all_cases/index.test.tsx | 2 +- .../all_cases/selector_modal/index.tsx | 14 ++++- .../components/all_cases/translations.ts | 4 ++ .../public/containers/use_post_comment.tsx | 2 +- .../cypress/screens/timeline.ts | 4 +- .../cypress/tasks/timeline.ts | 4 +- 8 files changed, 88 insertions(+), 35 deletions(-) diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_generic.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_generic.tsx index 4a4e31230030e..54867c333c2e2 100644 --- a/x-pack/plugins/cases/public/components/all_cases/all_cases_generic.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_generic.tsx @@ -7,7 +7,7 @@ import React, { useCallback, useMemo, useRef, useState } from 'react'; import { EuiProgress, EuiBasicTable, EuiTableSelectionType } from '@elastic/eui'; -import { difference, head, isEmpty, memoize } from 'lodash/fp'; +import { difference, head, isEmpty } from 'lodash/fp'; import styled, { css } from 'styled-components'; import classnames from 'classnames'; @@ -17,7 +17,6 @@ import { CaseType, CommentRequestAlertType, CaseStatusWithAllStatus, - CommentType, FilterOptions, SortFieldCase, SubCase, @@ -207,6 +206,10 @@ export const AllCasesGeneric = React.memo( isSelectorView: !!isSelectorView, userCanCrud, connectors, + onRowClick, + alertData, + postComment, + updateCase, }); const itemIdToExpandedRowMap = useMemo( @@ -241,32 +244,11 @@ export const AllCasesGeneric = React.memo( const isDataEmpty = useMemo(() => data.total === 0, [data]); const tableRowProps = useCallback( - (theCase: Case) => { - const onTableRowClick = memoize(async () => { - if (alertData != null) { - await postComment({ - caseId: theCase.id, - data: { - type: CommentType.alert, - ...alertData, - }, - updateCase, - }); - } - if (onRowClick) { - onRowClick(theCase); - } - }); - - return { - 'data-test-subj': `cases-table-row-${theCase.id}`, - className: classnames({ isDisabled: theCase.type === CaseType.collection }), - ...(isSelectorView && theCase.type !== CaseType.collection - ? { onClick: onTableRowClick } - : {}), - }; - }, - [isSelectorView, alertData, onRowClick, postComment, updateCase] + (theCase: Case) => ({ + 'data-test-subj': `cases-table-row-${theCase.id}`, + className: classnames({ isDisabled: theCase.type === CaseType.collection }), + }), + [] ); return ( diff --git a/x-pack/plugins/cases/public/components/all_cases/columns.tsx b/x-pack/plugins/cases/public/components/all_cases/columns.tsx index c0bd6536f1b73..6a23a293bfb83 100644 --- a/x-pack/plugins/cases/public/components/all_cases/columns.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/columns.tsx @@ -10,6 +10,7 @@ import { EuiAvatar, EuiBadgeGroup, EuiBadge, + EuiButton, EuiLink, EuiTableActionsColumnType, EuiTableComputedColumnType, @@ -24,6 +25,8 @@ import styled from 'styled-components'; import { CaseStatuses, CaseType, + CommentType, + CommentRequestAlertType, DeleteCase, Case, SubCase, @@ -43,6 +46,7 @@ import { useKibana } from '../../common/lib/kibana'; import { StatusContextMenu } from '../case_action_bar/status_context_menu'; import { TruncatedText } from '../truncated_text'; import { getConnectorIcon } from '../utils'; +import { PostComment } from '../../containers/use_post_comment'; export type CasesColumns = | EuiTableActionsColumnType @@ -75,6 +79,10 @@ export interface GetCasesColumn { isSelectorView: boolean; userCanCrud: boolean; connectors?: ActionConnector[]; + onRowClick?: (theCase: Case) => void; + alertData?: Omit; + postComment?: (args: PostComment) => Promise; + updateCase?: (newCase: Case) => void; } export const useCasesColumns = ({ caseDetailsNavigation, @@ -87,6 +95,10 @@ export const useCasesColumns = ({ isSelectorView, userCanCrud, connectors = [], + onRowClick, + alertData, + postComment, + updateCase, }: GetCasesColumn): CasesColumns[] => { // Delete case const { @@ -132,6 +144,25 @@ export const useCasesColumns = ({ [toggleDeleteModal] ); + const assignCaseAction = useCallback( + async (theCase: Case) => { + if (alertData != null) { + await postComment?.({ + caseId: theCase.id, + data: { + type: CommentType.alert, + ...alertData, + }, + updateCase, + }); + } + if (onRowClick) { + onRowClick(theCase); + } + }, + [alertData, onRowClick, postComment, updateCase] + ); + useEffect(() => { handleIsLoading(isDeleting || isLoadingCases.indexOf('caseUpdate') > -1); }, [handleIsLoading, isDeleting, isLoadingCases]); @@ -281,6 +312,30 @@ export const useCasesColumns = ({ return getEmptyTagValue(); }, }, + ...(isSelectorView + ? [ + { + align: RIGHT_ALIGNMENT, + render: (theCase: Case) => { + if (theCase.id != null) { + return ( + { + assignCaseAction(theCase); + }} + size="s" + fill={true} + > + {i18n.SELECT} + + ); + } + return getEmptyTagValue(); + }, + }, + ] + : []), ...(!isSelectorView ? [ { diff --git a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx index f55c871f4922a..7e3ca8729ef63 100644 --- a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx @@ -749,7 +749,7 @@ describe('AllCasesGeneric', () => { /> ); - wrapper.find('[data-test-subj="cases-table-row-1"]').first().simulate('click'); + wrapper.find('[data-test-subj="cases-table-row-select-1"]').first().simulate('click'); await waitFor(() => { expect(onRowClick).toHaveBeenCalledWith({ closedAt: null, diff --git a/x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx b/x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx index cbfb24f18c97e..7356764802550 100644 --- a/x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/selector_modal/index.tsx @@ -6,7 +6,14 @@ */ import React, { useState, useCallback } from 'react'; -import { EuiModal, EuiModalBody, EuiModalHeader, EuiModalHeaderTitle } from '@elastic/eui'; +import { + EuiButton, + EuiModal, + EuiModalBody, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, +} from '@elastic/eui'; import styled from 'styled-components'; import { Case, @@ -76,6 +83,11 @@ const AllCasesSelectorModalComponent: React.FC = ({ updateCase={updateCase} /> + + + {i18n.CANCEL} + + ) : null; }; diff --git a/x-pack/plugins/cases/public/components/all_cases/translations.ts b/x-pack/plugins/cases/public/components/all_cases/translations.ts index be1aa256db657..5f5cb274ebf77 100644 --- a/x-pack/plugins/cases/public/components/all_cases/translations.ts +++ b/x-pack/plugins/cases/public/components/all_cases/translations.ts @@ -75,6 +75,10 @@ export const DELETE = i18n.translate('xpack.cases.caseTable.delete', { defaultMessage: 'Delete', }); +export const SELECT = i18n.translate('xpack.cases.caseTable.select', { + defaultMessage: 'Select', +}); + export const REQUIRES_UPDATE = i18n.translate('xpack.cases.caseTable.requiresUpdate', { defaultMessage: ' requires update', }); diff --git a/x-pack/plugins/cases/public/containers/use_post_comment.tsx b/x-pack/plugins/cases/public/containers/use_post_comment.tsx index 8677787fd9af4..2d4437826092a 100644 --- a/x-pack/plugins/cases/public/containers/use_post_comment.tsx +++ b/x-pack/plugins/cases/public/containers/use_post_comment.tsx @@ -41,7 +41,7 @@ const dataFetchReducer = (state: NewCommentState, action: Action): NewCommentSta } }; -interface PostComment { +export interface PostComment { caseId: string; data: CommentRequest; updateCase?: (newCase: Case) => void; diff --git a/x-pack/plugins/security_solution/cypress/screens/timeline.ts b/x-pack/plugins/security_solution/cypress/screens/timeline.ts index 81e025fa6db8f..a37cd5e22ca07 100644 --- a/x-pack/plugins/security_solution/cypress/screens/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/screens/timeline.ts @@ -20,8 +20,8 @@ export const ATTACH_TIMELINE_TO_EXISTING_CASE_ICON = export const BULK_ACTIONS = '[data-test-subj="utility-bar-action-button"]'; -export const CASE = (id: string) => { - return `[data-test-subj="cases-table-row-${id}"]`; +export const SELECT_CASE = (id: string) => { + return `[data-test-subj="cases-table-row-select-${id}"]`; }; export const CELL = '[data-test-subj="statefulCell"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index 03b931bc74d77..24eb2e325d32c 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -17,7 +17,6 @@ import { ATTACH_TIMELINE_TO_CASE_BUTTON, ATTACH_TIMELINE_TO_EXISTING_CASE_ICON, ATTACH_TIMELINE_TO_NEW_CASE_ICON, - CASE, CLOSE_TIMELINE_BTN, COMBO_BOX, COMBO_BOX_INPUT, @@ -35,6 +34,7 @@ import { RESET_FIELDS, SAVE_FILTER_BTN, SEARCH_OR_FILTER_CONTAINER, + SELECT_CASE, SERVER_SIDE_EVENT_COUNT, STAR_ICON, TIMELINE_CHANGES_IN_PROGRESS, @@ -346,7 +346,7 @@ export const resetFields = () => { }; export const selectCase = (caseId: string) => { - cy.get(CASE(caseId)).click(); + cy.get(SELECT_CASE(caseId)).click(); }; export const waitForTimelineChanges = () => { From d21aaffa045e0f64b3bdb527656d2bfc50aae4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Marcondes?= <55978943+cauemarcondes@users.noreply.github.com> Date: Thu, 11 Nov 2021 17:04:02 -0500 Subject: [PATCH 07/23] [APM] Bug: Django and Flask code snippets for agent instrumentation shows `{curlyOpen}` and `{curlyClose}` instead of brackets (#118359) * removing curly code * removing unused mustache parser * addressing pr comments Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../apm_agents/replace_template_strings.ts | 2 -- .../tutorial/config_agent/commands/django.ts | 4 ++-- .../tutorial/config_agent/commands/flask.ts | 4 ++-- .../config_agent/commands/get_commands.test.ts | 16 ++++++++-------- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_agents/replace_template_strings.ts b/x-pack/plugins/apm/public/components/fleet_integration/apm_agents/replace_template_strings.ts index 2e0c0da8d0fb7..d36d76d466308 100644 --- a/x-pack/plugins/apm/public/components/fleet_integration/apm_agents/replace_template_strings.ts +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_agents/replace_template_strings.ts @@ -16,8 +16,6 @@ export function replaceTemplateStrings( ) { Mustache.parse(text, TEMPLATE_TAGS); return Mustache.render(text, { - curlyOpen: '{', - curlyClose: '}', config: { docs: { base_url: docLinks?.ELASTIC_WEBSITE_URL, diff --git a/x-pack/plugins/apm/public/tutorial/config_agent/commands/django.ts b/x-pack/plugins/apm/public/tutorial/config_agent/commands/django.ts index 97b5f3315bcdb..18fed9d329cd0 100644 --- a/x-pack/plugins/apm/public/tutorial/config_agent/commands/django.ts +++ b/x-pack/plugins/apm/public/tutorial/config_agent/commands/django.ts @@ -18,7 +18,7 @@ INSTALLED_APPS = ( # ... ) -ELASTIC_APM = {curlyOpen} +ELASTIC_APM = { # ${i18n.translate( 'xpack.apm.tutorial.djangoClient.configure.commands.setRequiredServiceNameComment', { @@ -58,7 +58,7 @@ ELASTIC_APM = {curlyOpen} } )} 'ENVIRONMENT': 'production', -{curlyClose} +} # ${i18n.translate( 'xpack.apm.tutorial.djangoClient.configure.commands.addTracingMiddlewareComment', diff --git a/x-pack/plugins/apm/public/tutorial/config_agent/commands/flask.ts b/x-pack/plugins/apm/public/tutorial/config_agent/commands/flask.ts index e4d7fd188e7c6..dbcd6f29225c1 100644 --- a/x-pack/plugins/apm/public/tutorial/config_agent/commands/flask.ts +++ b/x-pack/plugins/apm/public/tutorial/config_agent/commands/flask.ts @@ -25,7 +25,7 @@ apm = ElasticAPM(app) } )} from elasticapm.contrib.flask import ElasticAPM -app.config['ELASTIC_APM'] = {curlyOpen} +app.config['ELASTIC_APM'] = { # ${i18n.translate( 'xpack.apm.tutorial.flaskClient.configure.commands.setRequiredServiceNameComment', { @@ -65,6 +65,6 @@ app.config['ELASTIC_APM'] = {curlyOpen} } )} 'ENVIRONMENT': 'production', -{curlyClose} +} apm = ElasticAPM(app)`; diff --git a/x-pack/plugins/apm/public/tutorial/config_agent/commands/get_commands.test.ts b/x-pack/plugins/apm/public/tutorial/config_agent/commands/get_commands.test.ts index 5dc66e2230524..bb6593ae7acb8 100644 --- a/x-pack/plugins/apm/public/tutorial/config_agent/commands/get_commands.test.ts +++ b/x-pack/plugins/apm/public/tutorial/config_agent/commands/get_commands.test.ts @@ -178,7 +178,7 @@ describe('getCommands', () => { # ... ) - ELASTIC_APM = {curlyOpen} + ELASTIC_APM = { # Set the required service name. Allowed characters: # a-z, A-Z, 0-9, -, _, and space 'SERVICE_NAME': '', @@ -191,7 +191,7 @@ describe('getCommands', () => { # Set the service environment 'ENVIRONMENT': 'production', - {curlyClose} + } # To send performance metrics, add our tracing middleware: MIDDLEWARE = ( @@ -216,7 +216,7 @@ describe('getCommands', () => { # ... ) - ELASTIC_APM = {curlyOpen} + ELASTIC_APM = { # Set the required service name. Allowed characters: # a-z, A-Z, 0-9, -, _, and space 'SERVICE_NAME': '', @@ -229,7 +229,7 @@ describe('getCommands', () => { # Set the service environment 'ENVIRONMENT': 'production', - {curlyClose} + } # To send performance metrics, add our tracing middleware: MIDDLEWARE = ( @@ -254,7 +254,7 @@ describe('getCommands', () => { # or configure to use ELASTIC_APM in your application's settings from elasticapm.contrib.flask import ElasticAPM - app.config['ELASTIC_APM'] = {curlyOpen} + app.config['ELASTIC_APM'] = { # Set the required service name. Allowed characters: # a-z, A-Z, 0-9, -, _, and space 'SERVICE_NAME': '', @@ -267,7 +267,7 @@ describe('getCommands', () => { # Set the service environment 'ENVIRONMENT': 'production', - {curlyClose} + } apm = ElasticAPM(app)" `); @@ -289,7 +289,7 @@ describe('getCommands', () => { # or configure to use ELASTIC_APM in your application's settings from elasticapm.contrib.flask import ElasticAPM - app.config['ELASTIC_APM'] = {curlyOpen} + app.config['ELASTIC_APM'] = { # Set the required service name. Allowed characters: # a-z, A-Z, 0-9, -, _, and space 'SERVICE_NAME': '', @@ -302,7 +302,7 @@ describe('getCommands', () => { # Set the service environment 'ENVIRONMENT': 'production', - {curlyClose} + } apm = ElasticAPM(app)" `); From b47e55c492dc9f43c346b8946547fb870ca99a7c Mon Sep 17 00:00:00 2001 From: "Joey F. Poon" Date: Thu, 11 Nov 2021 16:44:01 -0600 Subject: [PATCH 08/23] [Security Solution] metadata api enhancements (#115115) * metadata api enhancements * move united index query logic to metadata service * add error wrappers for es/so calls in united index query * new getHostMetadataList() method to return list of endpoint metadata Co-authored-by: Paul Tavares --- .../common/endpoint/constants.ts | 3 + .../endpoint/endpoint_app_context_services.ts | 5 +- .../server/endpoint/mocks.ts | 19 +- .../endpoint/routes/actions/isolation.test.ts | 4 +- .../endpoint/routes/metadata/handlers.ts | 220 ++----- .../endpoint/routes/metadata/metadata.test.ts | 51 +- .../metadata/query_builders.fixtures.ts | 5 +- .../routes/metadata/query_builders.test.ts | 129 ++-- .../routes/metadata/query_builders.ts | 65 +- .../routes/metadata/support/test_support.ts | 12 +- .../endpoint_metadata_service.test.ts | 147 ++++- .../metadata/endpoint_metadata_service.ts | 312 ++++++++-- .../endpoint/services/metadata/errors.ts | 2 + .../endpoint/services/metadata/mocks.ts | 24 +- .../server/endpoint/types.ts | 10 + .../security_solution/server/plugin.ts | 2 + .../apis/data_stream_helper.ts | 43 +- .../apis/metadata.fixtures.ts | 571 ++++++++++++++++++ .../apis/metadata.ts | 316 +++++++++- 19 files changed, 1585 insertions(+), 355 deletions(-) create mode 100644 x-pack/test/security_solution_endpoint_api_int/apis/metadata.fixtures.ts diff --git a/x-pack/plugins/security_solution/common/endpoint/constants.ts b/x-pack/plugins/security_solution/common/endpoint/constants.ts index 178a2b68a4aab..fc418df95602b 100644 --- a/x-pack/plugins/security_solution/common/endpoint/constants.ts +++ b/x-pack/plugins/security_solution/common/endpoint/constants.ts @@ -15,6 +15,9 @@ export const ENDPOINT_ACTION_RESPONSES_INDEX = `${ENDPOINT_ACTION_RESPONSES_DS}- export const eventsIndexPattern = 'logs-endpoint.events.*'; export const alertsIndexPattern = 'logs-endpoint.alerts-*'; +// metadata datastream +export const METADATA_DATASTREAM = 'metrics-endpoint.metadata-default'; + /** index pattern for the data source index (data stream) that the Endpoint streams documents to */ export const metadataIndexPattern = 'metrics-endpoint.metadata-*'; diff --git a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts index d06739d9b859a..68ee826eca01c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts +++ b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts @@ -123,7 +123,10 @@ export class EndpointAppContextService { return this.startDependencies?.agentService; } - public getPackagePolicyService(): PackagePolicyServiceInterface | undefined { + public getPackagePolicyService(): PackagePolicyServiceInterface { + if (!this.startDependencies?.packagePolicyService) { + throw new EndpointAppContentServicesNotStartedError(); + } return this.startDependencies?.packagePolicyService; } diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 6c2df2d09f6d5..c428cf49b1e11 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -87,22 +87,36 @@ export const createMockEndpointAppContextServiceStartContract = (): jest.Mocked => { const config = createMockConfig(); + const logger = loggingSystemMock.create().get('mock_endpoint_app_context'); const casesClientMock = createCasesClientMock(); const savedObjectsStart = savedObjectsServiceMock.createStartContract(); const agentService = createMockAgentService(); const agentPolicyService = createMockAgentPolicyService(); + const packagePolicyService = createPackagePolicyServiceMock(); const endpointMetadataService = new EndpointMetadataService( savedObjectsStart, agentService, - agentPolicyService + agentPolicyService, + packagePolicyService, + logger ); + packagePolicyService.list.mockImplementation(async (_, options) => { + return { + items: [], + total: 0, + page: options.page ?? 1, + perPage: options.perPage ?? 10, + }; + }); + return { agentService, agentPolicyService, endpointMetadataService, + packagePolicyService, + logger, packageService: createMockPackageService(), - logger: loggingSystemMock.create().get('mock_endpoint_app_context'), manifestManager: getManifestManagerMock(), security: securityMock.createStart(), alerting: alertsMock.createStart(), @@ -113,7 +127,6 @@ export const createMockEndpointAppContextServiceStartContract = Parameters >(), exceptionListsClient: listMock.getExceptionListClient(), - packagePolicyService: createPackagePolicyServiceMock(), cases: { getCasesClientWithRequest: jest.fn(async () => casesClientMock), }, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts index a483a33ea4c8d..29a4e5ce0b299 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts @@ -45,7 +45,7 @@ import { LogsEndpointAction, } from '../../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { legacyMetadataSearchResponse } from '../metadata/support/test_support'; +import { legacyMetadataSearchResponseMock } from '../metadata/support/test_support'; import { AGENT_ACTIONS_INDEX, ElasticsearchAssetType } from '../../../../../fleet/common'; import { CasesClientMock } from '../../../../../cases/server/client/mocks'; @@ -211,7 +211,7 @@ describe('Host Isolation', () => { const mockSearchResponse = jest .fn() .mockImplementation(() => - Promise.resolve({ body: legacyMetadataSearchResponse(searchResponse) }) + Promise.resolve({ body: legacyMetadataSearchResponseMock(searchResponse) }) ); if (indexExists) { ctx.core.elasticsearch.client.asInternalUser.index = mockIndexResponse; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts index c72b1307d04b7..384fde6c7ceac 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts @@ -6,8 +6,6 @@ */ import Boom from '@hapi/boom'; -import type { TransportResult } from '@elastic/elasticsearch'; -import { SearchResponse, SearchTotalHits } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { TypeOf } from '@kbn/config-schema'; import { @@ -22,7 +20,6 @@ import { import { HostInfo, HostMetadata, - UnitedAgentMetadata, HostResultList, HostStatus, } from '../../../../common/endpoint/types'; @@ -30,10 +27,10 @@ import type { SecuritySolutionRequestHandlerContext } from '../../../types'; import { getESQueryHostMetadataByID, + getPagingProperties, kibanaRequestToMetadataListESQuery, - buildUnitedIndexQuery, } from './query_builders'; -import { Agent, AgentPolicy, PackagePolicy } from '../../../../../fleet/common/types/models'; +import { Agent, PackagePolicy } from '../../../../../fleet/common/types/models'; import { AgentNotFoundError } from '../../../../../fleet/server'; import { EndpointAppContext, HostListQueryResult } from '../../types'; import { GetMetadataListRequestSchema, GetMetadataRequestSchema } from './index'; @@ -46,9 +43,8 @@ import { queryResponseToHostListResult, queryResponseToHostResult, } from './support/query_strategies'; -import { NotFoundError } from '../../errors'; +import { EndpointError, NotFoundError } from '../../errors'; import { EndpointHostUnEnrolledError } from '../../services/metadata'; -import { getAgentStatus } from '../../../../../fleet/common/services/agent_status'; export interface MetadataRequestContext { esClient?: IScopedClusterClient; @@ -58,16 +54,6 @@ export interface MetadataRequestContext { savedObjectsClient?: SavedObjectsClientContract; } -/** - * 00000000-0000-0000-0000-000000000000 is initial Elastic Agent id sent by Endpoint before policy is configured - * 11111111-1111-1111-1111-111111111111 is Elastic Agent id sent by Endpoint when policy does not contain an id - */ - -const IGNORED_ELASTIC_AGENT_IDS = [ - '00000000-0000-0000-0000-000000000000', - '11111111-1111-1111-1111-111111111111', -]; - export const getLogger = (endpointAppContext: EndpointAppContext): Logger => { return endpointAppContext.logFactory.get('metadata'); }; @@ -109,39 +95,69 @@ export const getMetadataListRequestHandler = function ( SecuritySolutionRequestHandlerContext > { return async (context, request, response) => { - const agentService = endpointAppContext.service.getAgentService(); - if (agentService === undefined) { - throw new Error('agentService not available'); + const endpointMetadataService = endpointAppContext.service.getEndpointMetadataService(); + if (!endpointMetadataService) { + throw new EndpointError('endpoint metadata service not available'); } - const endpointPolicies = await getAllEndpointPackagePolicies( - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - endpointAppContext.service.getPackagePolicyService()!, - context.core.savedObjects.client - ); + let doesUnitedIndexExist = false; + let didUnitedIndexError = false; + let body: HostResultList = { + hosts: [], + total: 0, + request_page_size: 0, + request_page_index: 0, + }; - const { unitedIndexExists, unitedQueryResponse } = await queryUnitedIndex( - context, - request, - endpointAppContext, - logger, - endpointPolicies - ); - if (unitedIndexExists) { - return response.ok({ - body: unitedQueryResponse, - }); + try { + doesUnitedIndexExist = await endpointMetadataService.doesUnitedIndexExist( + context.core.elasticsearch.client.asCurrentUser + ); + } catch (error) { + // for better UX, try legacy query instead of immediately failing on united index error + didUnitedIndexError = true; } - return response.ok({ - body: await legacyListMetadataQuery( + // If no unified Index present, then perform a search using the legacy approach + if (!doesUnitedIndexExist || didUnitedIndexError) { + const endpointPolicies = await getAllEndpointPackagePolicies( + endpointAppContext.service.getPackagePolicyService(), + context.core.savedObjects.client + ); + + body = await legacyListMetadataQuery( context, request, endpointAppContext, logger, endpointPolicies - ), - }); + ); + return response.ok({ body }); + } + + // Unified index is installed and being used - perform search using new approach + try { + const pagingProperties = await getPagingProperties(request, endpointAppContext); + const { data, page, total, pageSize } = await endpointMetadataService.getHostMetadataList( + context.core.elasticsearch.client.asCurrentUser, + { + page: pagingProperties.pageIndex + 1, + pageSize: pagingProperties.pageSize, + filters: request.body?.filters || {}, + } + ); + + body = { + hosts: data, + request_page_index: page - 1, + total, + request_page_size: pageSize, + }; + } catch (error) { + return errorHandler(logger, response, error); + } + + return response.ok({ body }); }; }; @@ -412,6 +428,9 @@ async function legacyListMetadataQuery( ): Promise { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const agentService = endpointAppContext.service.getAgentService()!; + if (agentService === undefined) { + throw new Error('agentService not available'); + } const metadataRequestContext: MetadataRequestContext = { esClient: context.core.elasticsearch.client, @@ -429,15 +448,15 @@ async function legacyListMetadataQuery( ); const statusesToFilter = request?.body?.filters?.host_status ?? []; - const statusIds = await findAgentIdsByStatus( + const statusAgentIds = await findAgentIdsByStatus( agentService, context.core.elasticsearch.client.asCurrentUser, statusesToFilter ); const queryParams = await kibanaRequestToMetadataListESQuery(request, endpointAppContext, { - unenrolledAgentIds: unenrolledAgentIds.concat(IGNORED_ELASTIC_AGENT_IDS), - statusAgentIds: statusIds, + unenrolledAgentIds, + statusAgentIds, }); const result = await context.core.elasticsearch.client.asCurrentUser.search( @@ -446,118 +465,3 @@ async function legacyListMetadataQuery( const hostListQueryResult = queryResponseToHostListResult(result.body); return mapToHostResultList(queryParams, hostListQueryResult, metadataRequestContext); } - -async function queryUnitedIndex( - context: SecuritySolutionRequestHandlerContext, - request: KibanaRequest, - endpointAppContext: EndpointAppContext, - logger: Logger, - endpointPolicies: PackagePolicy[] -): Promise<{ - unitedIndexExists: boolean; - unitedQueryResponse: HostResultList; -}> { - const endpointPolicyIds = endpointPolicies.map((policy) => policy.policy_id); - const unitedIndexQuery = await buildUnitedIndexQuery( - request, - endpointAppContext, - IGNORED_ELASTIC_AGENT_IDS, - endpointPolicyIds - ); - - let unitedMetadataQueryResponse: TransportResult, unknown>; - try { - unitedMetadataQueryResponse = - await context.core.elasticsearch.client.asCurrentUser.search( - unitedIndexQuery - ); - } catch (error) { - const errorType = error?.meta?.body?.error?.type ?? ''; - - // no united index means that the endpoint package hasn't been upgraded yet - // this is expected so we fall back to the legacy query - // errors other than index_not_found_exception are unexpected - if (errorType !== 'index_not_found_exception') { - logger.error(error); - throw error; - } - return { - unitedIndexExists: false, - unitedQueryResponse: {} as HostResultList, - }; - } - - const { hits: docs, total: docsCount } = unitedMetadataQueryResponse?.body?.hits || {}; - const agentPolicyIds: string[] = docs.map((doc) => doc._source?.united?.agent?.policy_id ?? ''); - - const agentPolicies = - (await endpointAppContext.service - .getAgentPolicyService() - ?.getByIds(context.core.savedObjects.client, agentPolicyIds)) ?? []; - - const agentPoliciesMap: Record = agentPolicies.reduce( - (acc, agentPolicy) => ({ - ...acc, - [agentPolicy.id]: { - ...agentPolicy, - }, - }), - {} - ); - - const endpointPoliciesMap: Record = endpointPolicies.reduce( - (acc, packagePolicy) => ({ - ...acc, - [packagePolicy.policy_id]: packagePolicy, - }), - {} - ); - - const hosts = docs - .filter((doc) => { - const { endpoint: metadata, agent } = doc?._source?.united ?? {}; - return metadata && agent; - }) - .map((doc) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const { endpoint: metadata, agent } = doc!._source!.united!; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const agentPolicy = agentPoliciesMap[agent.policy_id!]; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const endpointPolicy = endpointPoliciesMap[agent.policy_id!]; - const fleetAgentStatus = getAgentStatus(agent as Agent); - - return { - metadata, - host_status: fleetAgentStatusToEndpointHostStatus(fleetAgentStatus), - policy_info: { - agent: { - applied: { - id: agent.policy_id || '', - revision: agent.policy_revision || 0, - }, - configured: { - id: agentPolicy?.id || '', - revision: agentPolicy?.revision || 0, - }, - }, - endpoint: { - id: endpointPolicy?.id || '', - revision: endpointPolicy?.revision || 0, - }, - }, - } as HostInfo; - }); - - const unitedQueryResponse: HostResultList = { - request_page_size: unitedIndexQuery.size, - request_page_index: unitedIndexQuery.from, - total: (docsCount as SearchTotalHits).value, - hosts, - }; - - return { - unitedIndexExists: true, - unitedQueryResponse, - }; -} diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index 7c2e5de928484..c0be1c7530cb4 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -34,7 +34,10 @@ import { import { createMockConfig } from '../../../lib/detection_engine/routes/__mocks__'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { Agent, ElasticsearchAssetType } from '../../../../../fleet/common/types/models'; -import { legacyMetadataSearchResponse, unitedMetadataSearchResponse } from './support/test_support'; +import { + legacyMetadataSearchResponseMock, + unitedMetadataSearchResponseMock, +} from './support/test_support'; import { PackageService } from '../../../../../fleet/server/services'; import { HOST_METADATA_LIST_ROUTE, @@ -76,6 +79,9 @@ describe('test endpoint route', () => { let mockAgentService: Required< ReturnType >['agentService']; + let mockAgentPolicyService: Required< + ReturnType + >['agentPolicyService']; let endpointAppContextService: EndpointAppContextService; let startContract: EndpointAppContextServiceStartContract; const noUnenrolledAgent = { @@ -138,6 +144,7 @@ describe('test endpoint route', () => { endpointAppContextService.setup(createMockEndpointAppContextServiceSetupContract()); endpointAppContextService.start({ ...startContract, packageService: mockPackageService }); mockAgentService = startContract.agentService!; + mockAgentPolicyService = startContract.agentPolicyService!; registerEndpointRoutes(routerMock, { logFactory: loggingSystemMock.create(), @@ -151,7 +158,7 @@ describe('test endpoint route', () => { it('should fallback to legacy index if index not found', async () => { const mockRequest = httpServerMock.createKibanaRequest({}); - const response = legacyMetadataSearchResponse( + const response = legacyMetadataSearchResponseMock( new EndpointDocGenerator().generateHostMetadata() ); (mockScopedClient.asCurrentUser.search as jest.Mock) @@ -195,7 +202,7 @@ describe('test endpoint route', () => { page_size: 10, }, { - page_index: 1, + page_index: 0, }, ], @@ -208,13 +215,13 @@ describe('test endpoint route', () => { mockAgentService.getAgentStatusById = jest.fn().mockReturnValue('error'); mockAgentService.listAgents = jest.fn().mockReturnValue(noUnenrolledAgent); + mockAgentPolicyService.getByIds = jest.fn().mockResolvedValueOnce([]); const metadata = new EndpointDocGenerator().generateHostMetadata(); const esSearchMock = mockScopedClient.asCurrentUser.search as jest.Mock; - esSearchMock.mockImplementationOnce(() => - Promise.resolve({ - body: unitedMetadataSearchResponse(metadata), - }) - ); + esSearchMock.mockResolvedValueOnce({}); + esSearchMock.mockResolvedValueOnce({ + body: unitedMetadataSearchResponseMock(metadata), + }); [routeConfig, routeHandler] = routerMock.post.mock.calls.find(([{ path }]) => path.startsWith(`${HOST_METADATA_LIST_ROUTE}`) )!; @@ -225,9 +232,11 @@ describe('test endpoint route', () => { mockResponse ); - expect(esSearchMock).toHaveBeenCalledTimes(1); + expect(esSearchMock).toHaveBeenCalledTimes(2); expect(esSearchMock.mock.calls[0][0]?.index).toEqual(METADATA_UNITED_INDEX); - expect(esSearchMock.mock.calls[0][0]?.body?.query).toEqual({ + expect(esSearchMock.mock.calls[0][0]?.size).toEqual(1); + expect(esSearchMock.mock.calls[1][0]?.index).toEqual(METADATA_UNITED_INDEX); + expect(esSearchMock.mock.calls[1][0]?.body?.query).toEqual({ bool: { must: [ { @@ -363,7 +372,7 @@ describe('test endpoint route', () => { expect(endpointResultList.hosts.length).toEqual(1); expect(endpointResultList.hosts[0].metadata).toEqual(metadata); expect(endpointResultList.total).toEqual(1); - expect(endpointResultList.request_page_index).toEqual(10); + expect(endpointResultList.request_page_index).toEqual(0); expect(endpointResultList.request_page_size).toEqual(10); }); }); @@ -412,7 +421,7 @@ describe('test endpoint route', () => { it('test find the latest of all endpoints', async () => { const mockRequest = httpServerMock.createKibanaRequest({}); - const response = legacyMetadataSearchResponse( + const response = legacyMetadataSearchResponseMock( new EndpointDocGenerator().generateHostMetadata() ); (mockScopedClient.asCurrentUser.search as jest.Mock) @@ -466,7 +475,9 @@ describe('test endpoint route', () => { }) .mockImplementationOnce(() => Promise.resolve({ - body: legacyMetadataSearchResponse(new EndpointDocGenerator().generateHostMetadata()), + body: legacyMetadataSearchResponseMock( + new EndpointDocGenerator().generateHostMetadata() + ), }) ); [routeConfig, routeHandler] = routerMock.post.mock.calls.find(([{ path }]) => @@ -526,7 +537,9 @@ describe('test endpoint route', () => { }) .mockImplementationOnce(() => Promise.resolve({ - body: legacyMetadataSearchResponse(new EndpointDocGenerator().generateHostMetadata()), + body: legacyMetadataSearchResponseMock( + new EndpointDocGenerator().generateHostMetadata() + ), }) ); [routeConfig, routeHandler] = routerMock.post.mock.calls.find(([{ path }]) => @@ -602,7 +615,7 @@ describe('test endpoint route', () => { const mockRequest = httpServerMock.createKibanaRequest({ params: { id: 'BADID' } }); (mockScopedClient.asCurrentUser.search as jest.Mock).mockImplementationOnce(() => - Promise.resolve({ body: legacyMetadataSearchResponse() }) + Promise.resolve({ body: legacyMetadataSearchResponseMock() }) ); mockAgentService.getAgentStatusById = jest.fn().mockReturnValue('error'); @@ -630,7 +643,7 @@ describe('test endpoint route', () => { }); it('should return a single endpoint with status healthy', async () => { - const response = legacyMetadataSearchResponse( + const response = legacyMetadataSearchResponseMock( new EndpointDocGenerator().generateHostMetadata() ); const mockRequest = httpServerMock.createKibanaRequest({ @@ -666,7 +679,7 @@ describe('test endpoint route', () => { }); it('should return a single endpoint with status unhealthy when AgentService throw 404', async () => { - const response = legacyMetadataSearchResponse( + const response = legacyMetadataSearchResponseMock( new EndpointDocGenerator().generateHostMetadata() ); @@ -703,7 +716,7 @@ describe('test endpoint route', () => { }); it('should return a single endpoint with status unhealthy when status is not offline, online or enrolling', async () => { - const response = legacyMetadataSearchResponse( + const response = legacyMetadataSearchResponseMock( new EndpointDocGenerator().generateHostMetadata() ); @@ -741,7 +754,7 @@ describe('test endpoint route', () => { }); it('should throw error when endpoint agent is not active', async () => { - const response = legacyMetadataSearchResponse( + const response = legacyMetadataSearchResponseMock( new EndpointDocGenerator().generateHostMetadata() ); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts index d2ad9831748b3..67a1b16211098 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts @@ -11,7 +11,10 @@ export const expectedCompleteUnitedIndexQuery = { bool: { must_not: { terms: { - 'agent.id': ['test-agent-id'], + 'agent.id': [ + '00000000-0000-0000-0000-000000000000', + '11111111-1111-1111-1111-111111111111', + ], }, }, filter: [ diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts index 46a16e48c7edf..a0cb5aad552d2 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts @@ -16,8 +16,6 @@ import { createMockConfig } from '../../../lib/detection_engine/routes/__mocks__ import { metadataCurrentIndexPattern } from '../../../../common/endpoint/constants'; import { parseExperimentalConfigValue } from '../../../../common/experimental_features'; import { get } from 'lodash'; -import { KibanaRequest } from 'kibana/server'; -import { EndpointAppContext } from '../../types'; import { expectedCompleteUnitedIndexQuery } from './query_builders.fixtures'; describe('query builder', () => { @@ -55,19 +53,6 @@ describe('query builder', () => { }); }); - it('queries for all endpoints when no specific parameters requested', async () => { - const mockRequest = httpServerMock.createKibanaRequest({ - body: {}, - }); - const query = await kibanaRequestToMetadataListESQuery(mockRequest, { - logFactory: loggingSystemMock.create(), - service: new EndpointAppContextService(), - config: () => Promise.resolve(createMockConfig()), - experimentalFeatures: parseExperimentalConfigValue(createMockConfig().enableExperimental), - }); - expect(query.body.query).toHaveProperty('match_all'); - }); - it('excludes unenrolled elastic agents when they exist, by default', async () => { const unenrolledElasticAgentId = '1fdca33f-799f-49f4-939c-ea4383c77672'; const mockRequest = httpServerMock.createKibanaRequest({ @@ -89,8 +74,24 @@ describe('query builder', () => { expect(query.body.query).toEqual({ bool: { must_not: [ - { terms: { 'elastic.agent.id': [unenrolledElasticAgentId] } }, - { terms: { 'HostDetails.elastic.agent.id': [unenrolledElasticAgentId] } }, + { + terms: { + 'elastic.agent.id': [ + '00000000-0000-0000-0000-000000000000', + '11111111-1111-1111-1111-111111111111', + unenrolledElasticAgentId, + ], + }, + }, + { + terms: { + 'HostDetails.elastic.agent.id': [ + '00000000-0000-0000-0000-000000000000', + '11111111-1111-1111-1111-111111111111', + unenrolledElasticAgentId, + ], + }, + }, ], }, }); @@ -154,31 +155,42 @@ describe('query builder', () => { } ); - expect(query.body.query.bool.must).toContainEqual({ - bool: { - must_not: [ - // both of these should exist, since the schema can be *either* - { terms: { 'elastic.agent.id': [unenrolledElasticAgentId] } }, - { terms: { 'HostDetails.elastic.agent.id': [unenrolledElasticAgentId] } }, - ], - }, - }); - expect(query.body.query.bool.must).toContainEqual({ - bool: { - must_not: { - bool: { - should: [ - { - match: { - 'host.ip': '10.140.73.246', - }, + expect(query.body.query.bool.must).toEqual([ + { + bool: { + must_not: [ + { + terms: { + 'elastic.agent.id': [ + '00000000-0000-0000-0000-000000000000', + '11111111-1111-1111-1111-111111111111', + '1fdca33f-799f-49f4-939c-ea4383c77672', + ], }, - ], - minimum_should_match: 1, + }, + { + terms: { + 'HostDetails.elastic.agent.id': [ + '00000000-0000-0000-0000-000000000000', + '11111111-1111-1111-1111-111111111111', + '1fdca33f-799f-49f4-939c-ea4383c77672', + ], + }, + }, + ], + }, + }, + { + bool: { + must_not: { + bool: { + minimum_should_match: 1, + should: [{ match: { 'host.ip': '10.140.73.246' } }], + }, }, }, }, - }); + ]); } ); }); @@ -209,24 +221,18 @@ describe('query builder', () => { }); describe('buildUnitedIndexQuery', () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let mockRequest: KibanaRequest; - let mockEndpointAppContext: EndpointAppContext; - const filters = { kql: '', host_status: [] }; - beforeEach(() => { - mockRequest = httpServerMock.createKibanaRequest({ body: { filters } }); - mockEndpointAppContext = { - logFactory: loggingSystemMock.create(), - service: new EndpointAppContextService(), - config: () => Promise.resolve(createMockConfig()), - experimentalFeatures: parseExperimentalConfigValue(createMockConfig().enableExperimental), - }; - }); - it('correctly builds empty query', async () => { - const query = await buildUnitedIndexQuery(mockRequest, mockEndpointAppContext, [], []); + const query = await buildUnitedIndexQuery({ page: 1, pageSize: 10, filters: {} }, []); const expected = { bool: { + must_not: { + terms: { + 'agent.id': [ + '00000000-0000-0000-0000-000000000000', + '11111111-1111-1111-1111-111111111111', + ], + }, + }, filter: [ { terms: { @@ -257,15 +263,16 @@ describe('query builder', () => { }); it('correctly builds query', async () => { - mockRequest.body.filters.kql = 'united.endpoint.host.os.name : *'; - mockRequest.body.filters.host_status = ['healthy']; - const ignoredAgentIds: string[] = ['test-agent-id']; - const endpointPolicyIds: string[] = ['test-endpoint-policy-id']; const query = await buildUnitedIndexQuery( - mockRequest, - mockEndpointAppContext, - ignoredAgentIds, - endpointPolicyIds + { + page: 1, + pageSize: 10, + filters: { + kql: 'united.endpoint.host.os.name : *', + host_status: ['healthy'], + }, + }, + ['test-endpoint-policy-id'] ); const expected = expectedCompleteUnitedIndexQuery; expect(query.body.query).toEqual(expected); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts index 8f10bc79bc0ff..73325a92a3324 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts @@ -12,9 +12,18 @@ import { METADATA_UNITED_INDEX, } from '../../../../common/endpoint/constants'; import { KibanaRequest } from '../../../../../../../src/core/server'; -import { EndpointAppContext } from '../../types'; +import { EndpointAppContext, GetHostMetadataListQuery } from '../../types'; import { buildStatusesKuery } from './support/agent_status'; +/** + * 00000000-0000-0000-0000-000000000000 is initial Elastic Agent id sent by Endpoint before policy is configured + * 11111111-1111-1111-1111-111111111111 is Elastic Agent id sent by Endpoint when policy does not contain an id + */ +const IGNORED_ELASTIC_AGENT_IDS = [ + '00000000-0000-0000-0000-000000000000', + '11111111-1111-1111-1111-111111111111', +]; + export interface QueryBuilderOptions { unenrolledAgentIds?: string[]; statusAgentIds?: string[]; @@ -53,7 +62,7 @@ export async function kibanaRequestToMetadataListESQuery( body: { query: buildQueryBody( request, - queryBuilderOptions?.unenrolledAgentIds, + IGNORED_ELASTIC_AGENT_IDS.concat(queryBuilderOptions?.unenrolledAgentIds ?? []), queryBuilderOptions?.statusAgentIds ), track_total_hits: true, @@ -65,7 +74,7 @@ export async function kibanaRequestToMetadataListESQuery( }; } -async function getPagingProperties( +export async function getPagingProperties( // eslint-disable-next-line @typescript-eslint/no-explicit-any request: KibanaRequest, endpointAppContext: EndpointAppContext @@ -82,7 +91,7 @@ async function getPagingProperties( } return { pageSize: pagingProperties.page_size || config.endpointResultListDefaultPageSize, - pageIndex: pagingProperties.page_index || config.endpointResultListDefaultFirstPageIndex, + pageIndex: pagingProperties.page_index ?? config.endpointResultListDefaultFirstPageIndex, }; } @@ -214,24 +223,26 @@ export function getESQueryHostMetadataByIDs(agentIDs: string[]) { }; } +interface BuildUnitedIndexQueryResponse { + body: { + query: Record; + track_total_hits: boolean; + sort: estypes.SearchSortContainer[]; + }; + from: number; + size: number; + index: string; +} export async function buildUnitedIndexQuery( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - request: KibanaRequest, - endpointAppContext: EndpointAppContext, - ignoredAgentIds: string[] | undefined, + { page = 1, pageSize = 10, filters = {} }: GetHostMetadataListQuery, endpointPolicyIds: string[] = [] - // eslint-disable-next-line @typescript-eslint/no-explicit-any -): Promise> { - const pagingProperties = await getPagingProperties(request, endpointAppContext); - const statusesToFilter = request?.body?.filters?.host_status ?? []; +): Promise { + const statusesToFilter = filters?.host_status ?? []; const statusesKuery = buildStatusesKuery(statusesToFilter); - const filterIgnoredAgents = - ignoredAgentIds && ignoredAgentIds.length > 0 - ? { - must_not: { terms: { 'agent.id': ignoredAgentIds } }, - } - : null; + const filterIgnoredAgents = { + must_not: { terms: { 'agent.id': IGNORED_ELASTIC_AGENT_IDS } }, + }; const filterEndpointPolicyAgents = { filter: [ // must contain an endpoint policy id @@ -259,20 +270,16 @@ export async function buildUnitedIndexQuery( }, }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let query: Record = - filterIgnoredAgents || filterEndpointPolicyAgents - ? idFilter - : { - match_all: {}, - }; + let query: BuildUnitedIndexQueryResponse['body']['query'] = idFilter; - if (statusesKuery || request?.body?.filters?.kql) { - const kqlQuery = toElasticsearchQuery(fromKueryExpression(request.body.filters.kql)); + if (statusesKuery || filters?.kql) { + const kqlQuery = toElasticsearchQuery(fromKueryExpression(filters.kql ?? '')); const q = []; + if (filterIgnoredAgents || filterEndpointPolicyAgents) { q.push(idFilter); } + if (statusesKuery) { q.push(toElasticsearchQuery(fromKueryExpression(statusesKuery))); } @@ -288,8 +295,8 @@ export async function buildUnitedIndexQuery( track_total_hits: true, sort: MetadataSortMethod, }, - from: pagingProperties.pageIndex * pagingProperties.pageSize, - size: pagingProperties.pageSize, + from: (page - 1) * pageSize, + size: pageSize, index: METADATA_UNITED_INDEX, }; } diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts index 2ffcc06915e73..6f8a0f83bf846 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts @@ -6,10 +6,11 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { Agent } from '../../../../../../fleet/common'; import { METADATA_UNITED_INDEX } from '../../../../../common/endpoint/constants'; import { HostMetadata, UnitedAgentMetadata } from '../../../../../common/endpoint/types'; -export function legacyMetadataSearchResponse( +export function legacyMetadataSearchResponseMock( hostMetadata?: HostMetadata ): estypes.SearchResponse { return { @@ -44,8 +45,9 @@ export function legacyMetadataSearchResponse( } as unknown as estypes.SearchResponse; } -export function unitedMetadataSearchResponse( - hostMetadata?: HostMetadata +export function unitedMetadataSearchResponseMock( + hostMetadata: HostMetadata = {} as HostMetadata, + agent: Agent = {} as Agent ): estypes.SearchResponse { return { took: 15, @@ -73,7 +75,9 @@ export function unitedMetadataSearchResponse( id: 'test-agent-id', }, united: { - agent: {}, + agent: { + ...agent, + }, endpoint: { ...hostMetadata, }, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts index c175fedda388e..d3cc7b32bbc1c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts @@ -12,18 +12,28 @@ import { import { elasticsearchServiceMock } from '../../../../../../../src/core/server/mocks'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ElasticsearchClientMock } from '../../../../../../../src/core/server/elasticsearch/client/mocks'; -import { legacyMetadataSearchResponse } from '../../routes/metadata/support/test_support'; +import { + legacyMetadataSearchResponseMock, + unitedMetadataSearchResponseMock, +} from '../../routes/metadata/support/test_support'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { getESQueryHostMetadataByFleetAgentIds } from '../../routes/metadata/query_builders'; +import { + getESQueryHostMetadataByFleetAgentIds, + buildUnitedIndexQuery, +} from '../../routes/metadata/query_builders'; import { EndpointError } from '../../errors'; import { HostMetadata } from '../../../../common/endpoint/types'; +import { Agent } from '../../../../../fleet/common'; +import { AgentPolicyServiceInterface } from '../../../../../fleet/server/services'; describe('EndpointMetadataService', () => { let testMockedContext: EndpointMetadataServiceTestContextMock; let metadataService: EndpointMetadataServiceTestContextMock['endpointMetadataService']; let esClient: ElasticsearchClientMock; + let endpointDocGenerator: EndpointDocGenerator; beforeEach(() => { + endpointDocGenerator = new EndpointDocGenerator('seed'); testMockedContext = createEndpointMetadataServiceTestContextMock(); metadataService = testMockedContext.endpointMetadataService; esClient = elasticsearchServiceMock.createScopedClusterClient().asInternalUser; @@ -35,10 +45,10 @@ describe('EndpointMetadataService', () => { beforeEach(() => { fleetAgentIds = ['one', 'two']; - endpointMetadataDoc = new EndpointDocGenerator().generateHostMetadata(); + endpointMetadataDoc = endpointDocGenerator.generateHostMetadata(); esClient.search.mockReturnValue( elasticsearchServiceMock.createSuccessTransportRequestPromise( - legacyMetadataSearchResponse(endpointMetadataDoc) + legacyMetadataSearchResponseMock(endpointMetadataDoc) ) ); }); @@ -66,4 +76,133 @@ describe('EndpointMetadataService', () => { expect(response).toEqual([endpointMetadataDoc]); }); }); + + describe('#doesUnitedIndexExist', () => { + it('should return true if united index found', async () => { + const esMockResponse = elasticsearchServiceMock.createSuccessTransportRequestPromise( + unitedMetadataSearchResponseMock() + ); + esClient.search.mockResolvedValue(esMockResponse); + const doesIndexExist = await metadataService.doesUnitedIndexExist(esClient); + + expect(doesIndexExist).toEqual(true); + }); + + it('should return false if united index not found', async () => { + const esMockResponse = elasticsearchServiceMock.createErrorTransportRequestPromise({ + meta: { body: { error: { type: 'index_not_found_exception' } } }, + }); + esClient.search.mockResolvedValue(esMockResponse); + const doesIndexExist = await metadataService.doesUnitedIndexExist(esClient); + + expect(doesIndexExist).toEqual(false); + }); + + it('should throw wrapped error if es error other than index not found', async () => { + const esMockResponse = elasticsearchServiceMock.createErrorTransportRequestPromise({}); + esClient.search.mockResolvedValue(esMockResponse); + const response = metadataService.doesUnitedIndexExist(esClient); + await expect(response).rejects.toThrow(EndpointError); + }); + }); + + describe('#getHostMetadataList', () => { + let agentPolicyServiceMock: jest.Mocked; + + beforeEach(() => { + agentPolicyServiceMock = testMockedContext.agentPolicyService; + esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; + }); + + it('should throw wrapped error if es error', async () => { + const esMockResponse = elasticsearchServiceMock.createErrorTransportRequestPromise({}); + esClient.search.mockResolvedValue(esMockResponse); + const metadataListResponse = metadataService.getHostMetadataList(esClient); + await expect(metadataListResponse).rejects.toThrow(EndpointError); + }); + + it('should correctly list HostMetadata', async () => { + const policyId = 'test-agent-policy-id'; + const packagePolicies = [ + Object.assign(endpointDocGenerator.generatePolicyPackagePolicy(), { + id: 'test-package-policy-id', + policy_id: policyId, + revision: 1, + }), + ]; + const packagePolicyIds = packagePolicies.map((policy) => policy.policy_id); + const agentPolicies = [ + Object.assign(endpointDocGenerator.generateAgentPolicy(), { + id: policyId, + revision: 2, + package_policies: packagePolicies, + }), + ]; + const agentPolicyIds = agentPolicies.map((policy) => policy.id); + const endpointMetadataDoc = endpointDocGenerator.generateHostMetadata(); + const mockAgent = { + policy_id: agentPolicies[0].id, + policy_revision: agentPolicies[0].revision, + } as unknown as Agent; + const mockDoc = unitedMetadataSearchResponseMock(endpointMetadataDoc, mockAgent); + const esMockResponse = await elasticsearchServiceMock.createSuccessTransportRequestPromise( + mockDoc + ); + + esClient.search.mockResolvedValue(esMockResponse); + agentPolicyServiceMock.getByIds.mockResolvedValue(agentPolicies); + testMockedContext.packagePolicyService.list.mockImplementation( + async (_, { page, perPage }) => { + const response = { + items: packagePolicies, + page: page ?? 1, + total: packagePolicies.length, + perPage: packagePolicies.length, + }; + + if ((page ?? 1) > 1) { + response.items = []; + } + + return response; + } + ); + + const metadataListResponse = await metadataService.getHostMetadataList(esClient); + const unitedIndexQuery = await buildUnitedIndexQuery( + { page: 1, pageSize: 10, filters: {} }, + packagePolicyIds + ); + + expect(esClient.search).toBeCalledWith(unitedIndexQuery); + expect(agentPolicyServiceMock.getByIds).toBeCalledWith(expect.anything(), agentPolicyIds); + expect(metadataListResponse).toEqual({ + pageSize: 10, + page: 1, + total: 1, + data: [ + { + metadata: endpointMetadataDoc, + host_status: 'inactive', + policy_info: { + agent: { + applied: { + id: mockAgent.policy_id, + revision: mockAgent.policy_revision, + }, + configured: { + id: agentPolicies[0].id, + revision: agentPolicies[0].revision, + }, + }, + endpoint: { + id: packagePolicies[0].id, + revision: packagePolicies[0].revision, + }, + }, + }, + ], + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts index 23c21e431a344..be8a6625c111e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts @@ -11,22 +11,34 @@ import { SavedObjectsClientContract, SavedObjectsServiceStart, } from 'kibana/server'; -import { HostInfo, HostMetadata } from '../../../../common/endpoint/types'; + +import { TransportResult } from '@elastic/elasticsearch'; +import { SearchTotalHits, SearchResponse } from '@elastic/elasticsearch/lib/api/types'; +import { + HostInfo, + HostMetadata, + MaybeImmutable, + PolicyData, + UnitedAgentMetadata, +} from '../../../../common/endpoint/types'; import { Agent, AgentPolicy, PackagePolicy } from '../../../../../fleet/common'; import { AgentNotFoundError, AgentPolicyServiceInterface, AgentService, + PackagePolicyServiceInterface, } from '../../../../../fleet/server'; import { EndpointHostNotFoundError, EndpointHostUnEnrolledError, FleetAgentNotFoundError, FleetAgentPolicyNotFoundError, + FleetEndpointPackagePolicyNotFoundError, } from './errors'; import { getESQueryHostMetadataByFleetAgentIds, getESQueryHostMetadataByID, + buildUnitedIndexQuery, } from '../../routes/metadata/query_builders'; import { queryResponseToHostListResult, @@ -40,11 +52,28 @@ import { } from '../../utils'; import { EndpointError } from '../../errors'; import { createInternalReadonlySoClient } from '../../utils/create_internal_readonly_so_client'; +import { GetHostMetadataListQuery } from '../../types'; +import { METADATA_UNITED_INDEX } from '../../../../common/endpoint/constants'; +import { getAllEndpointPackagePolicies } from '../../routes/metadata/support/endpoint_package_policies'; +import { getAgentStatus } from '../../../../../fleet/common/services/agent_status'; type AgentPolicyWithPackagePolicies = Omit & { package_policies: PackagePolicy[]; }; +const isAgentPolicyWithPackagePolicies = ( + agentPolicy: AgentPolicy | AgentPolicyWithPackagePolicies +): agentPolicy is AgentPolicyWithPackagePolicies => { + if ( + agentPolicy.package_policies.length === 0 || + typeof agentPolicy.package_policies[0] !== 'string' + ) { + return true; + } + + return false; +}; + export class EndpointMetadataService { /** * For internal use only by the `this.DANGEROUS_INTERNAL_SO_CLIENT` @@ -56,6 +85,7 @@ export class EndpointMetadataService { private savedObjectsStart: SavedObjectsServiceStart, private readonly agentService: AgentService, private readonly agentPolicyService: AgentPolicyServiceInterface, + private readonly packagePolicyService: PackagePolicyServiceInterface, private readonly logger?: Logger ) {} @@ -161,52 +191,119 @@ export class EndpointMetadataService { ); } - // ------------------------------------------------------------------------------ - // Any failures in enriching the Host form this point should NOT cause an error - // ------------------------------------------------------------------------------ - try { - let fleetAgentPolicy: AgentPolicyWithPackagePolicies | undefined; - let endpointPackagePolicy: PackagePolicy | undefined; - - // Get Agent Policy and Endpoint Package Policy - if (fleetAgent) { - try { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - fleetAgentPolicy = await this.getFleetAgentPolicy(fleetAgent.policy_id!); - endpointPackagePolicy = fleetAgentPolicy.package_policies.find( - (policy) => policy.package?.name === 'endpoint' + return this.enrichHostMetadata(esClient, endpointMetadata, fleetAgent); + } + + /** + * Enriches a host metadata document with data from fleet + * @param esClient + * @param endpointMetadata + * @param _fleetAgent + * @param _fleetAgentPolicy + * @param _endpointPackagePolicy + * @private + */ + // eslint-disable-next-line complexity + private async enrichHostMetadata( + esClient: ElasticsearchClient, + endpointMetadata: HostMetadata, + /** + * If undefined, it will be retrieved from Fleet using the ID in the endpointMetadata. + * If passing in an `Agent` record that was retrieved from the Endpoint Unified transform index, + * ensure that its `.status` property is properly set to the calculated value done by + * fleet `getAgentStatus()` method. + */ + _fleetAgent?: MaybeImmutable, + /** If undefined, it will be retrieved from Fleet using data from the endpointMetadata */ + _fleetAgentPolicy?: + | MaybeImmutable + | MaybeImmutable, + /** If undefined, it will be retrieved from Fleet using the ID in the endpointMetadata */ + _endpointPackagePolicy?: MaybeImmutable + ): Promise { + let fleetAgentId = endpointMetadata.elastic.agent.id; + // casting below is done only to remove `immutable<>` from the object if they are defined as such + let fleetAgent = _fleetAgent as Agent | undefined; + let fleetAgentPolicy = _fleetAgentPolicy as + | AgentPolicy + | AgentPolicyWithPackagePolicies + | undefined; + let endpointPackagePolicy = _endpointPackagePolicy as PackagePolicy | undefined; + + if (!fleetAgent) { + try { + if (!fleetAgentId) { + fleetAgentId = endpointMetadata.agent.id; + this.logger?.warn( + new EndpointError( + `Missing elastic fleet agent id on Endpoint Metadata doc - using Endpoint agent.id instead: ${fleetAgentId}` + ) ); - } catch (error) { - this.logger?.error(error); + } + + fleetAgent = await this.getFleetAgent(esClient, fleetAgentId); + } catch (error) { + if (error instanceof FleetAgentNotFoundError) { + this.logger?.warn(`agent with id ${fleetAgentId} not found`); + } else { + throw error; } } + } - return { - metadata: endpointMetadata, - host_status: fleetAgent - ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - fleetAgentStatusToEndpointHostStatus(fleetAgent.status!) - : DEFAULT_ENDPOINT_HOST_STATUS, - policy_info: { - agent: { - applied: { - revision: fleetAgent?.policy_revision ?? 0, - id: fleetAgent?.policy_id ?? '', - }, - configured: { - revision: fleetAgentPolicy?.revision ?? 0, - id: fleetAgentPolicy?.id ?? '', - }, + if (!fleetAgentPolicy && fleetAgent) { + try { + fleetAgentPolicy = await this.getFleetAgentPolicy(fleetAgent.policy_id ?? ''); + } catch (error) { + this.logger?.error(error); + } + } + + // The fleetAgentPolicy might have the endpoint policy in the `package_policies`, lets check that first + if ( + !endpointPackagePolicy && + fleetAgentPolicy && + isAgentPolicyWithPackagePolicies(fleetAgentPolicy) + ) { + endpointPackagePolicy = fleetAgentPolicy.package_policies.find( + (policy) => policy.package?.name === 'endpoint' + ); + } + + // if we still don't have an endpoint package policy, try retrieving it from fleet + if (!endpointPackagePolicy) { + try { + endpointPackagePolicy = await this.getFleetEndpointPackagePolicy( + endpointMetadata.Endpoint.policy.applied.id + ); + } catch (error) { + this.logger?.error(error); + } + } + + return { + metadata: endpointMetadata, + host_status: fleetAgent + ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + fleetAgentStatusToEndpointHostStatus(fleetAgent.status!) + : DEFAULT_ENDPOINT_HOST_STATUS, + policy_info: { + agent: { + applied: { + revision: fleetAgent?.policy_revision ?? 0, + id: fleetAgent?.policy_id ?? '', }, - endpoint: { - revision: endpointPackagePolicy?.revision ?? 0, - id: endpointPackagePolicy?.id ?? '', + configured: { + revision: fleetAgentPolicy?.revision ?? 0, + id: fleetAgentPolicy?.id ?? '', }, }, - }; - } catch (error) { - throw wrapErrorIfNeeded(error); - } + endpoint: { + revision: endpointPackagePolicy?.revision ?? 0, + id: endpointPackagePolicy?.id ?? '', + }, + }, + }; } /** @@ -247,4 +344,139 @@ export class EndpointMetadataService { `Fleet agent policy with id ${agentPolicyId} not found` ); } + + /** + * Retrieve an endpoint policy from fleet + * @param endpointPolicyId + * @throws + */ + async getFleetEndpointPackagePolicy(endpointPolicyId: string): Promise { + const endpointPackagePolicy = await this.packagePolicyService + .get(this.DANGEROUS_INTERNAL_SO_CLIENT, endpointPolicyId) + .catch(catchAndWrapError); + + if (!endpointPackagePolicy) { + throw new FleetEndpointPackagePolicyNotFoundError( + `Fleet endpoint package policy with id ${endpointPolicyId} not found` + ); + } + + return endpointPackagePolicy as PolicyData; + } + + /** + * Returns whether the united metadata index exists + * + * @param esClient + * + * @throws + */ + async doesUnitedIndexExist(esClient: ElasticsearchClient): Promise { + try { + await esClient.search({ + index: METADATA_UNITED_INDEX, + size: 1, + }); + return true; + } catch (error) { + const errorType = error?.meta?.body?.error?.type ?? ''; + // only index not found is expected + if (errorType !== 'index_not_found_exception') { + const err = wrapErrorIfNeeded(error); + this.logger?.error(err); + throw err; + } + } + + return false; + } + + /** + * Retrieve list of host metadata. Only supports new united index. + * + * @param esClient + * @param queryOptions + * + * @throws + */ + async getHostMetadataList( + esClient: ElasticsearchClient, + queryOptions: GetHostMetadataListQuery = {} + ): Promise<{ data: HostInfo[]; total: number; page: number; pageSize: number }> { + const endpointPolicies = await getAllEndpointPackagePolicies( + this.packagePolicyService, + this.DANGEROUS_INTERNAL_SO_CLIENT + ); + const endpointPolicyIds = endpointPolicies.map((policy) => policy.policy_id); + const unitedIndexQuery = await buildUnitedIndexQuery(queryOptions, endpointPolicyIds); + + let unitedMetadataQueryResponse: TransportResult, unknown>; + + try { + unitedMetadataQueryResponse = await esClient.search(unitedIndexQuery); + } catch (error) { + const err = wrapErrorIfNeeded(error); + this.logger?.error(err); + throw err; + } + + const { hits: docs, total: docsCount } = unitedMetadataQueryResponse?.body?.hits || {}; + const agentPolicyIds: string[] = docs.map((doc) => doc._source?.united?.agent?.policy_id ?? ''); + + const agentPolicies = + (await this.agentPolicyService + .getByIds(this.DANGEROUS_INTERNAL_SO_CLIENT, agentPolicyIds) + .catch(catchAndWrapError)) ?? []; + + const agentPoliciesMap: Record = agentPolicies.reduce( + (acc, agentPolicy) => ({ + ...acc, + [agentPolicy.id]: { + ...agentPolicy, + }, + }), + {} + ); + + const endpointPoliciesMap: Record = endpointPolicies.reduce( + (acc, packagePolicy) => ({ + ...acc, + [packagePolicy.policy_id]: packagePolicy, + }), + {} + ); + + const hosts: HostInfo[] = []; + + for (const doc of docs) { + const { endpoint: metadata, agent: _agent } = doc?._source?.united ?? {}; + + if (metadata && _agent) { + // `_agent: Agent` here is the record stored in the unified index, whose `status` **IS NOT** the + // calculated status returned by the normal fleet API/Service. So lets calculated it before + // passing this on to other methods that expect an `Agent` type + const agent: typeof _agent = { + ..._agent, + // Casting below necessary to remove `Immutable<>` from the type + status: getAgentStatus(_agent as Agent), + }; + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const agentPolicy = agentPoliciesMap[agent.policy_id!]; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const endpointPolicy = endpointPoliciesMap[agent.policy_id!]; + + hosts.push( + await this.enrichHostMetadata(esClient, metadata, agent, agentPolicy, endpointPolicy) + ); + } + } + + return { + data: hosts, + pageSize: unitedIndexQuery.size, + page: unitedIndexQuery.from + 1, + total: (docsCount as unknown as SearchTotalHits).value, + }; + } } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/errors.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/errors.ts index f61ad79a4c92b..c825211fede2d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/errors.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/errors.ts @@ -16,3 +16,5 @@ export class EndpointHostUnEnrolledError extends EndpointError {} export class FleetAgentNotFoundError extends NotFoundError {} export class FleetAgentPolicyNotFoundError extends NotFoundError {} + +export class FleetEndpointPackagePolicyNotFoundError extends NotFoundError {} diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts index 147d8e11b567c..166f834500927 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts @@ -11,9 +11,23 @@ import { savedObjectsServiceMock } from '../../../../../../../src/core/server/mo import { createMockAgentPolicyService, createMockAgentService, + createPackagePolicyServiceMock, } from '../../../../../fleet/server/mocks'; import { AgentPolicyServiceInterface, AgentService } from '../../../../../fleet/server'; +const createCustomizedPackagePolicyService = () => { + const service = createPackagePolicyServiceMock(); + service.list.mockImplementation(async (_, options) => { + return { + items: [], + total: 0, + page: options.page ?? 1, + perPage: options.perPage ?? 10, + }; + }); + return service; +}; + /** * Endpoint Metadata Service test context. Includes an instance of `EndpointMetadataService` along with the * dependencies that were used to initialize that instance. @@ -22,24 +36,30 @@ export interface EndpointMetadataServiceTestContextMock { savedObjectsStart: jest.Mocked; agentService: jest.Mocked; agentPolicyService: jest.Mocked; + packagePolicyService: ReturnType; endpointMetadataService: EndpointMetadataService; } export const createEndpointMetadataServiceTestContextMock = ( savedObjectsStart: jest.Mocked = savedObjectsServiceMock.createStartContract(), agentService: jest.Mocked = createMockAgentService(), - agentPolicyService: jest.Mocked = createMockAgentPolicyService() + agentPolicyService: jest.Mocked = createMockAgentPolicyService(), + packagePolicyService: ReturnType< + typeof createPackagePolicyServiceMock + > = createCustomizedPackagePolicyService() ): EndpointMetadataServiceTestContextMock => { const endpointMetadataService = new EndpointMetadataService( savedObjectsStart, agentService, - agentPolicyService + agentPolicyService, + packagePolicyService ); return { savedObjectsStart, agentService, agentPolicyService, + packagePolicyService, endpointMetadataService, }; }; diff --git a/x-pack/plugins/security_solution/server/endpoint/types.ts b/x-pack/plugins/security_solution/server/endpoint/types.ts index bc52b759b9f0a..919e62785f698 100644 --- a/x-pack/plugins/security_solution/server/endpoint/types.ts +++ b/x-pack/plugins/security_solution/server/endpoint/types.ts @@ -7,10 +7,12 @@ import { LoggerFactory } from 'kibana/server'; +import { TypeOf } from '@kbn/config-schema'; import { ConfigType } from '../config'; import { EndpointAppContextService } from './endpoint_app_context_services'; import { HostMetadata } from '../../common/endpoint/types'; import { ExperimentalFeatures } from '../../common/experimental_features'; +import { endpointFilters } from './routes/metadata'; /** * The context for Endpoint apps. @@ -35,3 +37,11 @@ export interface HostQueryResult { resultLength: number; result: HostMetadata | undefined; } + +// FIXME: when new Host Metadata list API is created (and existing one deprecated - 8.0?), move this type out of here and created it from Schema +export interface GetHostMetadataListQuery { + /* page number 1 based - not an index */ + page?: number; + pageSize?: number; + filters?: Partial>; +} diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 843bd0ed7019d..87f0ed7193a67 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -405,6 +405,8 @@ export class Plugin implements ISecuritySolutionPlugin { plugins.fleet?.agentService!, // eslint-disable-next-line @typescript-eslint/no-non-null-assertion plugins.fleet?.agentPolicyService!, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + plugins.fleet?.packagePolicyService!, logger ), security: plugins.security, diff --git a/x-pack/test/security_solution_endpoint_api_int/apis/data_stream_helper.ts b/x-pack/test/security_solution_endpoint_api_int/apis/data_stream_helper.ts index f848d4bf418e9..dc4b4113c6b11 100644 --- a/x-pack/test/security_solution_endpoint_api_int/apis/data_stream_helper.ts +++ b/x-pack/test/security_solution_endpoint_api_int/apis/data_stream_helper.ts @@ -6,6 +6,7 @@ */ import { Client } from '@elastic/elasticsearch'; +import { AGENTS_INDEX } from '../../../plugins/fleet/common'; import { metadataIndexPattern, eventsIndexPattern, @@ -14,6 +15,7 @@ import { metadataCurrentIndexPattern, telemetryIndexPattern, METADATA_UNITED_INDEX, + METADATA_DATASTREAM, } from '../../../plugins/security_solution/common/endpoint/constants'; export function deleteDataStream(getService: (serviceName: 'es') => Client, index: string) { @@ -41,7 +43,7 @@ export async function deleteAllDocsFromIndex( match_all: {}, }, }, - index: `${index}`, + index, wait_for_completion: true, refresh: true, }, @@ -60,8 +62,10 @@ export async function deleteMetadataStream(getService: (serviceName: 'es') => Cl await deleteDataStream(getService, metadataIndexPattern); } -export async function deleteAllDocsFromMetadataIndex(getService: (serviceName: 'es') => Client) { - await deleteAllDocsFromIndex(getService, metadataIndexPattern); +export async function deleteAllDocsFromMetadataDatastream( + getService: (serviceName: 'es') => Client +) { + await deleteAllDocsFromIndex(getService, METADATA_DATASTREAM); } export async function deleteAllDocsFromMetadataCurrentIndex( @@ -92,6 +96,10 @@ export async function deleteTelemetryStream(getService: (serviceName: 'es') => C await deleteDataStream(getService, telemetryIndexPattern); } +export function deleteAllDocsFromFleetAgents(getService: (serviceName: 'es') => Client) { + return deleteAllDocsFromIndex(getService, AGENTS_INDEX); +} + export function stopTransform(getService: (serviceName: 'es') => Client, transformId: string) { const client = getService('es'); const stopRequest = { @@ -102,3 +110,32 @@ export function stopTransform(getService: (serviceName: 'es') => Client, transfo }; return client.transform.stopTransform(stopRequest); } + +export async function startTransform( + getService: (serviceName: 'es') => Client, + transformId: string +) { + const client = getService('es'); + const transformsResponse = await client.transform.getTransform({ + transform_id: `${transformId}*`, + }); + return transformsResponse.transforms.map((transform) => { + const t = transform as unknown as { id: string }; + return client.transform.startTransform({ transform_id: t.id }); + }); +} + +export function bulkIndex( + getService: (serviceName: 'es') => Client, + index: string, + docs: unknown[] +) { + const body = docs.flatMap((doc) => [{ create: { _index: index } }, doc]); + const client = getService('es'); + + return client.bulk({ + index, + refresh: true, + body, + }); +} diff --git a/x-pack/test/security_solution_endpoint_api_int/apis/metadata.fixtures.ts b/x-pack/test/security_solution_endpoint_api_int/apis/metadata.fixtures.ts new file mode 100644 index 0000000000000..281ba95d8e0cb --- /dev/null +++ b/x-pack/test/security_solution_endpoint_api_int/apis/metadata.fixtures.ts @@ -0,0 +1,571 @@ +/* + * 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 function generateAgentDocs(timestamp: number, policyId: string) { + return [ + { + access_api_key_id: 'w4zJBHwBfQcM6aSYIRjO', + action_seq_no: [-1], + active: true, + agent: { + id: '963b081e-60d1-482c-befd-a5815fa8290f', + version: '8.0.0', + }, + enrolled_at: timestamp, + local_metadata: { + elastic: { + agent: { + 'build.original': + '8.0.0-SNAPSHOT (build: 0ee910f4df6653dc9557090946b392533621c2a3 at 2021-09-15 04:59:01 +0000 UTC)', + id: '963b081e-60d1-482c-befd-a5815fa8290f', + log_level: 'info', + snapshot: true, + upgradeable: false, + version: '8.0.0', + }, + }, + host: { + architecture: 'x86_64', + hostname: 'cf83e321af8a', + id: 'e57bde2886b8bb9f91f9143c3b123e98', + ip: ['127.0.0.1/8', '172.17.0.2/16'], + mac: ['02:42:ac:11:00:02'], + name: 'cf83e321af8a', + }, + os: { + family: 'redhat', + full: 'CentOS Linux Core(7 (Core))', + kernel: '5.10.47-linuxkit', + name: 'CentOS Linux', + platform: 'centos', + version: '7 (Core)', + }, + }, + policy_id: policyId, + type: 'PERMANENT', + default_api_key: 'x4zJBHwBfQcM6aSYYxiY:hhIFN3vSTGWFft7z0MbAhQ', + policy_output_permissions_hash: + 'cf54971b4d01d194757802052525463fe2f52ffaaf37755c9ab94fdd43c76e9c', + default_api_key_id: 'x4zJBHwBfQcM6aSYYxiY', + policy_revision_idx: 1, + policy_coordinator_idx: 1, + updated_at: timestamp, + last_checkin_status: 'online', + last_checkin: timestamp, + }, + { + access_api_key_id: 'w4zJBHwBfQcM6aSYIRjO', + action_seq_no: [-1], + active: true, + agent: { + id: '3838df35-a095-4af4-8fce-0b6d78793f2e', + version: '8.0.0', + }, + enrolled_at: timestamp, + local_metadata: { + elastic: { + agent: { + 'build.original': + '8.0.0-SNAPSHOT (build: 0ee910f4df6653dc9557090946b392533621c2a3 at 2021-09-15 04:59:01 +0000 UTC)', + id: '3838df35-a095-4af4-8fce-0b6d78793f2e', + log_level: 'info', + snapshot: true, + upgradeable: false, + version: '8.0.0', + }, + }, + host: { + architecture: 'x86_64', + hostname: 'cf83e321af8a', + id: 'e57bde2886b8bb9f91f9143c3b123e98', + ip: ['127.0.0.1/8', '172.17.0.2/16'], + mac: ['02:42:ac:11:00:02'], + name: 'cf83e321af8a', + }, + os: { + family: 'Windows', + full: 'Windows Server 2016', + kernel: '5.10.47-linuxkit', + name: 'windows 10.0', + platform: 'Windows', + version: '10.0', + }, + }, + policy_id: policyId, + type: 'PERMANENT', + default_api_key: 'x4zJBHwBfQcM6aSYYxiY:hhIFN3vSTGWFft7z0MbAhQ', + policy_output_permissions_hash: + 'cf54971b4d01d194757802052525463fe2f52ffaaf37755c9ab94fdd43c76e9c', + default_api_key_id: 'x4zJBHwBfQcM6aSYYxiY', + policy_revision_idx: 1, + policy_coordinator_idx: 1, + updated_at: timestamp, + last_checkin_status: 'online', + last_checkin: timestamp, + }, + ]; +} + +export function generateMetadataDocs(timestamp: number) { + return [ + { + '@timestamp': timestamp, + agent: { + id: '963b081e-60d1-482c-befd-a5815fa8290f', + version: '6.6.1', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '11488bae-880b-4e7b-8d28-aac2aa9de816', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'Default', + id: 'C2A9093E-E289-4C0A-AA44-8C32A414FA7A', + status: 'failure', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d14', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + architecture: 'x86', + hostname: 'cadmann-4.example.com', + name: 'cadmann-4.example.com', + id: '1fb3e58f-6ab0-4406-9d2a-91911207a712', + ip: ['10.192.213.130', '10.70.28.129'], + mac: ['a9-71-6a-cc-93-85', 'f7-31-84-d3-21-68', '2-95-12-39-ca-71'], + os: { + full: 'Windows 10', + name: 'windows 10.0', + platform: 'Windows', + family: 'Windows', + version: '10.0', + Ext: { + variant: 'Windows Pro', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: 'b3412d6f-b022-4448-8fee-21cc936ea86b', + version: '6.0.0', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '92ac1ce0-e1f7-409e-8af6-f17e97b1fc71', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'Default', + id: 'C2A9093E-E289-4C0A-AA44-8C32A414FA7A', + status: 'success', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d15', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + architecture: 'x86_64', + hostname: 'thurlow-9.example.com', + name: 'thurlow-9.example.com', + id: '2f735e3d-be14-483b-9822-bad06e9045ca', + ip: ['10.46.229.234'], + mac: ['30-8c-45-55-69-b8', 'e5-36-7e-8f-a3-84', '39-a1-37-20-18-74'], + os: { + full: 'Windows Server 2016', + name: 'windows 10.0', + platform: 'Windows', + family: 'Windows', + version: '10.0', + Ext: { + variant: 'Windows Server', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: '3838df35-a095-4af4-8fce-0b6d78793f2e', + version: '6.8.0', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '023fa40c-411d-4188-a941-4147bfadd095', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'Default', + id: '00000000-0000-0000-0000-000000000000', + status: 'failure', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d16', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + hostname: 'rezzani-7.example.com', + name: 'rezzani-7.example.com', + id: 'fc0ff548-feba-41b6-8367-65e8790d0eaf', + ip: ['10.101.149.26', '2606:a000:ffc0:39:11ef:37b9:3371:578c'], + mac: ['e2-6d-f9-0-46-2e'], + os: { + full: 'Windows 10', + name: 'windows 10.0', + platform: 'Windows', + family: 'Windows', + version: '10.0', + Ext: { + variant: 'Windows Pro', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: '963b081e-60d1-482c-befd-a5815fa8290f', + version: '6.6.1', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '11488bae-880b-4e7b-8d28-aac2aa9de816', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'Default', + id: 'C2A9093E-E289-4C0A-AA44-8C32A414FA7A', + status: 'failure', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d18', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + architecture: 'x86', + hostname: 'cadmann-4.example.com', + name: 'cadmann-4.example.com', + id: '1fb3e58f-6ab0-4406-9d2a-91911207a712', + ip: ['10.192.213.130', '10.70.28.129'], + mac: ['a9-71-6a-cc-93-85', 'f7-31-84-d3-21-68', '2-95-12-39-ca-71'], + os: { + full: 'Windows Server 2016', + name: 'windows 10.0', + platform: 'Windows', + family: 'Windows', + version: '10.0', + Ext: { + variant: 'Windows Server 2016', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: 'b3412d6f-b022-4448-8fee-21cc936ea86b', + version: '6.0.0', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '92ac1ce0-e1f7-409e-8af6-f17e97b1fc71', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'Default', + id: 'C2A9093E-E289-4C0A-AA44-8C32A414FA7A', + status: 'success', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d19', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + hostname: 'thurlow-9.example.com', + name: 'thurlow-9.example.com', + id: '2f735e3d-be14-483b-9822-bad06e9045ca', + ip: ['10.46.229.234'], + mac: ['30-8c-45-55-69-b8', 'e5-36-7e-8f-a3-84', '39-a1-37-20-18-74'], + os: { + full: 'Windows Server 2012', + name: 'windows 6.2', + platform: 'Windows', + family: 'Windows', + version: '6.2', + Ext: { + variant: 'Windows Server 2012', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: '3838df35-a095-4af4-8fce-0b6d78793f2e', + version: '6.8.0', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '023fa40c-411d-4188-a941-4147bfadd095', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'With Eventing', + id: '00000000-0000-0000-0000-000000000000', + status: 'failure', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d39', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + architecture: 'x86', + hostname: 'rezzani-7.example.com', + name: 'rezzani-7.example.com', + id: 'fc0ff548-feba-41b6-8367-65e8790d0eaf', + ip: ['10.101.149.26', '2606:a000:ffc0:39:11ef:37b9:3371:578c'], + mac: ['e2-6d-f9-0-46-2e'], + os: { + full: 'Windows Server 2012', + name: 'windows 6.2', + platform: 'Windows', + family: 'Windows', + version: '6.2', + Ext: { + variant: 'Windows Server 2012', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: '963b081e-60d1-482c-befd-a5815fa8290f', + version: '6.6.1', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '11488bae-880b-4e7b-8d28-aac2aa9de816', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'With Eventing', + id: '00000000-0000-0000-0000-000000000000', + status: 'failure', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d31', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + hostname: 'cadmann-4.example.com', + name: 'cadmann-4.example.com', + id: '1fb3e58f-6ab0-4406-9d2a-91911207a712', + ip: ['10.192.213.130', '10.70.28.129'], + mac: ['a9-71-6a-cc-93-85', 'f7-31-84-d3-21-68', '2-95-12-39-ca-71'], + os: { + full: 'Windows Server 2012R2', + name: 'windows 6.3', + platform: 'Windows', + family: 'Windows', + version: '6.3', + Ext: { + variant: 'Windows Server 2012 R2', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: 'b3412d6f-b022-4448-8fee-21cc936ea86b', + version: '6.0.0', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '92ac1ce0-e1f7-409e-8af6-f17e97b1fc71', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'Default', + id: 'C2A9093E-E289-4C0A-AA44-8C32A414FA7A', + status: 'success', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d23', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + hostname: 'thurlow-9.example.com', + name: 'thurlow-9.example.com', + id: '2f735e3d-be14-483b-9822-bad06e9045ca', + ip: ['10.46.229.234'], + mac: ['30-8c-45-55-69-b8', 'e5-36-7e-8f-a3-84', '39-a1-37-20-18-74'], + os: { + full: 'Windows Server 2012R2', + name: 'windows 6.3', + platform: 'Windows', + family: 'Windows', + version: '6.3', + Ext: { + variant: 'Windows Server 2012 R2', + }, + }, + }, + }, + { + '@timestamp': timestamp, + agent: { + id: '3838df35-a095-4af4-8fce-0b6d78793f2e', + version: '6.8.0', + name: 'Elastic Endpoint', + }, + elastic: { + agent: { + id: '023fa40c-411d-4188-a941-4147bfadd095', + }, + }, + Endpoint: { + status: 'enrolled', + policy: { + applied: { + name: 'With Eventing', + id: '00000000-0000-0000-0000-000000000000', + status: 'success', + }, + }, + }, + event: { + created: timestamp, + id: '32f5fda2-48e4-4fae-b89e-a18038294d35', + kind: 'metric', + category: ['host'], + type: ['info'], + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', + }, + host: { + architecture: 'x86', + hostname: 'rezzani-7.example.com', + name: 'rezzani-7.example.com', + id: 'fc0ff548-feba-41b6-8367-65e8790d0eaf', + ip: ['10.101.149.26', '2606:a000:ffc0:39:11ef:37b9:3371:578c'], + mac: ['e2-6d-f9-0-46-2e'], + os: { + full: 'Windows Server 2012', + name: 'windows 6.2', + version: '6.2', + platform: 'Windows', + family: 'Windows', + Ext: { + variant: 'Windows Server 2012', + }, + }, + }, + }, + ]; +} diff --git a/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts b/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts index afdc364ffd970..35e316f309d7f 100644 --- a/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts +++ b/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts @@ -9,25 +9,289 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../ftr_provider_context'; import { deleteAllDocsFromMetadataCurrentIndex, - deleteAllDocsFromMetadataIndex, + deleteAllDocsFromMetadataDatastream, deleteMetadataStream, deleteIndex, stopTransform, + startTransform, + deleteAllDocsFromFleetAgents, + deleteAllDocsFromIndex, + bulkIndex, } from './data_stream_helper'; import { + METADATA_DATASTREAM, HOST_METADATA_LIST_ROUTE, METADATA_UNITED_INDEX, METADATA_UNITED_TRANSFORM, } from '../../../plugins/security_solution/common/endpoint/constants'; +import { AGENTS_INDEX } from '../../../plugins/fleet/common'; +import { generateAgentDocs, generateMetadataDocs } from './metadata.fixtures'; +import { indexFleetEndpointPolicy } from '../../../plugins/security_solution/common/endpoint/data_loaders/index_fleet_endpoint_policy'; export default function ({ getService }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); describe('test metadata api', () => { - // TODO add this after endpoint package changes are merged and in snapshot - // describe('with .metrics-endpoint.metadata_united_default index', () => { - // }); + describe('with .metrics-endpoint.metadata_united_default index', () => { + const numberOfHostsInFixture = 2; + + before(async () => { + await stopTransform(getService, `${METADATA_UNITED_TRANSFORM}*`); + await deleteAllDocsFromFleetAgents(getService); + await deleteAllDocsFromMetadataDatastream(getService); + await deleteAllDocsFromMetadataCurrentIndex(getService); + await deleteAllDocsFromIndex(getService, METADATA_UNITED_INDEX); + + // generate an endpoint policy and attach id to agents since + // metadata list api filters down to endpoint policies only + const policy = await indexFleetEndpointPolicy( + getService('kibanaServer'), + 'Default', + '1.1.1' + ); + const policyId = policy.integrationPolicies[0].policy_id; + const currentTime = new Date().getTime(); + + await Promise.all([ + bulkIndex(getService, AGENTS_INDEX, generateAgentDocs(currentTime, policyId)), + bulkIndex(getService, METADATA_DATASTREAM, generateMetadataDocs(currentTime)), + ]); + + // wait for latest metadata transform to run + await new Promise((r) => setTimeout(r, 30000)); + await startTransform(getService, METADATA_UNITED_TRANSFORM); + + // wait for united metadata transform to run + await new Promise((r) => setTimeout(r, 15000)); + }); + + after(async () => { + await deleteAllDocsFromFleetAgents(getService); + await deleteAllDocsFromMetadataDatastream(getService); + await deleteAllDocsFromMetadataCurrentIndex(getService); + await stopTransform(getService, `${METADATA_UNITED_TRANSFORM}*`); + await deleteAllDocsFromIndex(getService, METADATA_UNITED_INDEX); + }); + + it('should return one entry for each host with default paging', async () => { + const res = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send() + .expect(200); + const { body } = res; + expect(body.total).to.eql(numberOfHostsInFixture); + expect(body.hosts.length).to.eql(numberOfHostsInFixture); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(0); + }); + + it('metadata api should return page based on paging properties passed.', async () => { + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + paging_properties: [ + { + page_size: 1, + }, + { + page_index: 1, + }, + ], + }) + .expect(200); + expect(body.total).to.eql(numberOfHostsInFixture); + expect(body.hosts.length).to.eql(1); + expect(body.request_page_size).to.eql(1); + expect(body.request_page_index).to.eql(1); + }); + + it('metadata api should return accurate total metadata if page index produces no result', async () => { + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + paging_properties: [ + { + page_size: 10, + }, + { + page_index: 3, + }, + ], + }) + .expect(200); + expect(body.total).to.eql(numberOfHostsInFixture); + expect(body.hosts.length).to.eql(0); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(30); + }); + + it('metadata api should return 400 when pagingProperties is below boundaries.', async () => { + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + paging_properties: [ + { + page_size: 0, + }, + { + page_index: 1, + }, + ], + }) + .expect(400); + expect(body.message).to.contain('Value must be equal to or greater than [1]'); + }); + + it('metadata api should return page based on filters passed.', async () => { + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + filters: { + kql: 'not (united.endpoint.host.ip:10.101.149.26)', + }, + }) + .expect(200); + expect(body.total).to.eql(1); + expect(body.hosts.length).to.eql(1); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(0); + }); + + it('metadata api should return page based on filters and paging passed.', async () => { + const notIncludedIp = '10.101.149.26'; + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + paging_properties: [ + { + page_size: 10, + }, + { + page_index: 0, + }, + ], + filters: { + kql: `not (united.endpoint.host.ip:${notIncludedIp})`, + }, + }) + .expect(200); + expect(body.total).to.eql(1); + const resultIps: string[] = [].concat( + ...body.hosts.map((hostInfo: Record) => hostInfo.metadata.host.ip) + ); + expect(resultIps.sort()).to.eql(['10.192.213.130', '10.70.28.129'].sort()); + expect(resultIps).not.include.eql(notIncludedIp); + expect(body.hosts.length).to.eql(1); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(0); + }); + + it('metadata api should return page based on host.os.Ext.variant filter.', async () => { + const variantValue = 'Windows Pro'; + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + filters: { + kql: `united.endpoint.host.os.Ext.variant:${variantValue}`, + }, + }) + .expect(200); + expect(body.total).to.eql(2); + const resultOsVariantValue: Set = new Set( + body.hosts.map((hostInfo: Record) => hostInfo.metadata.host.os.Ext.variant) + ); + expect(Array.from(resultOsVariantValue)).to.eql([variantValue]); + expect(body.hosts.length).to.eql(2); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(0); + }); + + it('metadata api should return the latest event for all the events for an endpoint', async () => { + const targetEndpointIp = '10.101.149.26'; + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + filters: { + kql: `united.endpoint.host.ip:${targetEndpointIp}`, + }, + }) + .expect(200); + expect(body.total).to.eql(1); + const resultIp: string = body.hosts[0].metadata.host.ip.filter( + (ip: string) => ip === targetEndpointIp + ); + expect(resultIp).to.eql([targetEndpointIp]); + expect(body.hosts.length).to.eql(1); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(0); + }); + + it('metadata api should return the latest event for all the events where policy status is not success', async () => { + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + filters: { + kql: `not (united.endpoint.Endpoint.policy.applied.status:success)`, + }, + }) + .expect(200); + const statuses: Set = new Set( + body.hosts.map( + (hostInfo: Record) => hostInfo.metadata.Endpoint.policy.applied.status + ) + ); + expect(statuses.size).to.eql(1); + expect(Array.from(statuses)).to.eql(['failure']); + }); + + it('metadata api should return the endpoint based on the elastic agent id, and status should be healthy', async () => { + const targetEndpointId = 'fc0ff548-feba-41b6-8367-65e8790d0eaf'; + const targetElasticAgentId = '023fa40c-411d-4188-a941-4147bfadd095'; + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + filters: { + kql: `united.endpoint.elastic.agent.id:${targetElasticAgentId}`, + }, + }) + .expect(200); + expect(body.total).to.eql(1); + const resultHostId: string = body.hosts[0].metadata.host.id; + const resultElasticAgentId: string = body.hosts[0].metadata.elastic.agent.id; + expect(resultHostId).to.eql(targetEndpointId); + expect(resultElasticAgentId).to.eql(targetElasticAgentId); + expect(body.hosts[0].host_status).to.eql('healthy'); + expect(body.hosts.length).to.eql(1); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(0); + }); + + it('metadata api should return all hosts when filter is empty string', async () => { + const { body } = await supertest + .post(HOST_METADATA_LIST_ROUTE) + .set('kbn-xsrf', 'xxx') + .send({ + filters: { + kql: '', + }, + }) + .expect(200); + expect(body.total).to.eql(numberOfHostsInFixture); + expect(body.hosts.length).to.eql(numberOfHostsInFixture); + expect(body.request_page_size).to.eql(10); + expect(body.request_page_index).to.eql(0); + }); + }); describe('with metrics-endpoint.metadata_current_default index', () => { /** @@ -40,10 +304,10 @@ export default function ({ getService }: FtrProviderContext) { await stopTransform(getService, `${METADATA_UNITED_TRANSFORM}*`); await deleteIndex(getService, METADATA_UNITED_INDEX); await deleteMetadataStream(getService); - await deleteAllDocsFromMetadataIndex(getService); + await deleteAllDocsFromMetadataDatastream(getService); await deleteAllDocsFromMetadataCurrentIndex(getService); const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send() .expect(200); @@ -55,30 +319,26 @@ export default function ({ getService }: FtrProviderContext) { }); describe(`POST ${HOST_METADATA_LIST_ROUTE} when index is not empty`, () => { + const timestamp = new Date().getTime(); before(async () => { // stop the united transform and delete the index // otherwise it won't hit metrics-endpoint.metadata_current_default index await stopTransform(getService, `${METADATA_UNITED_TRANSFORM}*`); await deleteIndex(getService, METADATA_UNITED_INDEX); - await esArchiver.load( - 'x-pack/test/functional/es_archives/endpoint/metadata/api_feature', - { - useCreate: true, - } - ); + await bulkIndex(getService, METADATA_DATASTREAM, generateMetadataDocs(timestamp)); // wait for transform - await new Promise((r) => setTimeout(r, 120000)); + await new Promise((r) => setTimeout(r, 60000)); }); // the endpoint uses data streams and es archiver does not support deleting them at the moment so we need // to do it manually after(async () => { await deleteMetadataStream(getService); - await deleteAllDocsFromMetadataIndex(getService); + await deleteAllDocsFromMetadataDatastream(getService); await deleteAllDocsFromMetadataCurrentIndex(getService); }); it('metadata api should return one entry for each host with default paging', async () => { const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send() .expect(200); @@ -90,7 +350,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return page based on paging properties passed.', async () => { const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ paging_properties: [ @@ -114,7 +374,7 @@ export default function ({ getService }: FtrProviderContext) { */ it('metadata api should return accurate total metadata if page index produces no result', async () => { const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ paging_properties: [ @@ -135,7 +395,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return 400 when pagingProperties is below boundaries.', async () => { const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ paging_properties: [ @@ -153,7 +413,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return page based on filters passed.', async () => { const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ filters: { @@ -170,7 +430,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return page based on filters and paging passed.', async () => { const notIncludedIp = '10.46.229.234'; const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ paging_properties: [ @@ -207,7 +467,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return page based on host.os.Ext.variant filter.', async () => { const variantValue = 'Windows Pro'; const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ filters: { @@ -228,7 +488,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return the latest event for all the events for an endpoint', async () => { const targetEndpointIp = '10.46.229.234'; const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ filters: { @@ -241,7 +501,7 @@ export default function ({ getService }: FtrProviderContext) { (ip: string) => ip === targetEndpointIp ); expect(resultIp).to.eql([targetEndpointIp]); - expect(body.hosts[0].metadata.event.created).to.eql(1634656952181); + expect(body.hosts[0].metadata.event.created).to.eql(timestamp); expect(body.hosts.length).to.eql(1); expect(body.request_page_size).to.eql(10); expect(body.request_page_index).to.eql(0); @@ -249,7 +509,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return the latest event for all the events where policy status is not success', async () => { const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ filters: { @@ -270,7 +530,7 @@ export default function ({ getService }: FtrProviderContext) { const targetEndpointId = 'fc0ff548-feba-41b6-8367-65e8790d0eaf'; const targetElasticAgentId = '023fa40c-411d-4188-a941-4147bfadd095'; const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ filters: { @@ -283,7 +543,7 @@ export default function ({ getService }: FtrProviderContext) { const resultElasticAgentId: string = body.hosts[0].metadata.elastic.agent.id; expect(resultHostId).to.eql(targetEndpointId); expect(resultElasticAgentId).to.eql(targetElasticAgentId); - expect(body.hosts[0].metadata.event.created).to.eql(1634656952181); + expect(body.hosts[0].metadata.event.created).to.eql(timestamp); expect(body.hosts[0].host_status).to.eql('unhealthy'); expect(body.hosts.length).to.eql(1); expect(body.request_page_size).to.eql(10); @@ -292,7 +552,7 @@ export default function ({ getService }: FtrProviderContext) { it('metadata api should return all hosts when filter is empty string', async () => { const { body } = await supertest - .post(`${HOST_METADATA_LIST_ROUTE}`) + .post(HOST_METADATA_LIST_ROUTE) .set('kbn-xsrf', 'xxx') .send({ filters: { From 7fea4933967323e8ae216b074b7d2f715168136d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 12 Nov 2021 00:04:42 +0000 Subject: [PATCH 09/23] chore(NA): upgrades @microsoft-api-* deps to most recent version (#118382) * chore(NA): upgrades @microsoft-api-* deps to most recent version * chore(NA): update docs Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- ...kibana-plugin-core-public.app.deeplinks.md | 1 - ...ibana-plugin-core-public.app.exactroute.md | 1 - .../public/kibana-plugin-core-public.app.md | 31 +-- .../kibana-plugin-core-public.app.updater_.md | 1 - .../kibana-plugin-core-public.appcategory.md | 10 +- ...lugin-core-public.appleaveconfirmaction.md | 8 +- ...lugin-core-public.appleavedefaultaction.md | 2 +- ...n-core-public.applicationsetup.register.md | 4 +- ...lic.applicationsetup.registerappupdater.md | 5 +- ...re-public.applicationstart.geturlforapp.md | 6 +- ...ana-plugin-core-public.applicationstart.md | 6 +- ...e-public.applicationstart.navigatetoapp.md | 6 +- ...e-public.applicationstart.navigatetourl.md | 5 +- ...e-public.appmountparameters.appbasepath.md | 2 - ...-core-public.appmountparameters.history.md | 2 - ...a-plugin-core-public.appmountparameters.md | 10 +- ...re-public.appmountparameters.onappleave.md | 1 - ....appmountparameters.setheaderactionmenu.md | 1 - ...kibana-plugin-core-public.appnavoptions.md | 8 +- .../kibana-plugin-core-public.asyncplugin.md | 4 +- ...na-plugin-core-public.asyncplugin.setup.md | 6 +- ...na-plugin-core-public.asyncplugin.start.md | 6 +- ...ana-plugin-core-public.asyncplugin.stop.md | 2 +- .../kibana-plugin-core-public.capabilities.md | 6 +- .../kibana-plugin-core-public.chromebadge.md | 6 +- ...lugin-core-public.chromedoctitle.change.md | 5 +- ...ibana-plugin-core-public.chromedoctitle.md | 2 - ...plugin-core-public.chromedoctitle.reset.md | 2 +- ...-plugin-core-public.chromehelpextension.md | 6 +- ...ublic.chromehelpextensionmenucustomlink.md | 7 +- ...blic.chromehelpextensionmenudiscusslink.md | 5 +- ...hromehelpextensionmenudocumentationlink.md | 5 +- ...ublic.chromehelpextensionmenugithublink.md | 7 +- ...ana-plugin-core-public.chromenavcontrol.md | 4 +- ...na-plugin-core-public.chromenavcontrols.md | 1 - ...public.chromenavcontrols.registercenter.md | 4 +- ...e-public.chromenavcontrols.registerleft.md | 4 +- ...-public.chromenavcontrols.registerright.md | 4 +- ...kibana-plugin-core-public.chromenavlink.md | 24 +-- ...links.enableforcedappswitchernavigation.md | 2 +- ...a-plugin-core-public.chromenavlinks.get.md | 4 +- ...lugin-core-public.chromenavlinks.getall.md | 2 +- ...navlinks.getforceappswitchernavigation_.md | 2 +- ...core-public.chromenavlinks.getnavlinks_.md | 2 +- ...a-plugin-core-public.chromenavlinks.has.md | 4 +- ...-core-public.chromerecentlyaccessed.add.md | 9 +- ...-core-public.chromerecentlyaccessed.get.md | 3 +- ...core-public.chromerecentlyaccessed.get_.md | 3 +- ...ublic.chromerecentlyaccessedhistoryitem.md | 6 +- ...lugin-core-public.chromestart.getbadge_.md | 2 +- ...core-public.chromestart.getbreadcrumbs_.md | 2 +- ...omestart.getbreadcrumbsappendextension_.md | 2 +- ...re-public.chromestart.getcustomnavlink_.md | 2 +- ...re-public.chromestart.gethelpextension_.md | 2 +- ...ublic.chromestart.getisnavdrawerlocked_.md | 2 +- ...n-core-public.chromestart.getisvisible_.md | 2 +- ...ore-public.chromestart.hasheaderbanner_.md | 2 +- .../kibana-plugin-core-public.chromestart.md | 10 +- ...plugin-core-public.chromestart.setbadge.md | 4 +- ...-core-public.chromestart.setbreadcrumbs.md | 4 +- ...romestart.setbreadcrumbsappendextension.md | 4 +- ...ore-public.chromestart.setcustomnavlink.md | 4 +- ...core-public.chromestart.setheaderbanner.md | 4 +- ...ore-public.chromestart.sethelpextension.md | 4 +- ...re-public.chromestart.sethelpsupporturl.md | 4 +- ...in-core-public.chromestart.setisvisible.md | 4 +- ...ana-plugin-core-public.chromeuserbanner.md | 2 +- .../kibana-plugin-core-public.coresetup.md | 14 +- .../kibana-plugin-core-public.corestart.md | 24 +-- ...in-core-public.deprecationsservicestart.md | 8 +- ...kibana-plugin-core-public.doclinksstart.md | 6 +- ...na-plugin-core-public.errortoastoptions.md | 5 +- ...ibana-plugin-core-public.fatalerrorinfo.md | 4 +- ...ana-plugin-core-public.fatalerrorssetup.md | 4 +- ...ana-plugin-core-public.httpfetchoptions.md | 13 +- ...in-core-public.httpfetchoptionswithpath.md | 3 +- ...bana-plugin-core-public.httpinterceptor.md | 8 +- ...gin-core-public.httpinterceptor.request.md | 6 +- ...ore-public.httpinterceptor.requesterror.md | 6 +- ...in-core-public.httpinterceptor.response.md | 6 +- ...re-public.httpinterceptor.responseerror.md | 6 +- ...core-public.httpinterceptorrequesterror.md | 4 +- ...ore-public.httpinterceptorresponseerror.md | 5 +- ...bana-plugin-core-public.httprequestinit.md | 26 +-- .../kibana-plugin-core-public.httpresponse.md | 8 +- ...-public.httpsetup.addloadingcountsource.md | 4 +- ...-core-public.httpsetup.getloadingcount_.md | 2 +- ...-plugin-core-public.httpsetup.intercept.md | 4 +- .../kibana-plugin-core-public.httpsetup.md | 22 +-- .../kibana-plugin-core-public.i18nstart.md | 2 +- ...core-public.ianonymouspaths.isanonymous.md | 4 +- ...in-core-public.ianonymouspaths.register.md | 4 +- .../kibana-plugin-core-public.ibasepath.md | 10 +- ...in-core-public.iexternalurl.validateurl.md | 4 +- ...gin-core-public.iexternalurlpolicy.host.md | 1 - ...a-plugin-core-public.iexternalurlpolicy.md | 6 +- ...core-public.iexternalurlpolicy.protocol.md | 1 - ...bana-plugin-core-public.ihttpfetcherror.md | 13 +- ...re-public.ihttpinterceptcontroller.halt.md | 2 +- ...in-core-public.ihttpinterceptcontroller.md | 2 +- ...ublic.ihttpresponseinterceptoroverrides.md | 4 +- ...na-plugin-core-public.iuisettingsclient.md | 22 +-- .../core/public/kibana-plugin-core-public.md | 4 +- ...plugin-core-public.navigatetoappoptions.md | 10 +- ...a-plugin-core-public.notificationssetup.md | 2 +- ...a-plugin-core-public.notificationsstart.md | 2 +- ...gin-core-public.overlaybannersstart.add.md | 6 +- ...public.overlaybannersstart.getcomponent.md | 2 +- ...-core-public.overlaybannersstart.remove.md | 4 +- ...core-public.overlaybannersstart.replace.md | 8 +- ...in-core-public.overlayflyoutopenoptions.md | 20 +- ...gin-core-public.overlayflyoutstart.open.md | 6 +- ...-core-public.overlaymodalconfirmoptions.md | 18 +- ...gin-core-public.overlaymodalopenoptions.md | 8 +- ...ugin-core-public.overlaymodalstart.open.md | 6 +- ...re-public.overlaymodalstart.openconfirm.md | 6 +- ...ana-plugin-core-public.overlayref.close.md | 2 +- .../kibana-plugin-core-public.overlayref.md | 2 +- .../kibana-plugin-core-public.overlaystart.md | 8 +- ... => kibana-plugin-core-public.plugin_2.md} | 10 +- ...bana-plugin-core-public.plugin_2.setup.md} | 10 +- ...bana-plugin-core-public.plugin_2.start.md} | 10 +- ...ibana-plugin-core-public.plugin_2.stop.md} | 6 +- ...in-core-public.plugininitializercontext.md | 6 +- ...n-core-public.resolvedsimplesavedobject.md | 6 +- ...na-plugin-core-public.responseerrorbody.md | 6 +- .../kibana-plugin-core-public.savedobject.md | 22 +-- ...ana-plugin-core-public.savedobjecterror.md | 8 +- ...plugin-core-public.savedobjectreference.md | 6 +- ...-public.savedobjectreferencewithcontext.md | 12 +- ...gin-core-public.savedobjectsbaseoptions.md | 2 +- ...n-core-public.savedobjectsbatchresponse.md | 2 +- ...ore-public.savedobjectsbulkcreateobject.md | 5 +- ...re-public.savedobjectsbulkcreateoptions.md | 2 +- ...re-public.savedobjectsbulkresolveobject.md | 4 +- ...-public.savedobjectsbulkresolveresponse.md | 2 +- ...ore-public.savedobjectsbulkupdateobject.md | 10 +- ...re-public.savedobjectsbulkupdateoptions.md | 2 +- ...re-public.savedobjectsclient.bulkupdate.md | 4 +- ...a-plugin-core-public.savedobjectsclient.md | 16 +- ...n-core-public.savedobjectsclient.update.md | 10 +- ...collectmultinamespacereferencesresponse.md | 2 +- ...n-core-public.savedobjectscreateoptions.md | 10 +- ...gin-core-public.savedobjectsfindoptions.md | 36 ++-- ...public.savedobjectsfindoptionsreference.md | 4 +- ...e-public.savedobjectsfindresponsepublic.md | 9 +- ...savedobjectsimportactionrequiredwarning.md | 8 +- ...avedobjectsimportambiguousconflicterror.md | 4 +- ...-public.savedobjectsimportconflicterror.md | 4 +- ...n-core-public.savedobjectsimportfailure.md | 12 +- ...avedobjectsimportmissingreferenceserror.md | 4 +- ...-core-public.savedobjectsimportresponse.md | 10 +- ...gin-core-public.savedobjectsimportretry.md | 14 +- ...-public.savedobjectsimportsimplewarning.md | 4 +- ...n-core-public.savedobjectsimportsuccess.md | 12 +- ...e-public.savedobjectsimportunknownerror.md | 6 +- ....savedobjectsimportunsupportedtypeerror.md | 2 +- ...core-public.savedobjectsresolveresponse.md | 6 +- ...na-plugin-core-public.savedobjectsstart.md | 2 +- ...n-core-public.savedobjectsupdateoptions.md | 6 +- ...core-public.scopedhistory._constructor_.md | 4 +- ...kibana-plugin-core-public.scopedhistory.md | 25 +-- ...-public.simplesavedobject._constructor_.md | 4 +- ...in-core-public.simplesavedobject.delete.md | 2 +- ...lugin-core-public.simplesavedobject.get.md | 4 +- ...lugin-core-public.simplesavedobject.has.md | 4 +- ...na-plugin-core-public.simplesavedobject.md | 18 +- ...ugin-core-public.simplesavedobject.save.md | 2 +- ...lugin-core-public.simplesavedobject.set.md | 6 +- .../kibana-plugin-core-public.toastoptions.md | 2 +- ...gin-core-public.toastsapi._constructor_.md | 2 +- ...kibana-plugin-core-public.toastsapi.add.md | 4 +- ...-plugin-core-public.toastsapi.adddanger.md | 6 +- ...a-plugin-core-public.toastsapi.adderror.md | 6 +- ...na-plugin-core-public.toastsapi.addinfo.md | 6 +- ...plugin-core-public.toastsapi.addsuccess.md | 6 +- ...plugin-core-public.toastsapi.addwarning.md | 6 +- ...ibana-plugin-core-public.toastsapi.get_.md | 2 +- .../kibana-plugin-core-public.toastsapi.md | 1 + ...ana-plugin-core-public.toastsapi.remove.md | 4 +- ...ana-plugin-core-public.uisettingsparams.md | 28 +-- ...a-plugin-core-public.userprovidedvalues.md | 4 +- .../kibana-plugin-core-server.appcategory.md | 10 +- .../kibana-plugin-core-server.asyncplugin.md | 4 +- ...na-plugin-core-server.asyncplugin.setup.md | 6 +- ...na-plugin-core-server.asyncplugin.start.md | 6 +- ...ana-plugin-core-server.asyncplugin.stop.md | 2 +- ...kibana-plugin-core-server.authenticated.md | 3 +- ...ibana-plugin-core-server.authnothandled.md | 2 +- ...ibana-plugin-core-server.authredirected.md | 3 +- ...plugin-core-server.authredirectedparams.md | 2 +- ...ana-plugin-core-server.authresultparams.md | 6 +- .../kibana-plugin-core-server.authtoolkit.md | 6 +- ...ugin-core-server.basedeprecationdetails.md | 14 +- .../kibana-plugin-core-server.basepath.md | 12 +- .../kibana-plugin-core-server.capabilities.md | 6 +- ...rver.capabilitiessetup.registerprovider.md | 5 +- ...rver.capabilitiessetup.registerswitcher.md | 5 +- ...r.capabilitiesstart.resolvecapabilities.md | 6 +- ...in-core-server.configdeprecationdetails.md | 5 +- ...ver.contextsetup.createcontextcontainer.md | 2 +- .../kibana-plugin-core-server.contextsetup.md | 2 - .../kibana-plugin-core-server.corepreboot.md | 6 +- .../kibana-plugin-core-server.coresetup.md | 26 +-- .../kibana-plugin-core-server.corestart.md | 14 +- .../kibana-plugin-core-server.corestatus.md | 4 +- ...kibana-plugin-core-server.countresponse.md | 4 +- ...plugin-core-server.cspconfig.__private_.md | 11 -- .../kibana-plugin-core-server.cspconfig.md | 12 +- ...n-core-server.customhttpresponseoptions.md | 8 +- ...ugin-core-server.deletedocumentresponse.md | 16 +- ...a-plugin-core-server.deprecationsclient.md | 2 +- ...-plugin-core-server.deprecationsettings.md | 4 +- ...in-core-server.deprecationsservicesetup.md | 3 +- ...ana-plugin-core-server.discoveredplugin.md | 12 +- ...erver.elasticsearchconfig._constructor_.md | 2 +- ...-plugin-core-server.elasticsearchconfig.md | 32 +-- ...-core-server.elasticsearchconfigpreboot.md | 4 +- ...n-core-server.elasticsearcherrordetails.md | 2 +- ...rver.elasticsearchservicepreboot.config.md | 1 - ...lasticsearchservicepreboot.createclient.md | 1 - ...core-server.elasticsearchservicepreboot.md | 4 +- ...n-core-server.elasticsearchservicesetup.md | 2 +- ...server.elasticsearchservicestart.client.md | 1 - ....elasticsearchservicestart.createclient.md | 1 - ...n-core-server.elasticsearchservicestart.md | 6 +- ...gin-core-server.elasticsearchstatusmeta.md | 6 +- ...in-core-server.errorhttpresponseoptions.md | 4 +- ...e-server.eventloopdelaysmonitor.collect.md | 2 +- ...ore-server.eventloopdelaysmonitor.reset.md | 2 +- ...core-server.eventloopdelaysmonitor.stop.md | 2 +- ...erver.executioncontextsetup.withcontext.md | 6 +- .../kibana-plugin-core-server.fakerequest.md | 2 +- ...n-core-server.featuredeprecationdetails.md | 3 +- ...ugin-core-server.getdeprecationscontext.md | 4 +- .../kibana-plugin-core-server.getresponse.md | 18 +- ...=> kibana-plugin-core-server.headers_2.md} | 4 +- .../kibana-plugin-core-server.httpauth.md | 4 +- ...kibana-plugin-core-server.httpresources.md | 2 +- ...-core-server.httpresourcesrenderoptions.md | 2 +- ...core-server.httpresourcesservicetoolkit.md | 8 +- ...-plugin-core-server.httpresponseoptions.md | 6 +- ...ibana-plugin-core-server.httpserverinfo.md | 8 +- ...a-plugin-core-server.httpservicepreboot.md | 7 +- ...erver.httpservicepreboot.registerroutes.md | 7 +- ...re-server.httpservicesetup.createrouter.md | 1 - ...ana-plugin-core-server.httpservicesetup.md | 28 ++- ...ervicesetup.registerroutehandlercontext.md | 1 - ...ana-plugin-core-server.httpservicestart.md | 6 +- ...-core-server.i18nservicesetup.getlocale.md | 2 +- ...er.i18nservicesetup.gettranslationfiles.md | 2 +- ...ibana-plugin-core-server.iclusterclient.md | 4 +- ...-server.icontextcontainer.createhandler.md | 6 +- ...na-plugin-core-server.icontextcontainer.md | 1 - ...erver.icontextcontainer.registercontext.md | 8 +- .../kibana-plugin-core-server.icspconfig.md | 8 +- ...plugin-core-server.icustomclusterclient.md | 3 +- ...erver.iexecutioncontextcontainer.tojson.md | 2 +- ...ver.iexecutioncontextcontainer.tostring.md | 2 +- ...a-plugin-core-server.iexternalurlconfig.md | 2 +- ...gin-core-server.iexternalurlpolicy.host.md | 1 - ...a-plugin-core-server.iexternalurlpolicy.md | 6 +- ...core-server.iexternalurlpolicy.protocol.md | 1 - ...bana-plugin-core-server.ikibanaresponse.md | 6 +- ...server.ikibanasocket.getpeercertificate.md | 4 +- ...rver.ikibanasocket.getpeercertificate_1.md | 4 +- ...rver.ikibanasocket.getpeercertificate_2.md | 4 +- ...n-core-server.ikibanasocket.getprotocol.md | 2 +- ...kibana-plugin-core-server.ikibanasocket.md | 4 +- ...n-core-server.ikibanasocket.renegotiate.md | 4 +- ...na-plugin-core-server.intervalhistogram.md | 16 +- ...ibana-plugin-core-server.irenderoptions.md | 2 +- .../kibana-plugin-core-server.irouter.md | 14 +- ...e-server.isavedobjectspointintimefinder.md | 4 +- ...plugin-core-server.iscopedclusterclient.md | 4 +- ...na-plugin-core-server.iuisettingsclient.md | 20 +- ...core-server.kibanarequest._constructor_.md | 10 +- ...kibana-plugin-core-server.kibanarequest.md | 26 +-- ...-plugin-core-server.kibanarequestevents.md | 4 +- ...a-plugin-core-server.kibanarequestroute.md | 6 +- ...lugin-core-server.kibanaresponsefactory.md | 5 - ...in-core-server.loggercontextconfiginput.md | 4 +- ...re-server.loggingservicesetup.configure.md | 5 +- .../core/server/kibana-plugin-core-server.md | 6 +- ...rver.metricsservicesetup.getopsmetrics_.md | 1 - ...-plugin-core-server.metricsservicesetup.md | 4 +- ...n-core-server.nodesversioncompatibility.md | 12 +- ...na-plugin-core-server.onpostauthtoolkit.md | 2 +- ...ana-plugin-core-server.onpreauthtoolkit.md | 2 +- ...gin-core-server.onpreresponseextensions.md | 2 +- ...na-plugin-core-server.onpreresponseinfo.md | 2 +- ...-plugin-core-server.onpreresponserender.md | 4 +- ...plugin-core-server.onpreresponsetoolkit.md | 4 +- ...-plugin-core-server.onpreroutingtoolkit.md | 4 +- .../kibana-plugin-core-server.opsmetrics.md | 14 +- .../kibana-plugin-core-server.opsosmetrics.md | 18 +- ...na-plugin-core-server.opsprocessmetrics.md | 10 +- ...ana-plugin-core-server.opsservermetrics.md | 6 +- ... => kibana-plugin-core-server.plugin_2.md} | 10 +- ...bana-plugin-core-server.plugin_2.setup.md} | 10 +- ...bana-plugin-core-server.plugin_2.start.md} | 10 +- ...ibana-plugin-core-server.plugin_2.stop.md} | 6 +- ...ugin-core-server.pluginconfigdescriptor.md | 9 +- ...-server.plugininitializercontext.logger.md | 1 - ...in-core-server.plugininitializercontext.md | 8 +- ...ibana-plugin-core-server.pluginmanifest.md | 28 +-- ...kibana-plugin-core-server.prebootplugin.md | 2 +- ...-plugin-core-server.prebootplugin.setup.md | 6 +- ...a-plugin-core-server.prebootplugin.stop.md | 2 +- ...lugin-core-server.prebootservicepreboot.md | 6 +- ...-core-server.registerdeprecationsconfig.md | 2 +- ...ibana-plugin-core-server.requesthandler.md | 1 - ...lugin-core-server.requesthandlercontext.md | 2 +- ...lugin-core-server.requesthandlerwrapper.md | 1 - ...-core-server.resolvecapabilitiesoptions.md | 2 +- .../kibana-plugin-core-server.routeconfig.md | 6 +- ...plugin-core-server.routeconfig.validate.md | 1 - ...a-plugin-core-server.routeconfigoptions.md | 10 +- ...ugin-core-server.routeconfigoptionsbody.md | 8 +- ...rver.routevalidationerror._constructor_.md | 4 +- ...plugin-core-server.routevalidationerror.md | 1 + ...gin-core-server.routevalidationfunction.md | 1 - ...ore-server.routevalidationresultfactory.md | 4 +- ...plugin-core-server.routevalidatorconfig.md | 6 +- ...lugin-core-server.routevalidatoroptions.md | 2 +- .../kibana-plugin-core-server.savedobject.md | 22 +-- ...ore-server.savedobjectexportbaseoptions.md | 10 +- ...core-server.savedobjectmigrationcontext.md | 8 +- ...ugin-core-server.savedobjectmigrationfn.md | 1 - ...gin-core-server.savedobjectmigrationmap.md | 1 - ...plugin-core-server.savedobjectreference.md | 6 +- ...-server.savedobjectreferencewithcontext.md | 12 +- ...gin-core-server.savedobjectsbaseoptions.md | 2 +- ...ore-server.savedobjectsbulkcreateobject.md | 18 +- ...n-core-server.savedobjectsbulkgetobject.md | 8 +- ...re-server.savedobjectsbulkresolveobject.md | 4 +- ...-server.savedobjectsbulkresolveresponse.md | 2 +- ...in-core-server.savedobjectsbulkresponse.md | 2 +- ...ore-server.savedobjectsbulkupdateobject.md | 9 +- ...re-server.savedobjectsbulkupdateoptions.md | 3 +- ...e-server.savedobjectsbulkupdateresponse.md | 2 +- ...server.savedobjectscheckconflictsobject.md | 4 +- ...rver.savedobjectscheckconflictsresponse.md | 2 +- ...re-server.savedobjectsclient.bulkcreate.md | 6 +- ...-core-server.savedobjectsclient.bulkget.md | 6 +- ...e-server.savedobjectsclient.bulkresolve.md | 6 +- ...re-server.savedobjectsclient.bulkupdate.md | 6 +- ...erver.savedobjectsclient.checkconflicts.md | 6 +- ...ver.savedobjectsclient.closepointintime.md | 6 +- ...sclient.collectmultinamespacereferences.md | 6 +- ...n-core-server.savedobjectsclient.create.md | 8 +- ...edobjectsclient.createpointintimefinder.md | 7 +- ...n-core-server.savedobjectsclient.delete.md | 8 +- ...gin-core-server.savedobjectsclient.find.md | 4 +- ...ugin-core-server.savedobjectsclient.get.md | 8 +- ...a-plugin-core-server.savedobjectsclient.md | 4 +- ...vedobjectsclient.openpointintimefortype.md | 6 +- ...r.savedobjectsclient.removereferencesto.md | 8 +- ...-core-server.savedobjectsclient.resolve.md | 8 +- ...n-core-server.savedobjectsclient.update.md | 10 +- ....savedobjectsclient.updateobjectsspaces.md | 10 +- ...erver.savedobjectsclientprovideroptions.md | 4 +- ...server.savedobjectsclientwrapperoptions.md | 6 +- ...er.savedobjectsclosepointintimeresponse.md | 4 +- ...tscollectmultinamespacereferencesobject.md | 4 +- ...scollectmultinamespacereferencesoptions.md | 3 +- ...collectmultinamespacereferencesresponse.md | 2 +- ...n-core-server.savedobjectscreateoptions.md | 19 +- ...ectscreatepointintimefinderdependencies.md | 2 +- ...er.savedobjectsdeletebynamespaceoptions.md | 3 +- ...n-core-server.savedobjectsdeleteoptions.md | 5 +- ...jectserrorhelpers.createbadrequesterror.md | 4 +- ...objectserrorhelpers.createconflicterror.md | 8 +- ...errorhelpers.creategenericnotfounderror.md | 6 +- ...orhelpers.createindexaliasnotfounderror.md | 4 +- ...serrorhelpers.createinvalidversionerror.md | 4 +- ...errorhelpers.createtoomanyrequestserror.md | 6 +- ...errorhelpers.createunsupportedtypeerror.md | 4 +- ...ctserrorhelpers.decoratebadrequesterror.md | 6 +- ...jectserrorhelpers.decorateconflicterror.md | 6 +- ...pers.decorateescannotexecutescripterror.md | 6 +- ...errorhelpers.decorateesunavailableerror.md | 6 +- ...ectserrorhelpers.decorateforbiddenerror.md | 6 +- ...bjectserrorhelpers.decorategeneralerror.md | 6 +- ...helpers.decorateindexaliasnotfounderror.md | 6 +- ...errorhelpers.decoratenotauthorizederror.md | 6 +- ...pers.decoraterequestentitytoolargeerror.md | 6 +- ...rorhelpers.decoratetoomanyrequestserror.md | 6 +- ...edobjectserrorhelpers.isbadrequesterror.md | 4 +- ...avedobjectserrorhelpers.isconflicterror.md | 4 +- ...rorhelpers.isescannotexecutescripterror.md | 4 +- ...bjectserrorhelpers.isesunavailableerror.md | 4 +- ...vedobjectserrorhelpers.isforbiddenerror.md | 4 +- ...savedobjectserrorhelpers.isgeneralerror.md | 4 +- ...jectserrorhelpers.isinvalidversionerror.md | 4 +- ...bjectserrorhelpers.isnotauthorizederror.md | 4 +- ...avedobjectserrorhelpers.isnotfounderror.md | 4 +- ...rorhelpers.isrequestentitytoolargeerror.md | 4 +- ...serrorhelpers.issavedobjectsclienterror.md | 4 +- ...ectserrorhelpers.istoomanyrequestserror.md | 4 +- ...erver.savedobjectsexportbyobjectoptions.md | 3 +- ...-server.savedobjectsexportbytypeoptions.md | 7 +- ...-server.savedobjectsexporter.__private_.md | 11 -- ...rver.savedobjectsexporter._constructor_.md | 2 +- ...er.savedobjectsexporter.exportbyobjects.md | 4 +- ...rver.savedobjectsexporter.exportbytypes.md | 4 +- ...plugin-core-server.savedobjectsexporter.md | 6 - ...r.savedobjectsexporterror._constructor_.md | 6 +- ...edobjectsexporterror.exportsizeexceeded.md | 4 +- ...bjectsexporterror.invalidtransformerror.md | 4 +- ...gin-core-server.savedobjectsexporterror.md | 5 +- ...avedobjectsexporterror.objectfetcherror.md | 4 +- ...objectsexporterror.objecttransformerror.md | 6 +- ...server.savedobjectsexportexcludedobject.md | 6 +- ...-server.savedobjectsexportresultdetails.md | 10 +- ...core-server.savedobjectsexporttransform.md | 2 - ...rver.savedobjectsexporttransformcontext.md | 2 +- ...gin-core-server.savedobjectsfindoptions.md | 36 ++-- ...server.savedobjectsfindoptionsreference.md | 4 +- ...in-core-server.savedobjectsfindresponse.md | 12 +- ...ugin-core-server.savedobjectsfindresult.md | 5 +- ...core-server.savedobjectsfindresult.sort.md | 1 - ...savedobjectsimportactionrequiredwarning.md | 8 +- ...avedobjectsimportambiguousconflicterror.md | 4 +- ...-server.savedobjectsimportconflicterror.md | 4 +- ...-server.savedobjectsimporter.__private_.md | 11 -- ...rver.savedobjectsimporter._constructor_.md | 2 +- ...core-server.savedobjectsimporter.import.md | 4 +- ...plugin-core-server.savedobjectsimporter.md | 6 - ...avedobjectsimporter.resolveimporterrors.md | 4 +- ...edobjectsimporterror.importsizeexceeded.md | 4 +- ...gin-core-server.savedobjectsimporterror.md | 5 +- ...jectsimporterror.nonuniqueimportobjects.md | 4 +- ...simporterror.nonuniqueretrydestinations.md | 4 +- ...bjectsimporterror.nonuniqueretryobjects.md | 4 +- ...objectsimporterror.referencesfetcherror.md | 4 +- ...n-core-server.savedobjectsimportfailure.md | 12 +- ...ore-server.savedobjectsimporthookresult.md | 2 +- ...avedobjectsimportmissingreferenceserror.md | 4 +- ...n-core-server.savedobjectsimportoptions.md | 8 +- ...-core-server.savedobjectsimportresponse.md | 10 +- ...gin-core-server.savedobjectsimportretry.md | 14 +- ...-server.savedobjectsimportsimplewarning.md | 4 +- ...n-core-server.savedobjectsimportsuccess.md | 12 +- ...e-server.savedobjectsimportunknownerror.md | 6 +- ....savedobjectsimportunsupportedtypeerror.md | 2 +- ...erver.savedobjectsincrementcounterfield.md | 4 +- ...ver.savedobjectsincrementcounteroptions.md | 9 +- ...core-server.savedobjectsmigrationlogger.md | 10 +- ...rver.savedobjectsopenpointintimeoptions.md | 6 +- ...ver.savedobjectsopenpointintimeresponse.md | 2 +- ...lugin-core-server.savedobjectspitparams.md | 4 +- ...a-plugin-core-server.savedobjectsrawdoc.md | 8 +- ...e-server.savedobjectsrawdocparseoptions.md | 2 +- ...r.savedobjectsremovereferencestooptions.md | 3 +- ....savedobjectsremovereferencestoresponse.md | 3 +- ...erver.savedobjectsrepository.bulkcreate.md | 6 +- ...e-server.savedobjectsrepository.bulkget.md | 6 +- ...rver.savedobjectsrepository.bulkresolve.md | 6 +- ...erver.savedobjectsrepository.bulkupdate.md | 6 +- ...r.savedobjectsrepository.checkconflicts.md | 6 +- ...savedobjectsrepository.closepointintime.md | 7 +- ...ository.collectmultinamespacereferences.md | 6 +- ...re-server.savedobjectsrepository.create.md | 8 +- ...jectsrepository.createpointintimefinder.md | 7 +- ...re-server.savedobjectsrepository.delete.md | 8 +- ...avedobjectsrepository.deletebynamespace.md | 6 +- ...core-server.savedobjectsrepository.find.md | 4 +- ...-core-server.savedobjectsrepository.get.md | 8 +- ...savedobjectsrepository.incrementcounter.md | 11 +- ...bjectsrepository.openpointintimefortype.md | 7 +- ...vedobjectsrepository.removereferencesto.md | 8 +- ...e-server.savedobjectsrepository.resolve.md | 8 +- ...re-server.savedobjectsrepository.update.md | 10 +- ...edobjectsrepository.updateobjectsspaces.md | 10 +- ...re-server.savedobjectsrepositoryfactory.md | 4 +- ....savedobjectsresolveimporterrorsoptions.md | 8 +- ...core-server.savedobjectsresolveresponse.md | 6 +- ...er.savedobjectsserializer.generaterawid.md | 8 +- ...sserializer.generaterawlegacyurlaliasid.md | 8 +- ...savedobjectsserializer.israwsavedobject.md | 6 +- ...savedobjectsserializer.rawtosavedobject.md | 6 +- ...savedobjectsserializer.savedobjecttoraw.md | 4 +- ...in-core-server.savedobjectsservicesetup.md | 10 +- ...r.savedobjectsservicesetup.registertype.md | 1 - ...in-core-server.savedobjectsservicestart.md | 14 +- ...lugin-core-server.savedobjectstatusmeta.md | 2 +- ...type.converttomultinamespacetypeversion.md | 3 - ...ana-plugin-core-server.savedobjectstype.md | 23 +-- ...tstypemanagementdefinition.isexportable.md | 1 - ...er.savedobjectstypemanagementdefinition.md | 22 +-- ...bjectstypemanagementdefinition.onimport.md | 1 - ...erver.savedobjectstypemappingdefinition.md | 5 +- ...r.savedobjectsupdateobjectsspacesobject.md | 4 +- ....savedobjectsupdateobjectsspacesoptions.md | 3 +- ...savedobjectsupdateobjectsspacesresponse.md | 2 +- ...bjectsupdateobjectsspacesresponseobject.md | 8 +- ...n-core-server.savedobjectsupdateoptions.md | 9 +- ...-core-server.savedobjectsupdateresponse.md | 5 +- ...ore-server.savedobjectsutils.generateid.md | 2 +- ....savedobjectsutils.getconvertedobjectid.md | 8 +- ...ore-server.savedobjectsutils.israndomid.md | 4 +- ...na-plugin-core-server.savedobjectsutils.md | 6 +- ...ver.savedobjecttyperegistry.getalltypes.md | 2 +- ...egistry.getimportableandexportabletypes.md | 2 +- ...server.savedobjecttyperegistry.getindex.md | 4 +- ...-server.savedobjecttyperegistry.gettype.md | 4 +- ...savedobjecttyperegistry.getvisibletypes.md | 2 +- ...server.savedobjecttyperegistry.ishidden.md | 4 +- ...ttyperegistry.isimportableandexportable.md | 4 +- ...avedobjecttyperegistry.ismultinamespace.md | 4 +- ...dobjecttyperegistry.isnamespaceagnostic.md | 4 +- ...ver.savedobjecttyperegistry.isshareable.md | 4 +- ...vedobjecttyperegistry.issinglenamespace.md | 4 +- ...er.savedobjecttyperegistry.registertype.md | 4 +- ...ibana-plugin-core-server.searchresponse.md | 14 +- ...kibana-plugin-core-server.servicestatus.md | 10 +- ...re-server.sessioncookievalidationresult.md | 4 +- ...plugin-core-server.sessionstorage.clear.md | 2 +- ...a-plugin-core-server.sessionstorage.get.md | 2 +- ...a-plugin-core-server.sessionstorage.set.md | 4 +- ...core-server.sessionstoragecookieoptions.md | 10 +- ...lugin-core-server.sessionstoragefactory.md | 2 +- .../kibana-plugin-core-server.shardsinfo.md | 8 +- ...ibana-plugin-core-server.shardsresponse.md | 8 +- ...a-plugin-core-server.statusservicesetup.md | 12 +- ...ugin-core-server.statusservicesetup.set.md | 4 +- ...ana-plugin-core-server.uisettingsparams.md | 28 +-- ...-server.uisettingsservicesetup.register.md | 5 +- ...uisettingsservicestart.asscopedtoclient.md | 5 +- ...a-plugin-core-server.userprovidedvalues.md | 4 +- package.json | 4 +- src/core/public/public.api.md | 49 ++--- src/core/server/server.api.md | 153 +++++++------- yarn.lock | 187 ++++++++++-------- 535 files changed, 1801 insertions(+), 1859 deletions(-) rename docs/development/core/public/{kibana-plugin-core-public.plugin.md => kibana-plugin-core-public.plugin_2.md} (56%) rename docs/development/core/public/{kibana-plugin-core-public.plugin.setup.md => kibana-plugin-core-public.plugin_2.setup.md} (56%) rename docs/development/core/public/{kibana-plugin-core-public.plugin.start.md => kibana-plugin-core-public.plugin_2.start.md} (57%) rename docs/development/core/public/{kibana-plugin-core-public.plugin.stop.md => kibana-plugin-core-public.plugin_2.stop.md} (56%) delete mode 100644 docs/development/core/server/kibana-plugin-core-server.cspconfig.__private_.md rename docs/development/core/server/{kibana-plugin-core-server.headers.md => kibana-plugin-core-server.headers_2.md} (78%) rename docs/development/core/server/{kibana-plugin-core-server.plugin.md => kibana-plugin-core-server.plugin_2.md} (57%) rename docs/development/core/server/{kibana-plugin-core-server.plugin.setup.md => kibana-plugin-core-server.plugin_2.setup.md} (57%) rename docs/development/core/server/{kibana-plugin-core-server.plugin.start.md => kibana-plugin-core-server.plugin_2.start.md} (57%) rename docs/development/core/server/{kibana-plugin-core-server.plugin.stop.md => kibana-plugin-core-server.plugin_2.stop.md} (56%) delete mode 100644 docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.__private_.md delete mode 100644 docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.__private_.md diff --git a/docs/development/core/public/kibana-plugin-core-public.app.deeplinks.md b/docs/development/core/public/kibana-plugin-core-public.app.deeplinks.md index 8186996b63fe5..d9f76fb38a55d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.deeplinks.md +++ b/docs/development/core/public/kibana-plugin-core-public.app.deeplinks.md @@ -44,6 +44,5 @@ core.application.register({ ], mount: () => { ... } }) - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.app.exactroute.md b/docs/development/core/public/kibana-plugin-core-public.app.exactroute.md index eb050b62c7d43..71f6352ec006c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.exactroute.md +++ b/docs/development/core/public/kibana-plugin-core-public.app.exactroute.md @@ -25,6 +25,5 @@ core.application.register({ // '[basePath]/app/my_app' will be matched // '[basePath]/app/my_app/some/path' will not be matched - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.app.md b/docs/development/core/public/kibana-plugin-core-public.app.md index d79a12a83367d..7af32efcb9c12 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.md +++ b/docs/development/core/public/kibana-plugin-core-public.app.md @@ -10,24 +10,25 @@ ```typescript export interface App extends AppNavOptions ``` +Extends: AppNavOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [appRoute](./kibana-plugin-core-public.app.approute.md) | string | Override the application's routing path from /app/${id}. Must be unique across registered applications. Should not include the base path from HTTP. | -| [capabilities](./kibana-plugin-core-public.app.capabilities.md) | Partial<Capabilities> | Custom capabilities defined by the app. | -| [category](./kibana-plugin-core-public.app.category.md) | AppCategory | The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference | -| [chromeless](./kibana-plugin-core-public.app.chromeless.md) | boolean | Hide the UI chrome when the application is mounted. Defaults to false. Takes precedence over chrome service visibility settings. | -| [deepLinks](./kibana-plugin-core-public.app.deeplinks.md) | AppDeepLink[] | Input type for registering secondary in-app locations for an application.Deep links must include at least one of path or deepLinks. A deep link that does not have a path represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible. | -| [defaultPath](./kibana-plugin-core-public.app.defaultpath.md) | string | Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the path option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)\`, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. | -| [exactRoute](./kibana-plugin-core-public.app.exactroute.md) | boolean | If set to true, the application's route will only be checked against an exact match. Defaults to false. | -| [id](./kibana-plugin-core-public.app.id.md) | string | The unique identifier of the application | -| [keywords](./kibana-plugin-core-public.app.keywords.md) | string[] | Optional keywords to match with in deep links search. Omit if this part of the hierarchy does not have a page URL. | -| [mount](./kibana-plugin-core-public.app.mount.md) | AppMount<HistoryLocationState> | A mount function called when the user navigates to this app's route. | -| [navLinkStatus](./kibana-plugin-core-public.app.navlinkstatus.md) | AppNavLinkStatus | The initial status of the application's navLink. Defaulting to visible if status is accessible and hidden if status is inaccessible See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) | -| [searchable](./kibana-plugin-core-public.app.searchable.md) | boolean | The initial flag to determine if the application is searchable in the global search. Defaulting to true if navLinkStatus is visible or omitted. | -| [status](./kibana-plugin-core-public.app.status.md) | AppStatus | The initial status of the application. Defaulting to accessible | -| [title](./kibana-plugin-core-public.app.title.md) | string | The title of the application. | -| [updater$](./kibana-plugin-core-public.app.updater_.md) | Observable<AppUpdater> | An [AppUpdater](./kibana-plugin-core-public.appupdater.md) observable that can be used to update the application [AppUpdatableFields](./kibana-plugin-core-public.appupdatablefields.md) at runtime. | +| [appRoute?](./kibana-plugin-core-public.app.approute.md) | string | (Optional) Override the application's routing path from /app/${id}. Must be unique across registered applications. Should not include the base path from HTTP. | +| [capabilities?](./kibana-plugin-core-public.app.capabilities.md) | Partial<Capabilities> | (Optional) Custom capabilities defined by the app. | +| [category?](./kibana-plugin-core-public.app.category.md) | AppCategory | (Optional) The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference | +| [chromeless?](./kibana-plugin-core-public.app.chromeless.md) | boolean | (Optional) Hide the UI chrome when the application is mounted. Defaults to false. Takes precedence over chrome service visibility settings. | +| [deepLinks?](./kibana-plugin-core-public.app.deeplinks.md) | AppDeepLink\[\] | (Optional) Input type for registering secondary in-app locations for an application.Deep links must include at least one of path or deepLinks. A deep link that does not have a path represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible. | +| [defaultPath?](./kibana-plugin-core-public.app.defaultpath.md) | string | (Optional) Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the path option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)\`, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. | +| [exactRoute?](./kibana-plugin-core-public.app.exactroute.md) | boolean | (Optional) If set to true, the application's route will only be checked against an exact match. Defaults to false. | +| [id](./kibana-plugin-core-public.app.id.md) | string | The unique identifier of the application | +| [keywords?](./kibana-plugin-core-public.app.keywords.md) | string\[\] | (Optional) Optional keywords to match with in deep links search. Omit if this part of the hierarchy does not have a page URL. | +| [mount](./kibana-plugin-core-public.app.mount.md) | AppMount<HistoryLocationState> | A mount function called when the user navigates to this app's route. | +| [navLinkStatus?](./kibana-plugin-core-public.app.navlinkstatus.md) | AppNavLinkStatus | (Optional) The initial status of the application's navLink. Defaulting to visible if status is accessible and hidden if status is inaccessible See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) | +| [searchable?](./kibana-plugin-core-public.app.searchable.md) | boolean | (Optional) The initial flag to determine if the application is searchable in the global search. Defaulting to true if navLinkStatus is visible or omitted. | +| [status?](./kibana-plugin-core-public.app.status.md) | AppStatus | (Optional) The initial status of the application. Defaulting to accessible | +| [title](./kibana-plugin-core-public.app.title.md) | string | The title of the application. | +| [updater$?](./kibana-plugin-core-public.app.updater_.md) | Observable<AppUpdater> | (Optional) An [AppUpdater](./kibana-plugin-core-public.appupdater.md) observable that can be used to update the application [AppUpdatableFields](./kibana-plugin-core-public.appupdatablefields.md) at runtime. | diff --git a/docs/development/core/public/kibana-plugin-core-public.app.updater_.md b/docs/development/core/public/kibana-plugin-core-public.app.updater_.md index 67acccbd02965..e6789a38f12f7 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.updater_.md +++ b/docs/development/core/public/kibana-plugin-core-public.app.updater_.md @@ -39,6 +39,5 @@ export class MyPlugin implements Plugin { navLinkStatus: AppNavLinkStatus.disabled, }) } - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appcategory.md b/docs/development/core/public/kibana-plugin-core-public.appcategory.md index b0ec377e165b6..40c714b51b8bd 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appcategory.md +++ b/docs/development/core/public/kibana-plugin-core-public.appcategory.md @@ -16,9 +16,9 @@ export interface AppCategory | Property | Type | Description | | --- | --- | --- | -| [ariaLabel](./kibana-plugin-core-public.appcategory.arialabel.md) | string | If the visual label isn't appropriate for screen readers, can override it here | -| [euiIconType](./kibana-plugin-core-public.appcategory.euiicontype.md) | string | Define an icon to be used for the category If the category is only 1 item, and no icon is defined, will default to the product icon Defaults to initials if no icon is defined | -| [id](./kibana-plugin-core-public.appcategory.id.md) | string | Unique identifier for the categories | -| [label](./kibana-plugin-core-public.appcategory.label.md) | string | Label used for category name. Also used as aria-label if one isn't set. | -| [order](./kibana-plugin-core-public.appcategory.order.md) | number | The order that categories will be sorted in Prefer large steps between categories to allow for further editing (Default categories are in steps of 1000) | +| [ariaLabel?](./kibana-plugin-core-public.appcategory.arialabel.md) | string | (Optional) If the visual label isn't appropriate for screen readers, can override it here | +| [euiIconType?](./kibana-plugin-core-public.appcategory.euiicontype.md) | string | (Optional) Define an icon to be used for the category If the category is only 1 item, and no icon is defined, will default to the product icon Defaults to initials if no icon is defined | +| [id](./kibana-plugin-core-public.appcategory.id.md) | string | Unique identifier for the categories | +| [label](./kibana-plugin-core-public.appcategory.label.md) | string | Label used for category name. Also used as aria-label if one isn't set. | +| [order?](./kibana-plugin-core-public.appcategory.order.md) | number | (Optional) The order that categories will be sorted in Prefer large steps between categories to allow for further editing (Default categories are in steps of 1000) | diff --git a/docs/development/core/public/kibana-plugin-core-public.appleaveconfirmaction.md b/docs/development/core/public/kibana-plugin-core-public.appleaveconfirmaction.md index 8650cd9868940..e44fe49c27c8c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appleaveconfirmaction.md +++ b/docs/development/core/public/kibana-plugin-core-public.appleaveconfirmaction.md @@ -18,8 +18,8 @@ export interface AppLeaveConfirmAction | Property | Type | Description | | --- | --- | --- | -| [callback](./kibana-plugin-core-public.appleaveconfirmaction.callback.md) | () => void | | -| [text](./kibana-plugin-core-public.appleaveconfirmaction.text.md) | string | | -| [title](./kibana-plugin-core-public.appleaveconfirmaction.title.md) | string | | -| [type](./kibana-plugin-core-public.appleaveconfirmaction.type.md) | AppLeaveActionType.confirm | | +| [callback?](./kibana-plugin-core-public.appleaveconfirmaction.callback.md) | () => void | (Optional) | +| [text](./kibana-plugin-core-public.appleaveconfirmaction.text.md) | string | | +| [title?](./kibana-plugin-core-public.appleaveconfirmaction.title.md) | string | (Optional) | +| [type](./kibana-plugin-core-public.appleaveconfirmaction.type.md) | AppLeaveActionType.confirm | | diff --git a/docs/development/core/public/kibana-plugin-core-public.appleavedefaultaction.md b/docs/development/core/public/kibana-plugin-core-public.appleavedefaultaction.md index f6df1c0516bd4..5d0e0d2a216e1 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appleavedefaultaction.md +++ b/docs/development/core/public/kibana-plugin-core-public.appleavedefaultaction.md @@ -18,5 +18,5 @@ export interface AppLeaveDefaultAction | Property | Type | Description | | --- | --- | --- | -| [type](./kibana-plugin-core-public.appleavedefaultaction.type.md) | AppLeaveActionType.default | | +| [type](./kibana-plugin-core-public.appleavedefaultaction.type.md) | AppLeaveActionType.default | | diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationsetup.register.md b/docs/development/core/public/kibana-plugin-core-public.applicationsetup.register.md index 6f4ecdc855df8..e53b28e88d6ea 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationsetup.register.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationsetup.register.md @@ -16,9 +16,9 @@ register(app: App): void; | Parameter | Type | Description | | --- | --- | --- | -| app | App<HistoryLocationState> | an [App](./kibana-plugin-core-public.app.md) | +| app | App<HistoryLocationState> | an [App](./kibana-plugin-core-public.app.md) | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationsetup.registerappupdater.md b/docs/development/core/public/kibana-plugin-core-public.applicationsetup.registerappupdater.md index 88800913364fa..6e8203fd68197 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationsetup.registerappupdater.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationsetup.registerappupdater.md @@ -18,11 +18,11 @@ registerAppUpdater(appUpdater$: Observable): void; | Parameter | Type | Description | | --- | --- | --- | -| appUpdater$ | Observable<AppUpdater> | | +| appUpdater$ | Observable<AppUpdater> | | Returns: -`void` +void ## Example @@ -42,6 +42,5 @@ export class MyPlugin implements Plugin { ); } } - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md b/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md index 6229aeb9238e8..8bc89f617e157 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md @@ -24,10 +24,10 @@ getUrlForApp(appId: string, options?: { | Parameter | Type | Description | | --- | --- | --- | -| appId | string | | -| options | {
path?: string;
absolute?: boolean;
deepLinkId?: string;
} | | +| appId | string | | +| options | { path?: string; absolute?: boolean; deepLinkId?: string; } | | Returns: -`string` +string diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationstart.md b/docs/development/core/public/kibana-plugin-core-public.applicationstart.md index 993234d4c6e09..cadf0f91b01d6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationstart.md @@ -15,9 +15,9 @@ export interface ApplicationStart | Property | Type | Description | | --- | --- | --- | -| [applications$](./kibana-plugin-core-public.applicationstart.applications_.md) | Observable<ReadonlyMap<string, PublicAppInfo>> | Observable emitting the list of currently registered apps and their associated status. | -| [capabilities](./kibana-plugin-core-public.applicationstart.capabilities.md) | RecursiveReadonly<Capabilities> | Gets the read-only capabilities. | -| [currentAppId$](./kibana-plugin-core-public.applicationstart.currentappid_.md) | Observable<string | undefined> | An observable that emits the current application id and each subsequent id update. | +| [applications$](./kibana-plugin-core-public.applicationstart.applications_.md) | Observable<ReadonlyMap<string, PublicAppInfo>> | Observable emitting the list of currently registered apps and their associated status. | +| [capabilities](./kibana-plugin-core-public.applicationstart.capabilities.md) | RecursiveReadonly<Capabilities> | Gets the read-only capabilities. | +| [currentAppId$](./kibana-plugin-core-public.applicationstart.currentappid_.md) | Observable<string \| undefined> | An observable that emits the current application id and each subsequent id update. | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetoapp.md b/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetoapp.md index e1f08c7b38133..a6f87209148fd 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetoapp.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetoapp.md @@ -16,10 +16,10 @@ navigateToApp(appId: string, options?: NavigateToAppOptions): Promise; | Parameter | Type | Description | | --- | --- | --- | -| appId | string | | -| options | NavigateToAppOptions | navigation options | +| appId | string | | +| options | NavigateToAppOptions | navigation options | Returns: -`Promise` +Promise<void> diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md b/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md index 8639394cbc421..9e6644e2b1ca7 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md @@ -22,11 +22,11 @@ navigateToUrl(url: string): Promise; | Parameter | Type | Description | | --- | --- | --- | -| url | string | an absolute URL, an absolute path or a relative path, to navigate to. | +| url | string | an absolute URL, an absolute path or a relative path, to navigate to. | Returns: -`Promise` +Promise<void> ## Example @@ -45,6 +45,5 @@ application.navigateToUrl('/app/discover/some-path') // does not include the cur application.navigateToUrl('/base-path/s/my-space/app/unknown-app/some-path') // unknown application application.navigateToUrl('../discover') // resolve to `/base-path/s/my-space/discover` which is not a path of a known app. application.navigateToUrl('../../other-space/discover') // resolve to `/base-path/s/other-space/discover` which is not within the current basePath. - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.appbasepath.md b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.appbasepath.md index b9ebcec6fa8e4..fd16c78d4cbbf 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.appbasepath.md +++ b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.appbasepath.md @@ -35,7 +35,6 @@ export class MyPlugin implements Plugin { }); } } - ``` ```ts @@ -58,6 +57,5 @@ export renderApp = ({ appBasePath, element }: AppMountParameters) => { return () => ReactDOM.unmountComponentAtNode(element); } - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.history.md b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.history.md index 84f2c2564bfd9..c22267eadbe28 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.history.md +++ b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.history.md @@ -30,7 +30,6 @@ export class MyPlugin implements Plugin { }); } } - ``` ```ts @@ -52,6 +51,5 @@ export renderApp = ({ element, history }: AppMountParameters) => { return () => ReactDOM.unmountComponentAtNode(element); } - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.md b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.md index f6c57603bedde..d32faa55a5f86 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.md +++ b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.md @@ -15,9 +15,9 @@ export interface AppMountParameters | Property | Type | Description | | --- | --- | --- | -| [appBasePath](./kibana-plugin-core-public.appmountparameters.appbasepath.md) | string | The route path for configuring navigation to the application. This string should not include the base path from HTTP. | -| [element](./kibana-plugin-core-public.appmountparameters.element.md) | HTMLElement | The container element to render the application into. | -| [history](./kibana-plugin-core-public.appmountparameters.history.md) | ScopedHistory<HistoryLocationState> | A scoped history instance for your application. Should be used to wire up your applications Router. | -| [onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) | (handler: AppLeaveHandler) => void | A function that can be used to register a handler that will be called when the user is leaving the current application, allowing to prompt a confirmation message before actually changing the page.This will be called either when the user goes to another application, or when trying to close the tab or manually changing the url. | -| [setHeaderActionMenu](./kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md) | (menuMount: MountPoint | undefined) => void | A function that can be used to set the mount point used to populate the application action container in the chrome header.Calling the handler multiple time will erase the current content of the action menu with the mount from the latest call. Calling the handler with undefined will unmount the current mount point. Calling the handler after the application has been unmounted will have no effect. | +| [appBasePath](./kibana-plugin-core-public.appmountparameters.appbasepath.md) | string | The route path for configuring navigation to the application. This string should not include the base path from HTTP. | +| [element](./kibana-plugin-core-public.appmountparameters.element.md) | HTMLElement | The container element to render the application into. | +| [history](./kibana-plugin-core-public.appmountparameters.history.md) | ScopedHistory<HistoryLocationState> | A scoped history instance for your application. Should be used to wire up your applications Router. | +| [onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) | (handler: AppLeaveHandler) => void | A function that can be used to register a handler that will be called when the user is leaving the current application, allowing to prompt a confirmation message before actually changing the page.This will be called either when the user goes to another application, or when trying to close the tab or manually changing the url. | +| [setHeaderActionMenu](./kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md) | (menuMount: MountPoint \| undefined) => void | A function that can be used to set the mount point used to populate the application action container in the chrome header.Calling the handler multiple time will erase the current content of the action menu with the mount from the latest call. Calling the handler with undefined will unmount the current mount point. Calling the handler after the application has been unmounted will have no effect. | diff --git a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.onappleave.md b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.onappleave.md index e64e40a49e44e..fa75e3e4084a6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.onappleave.md +++ b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.onappleave.md @@ -41,6 +41,5 @@ export renderApp = ({ element, history, onAppLeave }: AppMountParameters) => { }); return renderApp({ element, history }); } - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md index ca9cee64bb1f9..715e1ba4bf291 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md +++ b/docs/development/core/public/kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md @@ -34,6 +34,5 @@ export renderApp = ({ element, history, setHeaderActionMenu }: AppMountParameter }) return renderApp({ element, history }); } - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md index cb5ae936988dc..c6c583b7a9098 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md @@ -16,8 +16,8 @@ export interface AppNavOptions | Property | Type | Description | | --- | --- | --- | -| [euiIconType](./kibana-plugin-core-public.appnavoptions.euiicontype.md) | string | A EUI iconType that will be used for the app's icon. This icon takes precedence over the icon property. | -| [icon](./kibana-plugin-core-public.appnavoptions.icon.md) | string | A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | -| [order](./kibana-plugin-core-public.appnavoptions.order.md) | number | An ordinal used to sort nav links relative to one another for display. | -| [tooltip](./kibana-plugin-core-public.appnavoptions.tooltip.md) | string | A tooltip shown when hovering over app link. | +| [euiIconType?](./kibana-plugin-core-public.appnavoptions.euiicontype.md) | string | (Optional) A EUI iconType that will be used for the app's icon. This icon takes precedence over the icon property. | +| [icon?](./kibana-plugin-core-public.appnavoptions.icon.md) | string | (Optional) A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | +| [order?](./kibana-plugin-core-public.appnavoptions.order.md) | number | (Optional) An ordinal used to sort nav links relative to one another for display. | +| [tooltip?](./kibana-plugin-core-public.appnavoptions.tooltip.md) | string | (Optional) A tooltip shown when hovering over app link. | diff --git a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.md b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.md index cf315e1fd337e..cb9559dddc684 100644 --- a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.md +++ b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.md @@ -6,7 +6,7 @@ > Warning: This API is now obsolete. > -> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-public.plugin.md) +> Asynchronous lifecycles are deprecated, and should be migrated to sync > A plugin with asynchronous lifecycle methods. @@ -23,5 +23,5 @@ export interface AsyncPlugin(Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.setup.md b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.setup.md index 54507b44cdd72..67a5dad22a0a2 100644 --- a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.setup.md +++ b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.setup.md @@ -14,10 +14,10 @@ setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | | Parameter | Type | Description | | --- | --- | --- | -| core | CoreSetup<TPluginsStart, TStart> | | -| plugins | TPluginsSetup | | +| core | CoreSetup<TPluginsStart, TStart> | | +| plugins | TPluginsSetup | | Returns: -`TSetup | Promise` +TSetup \| Promise<TSetup> diff --git a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.start.md b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.start.md index f16d3c46bf849..89554a1afaf1a 100644 --- a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.start.md +++ b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.start.md @@ -14,10 +14,10 @@ start(core: CoreStart, plugins: TPluginsStart): TStart | Promise; | Parameter | Type | Description | | --- | --- | --- | -| core | CoreStart | | -| plugins | TPluginsStart | | +| core | CoreStart | | +| plugins | TPluginsStart | | Returns: -`TStart | Promise` +TStart \| Promise<TStart> diff --git a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.stop.md b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.stop.md index f809f75783c26..3fb7504879cf6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.asyncplugin.stop.md +++ b/docs/development/core/public/kibana-plugin-core-public.asyncplugin.stop.md @@ -11,5 +11,5 @@ stop?(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.capabilities.md b/docs/development/core/public/kibana-plugin-core-public.capabilities.md index 077899a4847d5..e908bd554d88d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.capabilities.md +++ b/docs/development/core/public/kibana-plugin-core-public.capabilities.md @@ -16,7 +16,7 @@ export interface Capabilities | Property | Type | Description | | --- | --- | --- | -| [catalogue](./kibana-plugin-core-public.capabilities.catalogue.md) | Record<string, boolean> | Catalogue capabilities. Catalogue entries drive the visibility of the Kibana homepage options. | -| [management](./kibana-plugin-core-public.capabilities.management.md) | {
[sectionId: string]: Record<string, boolean>;
} | Management section capabilities. | -| [navLinks](./kibana-plugin-core-public.capabilities.navlinks.md) | Record<string, boolean> | Navigation link capabilities. | +| [catalogue](./kibana-plugin-core-public.capabilities.catalogue.md) | Record<string, boolean> | Catalogue capabilities. Catalogue entries drive the visibility of the Kibana homepage options. | +| [management](./kibana-plugin-core-public.capabilities.management.md) | { \[sectionId: string\]: Record<string, boolean>; } | Management section capabilities. | +| [navLinks](./kibana-plugin-core-public.capabilities.navlinks.md) | Record<string, boolean> | Navigation link capabilities. | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromebadge.md b/docs/development/core/public/kibana-plugin-core-public.chromebadge.md index 0af3e5f367556..e2e4d1910fdd5 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromebadge.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromebadge.md @@ -15,7 +15,7 @@ export interface ChromeBadge | Property | Type | Description | | --- | --- | --- | -| [iconType](./kibana-plugin-core-public.chromebadge.icontype.md) | IconType | | -| [text](./kibana-plugin-core-public.chromebadge.text.md) | string | | -| [tooltip](./kibana-plugin-core-public.chromebadge.tooltip.md) | string | | +| [iconType?](./kibana-plugin-core-public.chromebadge.icontype.md) | IconType | (Optional) | +| [text](./kibana-plugin-core-public.chromebadge.text.md) | string | | +| [tooltip](./kibana-plugin-core-public.chromebadge.tooltip.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.change.md b/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.change.md index aa44f38df15a9..cf31d16cae0e0 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.change.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.change.md @@ -16,11 +16,11 @@ change(newTitle: string | string[]): void; | Parameter | Type | Description | | --- | --- | --- | -| newTitle | string | string[] | | +| newTitle | string \| string\[\] | The new title to set, either a string or string array | Returns: -`void` +void ## Example @@ -29,6 +29,5 @@ How to change the title of the document ```ts chrome.docTitle.change('My application title') chrome.docTitle.change(['My application', 'My section']) - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.md b/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.md index 5a6ab40d52d7a..48e04b648e8d8 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.md @@ -18,7 +18,6 @@ How to change the title of the document ```ts chrome.docTitle.change('My application') - ``` ## Example 2 @@ -27,7 +26,6 @@ How to reset the title of the document to it's initial value ```ts chrome.docTitle.reset() - ``` ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.reset.md b/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.reset.md index ac38db8d28935..e11635fd6d3f8 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.reset.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromedoctitle.reset.md @@ -13,5 +13,5 @@ reset(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromehelpextension.md b/docs/development/core/public/kibana-plugin-core-public.chromehelpextension.md index d90a9bf70486f..07fda8d926a29 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromehelpextension.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromehelpextension.md @@ -15,7 +15,7 @@ export interface ChromeHelpExtension | Property | Type | Description | | --- | --- | --- | -| [appName](./kibana-plugin-core-public.chromehelpextension.appname.md) | string | Provide your plugin's name to create a header for separation | -| [content](./kibana-plugin-core-public.chromehelpextension.content.md) | (element: HTMLDivElement) => () => void | Custom content to occur below the list of links | -| [links](./kibana-plugin-core-public.chromehelpextension.links.md) | ChromeHelpExtensionMenuLink[] | Creates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button | +| [appName](./kibana-plugin-core-public.chromehelpextension.appname.md) | string | Provide your plugin's name to create a header for separation | +| [content?](./kibana-plugin-core-public.chromehelpextension.content.md) | (element: HTMLDivElement) => () => void | (Optional) Custom content to occur below the list of links | +| [links?](./kibana-plugin-core-public.chromehelpextension.links.md) | ChromeHelpExtensionMenuLink\[\] | (Optional) Creates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenucustomlink.md b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenucustomlink.md index ff4978e69df62..daf724c72c23e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenucustomlink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenucustomlink.md @@ -10,12 +10,13 @@ ```typescript export interface ChromeHelpExtensionMenuCustomLink extends ChromeHelpExtensionLinkBase ``` +Extends: ChromeHelpExtensionLinkBase ## Properties | Property | Type | Description | | --- | --- | --- | -| [content](./kibana-plugin-core-public.chromehelpextensionmenucustomlink.content.md) | React.ReactNode | Content of the button (in lieu of children) | -| [href](./kibana-plugin-core-public.chromehelpextensionmenucustomlink.href.md) | string | URL of the link | -| [linkType](./kibana-plugin-core-public.chromehelpextensionmenucustomlink.linktype.md) | 'custom' | Extend EuiButtonEmpty to provide extra functionality | +| [content](./kibana-plugin-core-public.chromehelpextensionmenucustomlink.content.md) | React.ReactNode | Content of the button (in lieu of children) | +| [href](./kibana-plugin-core-public.chromehelpextensionmenucustomlink.href.md) | string | URL of the link | +| [linkType](./kibana-plugin-core-public.chromehelpextensionmenucustomlink.linktype.md) | 'custom' | Extend EuiButtonEmpty to provide extra functionality | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudiscusslink.md b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudiscusslink.md index a73f6daad28c2..3dc32fcb6d87f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudiscusslink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudiscusslink.md @@ -10,11 +10,12 @@ ```typescript export interface ChromeHelpExtensionMenuDiscussLink extends ChromeHelpExtensionLinkBase ``` +Extends: ChromeHelpExtensionLinkBase ## Properties | Property | Type | Description | | --- | --- | --- | -| [href](./kibana-plugin-core-public.chromehelpextensionmenudiscusslink.href.md) | string | URL to discuss page. i.e. https://discuss.elastic.co/c/${appName} | -| [linkType](./kibana-plugin-core-public.chromehelpextensionmenudiscusslink.linktype.md) | 'discuss' | Creates a generic give feedback link with comment icon | +| [href](./kibana-plugin-core-public.chromehelpextensionmenudiscusslink.href.md) | string | URL to discuss page. i.e. https://discuss.elastic.co/c/${appName} | +| [linkType](./kibana-plugin-core-public.chromehelpextensionmenudiscusslink.linktype.md) | 'discuss' | Creates a generic give feedback link with comment icon | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.md b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.md index fab49d06d4774..d20b513b1c550 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.md @@ -10,11 +10,12 @@ ```typescript export interface ChromeHelpExtensionMenuDocumentationLink extends ChromeHelpExtensionLinkBase ``` +Extends: ChromeHelpExtensionLinkBase ## Properties | Property | Type | Description | | --- | --- | --- | -| [href](./kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.href.md) | string | URL to documentation page. i.e. ${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html, | -| [linkType](./kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.linktype.md) | 'documentation' | Creates a deep-link to app-specific documentation | +| [href](./kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.href.md) | string | URL to documentation page. i.e. ${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html, | +| [linkType](./kibana-plugin-core-public.chromehelpextensionmenudocumentationlink.linktype.md) | 'documentation' | Creates a deep-link to app-specific documentation | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenugithublink.md b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenugithublink.md index ca9ceecffa6f1..56eee43d26902 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenugithublink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromehelpextensionmenugithublink.md @@ -10,12 +10,13 @@ ```typescript export interface ChromeHelpExtensionMenuGitHubLink extends ChromeHelpExtensionLinkBase ``` +Extends: ChromeHelpExtensionLinkBase ## Properties | Property | Type | Description | | --- | --- | --- | -| [labels](./kibana-plugin-core-public.chromehelpextensionmenugithublink.labels.md) | string[] | Include at least one app-specific label to be applied to the new github issue | -| [linkType](./kibana-plugin-core-public.chromehelpextensionmenugithublink.linktype.md) | 'github' | Creates a link to a new github issue in the Kibana repo | -| [title](./kibana-plugin-core-public.chromehelpextensionmenugithublink.title.md) | string | Provides initial text for the title of the issue | +| [labels](./kibana-plugin-core-public.chromehelpextensionmenugithublink.labels.md) | string\[\] | Include at least one app-specific label to be applied to the new github issue | +| [linkType](./kibana-plugin-core-public.chromehelpextensionmenugithublink.linktype.md) | 'github' | Creates a link to a new github issue in the Kibana repo | +| [title?](./kibana-plugin-core-public.chromehelpextensionmenugithublink.title.md) | string | (Optional) Provides initial text for the title of the issue | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrol.md b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrol.md index 0fad08fdbce81..c0371078c28a4 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrol.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrol.md @@ -15,6 +15,6 @@ export interface ChromeNavControl | Property | Type | Description | | --- | --- | --- | -| [mount](./kibana-plugin-core-public.chromenavcontrol.mount.md) | MountPoint | | -| [order](./kibana-plugin-core-public.chromenavcontrol.order.md) | number | | +| [mount](./kibana-plugin-core-public.chromenavcontrol.mount.md) | MountPoint | | +| [order?](./kibana-plugin-core-public.chromenavcontrol.order.md) | number | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.md b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.md index 47365782599ed..72018d46428a4 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.md @@ -23,7 +23,6 @@ chrome.navControls.registerLeft({ return () => ReactDOM.unmountComponentAtNode(targetDomElement); } }) - ``` ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registercenter.md b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registercenter.md index 2f921050e58dd..68b243bf47f85 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registercenter.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registercenter.md @@ -16,9 +16,9 @@ registerCenter(navControl: ChromeNavControl): void; | Parameter | Type | Description | | --- | --- | --- | -| navControl | ChromeNavControl | | +| navControl | ChromeNavControl | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerleft.md b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerleft.md index 514c44bd9d710..ee0789c285f0b 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerleft.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerleft.md @@ -16,9 +16,9 @@ registerLeft(navControl: ChromeNavControl): void; | Parameter | Type | Description | | --- | --- | --- | -| navControl | ChromeNavControl | | +| navControl | ChromeNavControl | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerright.md b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerright.md index eb56e0e38c6c9..9091736c62eeb 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerright.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavcontrols.registerright.md @@ -16,9 +16,9 @@ registerRight(navControl: ChromeNavControl): void; | Parameter | Type | Description | | --- | --- | --- | -| navControl | ChromeNavControl | | +| navControl | ChromeNavControl | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md index c7dd461617e34..964f4d4b86aaa 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md @@ -15,16 +15,16 @@ export interface ChromeNavLink | Property | Type | Description | | --- | --- | --- | -| [baseUrl](./kibana-plugin-core-public.chromenavlink.baseurl.md) | string | The base route used to open the root of an application. | -| [category](./kibana-plugin-core-public.chromenavlink.category.md) | AppCategory | The category the app lives in | -| [disabled](./kibana-plugin-core-public.chromenavlink.disabled.md) | boolean | Disables a link from being clickable. | -| [euiIconType](./kibana-plugin-core-public.chromenavlink.euiicontype.md) | string | A EUI iconType that will be used for the app's icon. This icon takes precedence over the icon property. | -| [hidden](./kibana-plugin-core-public.chromenavlink.hidden.md) | boolean | Hides a link from the navigation. | -| [href](./kibana-plugin-core-public.chromenavlink.href.md) | string | Settled state between url, baseUrl, and active | -| [icon](./kibana-plugin-core-public.chromenavlink.icon.md) | string | A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | -| [id](./kibana-plugin-core-public.chromenavlink.id.md) | string | A unique identifier for looking up links. | -| [order](./kibana-plugin-core-public.chromenavlink.order.md) | number | An ordinal used to sort nav links relative to one another for display. | -| [title](./kibana-plugin-core-public.chromenavlink.title.md) | string | The title of the application. | -| [tooltip](./kibana-plugin-core-public.chromenavlink.tooltip.md) | string | A tooltip shown when hovering over an app link. | -| [url](./kibana-plugin-core-public.chromenavlink.url.md) | string | The route used to open the default path and the deep links of an application. | +| [baseUrl](./kibana-plugin-core-public.chromenavlink.baseurl.md) | string | The base route used to open the root of an application. | +| [category?](./kibana-plugin-core-public.chromenavlink.category.md) | AppCategory | (Optional) The category the app lives in | +| [disabled?](./kibana-plugin-core-public.chromenavlink.disabled.md) | boolean | (Optional) Disables a link from being clickable. | +| [euiIconType?](./kibana-plugin-core-public.chromenavlink.euiicontype.md) | string | (Optional) A EUI iconType that will be used for the app's icon. This icon takes precedence over the icon property. | +| [hidden?](./kibana-plugin-core-public.chromenavlink.hidden.md) | boolean | (Optional) Hides a link from the navigation. | +| [href](./kibana-plugin-core-public.chromenavlink.href.md) | string | Settled state between url, baseUrl, and active | +| [icon?](./kibana-plugin-core-public.chromenavlink.icon.md) | string | (Optional) A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | +| [id](./kibana-plugin-core-public.chromenavlink.id.md) | string | A unique identifier for looking up links. | +| [order?](./kibana-plugin-core-public.chromenavlink.order.md) | number | (Optional) An ordinal used to sort nav links relative to one another for display. | +| [title](./kibana-plugin-core-public.chromenavlink.title.md) | string | The title of the application. | +| [tooltip?](./kibana-plugin-core-public.chromenavlink.tooltip.md) | string | (Optional) A tooltip shown when hovering over an app link. | +| [url](./kibana-plugin-core-public.chromenavlink.url.md) | string | The route used to open the default path and the deep links of an application. | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.enableforcedappswitchernavigation.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.enableforcedappswitchernavigation.md index b65ad2b17c1e1..4f9b6aaada5db 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.enableforcedappswitchernavigation.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.enableforcedappswitchernavigation.md @@ -13,7 +13,7 @@ enableForcedAppSwitcherNavigation(): void; ``` Returns: -`void` +void ## Remarks diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.get.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.get.md index f616f99f639ee..796d99b9b0e0c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.get.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.get.md @@ -16,9 +16,9 @@ get(id: string): ChromeNavLink | undefined; | Parameter | Type | Description | | --- | --- | --- | -| id | string | | +| id | string | | Returns: -`ChromeNavLink | undefined` +ChromeNavLink \| undefined diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getall.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getall.md index 94a7b25160af7..08d5707fe3251 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getall.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getall.md @@ -13,5 +13,5 @@ getAll(): Array>; ``` Returns: -`Array>` +Array<Readonly<ChromeNavLink>> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getforceappswitchernavigation_.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getforceappswitchernavigation_.md index ded2c8c08ba49..3b87790c37297 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getforceappswitchernavigation_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getforceappswitchernavigation_.md @@ -13,5 +13,5 @@ getForceAppSwitcherNavigation$(): Observable; ``` Returns: -`Observable` +Observable<boolean> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getnavlinks_.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getnavlinks_.md index d93b4381271e0..8ee5c0fb83081 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getnavlinks_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.getnavlinks_.md @@ -13,5 +13,5 @@ getNavLinks$(): Observable>>; ``` Returns: -`Observable>>` +Observable<Array<Readonly<ChromeNavLink>>> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.has.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.has.md index abef76582cef1..dfaae86a9d891 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.has.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlinks.has.md @@ -16,9 +16,9 @@ has(id: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| id | string | | +| id | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.add.md b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.add.md index 329105394e41c..5c99c6bf7fbcb 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.add.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.add.md @@ -16,19 +16,18 @@ add(link: string, label: string, id: string): void; | Parameter | Type | Description | | --- | --- | --- | -| link | string | | -| label | string | | -| id | string | | +| link | string | a relative URL to the resource (not including the ) | +| label | string | the label to display in the UI | +| id | string | a unique string used to de-duplicate the recently accessed list. | Returns: -`void` +void ## Example ```js chrome.recentlyAccessed.add('/app/map/1234', 'Map 1234', '1234'); - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get.md b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get.md index b0d66e25d1fe0..da696737b3bb7 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get.md @@ -13,13 +13,12 @@ get(): ChromeRecentlyAccessedHistoryItem[]; ``` Returns: -`ChromeRecentlyAccessedHistoryItem[]` +ChromeRecentlyAccessedHistoryItem\[\] ## Example ```js chrome.recentlyAccessed.get().forEach(console.log); - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get_.md b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get_.md index da53c6535b25d..4655289642f99 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessed.get_.md @@ -13,13 +13,12 @@ get$(): Observable; ``` Returns: -`Observable` +Observable<ChromeRecentlyAccessedHistoryItem\[\]> ## Example ```js chrome.recentlyAccessed.get$().subscribe(console.log); - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.md b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.md index e07492f883e53..3b67b41d37a35 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.md @@ -15,7 +15,7 @@ export interface ChromeRecentlyAccessedHistoryItem | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.id.md) | string | | -| [label](./kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.label.md) | string | | -| [link](./kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.link.md) | string | | +| [id](./kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.id.md) | string | | +| [label](./kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.label.md) | string | | +| [link](./kibana-plugin-core-public.chromerecentlyaccessedhistoryitem.link.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.getbadge_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.getbadge_.md index 586a61a9f214a..d3dc459bae9de 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.getbadge_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.getbadge_.md @@ -13,5 +13,5 @@ getBadge$(): Observable; ``` Returns: -`Observable` +Observable<ChromeBadge \| undefined> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbs_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbs_.md index 155f3423d69e4..c4d3751549b16 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbs_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbs_.md @@ -13,5 +13,5 @@ getBreadcrumbs$(): Observable; ``` Returns: -`Observable` +Observable<ChromeBreadcrumb\[\]> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbsappendextension_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbsappendextension_.md index dfe25c5c9e42d..21c12514debec 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbsappendextension_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.getbreadcrumbsappendextension_.md @@ -13,5 +13,5 @@ getBreadcrumbsAppendExtension$(): ObservableReturns: -`Observable` +Observable<ChromeBreadcrumbsAppendExtension \| undefined> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.getcustomnavlink_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.getcustomnavlink_.md index 64805eefbfea1..59346a409562e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.getcustomnavlink_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.getcustomnavlink_.md @@ -13,5 +13,5 @@ getCustomNavLink$(): Observable | undefined>; ``` Returns: -`Observable | undefined>` +Observable<Partial<ChromeNavLink> \| undefined> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.gethelpextension_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.gethelpextension_.md index 90c42a98bd60a..052bbe2630f70 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.gethelpextension_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.gethelpextension_.md @@ -13,5 +13,5 @@ getHelpExtension$(): Observable; ``` Returns: -`Observable` +Observable<ChromeHelpExtension \| undefined> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.getisnavdrawerlocked_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.getisnavdrawerlocked_.md index 78a4442a651e6..12aa71366aaac 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.getisnavdrawerlocked_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.getisnavdrawerlocked_.md @@ -13,5 +13,5 @@ getIsNavDrawerLocked$(): Observable; ``` Returns: -`Observable` +Observable<boolean> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.getisvisible_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.getisvisible_.md index b6204a1913909..70a9c832926e1 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.getisvisible_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.getisvisible_.md @@ -13,5 +13,5 @@ getIsVisible$(): Observable; ``` Returns: -`Observable` +Observable<boolean> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.hasheaderbanner_.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.hasheaderbanner_.md index 6ce0671eb5230..66dd1e2562f50 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.hasheaderbanner_.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.hasheaderbanner_.md @@ -13,5 +13,5 @@ hasHeaderBanner$(): Observable; ``` Returns: -`Observable` +Observable<boolean> diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.md index ffc77dd653c0f..3e672fbc14d75 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.md @@ -22,7 +22,6 @@ How to add a recently accessed item to the sidebar: ```ts core.chrome.recentlyAccessed.add('/app/map/1234', 'Map 1234', '1234'); - ``` ## Example 2 @@ -34,17 +33,16 @@ core.chrome.setHelpExtension(elem => { ReactDOM.render(, elem); return () => ReactDOM.unmountComponentAtNode(elem); }); - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [docTitle](./kibana-plugin-core-public.chromestart.doctitle.md) | ChromeDocTitle | APIs for accessing and updating the document title. | -| [navControls](./kibana-plugin-core-public.chromestart.navcontrols.md) | ChromeNavControls | [APIs](./kibana-plugin-core-public.chromenavcontrols.md) for registering new controls to be displayed in the navigation bar. | -| [navLinks](./kibana-plugin-core-public.chromestart.navlinks.md) | ChromeNavLinks | [APIs](./kibana-plugin-core-public.chromenavlinks.md) for manipulating nav links. | -| [recentlyAccessed](./kibana-plugin-core-public.chromestart.recentlyaccessed.md) | ChromeRecentlyAccessed | [APIs](./kibana-plugin-core-public.chromerecentlyaccessed.md) for recently accessed history. | +| [docTitle](./kibana-plugin-core-public.chromestart.doctitle.md) | ChromeDocTitle | APIs for accessing and updating the document title. | +| [navControls](./kibana-plugin-core-public.chromestart.navcontrols.md) | ChromeNavControls | [APIs](./kibana-plugin-core-public.chromenavcontrols.md) for registering new controls to be displayed in the navigation bar. | +| [navLinks](./kibana-plugin-core-public.chromestart.navlinks.md) | ChromeNavLinks | [APIs](./kibana-plugin-core-public.chromenavlinks.md) for manipulating nav links. | +| [recentlyAccessed](./kibana-plugin-core-public.chromestart.recentlyaccessed.md) | ChromeRecentlyAccessed | [APIs](./kibana-plugin-core-public.chromerecentlyaccessed.md) for recently accessed history. | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.setbadge.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.setbadge.md index 52e807658d238..7e974b139d141 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.setbadge.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.setbadge.md @@ -16,9 +16,9 @@ setBadge(badge?: ChromeBadge): void; | Parameter | Type | Description | | --- | --- | --- | -| badge | ChromeBadge | | +| badge | ChromeBadge | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbs.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbs.md index 80a1514ef7652..f44e3e6cfd562 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbs.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbs.md @@ -16,9 +16,9 @@ setBreadcrumbs(newBreadcrumbs: ChromeBreadcrumb[]): void; | Parameter | Type | Description | | --- | --- | --- | -| newBreadcrumbs | ChromeBreadcrumb[] | | +| newBreadcrumbs | ChromeBreadcrumb\[\] | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbsappendextension.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbsappendextension.md index 02adb9b4d325d..b8fa965f2726e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbsappendextension.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.setbreadcrumbsappendextension.md @@ -16,9 +16,9 @@ setBreadcrumbsAppendExtension(breadcrumbsAppendExtension?: ChromeBreadcrumbsAppe | Parameter | Type | Description | | --- | --- | --- | -| breadcrumbsAppendExtension | ChromeBreadcrumbsAppendExtension | | +| breadcrumbsAppendExtension | ChromeBreadcrumbsAppendExtension | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.setcustomnavlink.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.setcustomnavlink.md index adfb57f9c5ff2..7b100a25a4b2b 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.setcustomnavlink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.setcustomnavlink.md @@ -16,9 +16,9 @@ setCustomNavLink(newCustomNavLink?: Partial): void; | Parameter | Type | Description | | --- | --- | --- | -| newCustomNavLink | Partial<ChromeNavLink> | | +| newCustomNavLink | Partial<ChromeNavLink> | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.setheaderbanner.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.setheaderbanner.md index 02a2fa65ed478..75f711c0bf10b 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.setheaderbanner.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.setheaderbanner.md @@ -16,11 +16,11 @@ setHeaderBanner(headerBanner?: ChromeUserBanner): void; | Parameter | Type | Description | | --- | --- | --- | -| headerBanner | ChromeUserBanner | | +| headerBanner | ChromeUserBanner | | Returns: -`void` +void ## Remarks diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpextension.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpextension.md index c03cf2e9203bc..c2bc691349f3c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpextension.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpextension.md @@ -16,9 +16,9 @@ setHelpExtension(helpExtension?: ChromeHelpExtension): void; | Parameter | Type | Description | | --- | --- | --- | -| helpExtension | ChromeHelpExtension | | +| helpExtension | ChromeHelpExtension | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpsupporturl.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpsupporturl.md index a08c54c1f37c7..baeb37a89ca44 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpsupporturl.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.sethelpsupporturl.md @@ -16,9 +16,9 @@ setHelpSupportUrl(url: string): void; | Parameter | Type | Description | | --- | --- | --- | -| url | string | | +| url | string | The updated support URL | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromestart.setisvisible.md b/docs/development/core/public/kibana-plugin-core-public.chromestart.setisvisible.md index 76e2dc666fc82..9c8cc737bea4f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromestart.setisvisible.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromestart.setisvisible.md @@ -16,9 +16,9 @@ setIsVisible(isVisible: boolean): void; | Parameter | Type | Description | | --- | --- | --- | -| isVisible | boolean | | +| isVisible | boolean | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.chromeuserbanner.md b/docs/development/core/public/kibana-plugin-core-public.chromeuserbanner.md index 8617c5c4d2b12..0417197ab55f3 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromeuserbanner.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromeuserbanner.md @@ -15,5 +15,5 @@ export interface ChromeUserBanner | Property | Type | Description | | --- | --- | --- | -| [content](./kibana-plugin-core-public.chromeuserbanner.content.md) | MountPoint<HTMLDivElement> | | +| [content](./kibana-plugin-core-public.chromeuserbanner.content.md) | MountPoint<HTMLDivElement> | | diff --git a/docs/development/core/public/kibana-plugin-core-public.coresetup.md b/docs/development/core/public/kibana-plugin-core-public.coresetup.md index 5d2288120da05..18af0c7ea5855 100644 --- a/docs/development/core/public/kibana-plugin-core-public.coresetup.md +++ b/docs/development/core/public/kibana-plugin-core-public.coresetup.md @@ -16,11 +16,11 @@ export interface CoreSetupApplicationSetup | [ApplicationSetup](./kibana-plugin-core-public.applicationsetup.md) | -| [fatalErrors](./kibana-plugin-core-public.coresetup.fatalerrors.md) | FatalErrorsSetup | [FatalErrorsSetup](./kibana-plugin-core-public.fatalerrorssetup.md) | -| [getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-public.startservicesaccessor.md) | -| [http](./kibana-plugin-core-public.coresetup.http.md) | HttpSetup | [HttpSetup](./kibana-plugin-core-public.httpsetup.md) | -| [injectedMetadata](./kibana-plugin-core-public.coresetup.injectedmetadata.md) | {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
} | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. | -| [notifications](./kibana-plugin-core-public.coresetup.notifications.md) | NotificationsSetup | [NotificationsSetup](./kibana-plugin-core-public.notificationssetup.md) | -| [uiSettings](./kibana-plugin-core-public.coresetup.uisettings.md) | IUiSettingsClient | [IUiSettingsClient](./kibana-plugin-core-public.iuisettingsclient.md) | +| [application](./kibana-plugin-core-public.coresetup.application.md) | ApplicationSetup | [ApplicationSetup](./kibana-plugin-core-public.applicationsetup.md) | +| [fatalErrors](./kibana-plugin-core-public.coresetup.fatalerrors.md) | FatalErrorsSetup | [FatalErrorsSetup](./kibana-plugin-core-public.fatalerrorssetup.md) | +| [getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-public.startservicesaccessor.md) | +| [http](./kibana-plugin-core-public.coresetup.http.md) | HttpSetup | [HttpSetup](./kibana-plugin-core-public.httpsetup.md) | +| [injectedMetadata](./kibana-plugin-core-public.coresetup.injectedmetadata.md) | { getInjectedVar: (name: string, defaultValue?: any) => unknown; } | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. | +| [notifications](./kibana-plugin-core-public.coresetup.notifications.md) | NotificationsSetup | [NotificationsSetup](./kibana-plugin-core-public.notificationssetup.md) | +| [uiSettings](./kibana-plugin-core-public.coresetup.uisettings.md) | IUiSettingsClient | [IUiSettingsClient](./kibana-plugin-core-public.iuisettingsclient.md) | diff --git a/docs/development/core/public/kibana-plugin-core-public.corestart.md b/docs/development/core/public/kibana-plugin-core-public.corestart.md index 6ad9adca53ef5..e0f6a68782410 100644 --- a/docs/development/core/public/kibana-plugin-core-public.corestart.md +++ b/docs/development/core/public/kibana-plugin-core-public.corestart.md @@ -16,16 +16,16 @@ export interface CoreStart | Property | Type | Description | | --- | --- | --- | -| [application](./kibana-plugin-core-public.corestart.application.md) | ApplicationStart | [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) | -| [chrome](./kibana-plugin-core-public.corestart.chrome.md) | ChromeStart | [ChromeStart](./kibana-plugin-core-public.chromestart.md) | -| [deprecations](./kibana-plugin-core-public.corestart.deprecations.md) | DeprecationsServiceStart | [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) | -| [docLinks](./kibana-plugin-core-public.corestart.doclinks.md) | DocLinksStart | [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) | -| [fatalErrors](./kibana-plugin-core-public.corestart.fatalerrors.md) | FatalErrorsStart | [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) | -| [http](./kibana-plugin-core-public.corestart.http.md) | HttpStart | [HttpStart](./kibana-plugin-core-public.httpstart.md) | -| [i18n](./kibana-plugin-core-public.corestart.i18n.md) | I18nStart | [I18nStart](./kibana-plugin-core-public.i18nstart.md) | -| [injectedMetadata](./kibana-plugin-core-public.corestart.injectedmetadata.md) | {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
} | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. | -| [notifications](./kibana-plugin-core-public.corestart.notifications.md) | NotificationsStart | [NotificationsStart](./kibana-plugin-core-public.notificationsstart.md) | -| [overlays](./kibana-plugin-core-public.corestart.overlays.md) | OverlayStart | [OverlayStart](./kibana-plugin-core-public.overlaystart.md) | -| [savedObjects](./kibana-plugin-core-public.corestart.savedobjects.md) | SavedObjectsStart | [SavedObjectsStart](./kibana-plugin-core-public.savedobjectsstart.md) | -| [uiSettings](./kibana-plugin-core-public.corestart.uisettings.md) | IUiSettingsClient | [IUiSettingsClient](./kibana-plugin-core-public.iuisettingsclient.md) | +| [application](./kibana-plugin-core-public.corestart.application.md) | ApplicationStart | [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) | +| [chrome](./kibana-plugin-core-public.corestart.chrome.md) | ChromeStart | [ChromeStart](./kibana-plugin-core-public.chromestart.md) | +| [deprecations](./kibana-plugin-core-public.corestart.deprecations.md) | DeprecationsServiceStart | [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) | +| [docLinks](./kibana-plugin-core-public.corestart.doclinks.md) | DocLinksStart | [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) | +| [fatalErrors](./kibana-plugin-core-public.corestart.fatalerrors.md) | FatalErrorsStart | [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) | +| [http](./kibana-plugin-core-public.corestart.http.md) | HttpStart | [HttpStart](./kibana-plugin-core-public.httpstart.md) | +| [i18n](./kibana-plugin-core-public.corestart.i18n.md) | I18nStart | [I18nStart](./kibana-plugin-core-public.i18nstart.md) | +| [injectedMetadata](./kibana-plugin-core-public.corestart.injectedmetadata.md) | { getInjectedVar: (name: string, defaultValue?: any) => unknown; } | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. | +| [notifications](./kibana-plugin-core-public.corestart.notifications.md) | NotificationsStart | [NotificationsStart](./kibana-plugin-core-public.notificationsstart.md) | +| [overlays](./kibana-plugin-core-public.corestart.overlays.md) | OverlayStart | [OverlayStart](./kibana-plugin-core-public.overlaystart.md) | +| [savedObjects](./kibana-plugin-core-public.corestart.savedobjects.md) | SavedObjectsStart | [SavedObjectsStart](./kibana-plugin-core-public.savedobjectsstart.md) | +| [uiSettings](./kibana-plugin-core-public.corestart.uisettings.md) | IUiSettingsClient | [IUiSettingsClient](./kibana-plugin-core-public.iuisettingsclient.md) | diff --git a/docs/development/core/public/kibana-plugin-core-public.deprecationsservicestart.md b/docs/development/core/public/kibana-plugin-core-public.deprecationsservicestart.md index 0d2c963ec5547..bfc1d78f4d045 100644 --- a/docs/development/core/public/kibana-plugin-core-public.deprecationsservicestart.md +++ b/docs/development/core/public/kibana-plugin-core-public.deprecationsservicestart.md @@ -16,8 +16,8 @@ export interface DeprecationsServiceStart | Property | Type | Description | | --- | --- | --- | -| [getAllDeprecations](./kibana-plugin-core-public.deprecationsservicestart.getalldeprecations.md) | () => Promise<DomainDeprecationDetails[]> | Grabs deprecations details for all domains. | -| [getDeprecations](./kibana-plugin-core-public.deprecationsservicestart.getdeprecations.md) | (domainId: string) => Promise<DomainDeprecationDetails[]> | Grabs deprecations for a specific domain. | -| [isDeprecationResolvable](./kibana-plugin-core-public.deprecationsservicestart.isdeprecationresolvable.md) | (details: DomainDeprecationDetails) => boolean | Returns a boolean if the provided deprecation can be automatically resolvable. | -| [resolveDeprecation](./kibana-plugin-core-public.deprecationsservicestart.resolvedeprecation.md) | (details: DomainDeprecationDetails) => Promise<ResolveDeprecationResponse> | Calls the correctiveActions.api to automatically resolve the depprecation. | +| [getAllDeprecations](./kibana-plugin-core-public.deprecationsservicestart.getalldeprecations.md) | () => Promise<DomainDeprecationDetails\[\]> | Grabs deprecations details for all domains. | +| [getDeprecations](./kibana-plugin-core-public.deprecationsservicestart.getdeprecations.md) | (domainId: string) => Promise<DomainDeprecationDetails\[\]> | Grabs deprecations for a specific domain. | +| [isDeprecationResolvable](./kibana-plugin-core-public.deprecationsservicestart.isdeprecationresolvable.md) | (details: DomainDeprecationDetails) => boolean | Returns a boolean if the provided deprecation can be automatically resolvable. | +| [resolveDeprecation](./kibana-plugin-core-public.deprecationsservicestart.resolvedeprecation.md) | (details: DomainDeprecationDetails) => Promise<ResolveDeprecationResponse> | Calls the correctiveActions.api to automatically resolve the depprecation. | diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md index d0df23f35ab9e..a1363b7a519d1 100644 --- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md @@ -15,7 +15,7 @@ export interface DocLinksStart | Property | Type | Description | | --- | --- | --- | -| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | | -| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | | -| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly settings: string;
readonly elasticStackGetStarted: string;
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly customLinks: string;
readonly droppedTransactionSpans: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {
readonly guide: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
readonly urlDrilldownVariables: string;
};
readonly discover: Record<string, string>;
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
readonly suricataModule: string;
readonly zeekModule: string;
};
readonly auditbeat: {
readonly base: string;
readonly auditdModule: string;
readonly systemModule: string;
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly libbeat: {
readonly getStarted: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly composite: string;
readonly composite_missing_bucket: string;
readonly date_histogram: string;
readonly date_range: string;
readonly date_format_pattern: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly terms_doc_count_error: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessLangSpec: string;
readonly painlessSyntax: string;
readonly painlessWalkthrough: string;
readonly luceneExpressions: string;
};
readonly search: {
readonly sessions: string;
readonly sessionLimits: string;
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
readonly runtimeFields: string;
};
readonly addData: string;
readonly kibana: string;
readonly upgradeAssistant: string;
readonly rollupJobs: string;
readonly elasticsearch: Record<string, string>;
readonly siem: {
readonly privileges: string;
readonly guide: string;
readonly gettingStarted: string;
readonly ml: string;
readonly ruleChangeLog: string;
readonly detectionsReq: string;
readonly networkMap: string;
readonly troubleshootGaps: string;
};
readonly securitySolution: {
readonly trustedApps: string;
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly autocompleteChanges: string;
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
byteSizeUnits: string;
createAutoFollowPattern: string;
createFollower: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
createRoleMappingTemplates: string;
createRollupJobsRequest: string;
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
timeUnits: string;
updateTransform: string;
}>;
readonly observability: Readonly<{
guide: string;
infrastructureThreshold: string;
logsThreshold: string;
metricsThreshold: string;
monitorStatus: string;
monitorUptime: string;
tlsCertificate: string;
uptimeDurationAnomaly: string;
}>;
readonly alerting: Record<string, string>;
readonly maps: Record<string, string>;
readonly monitoring: Record<string, string>;
readonly security: Readonly<{
apiKeyServiceSettings: string;
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
elasticsearchEnableApiKeys: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
}>;
readonly spaces: Readonly<{
kibanaLegacyUrlAliases: string;
kibanaDisableLegacyUrlAliasesApi: string;
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
datastreamsILM: string;
beatsAgentComparison: string;
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
installElasticAgent: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
apiKeysLearnMore: string;
}>;
readonly ecs: {
readonly guide: string;
};
readonly clients: {
readonly guide: string;
readonly goOverview: string;
readonly javaIndex: string;
readonly jsIntro: string;
readonly netGuide: string;
readonly perlGuide: string;
readonly phpGuide: string;
readonly pythonGuide: string;
readonly rubyOverview: string;
readonly rustGuide: string;
};
readonly endpoints: {
readonly troubleshooting: string;
};
} | | +| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | | +| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | | +| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly enterpriseSearch: { readonly base: string; readonly appSearchBase: string; readonly workplaceSearchBase: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; readonly autocompleteChanges: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record<string, string>; readonly maps: Record<string, string>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: Record<string, string>; readonly snapshotRestore: Record<string, string>; readonly ingest: Record<string, string>; readonly fleet: Readonly<{ datastreamsILM: string; beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | | diff --git a/docs/development/core/public/kibana-plugin-core-public.errortoastoptions.md b/docs/development/core/public/kibana-plugin-core-public.errortoastoptions.md index dc256e6f5bc06..c2bddc58d9c3b 100644 --- a/docs/development/core/public/kibana-plugin-core-public.errortoastoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.errortoastoptions.md @@ -11,11 +11,12 @@ Options available for [IToasts](./kibana-plugin-core-public.itoasts.md) error AP ```typescript export interface ErrorToastOptions extends ToastOptions ``` +Extends: ToastOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [title](./kibana-plugin-core-public.errortoastoptions.title.md) | string | The title of the toast and the dialog when expanding the message. | -| [toastMessage](./kibana-plugin-core-public.errortoastoptions.toastmessage.md) | string | The message to be shown in the toast. If this is not specified the error's message will be shown in the toast instead. Overwriting that message can be used to provide more user-friendly toasts. If you specify this, the error message will still be shown in the detailed error modal. | +| [title](./kibana-plugin-core-public.errortoastoptions.title.md) | string | The title of the toast and the dialog when expanding the message. | +| [toastMessage?](./kibana-plugin-core-public.errortoastoptions.toastmessage.md) | string | (Optional) The message to be shown in the toast. If this is not specified the error's message will be shown in the toast instead. Overwriting that message can be used to provide more user-friendly toasts. If you specify this, the error message will still be shown in the detailed error modal. | diff --git a/docs/development/core/public/kibana-plugin-core-public.fatalerrorinfo.md b/docs/development/core/public/kibana-plugin-core-public.fatalerrorinfo.md index 51facf549bd01..9b2803e4f12ea 100644 --- a/docs/development/core/public/kibana-plugin-core-public.fatalerrorinfo.md +++ b/docs/development/core/public/kibana-plugin-core-public.fatalerrorinfo.md @@ -16,6 +16,6 @@ export interface FatalErrorInfo | Property | Type | Description | | --- | --- | --- | -| [message](./kibana-plugin-core-public.fatalerrorinfo.message.md) | string | | -| [stack](./kibana-plugin-core-public.fatalerrorinfo.stack.md) | string | undefined | | +| [message](./kibana-plugin-core-public.fatalerrorinfo.message.md) | string | | +| [stack](./kibana-plugin-core-public.fatalerrorinfo.stack.md) | string \| undefined | | diff --git a/docs/development/core/public/kibana-plugin-core-public.fatalerrorssetup.md b/docs/development/core/public/kibana-plugin-core-public.fatalerrorssetup.md index 31abcf13b820e..1f27fd52b7e32 100644 --- a/docs/development/core/public/kibana-plugin-core-public.fatalerrorssetup.md +++ b/docs/development/core/public/kibana-plugin-core-public.fatalerrorssetup.md @@ -16,6 +16,6 @@ export interface FatalErrorsSetup | Property | Type | Description | | --- | --- | --- | -| [add](./kibana-plugin-core-public.fatalerrorssetup.add.md) | (error: string | Error, source?: string) => never | Add a new fatal error. This will stop the Kibana Public Core and display a fatal error screen with details about the Kibana build and the error. | -| [get$](./kibana-plugin-core-public.fatalerrorssetup.get_.md) | () => Rx.Observable<FatalErrorInfo> | An Observable that will emit whenever a fatal error is added with add() | +| [add](./kibana-plugin-core-public.fatalerrorssetup.add.md) | (error: string \| Error, source?: string) => never | Add a new fatal error. This will stop the Kibana Public Core and display a fatal error screen with details about the Kibana build and the error. | +| [get$](./kibana-plugin-core-public.fatalerrorssetup.get_.md) | () => Rx.Observable<FatalErrorInfo> | An Observable that will emit whenever a fatal error is added with add() | diff --git a/docs/development/core/public/kibana-plugin-core-public.httpfetchoptions.md b/docs/development/core/public/kibana-plugin-core-public.httpfetchoptions.md index 45a48372b4512..9a7f05ab9cd3e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpfetchoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpfetchoptions.md @@ -11,15 +11,16 @@ All options that may be used with a [HttpHandler](./kibana-plugin-core-public.ht ```typescript export interface HttpFetchOptions extends HttpRequestInit ``` +Extends: HttpRequestInit ## Properties | Property | Type | Description | | --- | --- | --- | -| [asResponse](./kibana-plugin-core-public.httpfetchoptions.asresponse.md) | boolean | When true the return type of [HttpHandler](./kibana-plugin-core-public.httphandler.md) will be an [HttpResponse](./kibana-plugin-core-public.httpresponse.md) with detailed request and response information. When false, the return type will just be the parsed response body. Defaults to false. | -| [asSystemRequest](./kibana-plugin-core-public.httpfetchoptions.assystemrequest.md) | boolean | Whether or not the request should include the "system request" header to differentiate an end user request from Kibana internal request. Can be read on the server-side using KibanaRequest\#isSystemRequest. Defaults to false. | -| [context](./kibana-plugin-core-public.httpfetchoptions.context.md) | KibanaExecutionContext | | -| [headers](./kibana-plugin-core-public.httpfetchoptions.headers.md) | HttpHeadersInit | Headers to send with the request. See [HttpHeadersInit](./kibana-plugin-core-public.httpheadersinit.md). | -| [prependBasePath](./kibana-plugin-core-public.httpfetchoptions.prependbasepath.md) | boolean | Whether or not the request should automatically prepend the basePath. Defaults to true. | -| [query](./kibana-plugin-core-public.httpfetchoptions.query.md) | HttpFetchQuery | The query string for an HTTP request. See [HttpFetchQuery](./kibana-plugin-core-public.httpfetchquery.md). | +| [asResponse?](./kibana-plugin-core-public.httpfetchoptions.asresponse.md) | boolean | (Optional) When true the return type of [HttpHandler](./kibana-plugin-core-public.httphandler.md) will be an [HttpResponse](./kibana-plugin-core-public.httpresponse.md) with detailed request and response information. When false, the return type will just be the parsed response body. Defaults to false. | +| [asSystemRequest?](./kibana-plugin-core-public.httpfetchoptions.assystemrequest.md) | boolean | (Optional) Whether or not the request should include the "system request" header to differentiate an end user request from Kibana internal request. Can be read on the server-side using KibanaRequest\#isSystemRequest. Defaults to false. | +| [context?](./kibana-plugin-core-public.httpfetchoptions.context.md) | KibanaExecutionContext | (Optional) | +| [headers?](./kibana-plugin-core-public.httpfetchoptions.headers.md) | HttpHeadersInit | (Optional) Headers to send with the request. See [HttpHeadersInit](./kibana-plugin-core-public.httpheadersinit.md). | +| [prependBasePath?](./kibana-plugin-core-public.httpfetchoptions.prependbasepath.md) | boolean | (Optional) Whether or not the request should automatically prepend the basePath. Defaults to true. | +| [query?](./kibana-plugin-core-public.httpfetchoptions.query.md) | HttpFetchQuery | (Optional) The query string for an HTTP request. See [HttpFetchQuery](./kibana-plugin-core-public.httpfetchquery.md). | diff --git a/docs/development/core/public/kibana-plugin-core-public.httpfetchoptionswithpath.md b/docs/development/core/public/kibana-plugin-core-public.httpfetchoptionswithpath.md index 37ea559605d3c..78155adaf627e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpfetchoptionswithpath.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpfetchoptionswithpath.md @@ -11,10 +11,11 @@ Similar to [HttpFetchOptions](./kibana-plugin-core-public.httpfetchoptions.md) b ```typescript export interface HttpFetchOptionsWithPath extends HttpFetchOptions ``` +Extends: HttpFetchOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [path](./kibana-plugin-core-public.httpfetchoptionswithpath.path.md) | string | | +| [path](./kibana-plugin-core-public.httpfetchoptionswithpath.path.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.md b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.md index 84dd88eff9e4c..e1843b1a52988 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.md @@ -16,8 +16,8 @@ export interface HttpInterceptor | Method | Description | | --- | --- | -| [request(fetchOptions, controller)](./kibana-plugin-core-public.httpinterceptor.request.md) | Define an interceptor to be executed before a request is sent. | -| [requestError(httpErrorRequest, controller)](./kibana-plugin-core-public.httpinterceptor.requesterror.md) | Define an interceptor to be executed if a request interceptor throws an error or returns a rejected Promise. | -| [response(httpResponse, controller)](./kibana-plugin-core-public.httpinterceptor.response.md) | Define an interceptor to be executed after a response is received. | -| [responseError(httpErrorResponse, controller)](./kibana-plugin-core-public.httpinterceptor.responseerror.md) | Define an interceptor to be executed if a response interceptor throws an error or returns a rejected Promise. | +| [request(fetchOptions, controller)?](./kibana-plugin-core-public.httpinterceptor.request.md) | (Optional) Define an interceptor to be executed before a request is sent. | +| [requestError(httpErrorRequest, controller)?](./kibana-plugin-core-public.httpinterceptor.requesterror.md) | (Optional) Define an interceptor to be executed if a request interceptor throws an error or returns a rejected Promise. | +| [response(httpResponse, controller)?](./kibana-plugin-core-public.httpinterceptor.response.md) | (Optional) Define an interceptor to be executed after a response is received. | +| [responseError(httpErrorResponse, controller)?](./kibana-plugin-core-public.httpinterceptor.responseerror.md) | (Optional) Define an interceptor to be executed if a response interceptor throws an error or returns a rejected Promise. | diff --git a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.request.md b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.request.md index d9051c5f8d72c..95181e6d509f1 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.request.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.request.md @@ -16,10 +16,10 @@ request?(fetchOptions: Readonly, controller: IHttpInte | Parameter | Type | Description | | --- | --- | --- | -| fetchOptions | Readonly<HttpFetchOptionsWithPath> | | -| controller | IHttpInterceptController | | +| fetchOptions | Readonly<HttpFetchOptionsWithPath> | | +| controller | IHttpInterceptController | [IHttpInterceptController](./kibana-plugin-core-public.ihttpinterceptcontroller.md) | Returns: -`MaybePromise> | void` +MaybePromise<Partial<HttpFetchOptionsWithPath>> \| void diff --git a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.requesterror.md b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.requesterror.md index 16980d67fd81e..c2bd14a6d1ead 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.requesterror.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.requesterror.md @@ -16,10 +16,10 @@ requestError?(httpErrorRequest: HttpInterceptorRequestError, controller: IHttpIn | Parameter | Type | Description | | --- | --- | --- | -| httpErrorRequest | HttpInterceptorRequestError | | -| controller | IHttpInterceptController | | +| httpErrorRequest | HttpInterceptorRequestError | [HttpInterceptorRequestError](./kibana-plugin-core-public.httpinterceptorrequesterror.md) | +| controller | IHttpInterceptController | [IHttpInterceptController](./kibana-plugin-core-public.ihttpinterceptcontroller.md) | Returns: -`MaybePromise> | void` +MaybePromise<Partial<HttpFetchOptionsWithPath>> \| void diff --git a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.response.md b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.response.md index 374c6bfe09a95..40cfeffacc0ca 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.response.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.response.md @@ -16,10 +16,10 @@ response?(httpResponse: HttpResponse, controller: IHttpInterceptController): May | Parameter | Type | Description | | --- | --- | --- | -| httpResponse | HttpResponse | | -| controller | IHttpInterceptController | | +| httpResponse | HttpResponse | [HttpResponse](./kibana-plugin-core-public.httpresponse.md) | +| controller | IHttpInterceptController | [IHttpInterceptController](./kibana-plugin-core-public.ihttpinterceptcontroller.md) | Returns: -`MaybePromise | void` +MaybePromise<IHttpResponseInterceptorOverrides> \| void diff --git a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.responseerror.md b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.responseerror.md index fa0acd323fd72..d9be2e87761fc 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.responseerror.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpinterceptor.responseerror.md @@ -16,10 +16,10 @@ responseError?(httpErrorResponse: HttpInterceptorResponseError, controller: IHtt | Parameter | Type | Description | | --- | --- | --- | -| httpErrorResponse | HttpInterceptorResponseError | | -| controller | IHttpInterceptController | | +| httpErrorResponse | HttpInterceptorResponseError | [HttpInterceptorResponseError](./kibana-plugin-core-public.httpinterceptorresponseerror.md) | +| controller | IHttpInterceptController | [IHttpInterceptController](./kibana-plugin-core-public.ihttpinterceptcontroller.md) | Returns: -`MaybePromise | void` +MaybePromise<IHttpResponseInterceptorOverrides> \| void diff --git a/docs/development/core/public/kibana-plugin-core-public.httpinterceptorrequesterror.md b/docs/development/core/public/kibana-plugin-core-public.httpinterceptorrequesterror.md index 69eadf43cb87b..499bc61ce68af 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpinterceptorrequesterror.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpinterceptorrequesterror.md @@ -15,6 +15,6 @@ export interface HttpInterceptorRequestError | Property | Type | Description | | --- | --- | --- | -| [error](./kibana-plugin-core-public.httpinterceptorrequesterror.error.md) | Error | | -| [fetchOptions](./kibana-plugin-core-public.httpinterceptorrequesterror.fetchoptions.md) | Readonly<HttpFetchOptionsWithPath> | | +| [error](./kibana-plugin-core-public.httpinterceptorrequesterror.error.md) | Error | | +| [fetchOptions](./kibana-plugin-core-public.httpinterceptorrequesterror.fetchoptions.md) | Readonly<HttpFetchOptionsWithPath> | | diff --git a/docs/development/core/public/kibana-plugin-core-public.httpinterceptorresponseerror.md b/docs/development/core/public/kibana-plugin-core-public.httpinterceptorresponseerror.md index 6d2b8c6ec9965..014cebeb3ec4d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpinterceptorresponseerror.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpinterceptorresponseerror.md @@ -10,11 +10,12 @@ ```typescript export interface HttpInterceptorResponseError extends HttpResponse ``` +Extends: HttpResponse ## Properties | Property | Type | Description | | --- | --- | --- | -| [error](./kibana-plugin-core-public.httpinterceptorresponseerror.error.md) | Error | IHttpFetchError | | -| [request](./kibana-plugin-core-public.httpinterceptorresponseerror.request.md) | Readonly<Request> | | +| [error](./kibana-plugin-core-public.httpinterceptorresponseerror.error.md) | Error \| IHttpFetchError | | +| [request](./kibana-plugin-core-public.httpinterceptorresponseerror.request.md) | Readonly<Request> | | diff --git a/docs/development/core/public/kibana-plugin-core-public.httprequestinit.md b/docs/development/core/public/kibana-plugin-core-public.httprequestinit.md index 496fba97491ed..6b0e054ff1eb3 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httprequestinit.md +++ b/docs/development/core/public/kibana-plugin-core-public.httprequestinit.md @@ -16,17 +16,17 @@ export interface HttpRequestInit | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-public.httprequestinit.body.md) | BodyInit | null | A BodyInit object or null to set request's body. | -| [cache](./kibana-plugin-core-public.httprequestinit.cache.md) | RequestCache | The cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. | -| [credentials](./kibana-plugin-core-public.httprequestinit.credentials.md) | RequestCredentials | The credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. | -| [headers](./kibana-plugin-core-public.httprequestinit.headers.md) | HttpHeadersInit | [HttpHeadersInit](./kibana-plugin-core-public.httpheadersinit.md) | -| [integrity](./kibana-plugin-core-public.httprequestinit.integrity.md) | string | Subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. | -| [keepalive](./kibana-plugin-core-public.httprequestinit.keepalive.md) | boolean | Whether or not request can outlive the global in which it was created. | -| [method](./kibana-plugin-core-public.httprequestinit.method.md) | string | HTTP method, which is "GET" by default. | -| [mode](./kibana-plugin-core-public.httprequestinit.mode.md) | RequestMode | The mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. | -| [redirect](./kibana-plugin-core-public.httprequestinit.redirect.md) | RequestRedirect | The redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. | -| [referrer](./kibana-plugin-core-public.httprequestinit.referrer.md) | string | The referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the Referer header of the request being made. | -| [referrerPolicy](./kibana-plugin-core-public.httprequestinit.referrerpolicy.md) | ReferrerPolicy | The referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. | -| [signal](./kibana-plugin-core-public.httprequestinit.signal.md) | AbortSignal | null | Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. | -| [window](./kibana-plugin-core-public.httprequestinit.window.md) | null | Can only be null. Used to disassociate request from any Window. | +| [body?](./kibana-plugin-core-public.httprequestinit.body.md) | BodyInit \| null | (Optional) A BodyInit object or null to set request's body. | +| [cache?](./kibana-plugin-core-public.httprequestinit.cache.md) | RequestCache | (Optional) The cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. | +| [credentials?](./kibana-plugin-core-public.httprequestinit.credentials.md) | RequestCredentials | (Optional) The credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. | +| [headers?](./kibana-plugin-core-public.httprequestinit.headers.md) | HttpHeadersInit | (Optional) [HttpHeadersInit](./kibana-plugin-core-public.httpheadersinit.md) | +| [integrity?](./kibana-plugin-core-public.httprequestinit.integrity.md) | string | (Optional) Subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. | +| [keepalive?](./kibana-plugin-core-public.httprequestinit.keepalive.md) | boolean | (Optional) Whether or not request can outlive the global in which it was created. | +| [method?](./kibana-plugin-core-public.httprequestinit.method.md) | string | (Optional) HTTP method, which is "GET" by default. | +| [mode?](./kibana-plugin-core-public.httprequestinit.mode.md) | RequestMode | (Optional) The mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. | +| [redirect?](./kibana-plugin-core-public.httprequestinit.redirect.md) | RequestRedirect | (Optional) The redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. | +| [referrer?](./kibana-plugin-core-public.httprequestinit.referrer.md) | string | (Optional) The referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the Referer header of the request being made. | +| [referrerPolicy?](./kibana-plugin-core-public.httprequestinit.referrerpolicy.md) | ReferrerPolicy | (Optional) The referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. | +| [signal?](./kibana-plugin-core-public.httprequestinit.signal.md) | AbortSignal \| null | (Optional) Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. | +| [window?](./kibana-plugin-core-public.httprequestinit.window.md) | null | (Optional) Can only be null. Used to disassociate request from any Window. | diff --git a/docs/development/core/public/kibana-plugin-core-public.httpresponse.md b/docs/development/core/public/kibana-plugin-core-public.httpresponse.md index dcbfa556da65d..c0a3644ecaf2f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpresponse.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpresponse.md @@ -15,8 +15,8 @@ export interface HttpResponse | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-public.httpresponse.body.md) | TResponseBody | Parsed body received, may be undefined if there was an error. | -| [fetchOptions](./kibana-plugin-core-public.httpresponse.fetchoptions.md) | Readonly<HttpFetchOptionsWithPath> | The original [HttpFetchOptionsWithPath](./kibana-plugin-core-public.httpfetchoptionswithpath.md) used to send this request. | -| [request](./kibana-plugin-core-public.httpresponse.request.md) | Readonly<Request> | Raw request sent to Kibana server. | -| [response](./kibana-plugin-core-public.httpresponse.response.md) | Readonly<Response> | Raw response received, may be undefined if there was an error. | +| [body?](./kibana-plugin-core-public.httpresponse.body.md) | TResponseBody | (Optional) Parsed body received, may be undefined if there was an error. | +| [fetchOptions](./kibana-plugin-core-public.httpresponse.fetchoptions.md) | Readonly<HttpFetchOptionsWithPath> | The original [HttpFetchOptionsWithPath](./kibana-plugin-core-public.httpfetchoptionswithpath.md) used to send this request. | +| [request](./kibana-plugin-core-public.httpresponse.request.md) | Readonly<Request> | Raw request sent to Kibana server. | +| [response?](./kibana-plugin-core-public.httpresponse.response.md) | Readonly<Response> | (Optional) Raw response received, may be undefined if there was an error. | diff --git a/docs/development/core/public/kibana-plugin-core-public.httpsetup.addloadingcountsource.md b/docs/development/core/public/kibana-plugin-core-public.httpsetup.addloadingcountsource.md index 71746b7b1b73f..7962772dbaa5c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpsetup.addloadingcountsource.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpsetup.addloadingcountsource.md @@ -16,9 +16,9 @@ addLoadingCountSource(countSource$: Observable): void; | Parameter | Type | Description | | --- | --- | --- | -| countSource$ | Observable<number> | | +| countSource$ | Observable<number> | an Observable to subscribe to for loading count updates. | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.httpsetup.getloadingcount_.md b/docs/development/core/public/kibana-plugin-core-public.httpsetup.getloadingcount_.md index d60826f3ce5fa..e10278470f542 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpsetup.getloadingcount_.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpsetup.getloadingcount_.md @@ -13,5 +13,5 @@ getLoadingCount$(): Observable; ``` Returns: -`Observable` +Observable<number> diff --git a/docs/development/core/public/kibana-plugin-core-public.httpsetup.intercept.md b/docs/development/core/public/kibana-plugin-core-public.httpsetup.intercept.md index d774d9896a92b..27962d3c3867b 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpsetup.intercept.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpsetup.intercept.md @@ -16,11 +16,11 @@ intercept(interceptor: HttpInterceptor): () => void; | Parameter | Type | Description | | --- | --- | --- | -| interceptor | HttpInterceptor | | +| interceptor | HttpInterceptor | a [HttpInterceptor](./kibana-plugin-core-public.httpinterceptor.md) | Returns: -`() => void` +() => void a function for removing the attached interceptor. diff --git a/docs/development/core/public/kibana-plugin-core-public.httpsetup.md b/docs/development/core/public/kibana-plugin-core-public.httpsetup.md index a921110018c70..2d8116b0eeba6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.httpsetup.md +++ b/docs/development/core/public/kibana-plugin-core-public.httpsetup.md @@ -15,17 +15,17 @@ export interface HttpSetup | Property | Type | Description | | --- | --- | --- | -| [anonymousPaths](./kibana-plugin-core-public.httpsetup.anonymouspaths.md) | IAnonymousPaths | APIs for denoting certain paths for not requiring authentication | -| [basePath](./kibana-plugin-core-public.httpsetup.basepath.md) | IBasePath | APIs for manipulating the basePath on URL segments. See [IBasePath](./kibana-plugin-core-public.ibasepath.md) | -| [delete](./kibana-plugin-core-public.httpsetup.delete.md) | HttpHandler | Makes an HTTP request with the DELETE method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | -| [externalUrl](./kibana-plugin-core-public.httpsetup.externalurl.md) | IExternalUrl | | -| [fetch](./kibana-plugin-core-public.httpsetup.fetch.md) | HttpHandler | Makes an HTTP request. Defaults to a GET request unless overridden. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | -| [get](./kibana-plugin-core-public.httpsetup.get.md) | HttpHandler | Makes an HTTP request with the GET method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | -| [head](./kibana-plugin-core-public.httpsetup.head.md) | HttpHandler | Makes an HTTP request with the HEAD method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | -| [options](./kibana-plugin-core-public.httpsetup.options.md) | HttpHandler | Makes an HTTP request with the OPTIONS method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | -| [patch](./kibana-plugin-core-public.httpsetup.patch.md) | HttpHandler | Makes an HTTP request with the PATCH method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | -| [post](./kibana-plugin-core-public.httpsetup.post.md) | HttpHandler | Makes an HTTP request with the POST method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | -| [put](./kibana-plugin-core-public.httpsetup.put.md) | HttpHandler | Makes an HTTP request with the PUT method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [anonymousPaths](./kibana-plugin-core-public.httpsetup.anonymouspaths.md) | IAnonymousPaths | APIs for denoting certain paths for not requiring authentication | +| [basePath](./kibana-plugin-core-public.httpsetup.basepath.md) | IBasePath | APIs for manipulating the basePath on URL segments. See [IBasePath](./kibana-plugin-core-public.ibasepath.md) | +| [delete](./kibana-plugin-core-public.httpsetup.delete.md) | HttpHandler | Makes an HTTP request with the DELETE method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [externalUrl](./kibana-plugin-core-public.httpsetup.externalurl.md) | IExternalUrl | | +| [fetch](./kibana-plugin-core-public.httpsetup.fetch.md) | HttpHandler | Makes an HTTP request. Defaults to a GET request unless overridden. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [get](./kibana-plugin-core-public.httpsetup.get.md) | HttpHandler | Makes an HTTP request with the GET method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [head](./kibana-plugin-core-public.httpsetup.head.md) | HttpHandler | Makes an HTTP request with the HEAD method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [options](./kibana-plugin-core-public.httpsetup.options.md) | HttpHandler | Makes an HTTP request with the OPTIONS method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [patch](./kibana-plugin-core-public.httpsetup.patch.md) | HttpHandler | Makes an HTTP request with the PATCH method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [post](./kibana-plugin-core-public.httpsetup.post.md) | HttpHandler | Makes an HTTP request with the POST method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | +| [put](./kibana-plugin-core-public.httpsetup.put.md) | HttpHandler | Makes an HTTP request with the PUT method. See [HttpHandler](./kibana-plugin-core-public.httphandler.md) for options. | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.i18nstart.md b/docs/development/core/public/kibana-plugin-core-public.i18nstart.md index 5aff9d69c4590..586f5797abe6c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.i18nstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.i18nstart.md @@ -16,5 +16,5 @@ export interface I18nStart | Property | Type | Description | | --- | --- | --- | -| [Context](./kibana-plugin-core-public.i18nstart.context.md) | ({ children }: {
children: React.ReactNode;
}) => JSX.Element | React Context provider required as the topmost component for any i18n-compatible React tree. | +| [Context](./kibana-plugin-core-public.i18nstart.context.md) | ({ children }: { children: React.ReactNode; }) => JSX.Element | React Context provider required as the topmost component for any i18n-compatible React tree. | diff --git a/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.isanonymous.md b/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.isanonymous.md index 179b4e0e8663e..115285c84ea78 100644 --- a/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.isanonymous.md +++ b/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.isanonymous.md @@ -16,9 +16,9 @@ isAnonymous(path: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| path | string | | +| path | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.register.md b/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.register.md index 5188ffd24f7f1..bfcc0f6decd5d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.register.md +++ b/docs/development/core/public/kibana-plugin-core-public.ianonymouspaths.register.md @@ -16,9 +16,9 @@ register(path: string): void; | Parameter | Type | Description | | --- | --- | --- | -| path | string | | +| path | string | | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.ibasepath.md b/docs/development/core/public/kibana-plugin-core-public.ibasepath.md index 3afce9fee2a7c..72a863f7d515c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.ibasepath.md +++ b/docs/development/core/public/kibana-plugin-core-public.ibasepath.md @@ -16,9 +16,9 @@ export interface IBasePath | Property | Type | Description | | --- | --- | --- | -| [get](./kibana-plugin-core-public.ibasepath.get.md) | () => string | Gets the basePath string. | -| [prepend](./kibana-plugin-core-public.ibasepath.prepend.md) | (url: string) => string | Prepends path with the basePath. | -| [publicBaseUrl](./kibana-plugin-core-public.ibasepath.publicbaseurl.md) | string | The server's publicly exposed base URL, if configured. Includes protocol, host, port (optional) and the [IBasePath.serverBasePath](./kibana-plugin-core-public.ibasepath.serverbasepath.md). | -| [remove](./kibana-plugin-core-public.ibasepath.remove.md) | (url: string) => string | Removes the prepended basePath from the path. | -| [serverBasePath](./kibana-plugin-core-public.ibasepath.serverbasepath.md) | string | Returns the server's root basePath as configured, without any namespace prefix.See for getting the basePath value for a specific request | +| [get](./kibana-plugin-core-public.ibasepath.get.md) | () => string | Gets the basePath string. | +| [prepend](./kibana-plugin-core-public.ibasepath.prepend.md) | (url: string) => string | Prepends path with the basePath. | +| [publicBaseUrl?](./kibana-plugin-core-public.ibasepath.publicbaseurl.md) | string | (Optional) The server's publicly exposed base URL, if configured. Includes protocol, host, port (optional) and the [IBasePath.serverBasePath](./kibana-plugin-core-public.ibasepath.serverbasepath.md). | +| [remove](./kibana-plugin-core-public.ibasepath.remove.md) | (url: string) => string | Removes the prepended basePath from the path. | +| [serverBasePath](./kibana-plugin-core-public.ibasepath.serverbasepath.md) | string | Returns the server's root basePath as configured, without any namespace prefix.See for getting the basePath value for a specific request | diff --git a/docs/development/core/public/kibana-plugin-core-public.iexternalurl.validateurl.md b/docs/development/core/public/kibana-plugin-core-public.iexternalurl.validateurl.md index 466d7cfebf547..24140effc45d9 100644 --- a/docs/development/core/public/kibana-plugin-core-public.iexternalurl.validateurl.md +++ b/docs/development/core/public/kibana-plugin-core-public.iexternalurl.validateurl.md @@ -18,9 +18,9 @@ validateUrl(relativeOrAbsoluteUrl: string): URL | null; | Parameter | Type | Description | | --- | --- | --- | -| relativeOrAbsoluteUrl | string | | +| relativeOrAbsoluteUrl | string | | Returns: -`URL | null` +URL \| null diff --git a/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.host.md b/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.host.md index 842d86db45d73..1d3c9fc9bbaf1 100644 --- a/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.host.md +++ b/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.host.md @@ -19,6 +19,5 @@ host?: string; // allows access to all of google.com, using any protocol. allow: true, host: 'google.com' - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.md b/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.md index 3a1e571460974..6623fec18d976 100644 --- a/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.md +++ b/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.md @@ -16,7 +16,7 @@ export interface IExternalUrlPolicy | Property | Type | Description | | --- | --- | --- | -| [allow](./kibana-plugin-core-public.iexternalurlpolicy.allow.md) | boolean | Indicates if this policy allows or denies access to the described destination. | -| [host](./kibana-plugin-core-public.iexternalurlpolicy.host.md) | string | Optional host describing the external destination. May be combined with protocol. | -| [protocol](./kibana-plugin-core-public.iexternalurlpolicy.protocol.md) | string | Optional protocol describing the external destination. May be combined with host. | +| [allow](./kibana-plugin-core-public.iexternalurlpolicy.allow.md) | boolean | Indicates if this policy allows or denies access to the described destination. | +| [host?](./kibana-plugin-core-public.iexternalurlpolicy.host.md) | string | (Optional) Optional host describing the external destination. May be combined with protocol. | +| [protocol?](./kibana-plugin-core-public.iexternalurlpolicy.protocol.md) | string | (Optional) Optional protocol describing the external destination. May be combined with host. | diff --git a/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.protocol.md b/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.protocol.md index ac73412b6e143..6b6f8b9638bb8 100644 --- a/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.protocol.md +++ b/docs/development/core/public/kibana-plugin-core-public.iexternalurlpolicy.protocol.md @@ -19,6 +19,5 @@ protocol?: string; // allows access to all destinations over the `https` protocol. allow: true, protocol: 'https' - ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.ihttpfetcherror.md b/docs/development/core/public/kibana-plugin-core-public.ihttpfetcherror.md index 8c21d1636711f..9aaae1be72028 100644 --- a/docs/development/core/public/kibana-plugin-core-public.ihttpfetcherror.md +++ b/docs/development/core/public/kibana-plugin-core-public.ihttpfetcherror.md @@ -10,15 +10,16 @@ ```typescript export interface IHttpFetchError extends Error ``` +Extends: Error ## Properties | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-public.ihttpfetcherror.body.md) | TResponseBody | | -| [name](./kibana-plugin-core-public.ihttpfetcherror.name.md) | string | | -| [req](./kibana-plugin-core-public.ihttpfetcherror.req.md) | Request | | -| [request](./kibana-plugin-core-public.ihttpfetcherror.request.md) | Request | | -| [res](./kibana-plugin-core-public.ihttpfetcherror.res.md) | Response | | -| [response](./kibana-plugin-core-public.ihttpfetcherror.response.md) | Response | | +| [body?](./kibana-plugin-core-public.ihttpfetcherror.body.md) | TResponseBody | (Optional) | +| [name](./kibana-plugin-core-public.ihttpfetcherror.name.md) | string | | +| [req](./kibana-plugin-core-public.ihttpfetcherror.req.md) | Request | | +| [request](./kibana-plugin-core-public.ihttpfetcherror.request.md) | Request | | +| [res?](./kibana-plugin-core-public.ihttpfetcherror.res.md) | Response | (Optional) | +| [response?](./kibana-plugin-core-public.ihttpfetcherror.response.md) | Response | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.halt.md b/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.halt.md index 012805d22ba4e..b982e4dbac8a6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.halt.md +++ b/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.halt.md @@ -13,5 +13,5 @@ halt(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.md b/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.md index 5b720fda34f4b..15a66ef569e7d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.md +++ b/docs/development/core/public/kibana-plugin-core-public.ihttpinterceptcontroller.md @@ -16,7 +16,7 @@ export interface IHttpInterceptController | Property | Type | Description | | --- | --- | --- | -| [halted](./kibana-plugin-core-public.ihttpinterceptcontroller.halted.md) | boolean | Whether or not this chain has been halted. | +| [halted](./kibana-plugin-core-public.ihttpinterceptcontroller.halted.md) | boolean | Whether or not this chain has been halted. | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.ihttpresponseinterceptoroverrides.md b/docs/development/core/public/kibana-plugin-core-public.ihttpresponseinterceptoroverrides.md index 4b55cec8f3a2f..57a4555cd6da5 100644 --- a/docs/development/core/public/kibana-plugin-core-public.ihttpresponseinterceptoroverrides.md +++ b/docs/development/core/public/kibana-plugin-core-public.ihttpresponseinterceptoroverrides.md @@ -16,6 +16,6 @@ export interface IHttpResponseInterceptorOverrides | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-public.ihttpresponseinterceptoroverrides.body.md) | TResponseBody | Parsed body received, may be undefined if there was an error. | -| [response](./kibana-plugin-core-public.ihttpresponseinterceptoroverrides.response.md) | Readonly<Response> | Raw response received, may be undefined if there was an error. | +| [body?](./kibana-plugin-core-public.ihttpresponseinterceptoroverrides.body.md) | TResponseBody | (Optional) Parsed body received, may be undefined if there was an error. | +| [response?](./kibana-plugin-core-public.ihttpresponseinterceptoroverrides.response.md) | Readonly<Response> | (Optional) Raw response received, may be undefined if there was an error. | diff --git a/docs/development/core/public/kibana-plugin-core-public.iuisettingsclient.md b/docs/development/core/public/kibana-plugin-core-public.iuisettingsclient.md index d6f3b3186b542..5d2429a799fe6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.iuisettingsclient.md +++ b/docs/development/core/public/kibana-plugin-core-public.iuisettingsclient.md @@ -16,15 +16,15 @@ export interface IUiSettingsClient | Property | Type | Description | | --- | --- | --- | -| [get](./kibana-plugin-core-public.iuisettingsclient.get.md) | <T = any>(key: string, defaultOverride?: T) => T | Gets the value for a specific uiSetting. If this setting has no user-defined value then the defaultOverride parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not registered by any plugin then an error is thrown, otherwise reads the default value defined by a plugin. | -| [get$](./kibana-plugin-core-public.iuisettingsclient.get_.md) | <T = any>(key: string, defaultOverride?: T) => Observable<T> | Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a defaultOverride argument behaves the same as it does in \#get() | -| [getAll](./kibana-plugin-core-public.iuisettingsclient.getall.md) | () => Readonly<Record<string, PublicUiSettingsParams & UserProvidedValues>> | Gets the metadata about all uiSettings, including the type, default value, and user value for each key. | -| [getUpdate$](./kibana-plugin-core-public.iuisettingsclient.getupdate_.md) | <T = any>() => Observable<{
key: string;
newValue: T;
oldValue: T;
}> | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. | -| [getUpdateErrors$](./kibana-plugin-core-public.iuisettingsclient.getupdateerrors_.md) | () => Observable<Error> | Returns an Observable that notifies subscribers of each error while trying to update the settings, containing the actual Error class. | -| [isCustom](./kibana-plugin-core-public.iuisettingsclient.iscustom.md) | (key: string) => boolean | Returns true if the setting wasn't registered by any plugin, but was either added directly via set(), or is an unknown setting found in the uiSettings saved object | -| [isDeclared](./kibana-plugin-core-public.iuisettingsclient.isdeclared.md) | (key: string) => boolean | Returns true if the key is a "known" uiSetting, meaning it is either registered by any plugin or was previously added as a custom setting via the set() method. | -| [isDefault](./kibana-plugin-core-public.iuisettingsclient.isdefault.md) | (key: string) => boolean | Returns true if the setting has no user-defined value or is unknown | -| [isOverridden](./kibana-plugin-core-public.iuisettingsclient.isoverridden.md) | (key: string) => boolean | Shows whether the uiSettings value set by the user. | -| [remove](./kibana-plugin-core-public.iuisettingsclient.remove.md) | (key: string) => Promise<boolean> | Removes the user-defined value for a setting, causing it to revert to the default. This method behaves the same as calling set(key, null), including the synchronization, custom setting, and error behavior of that method. | -| [set](./kibana-plugin-core-public.iuisettingsclient.set.md) | (key: string, value: any) => Promise<boolean> | Sets the value for a uiSetting. If the setting is not registered by any plugin it will be stored as a custom setting. The new value will be synchronously available via the get() method and sent to the server in the background. If the request to the server fails then a updateErrors$ will be notified and the setting will be reverted to its value before set() was called. | +| [get](./kibana-plugin-core-public.iuisettingsclient.get.md) | <T = any>(key: string, defaultOverride?: T) => T | Gets the value for a specific uiSetting. If this setting has no user-defined value then the defaultOverride parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not registered by any plugin then an error is thrown, otherwise reads the default value defined by a plugin. | +| [get$](./kibana-plugin-core-public.iuisettingsclient.get_.md) | <T = any>(key: string, defaultOverride?: T) => Observable<T> | Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a defaultOverride argument behaves the same as it does in \#get() | +| [getAll](./kibana-plugin-core-public.iuisettingsclient.getall.md) | () => Readonly<Record<string, PublicUiSettingsParams & UserProvidedValues>> | Gets the metadata about all uiSettings, including the type, default value, and user value for each key. | +| [getUpdate$](./kibana-plugin-core-public.iuisettingsclient.getupdate_.md) | <T = any>() => Observable<{ key: string; newValue: T; oldValue: T; }> | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. | +| [getUpdateErrors$](./kibana-plugin-core-public.iuisettingsclient.getupdateerrors_.md) | () => Observable<Error> | Returns an Observable that notifies subscribers of each error while trying to update the settings, containing the actual Error class. | +| [isCustom](./kibana-plugin-core-public.iuisettingsclient.iscustom.md) | (key: string) => boolean | Returns true if the setting wasn't registered by any plugin, but was either added directly via set(), or is an unknown setting found in the uiSettings saved object | +| [isDeclared](./kibana-plugin-core-public.iuisettingsclient.isdeclared.md) | (key: string) => boolean | Returns true if the key is a "known" uiSetting, meaning it is either registered by any plugin or was previously added as a custom setting via the set() method. | +| [isDefault](./kibana-plugin-core-public.iuisettingsclient.isdefault.md) | (key: string) => boolean | Returns true if the setting has no user-defined value or is unknown | +| [isOverridden](./kibana-plugin-core-public.iuisettingsclient.isoverridden.md) | (key: string) => boolean | Shows whether the uiSettings value set by the user. | +| [remove](./kibana-plugin-core-public.iuisettingsclient.remove.md) | (key: string) => Promise<boolean> | Removes the user-defined value for a setting, causing it to revert to the default. This method behaves the same as calling set(key, null), including the synchronization, custom setting, and error behavior of that method. | +| [set](./kibana-plugin-core-public.iuisettingsclient.set.md) | (key: string, value: any) => Promise<boolean> | Sets the value for a uiSetting. If the setting is not registered by any plugin it will be stored as a custom setting. The new value will be synchronously available via the get() method and sent to the server in the background. If the request to the server fails then a updateErrors$ will be notified and the setting will be reverted to its value before set() was called. | diff --git a/docs/development/core/public/kibana-plugin-core-public.md b/docs/development/core/public/kibana-plugin-core-public.md index a32dceafd74a9..dee77e8994155 100644 --- a/docs/development/core/public/kibana-plugin-core-public.md +++ b/docs/development/core/public/kibana-plugin-core-public.md @@ -6,7 +6,7 @@ The Kibana Core APIs for client-side plugins. -A plugin's `public/index` file must contain a named import, `plugin`, that implements [PluginInitializer](./kibana-plugin-core-public.plugininitializer.md) which returns an object that implements [Plugin](./kibana-plugin-core-public.plugin.md). +A plugin's `public/index` file must contain a named import, `plugin`, that implements [PluginInitializer](./kibana-plugin-core-public.plugininitializer.md) which returns an object that implements . The plugin integrates with the core system via lifecycle events: `setup`, `start`, and `stop`. In each lifecycle method, the plugin will receive the corresponding core services available (either [CoreSetup](./kibana-plugin-core-public.coresetup.md) or [CoreStart](./kibana-plugin-core-public.corestart.md)) and any interfaces returned by dependency plugins' lifecycle method. Anything returned by the plugin's lifecycle method will be exposed to downstream dependencies when their corresponding lifecycle methods are invoked. @@ -94,7 +94,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [OverlayModalStart](./kibana-plugin-core-public.overlaymodalstart.md) | APIs to open and manage modal dialogs. | | [OverlayRef](./kibana-plugin-core-public.overlayref.md) | Returned by [OverlayStart](./kibana-plugin-core-public.overlaystart.md) methods for closing a mounted overlay. | | [OverlayStart](./kibana-plugin-core-public.overlaystart.md) | | -| [Plugin](./kibana-plugin-core-public.plugin.md) | The interface that should be returned by a PluginInitializer. | +| [Plugin\_2](./kibana-plugin-core-public.plugin_2.md) | The interface that should be returned by a PluginInitializer. | | [PluginInitializerContext](./kibana-plugin-core-public.plugininitializercontext.md) | The available core services passed to a PluginInitializer | | [ResolvedSimpleSavedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.md) | This interface is a very simple wrapper for SavedObjects resolved from the server with the [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md). | | [ResponseErrorBody](./kibana-plugin-core-public.responseerrorbody.md) | | diff --git a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md index 7b01bab056d84..c8ec5bdaf8c0d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md @@ -16,9 +16,9 @@ export interface NavigateToAppOptions | Property | Type | Description | | --- | --- | --- | -| [deepLinkId](./kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md) | string | optional [deep link](./kibana-plugin-core-public.app.deeplinks.md) id inside the application to navigate to. If an additional [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) is defined it will be appended to the deep link path. | -| [openInNewTab](./kibana-plugin-core-public.navigatetoappoptions.openinnewtab.md) | boolean | if true, will open the app in new tab, will share session information via window.open if base | -| [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) | string | optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md) as default. | -| [replace](./kibana-plugin-core-public.navigatetoappoptions.replace.md) | boolean | if true, will not create a new history entry when navigating (using replace instead of push) | -| [state](./kibana-plugin-core-public.navigatetoappoptions.state.md) | unknown | optional state to forward to the application | +| [deepLinkId?](./kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md) | string | (Optional) optional [deep link](./kibana-plugin-core-public.app.deeplinks.md) id inside the application to navigate to. If an additional [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) is defined it will be appended to the deep link path. | +| [openInNewTab?](./kibana-plugin-core-public.navigatetoappoptions.openinnewtab.md) | boolean | (Optional) if true, will open the app in new tab, will share session information via window.open if base | +| [path?](./kibana-plugin-core-public.navigatetoappoptions.path.md) | string | (Optional) optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md) as default. | +| [replace?](./kibana-plugin-core-public.navigatetoappoptions.replace.md) | boolean | (Optional) if true, will not create a new history entry when navigating (using replace instead of push) | +| [state?](./kibana-plugin-core-public.navigatetoappoptions.state.md) | unknown | (Optional) optional state to forward to the application | diff --git a/docs/development/core/public/kibana-plugin-core-public.notificationssetup.md b/docs/development/core/public/kibana-plugin-core-public.notificationssetup.md index fb78fb055a79d..efaeafa1afb1a 100644 --- a/docs/development/core/public/kibana-plugin-core-public.notificationssetup.md +++ b/docs/development/core/public/kibana-plugin-core-public.notificationssetup.md @@ -15,5 +15,5 @@ export interface NotificationsSetup | Property | Type | Description | | --- | --- | --- | -| [toasts](./kibana-plugin-core-public.notificationssetup.toasts.md) | ToastsSetup | [ToastsSetup](./kibana-plugin-core-public.toastssetup.md) | +| [toasts](./kibana-plugin-core-public.notificationssetup.toasts.md) | ToastsSetup | [ToastsSetup](./kibana-plugin-core-public.toastssetup.md) | diff --git a/docs/development/core/public/kibana-plugin-core-public.notificationsstart.md b/docs/development/core/public/kibana-plugin-core-public.notificationsstart.md index 9b1f6e62400f0..0e77badd51235 100644 --- a/docs/development/core/public/kibana-plugin-core-public.notificationsstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.notificationsstart.md @@ -15,5 +15,5 @@ export interface NotificationsStart | Property | Type | Description | | --- | --- | --- | -| [toasts](./kibana-plugin-core-public.notificationsstart.toasts.md) | ToastsStart | [ToastsStart](./kibana-plugin-core-public.toastsstart.md) | +| [toasts](./kibana-plugin-core-public.notificationsstart.toasts.md) | ToastsStart | [ToastsStart](./kibana-plugin-core-public.toastsstart.md) | diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.add.md b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.add.md index 4cedda4e8092a..fd3ce0b3a4292 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.add.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.add.md @@ -16,12 +16,12 @@ add(mount: MountPoint, priority?: number): string; | Parameter | Type | Description | | --- | --- | --- | -| mount | MountPoint | | -| priority | number | | +| mount | MountPoint | [MountPoint](./kibana-plugin-core-public.mountpoint.md) | +| priority | number | optional priority order to display this banner. Higher priority values are shown first. | Returns: -`string` +string a unique identifier for the given banner to be used with [OverlayBannersStart.remove()](./kibana-plugin-core-public.overlaybannersstart.remove.md) and [OverlayBannersStart.replace()](./kibana-plugin-core-public.overlaybannersstart.replace.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.getcomponent.md b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.getcomponent.md index dc167f4f8fb8d..b5f0ab1d01299 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.getcomponent.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.getcomponent.md @@ -11,5 +11,5 @@ getComponent(): JSX.Element; ``` Returns: -`JSX.Element` +JSX.Element diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.remove.md b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.remove.md index 2c69506afb612..ce1e3ee08bd51 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.remove.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.remove.md @@ -16,11 +16,11 @@ remove(id: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| id | string | | +| id | string | the unique identifier for the banner returned by [OverlayBannersStart.add()](./kibana-plugin-core-public.overlaybannersstart.add.md) | Returns: -`boolean` +boolean if the banner was found or not diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.replace.md b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.replace.md index 1112d781bae4f..ea16c739cc847 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.replace.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaybannersstart.replace.md @@ -16,13 +16,13 @@ replace(id: string | undefined, mount: MountPoint, priority?: number): string; | Parameter | Type | Description | | --- | --- | --- | -| id | string | undefined | | -| mount | MountPoint | | -| priority | number | | +| id | string \| undefined | the unique identifier for the banner returned by [OverlayBannersStart.add()](./kibana-plugin-core-public.overlaybannersstart.add.md) | +| mount | MountPoint | [MountPoint](./kibana-plugin-core-public.mountpoint.md) | +| priority | number | optional priority order to display this banner. Higher priority values are shown first. | Returns: -`string` +string a new identifier for the given banner to be used with [OverlayBannersStart.remove()](./kibana-plugin-core-public.overlaybannersstart.remove.md) and [OverlayBannersStart.replace()](./kibana-plugin-core-public.overlaybannersstart.replace.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.overlayflyoutopenoptions.md b/docs/development/core/public/kibana-plugin-core-public.overlayflyoutopenoptions.md index 611b2206bccdc..defbf79b0ffe2 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlayflyoutopenoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlayflyoutopenoptions.md @@ -15,14 +15,14 @@ export interface OverlayFlyoutOpenOptions | Property | Type | Description | | --- | --- | --- | -| ["aria-label"](./kibana-plugin-core-public.overlayflyoutopenoptions._aria-label_.md) | string | | -| ["data-test-subj"](./kibana-plugin-core-public.overlayflyoutopenoptions._data-test-subj_.md) | string | | -| [className](./kibana-plugin-core-public.overlayflyoutopenoptions.classname.md) | string | | -| [closeButtonAriaLabel](./kibana-plugin-core-public.overlayflyoutopenoptions.closebuttonarialabel.md) | string | | -| [hideCloseButton](./kibana-plugin-core-public.overlayflyoutopenoptions.hideclosebutton.md) | boolean | | -| [maskProps](./kibana-plugin-core-public.overlayflyoutopenoptions.maskprops.md) | EuiOverlayMaskProps | | -| [maxWidth](./kibana-plugin-core-public.overlayflyoutopenoptions.maxwidth.md) | boolean | number | string | | -| [onClose](./kibana-plugin-core-public.overlayflyoutopenoptions.onclose.md) | (flyout: OverlayRef) => void | EuiFlyout onClose handler. If provided the consumer is responsible for calling flyout.close() to close the flyout; | -| [ownFocus](./kibana-plugin-core-public.overlayflyoutopenoptions.ownfocus.md) | boolean | | -| [size](./kibana-plugin-core-public.overlayflyoutopenoptions.size.md) | EuiFlyoutSize | | +| ["aria-label"?](./kibana-plugin-core-public.overlayflyoutopenoptions._aria-label_.md) | string | (Optional) | +| ["data-test-subj"?](./kibana-plugin-core-public.overlayflyoutopenoptions._data-test-subj_.md) | string | (Optional) | +| [className?](./kibana-plugin-core-public.overlayflyoutopenoptions.classname.md) | string | (Optional) | +| [closeButtonAriaLabel?](./kibana-plugin-core-public.overlayflyoutopenoptions.closebuttonarialabel.md) | string | (Optional) | +| [hideCloseButton?](./kibana-plugin-core-public.overlayflyoutopenoptions.hideclosebutton.md) | boolean | (Optional) | +| [maskProps?](./kibana-plugin-core-public.overlayflyoutopenoptions.maskprops.md) | EuiOverlayMaskProps | (Optional) | +| [maxWidth?](./kibana-plugin-core-public.overlayflyoutopenoptions.maxwidth.md) | boolean \| number \| string | (Optional) | +| [onClose?](./kibana-plugin-core-public.overlayflyoutopenoptions.onclose.md) | (flyout: OverlayRef) => void | (Optional) EuiFlyout onClose handler. If provided the consumer is responsible for calling flyout.close() to close the flyout; | +| [ownFocus?](./kibana-plugin-core-public.overlayflyoutopenoptions.ownfocus.md) | boolean | (Optional) | +| [size?](./kibana-plugin-core-public.overlayflyoutopenoptions.size.md) | EuiFlyoutSize | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.overlayflyoutstart.open.md b/docs/development/core/public/kibana-plugin-core-public.overlayflyoutstart.open.md index 1f740410ca282..94290eb91f942 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlayflyoutstart.open.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlayflyoutstart.open.md @@ -16,10 +16,10 @@ open(mount: MountPoint, options?: OverlayFlyoutOpenOptions): OverlayRef; | Parameter | Type | Description | | --- | --- | --- | -| mount | MountPoint | | -| options | OverlayFlyoutOpenOptions | | +| mount | MountPoint | [MountPoint](./kibana-plugin-core-public.mountpoint.md) - Mounts the children inside a flyout panel | +| options | OverlayFlyoutOpenOptions | [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) - options for the flyout [OverlayRef](./kibana-plugin-core-public.overlayref.md) A reference to the opened flyout panel. | Returns: -`OverlayRef` +OverlayRef diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaymodalconfirmoptions.md b/docs/development/core/public/kibana-plugin-core-public.overlaymodalconfirmoptions.md index 83405a151a372..2f672e551ba51 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaymodalconfirmoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaymodalconfirmoptions.md @@ -15,13 +15,13 @@ export interface OverlayModalConfirmOptions | Property | Type | Description | | --- | --- | --- | -| ["data-test-subj"](./kibana-plugin-core-public.overlaymodalconfirmoptions._data-test-subj_.md) | string | | -| [buttonColor](./kibana-plugin-core-public.overlaymodalconfirmoptions.buttoncolor.md) | EuiConfirmModalProps['buttonColor'] | | -| [cancelButtonText](./kibana-plugin-core-public.overlaymodalconfirmoptions.cancelbuttontext.md) | string | | -| [className](./kibana-plugin-core-public.overlaymodalconfirmoptions.classname.md) | string | | -| [closeButtonAriaLabel](./kibana-plugin-core-public.overlaymodalconfirmoptions.closebuttonarialabel.md) | string | | -| [confirmButtonText](./kibana-plugin-core-public.overlaymodalconfirmoptions.confirmbuttontext.md) | string | | -| [defaultFocusedButton](./kibana-plugin-core-public.overlaymodalconfirmoptions.defaultfocusedbutton.md) | EuiConfirmModalProps['defaultFocusedButton'] | | -| [maxWidth](./kibana-plugin-core-public.overlaymodalconfirmoptions.maxwidth.md) | boolean | number | string | Sets the max-width of the modal. Set to true to use the default (euiBreakpoints 'm'), set to false to not restrict the width, set to a number for a custom width in px, set to a string for a custom width in custom measurement. | -| [title](./kibana-plugin-core-public.overlaymodalconfirmoptions.title.md) | string | | +| ["data-test-subj"?](./kibana-plugin-core-public.overlaymodalconfirmoptions._data-test-subj_.md) | string | (Optional) | +| [buttonColor?](./kibana-plugin-core-public.overlaymodalconfirmoptions.buttoncolor.md) | EuiConfirmModalProps\['buttonColor'\] | (Optional) | +| [cancelButtonText?](./kibana-plugin-core-public.overlaymodalconfirmoptions.cancelbuttontext.md) | string | (Optional) | +| [className?](./kibana-plugin-core-public.overlaymodalconfirmoptions.classname.md) | string | (Optional) | +| [closeButtonAriaLabel?](./kibana-plugin-core-public.overlaymodalconfirmoptions.closebuttonarialabel.md) | string | (Optional) | +| [confirmButtonText?](./kibana-plugin-core-public.overlaymodalconfirmoptions.confirmbuttontext.md) | string | (Optional) | +| [defaultFocusedButton?](./kibana-plugin-core-public.overlaymodalconfirmoptions.defaultfocusedbutton.md) | EuiConfirmModalProps\['defaultFocusedButton'\] | (Optional) | +| [maxWidth?](./kibana-plugin-core-public.overlaymodalconfirmoptions.maxwidth.md) | boolean \| number \| string | (Optional) Sets the max-width of the modal. Set to true to use the default (euiBreakpoints 'm'), set to false to not restrict the width, set to a number for a custom width in px, set to a string for a custom width in custom measurement. | +| [title?](./kibana-plugin-core-public.overlaymodalconfirmoptions.title.md) | string | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaymodalopenoptions.md b/docs/development/core/public/kibana-plugin-core-public.overlaymodalopenoptions.md index 5307a8357a814..5fc978ea26262 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaymodalopenoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaymodalopenoptions.md @@ -15,8 +15,8 @@ export interface OverlayModalOpenOptions | Property | Type | Description | | --- | --- | --- | -| ["data-test-subj"](./kibana-plugin-core-public.overlaymodalopenoptions._data-test-subj_.md) | string | | -| [className](./kibana-plugin-core-public.overlaymodalopenoptions.classname.md) | string | | -| [closeButtonAriaLabel](./kibana-plugin-core-public.overlaymodalopenoptions.closebuttonarialabel.md) | string | | -| [maxWidth](./kibana-plugin-core-public.overlaymodalopenoptions.maxwidth.md) | boolean | number | string | | +| ["data-test-subj"?](./kibana-plugin-core-public.overlaymodalopenoptions._data-test-subj_.md) | string | (Optional) | +| [className?](./kibana-plugin-core-public.overlaymodalopenoptions.classname.md) | string | (Optional) | +| [closeButtonAriaLabel?](./kibana-plugin-core-public.overlaymodalopenoptions.closebuttonarialabel.md) | string | (Optional) | +| [maxWidth?](./kibana-plugin-core-public.overlaymodalopenoptions.maxwidth.md) | boolean \| number \| string | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.open.md b/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.open.md index 1c6b82e37a624..35bfa406b4d17 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.open.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.open.md @@ -16,10 +16,10 @@ open(mount: MountPoint, options?: OverlayModalOpenOptions): OverlayRef; | Parameter | Type | Description | | --- | --- | --- | -| mount | MountPoint | | -| options | OverlayModalOpenOptions | | +| mount | MountPoint | [MountPoint](./kibana-plugin-core-public.mountpoint.md) - Mounts the children inside the modal | +| options | OverlayModalOpenOptions | [OverlayModalOpenOptions](./kibana-plugin-core-public.overlaymodalopenoptions.md) - options for the modal [OverlayRef](./kibana-plugin-core-public.overlayref.md) A reference to the opened modal. | Returns: -`OverlayRef` +OverlayRef diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.openconfirm.md b/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.openconfirm.md index b0052c0f6460e..056f512de87bf 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.openconfirm.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaymodalstart.openconfirm.md @@ -16,10 +16,10 @@ openConfirm(message: MountPoint | string, options?: OverlayModalConfirmOptions): | Parameter | Type | Description | | --- | --- | --- | -| message | MountPoint | string | | -| options | OverlayModalConfirmOptions | | +| message | MountPoint \| string | [MountPoint](./kibana-plugin-core-public.mountpoint.md) - string or mountpoint to be used a the confirm message body | +| options | OverlayModalConfirmOptions | [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) - options for the confirm modal | Returns: -`Promise` +Promise<boolean> diff --git a/docs/development/core/public/kibana-plugin-core-public.overlayref.close.md b/docs/development/core/public/kibana-plugin-core-public.overlayref.close.md index 656afa64e5490..454723f6ffd09 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlayref.close.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlayref.close.md @@ -13,5 +13,5 @@ close(): Promise; ``` Returns: -`Promise` +Promise<void> diff --git a/docs/development/core/public/kibana-plugin-core-public.overlayref.md b/docs/development/core/public/kibana-plugin-core-public.overlayref.md index 0fc76057d0390..da11e284f285d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlayref.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlayref.md @@ -16,7 +16,7 @@ export interface OverlayRef | Property | Type | Description | | --- | --- | --- | -| [onClose](./kibana-plugin-core-public.overlayref.onclose.md) | Promise<void> | A Promise that will resolve once this overlay is closed.Overlays can close from user interaction, calling close() on the overlay reference or another overlay replacing yours via openModal or openFlyout. | +| [onClose](./kibana-plugin-core-public.overlayref.onclose.md) | Promise<void> | A Promise that will resolve once this overlay is closed.Overlays can close from user interaction, calling close() on the overlay reference or another overlay replacing yours via openModal or openFlyout. | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.overlaystart.md b/docs/development/core/public/kibana-plugin-core-public.overlaystart.md index 2cc4d89dda643..3bbdd4ab9b918 100644 --- a/docs/development/core/public/kibana-plugin-core-public.overlaystart.md +++ b/docs/development/core/public/kibana-plugin-core-public.overlaystart.md @@ -15,8 +15,8 @@ export interface OverlayStart | Property | Type | Description | | --- | --- | --- | -| [banners](./kibana-plugin-core-public.overlaystart.banners.md) | OverlayBannersStart | [OverlayBannersStart](./kibana-plugin-core-public.overlaybannersstart.md) | -| [openConfirm](./kibana-plugin-core-public.overlaystart.openconfirm.md) | OverlayModalStart['openConfirm'] | | -| [openFlyout](./kibana-plugin-core-public.overlaystart.openflyout.md) | OverlayFlyoutStart['open'] | | -| [openModal](./kibana-plugin-core-public.overlaystart.openmodal.md) | OverlayModalStart['open'] | | +| [banners](./kibana-plugin-core-public.overlaystart.banners.md) | OverlayBannersStart | [OverlayBannersStart](./kibana-plugin-core-public.overlaybannersstart.md) | +| [openConfirm](./kibana-plugin-core-public.overlaystart.openconfirm.md) | OverlayModalStart\['openConfirm'\] | | +| [openFlyout](./kibana-plugin-core-public.overlaystart.openflyout.md) | OverlayFlyoutStart\['open'\] | | +| [openModal](./kibana-plugin-core-public.overlaystart.openmodal.md) | OverlayModalStart\['open'\] | | diff --git a/docs/development/core/public/kibana-plugin-core-public.plugin.md b/docs/development/core/public/kibana-plugin-core-public.plugin_2.md similarity index 56% rename from docs/development/core/public/kibana-plugin-core-public.plugin.md rename to docs/development/core/public/kibana-plugin-core-public.plugin_2.md index 4de46ae55797c..da8cef9b83cc7 100644 --- a/docs/development/core/public/kibana-plugin-core-public.plugin.md +++ b/docs/development/core/public/kibana-plugin-core-public.plugin_2.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin](./kibana-plugin-core-public.plugin.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin\_2](./kibana-plugin-core-public.plugin_2.md) -## Plugin interface +## Plugin\_2 interface The interface that should be returned by a `PluginInitializer`. @@ -16,7 +16,7 @@ export interface Plugin(Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.plugin.setup.md b/docs/development/core/public/kibana-plugin-core-public.plugin_2.setup.md similarity index 56% rename from docs/development/core/public/kibana-plugin-core-public.plugin.setup.md rename to docs/development/core/public/kibana-plugin-core-public.plugin_2.setup.md index 232851cd342ce..5ebb5a1a74811 100644 --- a/docs/development/core/public/kibana-plugin-core-public.plugin.setup.md +++ b/docs/development/core/public/kibana-plugin-core-public.plugin_2.setup.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin](./kibana-plugin-core-public.plugin.md) > [setup](./kibana-plugin-core-public.plugin.setup.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin\_2](./kibana-plugin-core-public.plugin_2.md) > [setup](./kibana-plugin-core-public.plugin_2.setup.md) -## Plugin.setup() method +## Plugin\_2.setup() method Signature: @@ -14,10 +14,10 @@ setup(core: CoreSetup, plugins: TPluginsSetup): TSetup; | Parameter | Type | Description | | --- | --- | --- | -| core | CoreSetup<TPluginsStart, TStart> | | -| plugins | TPluginsSetup | | +| core | CoreSetup<TPluginsStart, TStart> | | +| plugins | TPluginsSetup | | Returns: -`TSetup` +TSetup diff --git a/docs/development/core/public/kibana-plugin-core-public.plugin.start.md b/docs/development/core/public/kibana-plugin-core-public.plugin_2.start.md similarity index 57% rename from docs/development/core/public/kibana-plugin-core-public.plugin.start.md rename to docs/development/core/public/kibana-plugin-core-public.plugin_2.start.md index ec5ed211a9d2b..f4979ee033aac 100644 --- a/docs/development/core/public/kibana-plugin-core-public.plugin.start.md +++ b/docs/development/core/public/kibana-plugin-core-public.plugin_2.start.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin](./kibana-plugin-core-public.plugin.md) > [start](./kibana-plugin-core-public.plugin.start.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin\_2](./kibana-plugin-core-public.plugin_2.md) > [start](./kibana-plugin-core-public.plugin_2.start.md) -## Plugin.start() method +## Plugin\_2.start() method Signature: @@ -14,10 +14,10 @@ start(core: CoreStart, plugins: TPluginsStart): TStart; | Parameter | Type | Description | | --- | --- | --- | -| core | CoreStart | | -| plugins | TPluginsStart | | +| core | CoreStart | | +| plugins | TPluginsStart | | Returns: -`TStart` +TStart diff --git a/docs/development/core/public/kibana-plugin-core-public.plugin.stop.md b/docs/development/core/public/kibana-plugin-core-public.plugin_2.stop.md similarity index 56% rename from docs/development/core/public/kibana-plugin-core-public.plugin.stop.md rename to docs/development/core/public/kibana-plugin-core-public.plugin_2.stop.md index b509d1ae25340..69532f2d0e09d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.plugin.stop.md +++ b/docs/development/core/public/kibana-plugin-core-public.plugin_2.stop.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin](./kibana-plugin-core-public.plugin.md) > [stop](./kibana-plugin-core-public.plugin.stop.md) +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [Plugin\_2](./kibana-plugin-core-public.plugin_2.md) > [stop](./kibana-plugin-core-public.plugin_2.stop.md) -## Plugin.stop() method +## Plugin\_2.stop() method Signature: @@ -11,5 +11,5 @@ stop?(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.plugininitializercontext.md b/docs/development/core/public/kibana-plugin-core-public.plugininitializercontext.md index 422bf5a71cddc..3304b4bf3def4 100644 --- a/docs/development/core/public/kibana-plugin-core-public.plugininitializercontext.md +++ b/docs/development/core/public/kibana-plugin-core-public.plugininitializercontext.md @@ -16,7 +16,7 @@ export interface PluginInitializerContext | Property | Type | Description | | --- | --- | --- | -| [config](./kibana-plugin-core-public.plugininitializercontext.config.md) | {
get: <T extends object = ConfigSchema>() => T;
} | | -| [env](./kibana-plugin-core-public.plugininitializercontext.env.md) | {
mode: Readonly<EnvironmentMode>;
packageInfo: Readonly<PackageInfo>;
} | | -| [opaqueId](./kibana-plugin-core-public.plugininitializercontext.opaqueid.md) | PluginOpaqueId | A symbol used to identify this plugin in the system. Needed when registering handlers or context providers. | +| [config](./kibana-plugin-core-public.plugininitializercontext.config.md) | { get: <T extends object = ConfigSchema>() => T; } | | +| [env](./kibana-plugin-core-public.plugininitializercontext.env.md) | { mode: Readonly<EnvironmentMode>; packageInfo: Readonly<PackageInfo>; } | | +| [opaqueId](./kibana-plugin-core-public.plugininitializercontext.opaqueid.md) | PluginOpaqueId | A symbol used to identify this plugin in the system. Needed when registering handlers or context providers. | diff --git a/docs/development/core/public/kibana-plugin-core-public.resolvedsimplesavedobject.md b/docs/development/core/public/kibana-plugin-core-public.resolvedsimplesavedobject.md index 4936598c58799..2844bd97db7f2 100644 --- a/docs/development/core/public/kibana-plugin-core-public.resolvedsimplesavedobject.md +++ b/docs/development/core/public/kibana-plugin-core-public.resolvedsimplesavedobject.md @@ -16,7 +16,7 @@ export interface ResolvedSimpleSavedObject | Property | Type | Description | | --- | --- | --- | -| [alias\_target\_id](./kibana-plugin-core-public.resolvedsimplesavedobject.alias_target_id.md) | SavedObjectsResolveResponse['alias_target_id'] | The ID of the object that the legacy URL alias points to. This is only defined when the outcome is 'aliasMatch' or 'conflict'. | -| [outcome](./kibana-plugin-core-public.resolvedsimplesavedobject.outcome.md) | SavedObjectsResolveResponse['outcome'] | The outcome for a successful resolve call is one of the following values:\* 'exactMatch' -- One document exactly matched the given ID. \* 'aliasMatch' -- One document with a legacy URL alias matched the given ID; in this case the saved_object.id field is different than the given ID. \* 'conflict' -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the saved_object object is the exact match, and the saved_object.id field is the same as the given ID. | -| [saved\_object](./kibana-plugin-core-public.resolvedsimplesavedobject.saved_object.md) | SimpleSavedObject<T> | The saved object that was found. | +| [alias\_target\_id?](./kibana-plugin-core-public.resolvedsimplesavedobject.alias_target_id.md) | SavedObjectsResolveResponse\['alias\_target\_id'\] | (Optional) The ID of the object that the legacy URL alias points to. This is only defined when the outcome is 'aliasMatch' or 'conflict'. | +| [outcome](./kibana-plugin-core-public.resolvedsimplesavedobject.outcome.md) | SavedObjectsResolveResponse\['outcome'\] | The outcome for a successful resolve call is one of the following values:\* 'exactMatch' -- One document exactly matched the given ID. \* 'aliasMatch' -- One document with a legacy URL alias matched the given ID; in this case the saved_object.id field is different than the given ID. \* 'conflict' -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the saved_object object is the exact match, and the saved_object.id field is the same as the given ID. | +| [saved\_object](./kibana-plugin-core-public.resolvedsimplesavedobject.saved_object.md) | SimpleSavedObject<T> | The saved object that was found. | diff --git a/docs/development/core/public/kibana-plugin-core-public.responseerrorbody.md b/docs/development/core/public/kibana-plugin-core-public.responseerrorbody.md index 8a990909fac3e..5bc9103691014 100644 --- a/docs/development/core/public/kibana-plugin-core-public.responseerrorbody.md +++ b/docs/development/core/public/kibana-plugin-core-public.responseerrorbody.md @@ -15,7 +15,7 @@ export interface ResponseErrorBody | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-public.responseerrorbody.attributes.md) | Record<string, unknown> | | -| [message](./kibana-plugin-core-public.responseerrorbody.message.md) | string | | -| [statusCode](./kibana-plugin-core-public.responseerrorbody.statuscode.md) | number | | +| [attributes?](./kibana-plugin-core-public.responseerrorbody.attributes.md) | Record<string, unknown> | (Optional) | +| [message](./kibana-plugin-core-public.responseerrorbody.message.md) | string | | +| [statusCode](./kibana-plugin-core-public.responseerrorbody.statuscode.md) | number | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobject.md b/docs/development/core/public/kibana-plugin-core-public.savedobject.md index 26f472b741268..283a960013305 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobject.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobject.md @@ -14,15 +14,15 @@ export interface SavedObject | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-public.savedobject.attributes.md) | T | The data for a Saved Object is stored as an object in the attributes property. | -| [coreMigrationVersion](./kibana-plugin-core-public.savedobject.coremigrationversion.md) | string | A semver value that is used when upgrading objects between Kibana versions. | -| [error](./kibana-plugin-core-public.savedobject.error.md) | SavedObjectError | | -| [id](./kibana-plugin-core-public.savedobject.id.md) | string | The ID of this Saved Object, guaranteed to be unique for all objects of the same type | -| [migrationVersion](./kibana-plugin-core-public.savedobject.migrationversion.md) | SavedObjectsMigrationVersion | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | -| [namespaces](./kibana-plugin-core-public.savedobject.namespaces.md) | string[] | Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with namespaceType: 'agnostic'. | -| [originId](./kibana-plugin-core-public.savedobject.originid.md) | string | The ID of the saved object this originated from. This is set if this object's id was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space. | -| [references](./kibana-plugin-core-public.savedobject.references.md) | SavedObjectReference[] | A reference to another saved object. | -| [type](./kibana-plugin-core-public.savedobject.type.md) | string | The type of Saved Object. Each plugin can define it's own custom Saved Object types. | -| [updated\_at](./kibana-plugin-core-public.savedobject.updated_at.md) | string | Timestamp of the last time this document had been updated. | -| [version](./kibana-plugin-core-public.savedobject.version.md) | string | An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. | +| [attributes](./kibana-plugin-core-public.savedobject.attributes.md) | T | The data for a Saved Object is stored as an object in the attributes property. | +| [coreMigrationVersion?](./kibana-plugin-core-public.savedobject.coremigrationversion.md) | string | (Optional) A semver value that is used when upgrading objects between Kibana versions. | +| [error?](./kibana-plugin-core-public.savedobject.error.md) | SavedObjectError | (Optional) | +| [id](./kibana-plugin-core-public.savedobject.id.md) | string | The ID of this Saved Object, guaranteed to be unique for all objects of the same type | +| [migrationVersion?](./kibana-plugin-core-public.savedobject.migrationversion.md) | SavedObjectsMigrationVersion | (Optional) Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | +| [namespaces?](./kibana-plugin-core-public.savedobject.namespaces.md) | string\[\] | (Optional) Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with namespaceType: 'agnostic'. | +| [originId?](./kibana-plugin-core-public.savedobject.originid.md) | string | (Optional) The ID of the saved object this originated from. This is set if this object's id was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space. | +| [references](./kibana-plugin-core-public.savedobject.references.md) | SavedObjectReference\[\] | A reference to another saved object. | +| [type](./kibana-plugin-core-public.savedobject.type.md) | string | The type of Saved Object. Each plugin can define it's own custom Saved Object types. | +| [updated\_at?](./kibana-plugin-core-public.savedobject.updated_at.md) | string | (Optional) Timestamp of the last time this document had been updated. | +| [version?](./kibana-plugin-core-public.savedobject.version.md) | string | (Optional) An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjecterror.md b/docs/development/core/public/kibana-plugin-core-public.savedobjecterror.md index 2117cea433b5c..f6e8874b212b0 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjecterror.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjecterror.md @@ -14,8 +14,8 @@ export interface SavedObjectError | Property | Type | Description | | --- | --- | --- | -| [error](./kibana-plugin-core-public.savedobjecterror.error.md) | string | | -| [message](./kibana-plugin-core-public.savedobjecterror.message.md) | string | | -| [metadata](./kibana-plugin-core-public.savedobjecterror.metadata.md) | Record<string, unknown> | | -| [statusCode](./kibana-plugin-core-public.savedobjecterror.statuscode.md) | number | | +| [error](./kibana-plugin-core-public.savedobjecterror.error.md) | string | | +| [message](./kibana-plugin-core-public.savedobjecterror.message.md) | string | | +| [metadata?](./kibana-plugin-core-public.savedobjecterror.metadata.md) | Record<string, unknown> | (Optional) | +| [statusCode](./kibana-plugin-core-public.savedobjecterror.statuscode.md) | number | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectreference.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectreference.md index 410ab23f0b604..e63ba254602db 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectreference.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectreference.md @@ -16,7 +16,7 @@ export interface SavedObjectReference | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-public.savedobjectreference.id.md) | string | | -| [name](./kibana-plugin-core-public.savedobjectreference.name.md) | string | | -| [type](./kibana-plugin-core-public.savedobjectreference.type.md) | string | | +| [id](./kibana-plugin-core-public.savedobjectreference.id.md) | string | | +| [name](./kibana-plugin-core-public.savedobjectreference.name.md) | string | | +| [type](./kibana-plugin-core-public.savedobjectreference.type.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectreferencewithcontext.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectreferencewithcontext.md index a79fa96695e36..39e14607d861f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectreferencewithcontext.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectreferencewithcontext.md @@ -16,10 +16,10 @@ export interface SavedObjectReferenceWithContext | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-public.savedobjectreferencewithcontext.id.md) | string | The ID of the referenced object | -| [inboundReferences](./kibana-plugin-core-public.savedobjectreferencewithcontext.inboundreferences.md) | Array<{
type: string;
id: string;
name: string;
}> | References to this object; note that this does not contain \_all inbound references everywhere for this object\_, it only contains inbound references for the scope of this operation | -| [isMissing](./kibana-plugin-core-public.savedobjectreferencewithcontext.ismissing.md) | boolean | Whether or not this object or reference is missing | -| [spaces](./kibana-plugin-core-public.savedobjectreferencewithcontext.spaces.md) | string[] | The space(s) that the referenced object exists in | -| [spacesWithMatchingAliases](./kibana-plugin-core-public.savedobjectreferencewithcontext.spaceswithmatchingaliases.md) | string[] | The space(s) that legacy URL aliases matching this type/id exist in | -| [type](./kibana-plugin-core-public.savedobjectreferencewithcontext.type.md) | string | The type of the referenced object | +| [id](./kibana-plugin-core-public.savedobjectreferencewithcontext.id.md) | string | The ID of the referenced object | +| [inboundReferences](./kibana-plugin-core-public.savedobjectreferencewithcontext.inboundreferences.md) | Array<{ type: string; id: string; name: string; }> | References to this object; note that this does not contain \_all inbound references everywhere for this object\_, it only contains inbound references for the scope of this operation | +| [isMissing?](./kibana-plugin-core-public.savedobjectreferencewithcontext.ismissing.md) | boolean | (Optional) Whether or not this object or reference is missing | +| [spaces](./kibana-plugin-core-public.savedobjectreferencewithcontext.spaces.md) | string\[\] | The space(s) that the referenced object exists in | +| [spacesWithMatchingAliases?](./kibana-plugin-core-public.savedobjectreferencewithcontext.spaceswithmatchingaliases.md) | string\[\] | (Optional) The space(s) that legacy URL aliases matching this type/id exist in | +| [type](./kibana-plugin-core-public.savedobjectreferencewithcontext.type.md) | string | The type of the referenced object | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbaseoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbaseoptions.md index 838d8fb1979a8..f86d3b5afc04e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbaseoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbaseoptions.md @@ -15,5 +15,5 @@ export interface SavedObjectsBaseOptions | Property | Type | Description | | --- | --- | --- | -| [namespace](./kibana-plugin-core-public.savedobjectsbaseoptions.namespace.md) | string | Specify the namespace for this operation | +| [namespace?](./kibana-plugin-core-public.savedobjectsbaseoptions.namespace.md) | string | (Optional) Specify the namespace for this operation | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbatchresponse.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbatchresponse.md index 1551836008700..3926231db17b5 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbatchresponse.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbatchresponse.md @@ -15,5 +15,5 @@ export interface SavedObjectsBatchResponse | Property | Type | Description | | --- | --- | --- | -| [savedObjects](./kibana-plugin-core-public.savedobjectsbatchresponse.savedobjects.md) | Array<SimpleSavedObject<T>> | | +| [savedObjects](./kibana-plugin-core-public.savedobjectsbatchresponse.savedobjects.md) | Array<SimpleSavedObject<T>> | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateobject.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateobject.md index 20d137819a90e..f9ff61859b1a8 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateobject.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateobject.md @@ -9,11 +9,12 @@ ```typescript export interface SavedObjectsBulkCreateObject extends SavedObjectsCreateOptions ``` +Extends: SavedObjectsCreateOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-public.savedobjectsbulkcreateobject.attributes.md) | T | | -| [type](./kibana-plugin-core-public.savedobjectsbulkcreateobject.type.md) | string | | +| [attributes](./kibana-plugin-core-public.savedobjectsbulkcreateobject.attributes.md) | T | | +| [type](./kibana-plugin-core-public.savedobjectsbulkcreateobject.type.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateoptions.md index 02e659bd858f7..ada12c064e0a1 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkcreateoptions.md @@ -15,5 +15,5 @@ export interface SavedObjectsBulkCreateOptions | Property | Type | Description | | --- | --- | --- | -| [overwrite](./kibana-plugin-core-public.savedobjectsbulkcreateoptions.overwrite.md) | boolean | If a document with the given id already exists, overwrite it's contents (default=false). | +| [overwrite?](./kibana-plugin-core-public.savedobjectsbulkcreateoptions.overwrite.md) | boolean | (Optional) If a document with the given id already exists, overwrite it's contents (default=false). | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveobject.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveobject.md index 8ca5da9d7db4f..fbff3d3bd8f25 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveobject.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveobject.md @@ -15,6 +15,6 @@ export interface SavedObjectsBulkResolveObject | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-public.savedobjectsbulkresolveobject.id.md) | string | | -| [type](./kibana-plugin-core-public.savedobjectsbulkresolveobject.type.md) | string | | +| [id](./kibana-plugin-core-public.savedobjectsbulkresolveobject.id.md) | string | | +| [type](./kibana-plugin-core-public.savedobjectsbulkresolveobject.type.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveresponse.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveresponse.md index 36a92d02b8aaa..e34bf6fe32618 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveresponse.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkresolveresponse.md @@ -15,5 +15,5 @@ export interface SavedObjectsBulkResolveResponse | Property | Type | Description | | --- | --- | --- | -| [resolved\_objects](./kibana-plugin-core-public.savedobjectsbulkresolveresponse.resolved_objects.md) | Array<SavedObjectsResolveResponse<T>> | | +| [resolved\_objects](./kibana-plugin-core-public.savedobjectsbulkresolveresponse.resolved_objects.md) | Array<SavedObjectsResolveResponse<T>> | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateobject.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateobject.md index fd6572f2c0cbe..f28d99cb110c6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateobject.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateobject.md @@ -15,9 +15,9 @@ export interface SavedObjectsBulkUpdateObject | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-public.savedobjectsbulkupdateobject.attributes.md) | T | | -| [id](./kibana-plugin-core-public.savedobjectsbulkupdateobject.id.md) | string | | -| [references](./kibana-plugin-core-public.savedobjectsbulkupdateobject.references.md) | SavedObjectReference[] | | -| [type](./kibana-plugin-core-public.savedobjectsbulkupdateobject.type.md) | string | | -| [version](./kibana-plugin-core-public.savedobjectsbulkupdateobject.version.md) | string | | +| [attributes](./kibana-plugin-core-public.savedobjectsbulkupdateobject.attributes.md) | T | | +| [id](./kibana-plugin-core-public.savedobjectsbulkupdateobject.id.md) | string | | +| [references?](./kibana-plugin-core-public.savedobjectsbulkupdateobject.references.md) | SavedObjectReference\[\] | (Optional) | +| [type](./kibana-plugin-core-public.savedobjectsbulkupdateobject.type.md) | string | | +| [version?](./kibana-plugin-core-public.savedobjectsbulkupdateobject.version.md) | string | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateoptions.md index 35cc72baa0ef6..a2cdd3eb801e6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsbulkupdateoptions.md @@ -15,5 +15,5 @@ export interface SavedObjectsBulkUpdateOptions | Property | Type | Description | | --- | --- | --- | -| [namespace](./kibana-plugin-core-public.savedobjectsbulkupdateoptions.namespace.md) | string | | +| [namespace?](./kibana-plugin-core-public.savedobjectsbulkupdateoptions.namespace.md) | string | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.bulkupdate.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.bulkupdate.md index 05c84d9c27192..0e3bfb2bd896b 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.bulkupdate.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.bulkupdate.md @@ -16,11 +16,11 @@ bulkUpdate(objects?: SavedObjectsBulkUpdateObject[]): PromiseSavedObjectsBulkUpdateObject[] | | +| objects | SavedObjectsBulkUpdateObject\[\] | \[{ type, id, attributes, options: { version, references } }\] | Returns: -`Promise>` +Promise<SavedObjectsBatchResponse<unknown>> The result of the update operation containing both failed and updated saved objects. diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.md index 1a630ebe8c9ae..d18d680feffd5 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.md @@ -20,14 +20,14 @@ The constructor for this class is marked as internal. Third-party code should no | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [bulkCreate](./kibana-plugin-core-public.savedobjectsclient.bulkcreate.md) | | (objects?: SavedObjectsBulkCreateObject[], options?: SavedObjectsBulkCreateOptions) => Promise<SavedObjectsBatchResponse<unknown>> | Creates multiple documents at once | -| [bulkGet](./kibana-plugin-core-public.savedobjectsclient.bulkget.md) | | (objects?: Array<{
id: string;
type: string;
}>) => Promise<SavedObjectsBatchResponse<unknown>> | Returns an array of objects by id | -| [bulkResolve](./kibana-plugin-core-public.savedobjectsclient.bulkresolve.md) | | <T = unknown>(objects?: Array<{
id: string;
type: string;
}>) => Promise<{
resolved_objects: ResolvedSimpleSavedObject<T>[];
}> | Resolves an array of objects by id, using any legacy URL aliases if they exist | -| [create](./kibana-plugin-core-public.savedobjectsclient.create.md) | | <T = unknown>(type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise<SimpleSavedObject<T>> | Persists an object | -| [delete](./kibana-plugin-core-public.savedobjectsclient.delete.md) | | (type: string, id: string, options?: SavedObjectsDeleteOptions | undefined) => ReturnType<SavedObjectsApi['delete']> | Deletes an object | -| [find](./kibana-plugin-core-public.savedobjectsclient.find.md) | | <T = unknown, A = unknown>(options: SavedObjectsFindOptions) => Promise<SavedObjectsFindResponsePublic<T, unknown>> | Search for objects | -| [get](./kibana-plugin-core-public.savedobjectsclient.get.md) | | <T = unknown>(type: string, id: string) => Promise<SimpleSavedObject<T>> | Fetches a single object | -| [resolve](./kibana-plugin-core-public.savedobjectsclient.resolve.md) | | <T = unknown>(type: string, id: string) => Promise<ResolvedSimpleSavedObject<T>> | Resolves a single object | +| [bulkCreate](./kibana-plugin-core-public.savedobjectsclient.bulkcreate.md) | | (objects?: SavedObjectsBulkCreateObject\[\], options?: SavedObjectsBulkCreateOptions) => Promise<SavedObjectsBatchResponse<unknown>> | Creates multiple documents at once | +| [bulkGet](./kibana-plugin-core-public.savedobjectsclient.bulkget.md) | | (objects?: Array<{ id: string; type: string; }>) => Promise<SavedObjectsBatchResponse<unknown>> | Returns an array of objects by id | +| [bulkResolve](./kibana-plugin-core-public.savedobjectsclient.bulkresolve.md) | | <T = unknown>(objects?: Array<{ id: string; type: string; }>) => Promise<{ resolved\_objects: ResolvedSimpleSavedObject<T>\[\]; }> | Resolves an array of objects by id, using any legacy URL aliases if they exist | +| [create](./kibana-plugin-core-public.savedobjectsclient.create.md) | | <T = unknown>(type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise<SimpleSavedObject<T>> | Persists an object | +| [delete](./kibana-plugin-core-public.savedobjectsclient.delete.md) | | (type: string, id: string, options?: SavedObjectsDeleteOptions \| undefined) => ReturnType<SavedObjectsApi\['delete'\]> | Deletes an object | +| [find](./kibana-plugin-core-public.savedobjectsclient.find.md) | | <T = unknown, A = unknown>(options: SavedObjectsFindOptions) => Promise<SavedObjectsFindResponsePublic<T, unknown>> | Search for objects | +| [get](./kibana-plugin-core-public.savedobjectsclient.get.md) | | <T = unknown>(type: string, id: string) => Promise<SimpleSavedObject<T>> | Fetches a single object | +| [resolve](./kibana-plugin-core-public.savedobjectsclient.resolve.md) | | <T = unknown>(type: string, id: string) => Promise<ResolvedSimpleSavedObject<T>> | Resolves a single object | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.update.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.update.md index a5847d6a26198..dec84fb58bf5e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.update.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsclient.update.md @@ -16,13 +16,13 @@ update(type: string, id: string, attributes: T, { version, referenc | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| attributes | T | | -| { version, references, upsert } | SavedObjectsUpdateOptions | | +| type | string | | +| id | string | | +| attributes | T | | +| { version, references, upsert } | SavedObjectsUpdateOptions | | Returns: -`Promise>` +Promise<SimpleSavedObject<T>> diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectscollectmultinamespacereferencesresponse.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectscollectmultinamespacereferencesresponse.md index a6e0a274008a6..a356850fa1ad4 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectscollectmultinamespacereferencesresponse.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectscollectmultinamespacereferencesresponse.md @@ -16,5 +16,5 @@ export interface SavedObjectsCollectMultiNamespaceReferencesResponse | Property | Type | Description | | --- | --- | --- | -| [objects](./kibana-plugin-core-public.savedobjectscollectmultinamespacereferencesresponse.objects.md) | SavedObjectReferenceWithContext[] | | +| [objects](./kibana-plugin-core-public.savedobjectscollectmultinamespacereferencesresponse.objects.md) | SavedObjectReferenceWithContext\[\] | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectscreateoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectscreateoptions.md index a039b9f5b4fe4..835a9e87a1dba 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectscreateoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectscreateoptions.md @@ -15,9 +15,9 @@ export interface SavedObjectsCreateOptions | Property | Type | Description | | --- | --- | --- | -| [coreMigrationVersion](./kibana-plugin-core-public.savedobjectscreateoptions.coremigrationversion.md) | string | A semver value that is used when upgrading objects between Kibana versions. | -| [id](./kibana-plugin-core-public.savedobjectscreateoptions.id.md) | string | (Not recommended) Specify an id instead of having the saved objects service generate one for you. | -| [migrationVersion](./kibana-plugin-core-public.savedobjectscreateoptions.migrationversion.md) | SavedObjectsMigrationVersion | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | -| [overwrite](./kibana-plugin-core-public.savedobjectscreateoptions.overwrite.md) | boolean | If a document with the given id already exists, overwrite it's contents (default=false). | -| [references](./kibana-plugin-core-public.savedobjectscreateoptions.references.md) | SavedObjectReference[] | | +| [coreMigrationVersion?](./kibana-plugin-core-public.savedobjectscreateoptions.coremigrationversion.md) | string | (Optional) A semver value that is used when upgrading objects between Kibana versions. | +| [id?](./kibana-plugin-core-public.savedobjectscreateoptions.id.md) | string | (Optional) (Not recommended) Specify an id instead of having the saved objects service generate one for you. | +| [migrationVersion?](./kibana-plugin-core-public.savedobjectscreateoptions.migrationversion.md) | SavedObjectsMigrationVersion | (Optional) Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | +| [overwrite?](./kibana-plugin-core-public.savedobjectscreateoptions.overwrite.md) | boolean | (Optional) If a document with the given id already exists, overwrite it's contents (default=false). | +| [references?](./kibana-plugin-core-public.savedobjectscreateoptions.references.md) | SavedObjectReference\[\] | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md index 706408f81f02a..f429911476307 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md @@ -15,22 +15,22 @@ export interface SavedObjectsFindOptions | Property | Type | Description | | --- | --- | --- | -| [defaultSearchOperator](./kibana-plugin-core-public.savedobjectsfindoptions.defaultsearchoperator.md) | 'AND' | 'OR' | The search operator to use with the provided filter. Defaults to OR | -| [fields](./kibana-plugin-core-public.savedobjectsfindoptions.fields.md) | string[] | An array of fields to include in the results | -| [filter](./kibana-plugin-core-public.savedobjectsfindoptions.filter.md) | string | KueryNode | | -| [hasReference](./kibana-plugin-core-public.savedobjectsfindoptions.hasreference.md) | SavedObjectsFindOptionsReference | SavedObjectsFindOptionsReference[] | Search for documents having a reference to the specified objects. Use hasReferenceOperator to specify the operator to use when searching for multiple references. | -| [hasReferenceOperator](./kibana-plugin-core-public.savedobjectsfindoptions.hasreferenceoperator.md) | 'AND' | 'OR' | The operator to use when searching by multiple references using the hasReference option. Defaults to OR | -| [namespaces](./kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md) | string[] | | -| [page](./kibana-plugin-core-public.savedobjectsfindoptions.page.md) | number | | -| [perPage](./kibana-plugin-core-public.savedobjectsfindoptions.perpage.md) | number | | -| [pit](./kibana-plugin-core-public.savedobjectsfindoptions.pit.md) | SavedObjectsPitParams | Search against a specific Point In Time (PIT) that you've opened with . | -| [preference](./kibana-plugin-core-public.savedobjectsfindoptions.preference.md) | string | An optional ES preference value to be used for the query \* | -| [rootSearchFields](./kibana-plugin-core-public.savedobjectsfindoptions.rootsearchfields.md) | string[] | The fields to perform the parsed query against. Unlike the searchFields argument, these are expected to be root fields and will not be modified. If used in conjunction with searchFields, both are concatenated together. | -| [search](./kibana-plugin-core-public.savedobjectsfindoptions.search.md) | string | Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String query argument for more information | -| [searchAfter](./kibana-plugin-core-public.savedobjectsfindoptions.searchafter.md) | estypes.Id[] | Use the sort values from the previous page to retrieve the next page of results. | -| [searchFields](./kibana-plugin-core-public.savedobjectsfindoptions.searchfields.md) | string[] | The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | -| [sortField](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | string | | -| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | | -| [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | string | string[] | | -| [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | +| [defaultSearchOperator?](./kibana-plugin-core-public.savedobjectsfindoptions.defaultsearchoperator.md) | 'AND' \| 'OR' | (Optional) The search operator to use with the provided filter. Defaults to OR | +| [fields?](./kibana-plugin-core-public.savedobjectsfindoptions.fields.md) | string\[\] | (Optional) An array of fields to include in the results | +| [filter?](./kibana-plugin-core-public.savedobjectsfindoptions.filter.md) | string \| KueryNode | (Optional) | +| [hasReference?](./kibana-plugin-core-public.savedobjectsfindoptions.hasreference.md) | SavedObjectsFindOptionsReference \| SavedObjectsFindOptionsReference\[\] | (Optional) Search for documents having a reference to the specified objects. Use hasReferenceOperator to specify the operator to use when searching for multiple references. | +| [hasReferenceOperator?](./kibana-plugin-core-public.savedobjectsfindoptions.hasreferenceoperator.md) | 'AND' \| 'OR' | (Optional) The operator to use when searching by multiple references using the hasReference option. Defaults to OR | +| [namespaces?](./kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md) | string\[\] | (Optional) | +| [page?](./kibana-plugin-core-public.savedobjectsfindoptions.page.md) | number | (Optional) | +| [perPage?](./kibana-plugin-core-public.savedobjectsfindoptions.perpage.md) | number | (Optional) | +| [pit?](./kibana-plugin-core-public.savedobjectsfindoptions.pit.md) | SavedObjectsPitParams | (Optional) Search against a specific Point In Time (PIT) that you've opened with . | +| [preference?](./kibana-plugin-core-public.savedobjectsfindoptions.preference.md) | string | (Optional) An optional ES preference value to be used for the query \* | +| [rootSearchFields?](./kibana-plugin-core-public.savedobjectsfindoptions.rootsearchfields.md) | string\[\] | (Optional) The fields to perform the parsed query against. Unlike the searchFields argument, these are expected to be root fields and will not be modified. If used in conjunction with searchFields, both are concatenated together. | +| [search?](./kibana-plugin-core-public.savedobjectsfindoptions.search.md) | string | (Optional) Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String query argument for more information | +| [searchAfter?](./kibana-plugin-core-public.savedobjectsfindoptions.searchafter.md) | estypes.Id\[\] | (Optional) Use the sort values from the previous page to retrieve the next page of results. | +| [searchFields?](./kibana-plugin-core-public.savedobjectsfindoptions.searchfields.md) | string\[\] | (Optional) The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | +| [sortField?](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | string | (Optional) | +| [sortOrder?](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | (Optional) | +| [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | string \| string\[\] | | +| [typeToNamespacesMap?](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string\[\] \| undefined> | (Optional) This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptionsreference.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptionsreference.md index cdfefd01e6f83..cab03bf71393c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptionsreference.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptionsreference.md @@ -15,6 +15,6 @@ export interface SavedObjectsFindOptionsReference | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-public.savedobjectsfindoptionsreference.id.md) | string | | -| [type](./kibana-plugin-core-public.savedobjectsfindoptionsreference.type.md) | string | | +| [id](./kibana-plugin-core-public.savedobjectsfindoptionsreference.id.md) | string | | +| [type](./kibana-plugin-core-public.savedobjectsfindoptionsreference.type.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindresponsepublic.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindresponsepublic.md index 6f2276194f054..dd26960a95766 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindresponsepublic.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindresponsepublic.md @@ -13,13 +13,14 @@ Return type of the Saved Objects `find()` method. ```typescript export interface SavedObjectsFindResponsePublic extends SavedObjectsBatchResponse ``` +Extends: SavedObjectsBatchResponse<T> ## Properties | Property | Type | Description | | --- | --- | --- | -| [aggregations](./kibana-plugin-core-public.savedobjectsfindresponsepublic.aggregations.md) | A | | -| [page](./kibana-plugin-core-public.savedobjectsfindresponsepublic.page.md) | number | | -| [perPage](./kibana-plugin-core-public.savedobjectsfindresponsepublic.perpage.md) | number | | -| [total](./kibana-plugin-core-public.savedobjectsfindresponsepublic.total.md) | number | | +| [aggregations?](./kibana-plugin-core-public.savedobjectsfindresponsepublic.aggregations.md) | A | (Optional) | +| [page](./kibana-plugin-core-public.savedobjectsfindresponsepublic.page.md) | number | | +| [perPage](./kibana-plugin-core-public.savedobjectsfindresponsepublic.perpage.md) | number | | +| [total](./kibana-plugin-core-public.savedobjectsfindresponsepublic.total.md) | number | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.md index 2ecce7233aa57..fe148fdc2ff1a 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.md @@ -18,8 +18,8 @@ export interface SavedObjectsImportActionRequiredWarning | Property | Type | Description | | --- | --- | --- | -| [actionPath](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.actionpath.md) | string | The path (without the basePath) that the user should be redirect to address this warning. | -| [buttonLabel](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.buttonlabel.md) | string | An optional label to use for the link button. If unspecified, a default label will be used. | -| [message](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.message.md) | string | The translated message to display to the user. | -| [type](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.type.md) | 'action_required' | | +| [actionPath](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.actionpath.md) | string | The path (without the basePath) that the user should be redirect to address this warning. | +| [buttonLabel?](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.buttonlabel.md) | string | (Optional) An optional label to use for the link button. If unspecified, a default label will be used. | +| [message](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.message.md) | string | The translated message to display to the user. | +| [type](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.type.md) | 'action\_required' | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md index 76dfacf132f0a..2d136bb870de7 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportAmbiguousConflictError | Property | Type | Description | | --- | --- | --- | -| [destinations](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.destinations.md) | Array<{
id: string;
title?: string;
updatedAt?: string;
}> | | -| [type](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.type.md) | 'ambiguous_conflict' | | +| [destinations](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.destinations.md) | Array<{ id: string; title?: string; updatedAt?: string; }> | | +| [type](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.type.md) | 'ambiguous\_conflict' | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportconflicterror.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportconflicterror.md index b0320b05ecadc..57737986ba4ca 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportconflicterror.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportconflicterror.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportConflictError | Property | Type | Description | | --- | --- | --- | -| [destinationId](./kibana-plugin-core-public.savedobjectsimportconflicterror.destinationid.md) | string | | -| [type](./kibana-plugin-core-public.savedobjectsimportconflicterror.type.md) | 'conflict' | | +| [destinationId?](./kibana-plugin-core-public.savedobjectsimportconflicterror.destinationid.md) | string | (Optional) | +| [type](./kibana-plugin-core-public.savedobjectsimportconflicterror.type.md) | 'conflict' | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportfailure.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportfailure.md index f9219c9037e0a..be1a20b3c71a4 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportfailure.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportfailure.md @@ -16,10 +16,10 @@ export interface SavedObjectsImportFailure | Property | Type | Description | | --- | --- | --- | -| [error](./kibana-plugin-core-public.savedobjectsimportfailure.error.md) | SavedObjectsImportConflictError | SavedObjectsImportAmbiguousConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError | | -| [id](./kibana-plugin-core-public.savedobjectsimportfailure.id.md) | string | | -| [meta](./kibana-plugin-core-public.savedobjectsimportfailure.meta.md) | {
title?: string;
icon?: string;
} | | -| [overwrite](./kibana-plugin-core-public.savedobjectsimportfailure.overwrite.md) | boolean | If overwrite is specified, an attempt was made to overwrite an existing object. | -| [title](./kibana-plugin-core-public.savedobjectsimportfailure.title.md) | string | | -| [type](./kibana-plugin-core-public.savedobjectsimportfailure.type.md) | string | | +| [error](./kibana-plugin-core-public.savedobjectsimportfailure.error.md) | SavedObjectsImportConflictError \| SavedObjectsImportAmbiguousConflictError \| SavedObjectsImportUnsupportedTypeError \| SavedObjectsImportMissingReferencesError \| SavedObjectsImportUnknownError | | +| [id](./kibana-plugin-core-public.savedobjectsimportfailure.id.md) | string | | +| [meta](./kibana-plugin-core-public.savedobjectsimportfailure.meta.md) | { title?: string; icon?: string; } | | +| [overwrite?](./kibana-plugin-core-public.savedobjectsimportfailure.overwrite.md) | boolean | (Optional) If overwrite is specified, an attempt was made to overwrite an existing object. | +| [title?](./kibana-plugin-core-public.savedobjectsimportfailure.title.md) | string | (Optional) | +| [type](./kibana-plugin-core-public.savedobjectsimportfailure.type.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.md index 1fea85ea239d5..6c03ab263084c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportMissingReferencesError | Property | Type | Description | | --- | --- | --- | -| [references](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.references.md) | Array<{
type: string;
id: string;
}> | | -| [type](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.type.md) | 'missing_references' | | +| [references](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.references.md) | Array<{ type: string; id: string; }> | | +| [type](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.type.md) | 'missing\_references' | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportresponse.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportresponse.md index 3be800498a9b7..5b6139723a101 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportresponse.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportresponse.md @@ -16,9 +16,9 @@ export interface SavedObjectsImportResponse | Property | Type | Description | | --- | --- | --- | -| [errors](./kibana-plugin-core-public.savedobjectsimportresponse.errors.md) | SavedObjectsImportFailure[] | | -| [success](./kibana-plugin-core-public.savedobjectsimportresponse.success.md) | boolean | | -| [successCount](./kibana-plugin-core-public.savedobjectsimportresponse.successcount.md) | number | | -| [successResults](./kibana-plugin-core-public.savedobjectsimportresponse.successresults.md) | SavedObjectsImportSuccess[] | | -| [warnings](./kibana-plugin-core-public.savedobjectsimportresponse.warnings.md) | SavedObjectsImportWarning[] | | +| [errors?](./kibana-plugin-core-public.savedobjectsimportresponse.errors.md) | SavedObjectsImportFailure\[\] | (Optional) | +| [success](./kibana-plugin-core-public.savedobjectsimportresponse.success.md) | boolean | | +| [successCount](./kibana-plugin-core-public.savedobjectsimportresponse.successcount.md) | number | | +| [successResults?](./kibana-plugin-core-public.savedobjectsimportresponse.successresults.md) | SavedObjectsImportSuccess\[\] | (Optional) | +| [warnings](./kibana-plugin-core-public.savedobjectsimportresponse.warnings.md) | SavedObjectsImportWarning\[\] | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportretry.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportretry.md index b0bda93ef8b72..80a3145ae7e55 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportretry.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportretry.md @@ -16,11 +16,11 @@ export interface SavedObjectsImportRetry | Property | Type | Description | | --- | --- | --- | -| [createNewCopy](./kibana-plugin-core-public.savedobjectsimportretry.createnewcopy.md) | boolean | If createNewCopy is specified, the new object has a new (undefined) origin ID. This is only needed for the case where createNewCopies mode is disabled and ambiguous source conflicts are detected. | -| [destinationId](./kibana-plugin-core-public.savedobjectsimportretry.destinationid.md) | string | The object ID that will be created or overwritten. If not specified, the id field will be used. | -| [id](./kibana-plugin-core-public.savedobjectsimportretry.id.md) | string | | -| [ignoreMissingReferences](./kibana-plugin-core-public.savedobjectsimportretry.ignoremissingreferences.md) | boolean | If ignoreMissingReferences is specified, reference validation will be skipped for this object. | -| [overwrite](./kibana-plugin-core-public.savedobjectsimportretry.overwrite.md) | boolean | | -| [replaceReferences](./kibana-plugin-core-public.savedobjectsimportretry.replacereferences.md) | Array<{
type: string;
from: string;
to: string;
}> | | -| [type](./kibana-plugin-core-public.savedobjectsimportretry.type.md) | string | | +| [createNewCopy?](./kibana-plugin-core-public.savedobjectsimportretry.createnewcopy.md) | boolean | (Optional) If createNewCopy is specified, the new object has a new (undefined) origin ID. This is only needed for the case where createNewCopies mode is disabled and ambiguous source conflicts are detected. | +| [destinationId?](./kibana-plugin-core-public.savedobjectsimportretry.destinationid.md) | string | (Optional) The object ID that will be created or overwritten. If not specified, the id field will be used. | +| [id](./kibana-plugin-core-public.savedobjectsimportretry.id.md) | string | | +| [ignoreMissingReferences?](./kibana-plugin-core-public.savedobjectsimportretry.ignoremissingreferences.md) | boolean | (Optional) If ignoreMissingReferences is specified, reference validation will be skipped for this object. | +| [overwrite](./kibana-plugin-core-public.savedobjectsimportretry.overwrite.md) | boolean | | +| [replaceReferences](./kibana-plugin-core-public.savedobjectsimportretry.replacereferences.md) | Array<{ type: string; from: string; to: string; }> | | +| [type](./kibana-plugin-core-public.savedobjectsimportretry.type.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsimplewarning.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsimplewarning.md index 4d6d984777c80..304779a1589f9 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsimplewarning.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsimplewarning.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportSimpleWarning | Property | Type | Description | | --- | --- | --- | -| [message](./kibana-plugin-core-public.savedobjectsimportsimplewarning.message.md) | string | The translated message to display to the user | -| [type](./kibana-plugin-core-public.savedobjectsimportsimplewarning.type.md) | 'simple' | | +| [message](./kibana-plugin-core-public.savedobjectsimportsimplewarning.message.md) | string | The translated message to display to the user | +| [type](./kibana-plugin-core-public.savedobjectsimportsimplewarning.type.md) | 'simple' | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsuccess.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsuccess.md index 4872deb5ee0db..57ca4b7a787f6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsuccess.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportsuccess.md @@ -16,10 +16,10 @@ export interface SavedObjectsImportSuccess | Property | Type | Description | | --- | --- | --- | -| [createNewCopy](./kibana-plugin-core-public.savedobjectsimportsuccess.createnewcopy.md) | boolean | | -| [destinationId](./kibana-plugin-core-public.savedobjectsimportsuccess.destinationid.md) | string | If destinationId is specified, the new object has a new ID that is different from the import ID. | -| [id](./kibana-plugin-core-public.savedobjectsimportsuccess.id.md) | string | | -| [meta](./kibana-plugin-core-public.savedobjectsimportsuccess.meta.md) | {
title?: string;
icon?: string;
} | | -| [overwrite](./kibana-plugin-core-public.savedobjectsimportsuccess.overwrite.md) | boolean | If overwrite is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution). | -| [type](./kibana-plugin-core-public.savedobjectsimportsuccess.type.md) | string | | +| [createNewCopy?](./kibana-plugin-core-public.savedobjectsimportsuccess.createnewcopy.md) | boolean | (Optional) | +| [destinationId?](./kibana-plugin-core-public.savedobjectsimportsuccess.destinationid.md) | string | (Optional) If destinationId is specified, the new object has a new ID that is different from the import ID. | +| [id](./kibana-plugin-core-public.savedobjectsimportsuccess.id.md) | string | | +| [meta](./kibana-plugin-core-public.savedobjectsimportsuccess.meta.md) | { title?: string; icon?: string; } | | +| [overwrite?](./kibana-plugin-core-public.savedobjectsimportsuccess.overwrite.md) | boolean | (Optional) If overwrite is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution). | +| [type](./kibana-plugin-core-public.savedobjectsimportsuccess.type.md) | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunknownerror.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunknownerror.md index 8ed3369d50d74..fc78e04dee8ac 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunknownerror.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunknownerror.md @@ -16,7 +16,7 @@ export interface SavedObjectsImportUnknownError | Property | Type | Description | | --- | --- | --- | -| [message](./kibana-plugin-core-public.savedobjectsimportunknownerror.message.md) | string | | -| [statusCode](./kibana-plugin-core-public.savedobjectsimportunknownerror.statuscode.md) | number | | -| [type](./kibana-plugin-core-public.savedobjectsimportunknownerror.type.md) | 'unknown' | | +| [message](./kibana-plugin-core-public.savedobjectsimportunknownerror.message.md) | string | | +| [statusCode](./kibana-plugin-core-public.savedobjectsimportunknownerror.statuscode.md) | number | | +| [type](./kibana-plugin-core-public.savedobjectsimportunknownerror.type.md) | 'unknown' | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunsupportedtypeerror.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunsupportedtypeerror.md index afd5ae3110087..de805f05a12e9 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunsupportedtypeerror.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsimportunsupportedtypeerror.md @@ -16,5 +16,5 @@ export interface SavedObjectsImportUnsupportedTypeError | Property | Type | Description | | --- | --- | --- | -| [type](./kibana-plugin-core-public.savedobjectsimportunsupportedtypeerror.type.md) | 'unsupported_type' | | +| [type](./kibana-plugin-core-public.savedobjectsimportunsupportedtypeerror.type.md) | 'unsupported\_type' | | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsresolveresponse.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsresolveresponse.md index cdc79d8ac363d..6364493a9ef09 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsresolveresponse.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsresolveresponse.md @@ -15,7 +15,7 @@ export interface SavedObjectsResolveResponse | Property | Type | Description | | --- | --- | --- | -| [alias\_target\_id](./kibana-plugin-core-public.savedobjectsresolveresponse.alias_target_id.md) | string | The ID of the object that the legacy URL alias points to. This is only defined when the outcome is 'aliasMatch' or 'conflict'. | -| [outcome](./kibana-plugin-core-public.savedobjectsresolveresponse.outcome.md) | 'exactMatch' | 'aliasMatch' | 'conflict' | The outcome for a successful resolve call is one of the following values:\* 'exactMatch' -- One document exactly matched the given ID. \* 'aliasMatch' -- One document with a legacy URL alias matched the given ID; in this case the saved_object.id field is different than the given ID. \* 'conflict' -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the saved_object object is the exact match, and the saved_object.id field is the same as the given ID. | -| [saved\_object](./kibana-plugin-core-public.savedobjectsresolveresponse.saved_object.md) | SavedObject<T> | The saved object that was found. | +| [alias\_target\_id?](./kibana-plugin-core-public.savedobjectsresolveresponse.alias_target_id.md) | string | (Optional) The ID of the object that the legacy URL alias points to. This is only defined when the outcome is 'aliasMatch' or 'conflict'. | +| [outcome](./kibana-plugin-core-public.savedobjectsresolveresponse.outcome.md) | 'exactMatch' \| 'aliasMatch' \| 'conflict' | The outcome for a successful resolve call is one of the following values:\* 'exactMatch' -- One document exactly matched the given ID. \* 'aliasMatch' -- One document with a legacy URL alias matched the given ID; in this case the saved_object.id field is different than the given ID. \* 'conflict' -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the saved_object object is the exact match, and the saved_object.id field is the same as the given ID. | +| [saved\_object](./kibana-plugin-core-public.savedobjectsresolveresponse.saved_object.md) | SavedObject<T> | The saved object that was found. | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsstart.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsstart.md index 0aa47301e8eb1..0ce0da309afbd 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsstart.md @@ -15,5 +15,5 @@ export interface SavedObjectsStart | Property | Type | Description | | --- | --- | --- | -| [client](./kibana-plugin-core-public.savedobjectsstart.client.md) | SavedObjectsClientContract | [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md) | +| [client](./kibana-plugin-core-public.savedobjectsstart.client.md) | SavedObjectsClientContract | [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md) | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsupdateoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsupdateoptions.md index d9cc801148d9e..4a9b85e7b67e6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsupdateoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsupdateoptions.md @@ -15,7 +15,7 @@ export interface SavedObjectsUpdateOptions | Property | Type | Description | | --- | --- | --- | -| [references](./kibana-plugin-core-public.savedobjectsupdateoptions.references.md) | SavedObjectReference[] | | -| [upsert](./kibana-plugin-core-public.savedobjectsupdateoptions.upsert.md) | Attributes | | -| [version](./kibana-plugin-core-public.savedobjectsupdateoptions.version.md) | string | | +| [references?](./kibana-plugin-core-public.savedobjectsupdateoptions.references.md) | SavedObjectReference\[\] | (Optional) | +| [upsert?](./kibana-plugin-core-public.savedobjectsupdateoptions.upsert.md) | Attributes | (Optional) | +| [version?](./kibana-plugin-core-public.savedobjectsupdateoptions.version.md) | string | (Optional) | diff --git a/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md b/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md index 2cf647086b3e2..32b0950aa1065 100644 --- a/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md +++ b/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md @@ -16,6 +16,6 @@ constructor(parentHistory: History, basePath: string); | Parameter | Type | Description | | --- | --- | --- | -| parentHistory | History | | -| basePath | string | | +| parentHistory | History | | +| basePath | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md index 15ed4e74c4dc5..0d04fc3d6a860 100644 --- a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md +++ b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md @@ -15,6 +15,7 @@ The [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistor ```typescript export declare class ScopedHistory implements History ``` +Implements: History<HistoryLocationState> ## Constructors @@ -26,16 +27,16 @@ export declare class ScopedHistory implements Hi | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [action](./kibana-plugin-core-public.scopedhistory.action.md) | | Action | The last action dispatched on the history stack. | -| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | (prompt?: string | boolean | History.TransitionPromptHook<HistoryLocationState> | undefined) => UnregisterCallback | Add a block prompt requesting user confirmation when navigating away from the current page. | -| [createHref](./kibana-plugin-core-public.scopedhistory.createhref.md) | | (location: LocationDescriptorObject<HistoryLocationState>, { prependBasePath }?: {
prependBasePath?: boolean | undefined;
}) => Href | Creates an href (string) to the location. If prependBasePath is true (default), it will prepend the location's path with the scoped history basePath. | -| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | <SubHistoryLocationState = unknown>(basePath: string) => ScopedHistory<SubHistoryLocationState> | Creates a ScopedHistory for a subpath of this ScopedHistory. Useful for applications that may have sub-apps that do not need access to the containing application's history. | -| [go](./kibana-plugin-core-public.scopedhistory.go.md) | | (n: number) => void | Send the user forward or backwards in the history stack. | -| [goBack](./kibana-plugin-core-public.scopedhistory.goback.md) | | () => void | Send the user one location back in the history stack. Equivalent to calling [ScopedHistory.go(-1)](./kibana-plugin-core-public.scopedhistory.go.md). If no more entries are available backwards, this is a no-op. | -| [goForward](./kibana-plugin-core-public.scopedhistory.goforward.md) | | () => void | Send the user one location forward in the history stack. Equivalent to calling [ScopedHistory.go(1)](./kibana-plugin-core-public.scopedhistory.go.md). If no more entries are available forwards, this is a no-op. | -| [length](./kibana-plugin-core-public.scopedhistory.length.md) | | number | The number of entries in the history stack, including all entries forwards and backwards from the current location. | -| [listen](./kibana-plugin-core-public.scopedhistory.listen.md) | | (listener: (location: Location<HistoryLocationState>, action: Action) => void) => UnregisterCallback | Adds a listener for location updates. | -| [location](./kibana-plugin-core-public.scopedhistory.location.md) | | Location<HistoryLocationState> | The current location of the history stack. | -| [push](./kibana-plugin-core-public.scopedhistory.push.md) | | (pathOrLocation: Path | LocationDescriptorObject<HistoryLocationState>, state?: HistoryLocationState | undefined) => void | Pushes a new location onto the history stack. If there are forward entries in the stack, they will be removed. | -| [replace](./kibana-plugin-core-public.scopedhistory.replace.md) | | (pathOrLocation: Path | LocationDescriptorObject<HistoryLocationState>, state?: HistoryLocationState | undefined) => void | Replaces the current location in the history stack. Does not remove forward or backward entries. | +| [action](./kibana-plugin-core-public.scopedhistory.action.md) | | Action | The last action dispatched on the history stack. | +| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | (prompt?: string \| boolean \| History.TransitionPromptHook<HistoryLocationState> \| undefined) => UnregisterCallback | Add a block prompt requesting user confirmation when navigating away from the current page. | +| [createHref](./kibana-plugin-core-public.scopedhistory.createhref.md) | | (location: LocationDescriptorObject<HistoryLocationState>, { prependBasePath }?: { prependBasePath?: boolean \| undefined; }) => Href | Creates an href (string) to the location. If prependBasePath is true (default), it will prepend the location's path with the scoped history basePath. | +| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | <SubHistoryLocationState = unknown>(basePath: string) => ScopedHistory<SubHistoryLocationState> | Creates a ScopedHistory for a subpath of this ScopedHistory. Useful for applications that may have sub-apps that do not need access to the containing application's history. | +| [go](./kibana-plugin-core-public.scopedhistory.go.md) | | (n: number) => void | Send the user forward or backwards in the history stack. | +| [goBack](./kibana-plugin-core-public.scopedhistory.goback.md) | | () => void | Send the user one location back in the history stack. Equivalent to calling [ScopedHistory.go(-1)](./kibana-plugin-core-public.scopedhistory.go.md). If no more entries are available backwards, this is a no-op. | +| [goForward](./kibana-plugin-core-public.scopedhistory.goforward.md) | | () => void | Send the user one location forward in the history stack. Equivalent to calling [ScopedHistory.go(1)](./kibana-plugin-core-public.scopedhistory.go.md). If no more entries are available forwards, this is a no-op. | +| [length](./kibana-plugin-core-public.scopedhistory.length.md) | | number | The number of entries in the history stack, including all entries forwards and backwards from the current location. | +| [listen](./kibana-plugin-core-public.scopedhistory.listen.md) | | (listener: (location: Location<HistoryLocationState>, action: Action) => void) => UnregisterCallback | Adds a listener for location updates. | +| [location](./kibana-plugin-core-public.scopedhistory.location.md) | | Location<HistoryLocationState> | The current location of the history stack. | +| [push](./kibana-plugin-core-public.scopedhistory.push.md) | | (pathOrLocation: Path \| LocationDescriptorObject<HistoryLocationState>, state?: HistoryLocationState \| undefined) => void | Pushes a new location onto the history stack. If there are forward entries in the stack, they will be removed. | +| [replace](./kibana-plugin-core-public.scopedhistory.replace.md) | | (pathOrLocation: Path \| LocationDescriptorObject<HistoryLocationState>, state?: HistoryLocationState \| undefined) => void | Replaces the current location in the history stack. Does not remove forward or backward entries. | diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md index c73a3a200cc24..f53b6e5292861 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md @@ -16,6 +16,6 @@ constructor(client: SavedObjectsClientContract, { id, type, version, attributes, | Parameter | Type | Description | | --- | --- | --- | -| client | SavedObjectsClientContract | | -| { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, } | SavedObjectType<T> | | +| client | SavedObjectsClientContract | | +| { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, } | SavedObjectType<T> | | diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.delete.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.delete.md index 909ff2e7d3435..cb848bff56430 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.delete.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.delete.md @@ -11,5 +11,5 @@ delete(): Promise<{}>; ``` Returns: -`Promise<{}>` +Promise<{}> diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.get.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.get.md index caa9ab9857a6f..9a9c27d78c06c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.get.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.get.md @@ -14,9 +14,9 @@ get(key: string): any; | Parameter | Type | Description | | --- | --- | --- | -| key | string | | +| key | string | | Returns: -`any` +any diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.has.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.has.md index 960a7b6cfd16a..acd0ff02c7d23 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.has.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.has.md @@ -14,9 +14,9 @@ has(key: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| key | string | | +| key | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md index e15a4d4ea6d09..2aac93f9b5bc1 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md @@ -24,15 +24,15 @@ export declare class SimpleSavedObject | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [\_version](./kibana-plugin-core-public.simplesavedobject._version.md) | | SavedObjectType<T>['version'] | | -| [attributes](./kibana-plugin-core-public.simplesavedobject.attributes.md) | | T | | -| [coreMigrationVersion](./kibana-plugin-core-public.simplesavedobject.coremigrationversion.md) | | SavedObjectType<T>['coreMigrationVersion'] | | -| [error](./kibana-plugin-core-public.simplesavedobject.error.md) | | SavedObjectType<T>['error'] | | -| [id](./kibana-plugin-core-public.simplesavedobject.id.md) | | SavedObjectType<T>['id'] | | -| [migrationVersion](./kibana-plugin-core-public.simplesavedobject.migrationversion.md) | | SavedObjectType<T>['migrationVersion'] | | -| [namespaces](./kibana-plugin-core-public.simplesavedobject.namespaces.md) | | SavedObjectType<T>['namespaces'] | Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with namespaceType: 'agnostic'. | -| [references](./kibana-plugin-core-public.simplesavedobject.references.md) | | SavedObjectType<T>['references'] | | -| [type](./kibana-plugin-core-public.simplesavedobject.type.md) | | SavedObjectType<T>['type'] | | +| [\_version?](./kibana-plugin-core-public.simplesavedobject._version.md) | | SavedObjectType<T>\['version'\] | (Optional) | +| [attributes](./kibana-plugin-core-public.simplesavedobject.attributes.md) | | T | | +| [coreMigrationVersion](./kibana-plugin-core-public.simplesavedobject.coremigrationversion.md) | | SavedObjectType<T>\['coreMigrationVersion'\] | | +| [error](./kibana-plugin-core-public.simplesavedobject.error.md) | | SavedObjectType<T>\['error'\] | | +| [id](./kibana-plugin-core-public.simplesavedobject.id.md) | | SavedObjectType<T>\['id'\] | | +| [migrationVersion](./kibana-plugin-core-public.simplesavedobject.migrationversion.md) | | SavedObjectType<T>\['migrationVersion'\] | | +| [namespaces](./kibana-plugin-core-public.simplesavedobject.namespaces.md) | | SavedObjectType<T>\['namespaces'\] | Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with namespaceType: 'agnostic'. | +| [references](./kibana-plugin-core-public.simplesavedobject.references.md) | | SavedObjectType<T>\['references'\] | | +| [type](./kibana-plugin-core-public.simplesavedobject.type.md) | | SavedObjectType<T>\['type'\] | | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.save.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.save.md index c985c714b9c5c..fdd262c70d4e6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.save.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.save.md @@ -11,5 +11,5 @@ save(): Promise>; ``` Returns: -`Promise>` +Promise<SimpleSavedObject<T>> diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.set.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.set.md index 09549e92b6a05..e3a6621f520bd 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.set.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.set.md @@ -14,10 +14,10 @@ set(key: string, value: any): T; | Parameter | Type | Description | | --- | --- | --- | -| key | string | | -| value | any | | +| key | string | | +| value | any | | Returns: -`T` +T diff --git a/docs/development/core/public/kibana-plugin-core-public.toastoptions.md b/docs/development/core/public/kibana-plugin-core-public.toastoptions.md index 0d85c482c2288..c140a2e52b036 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastoptions.md @@ -16,5 +16,5 @@ export interface ToastOptions | Property | Type | Description | | --- | --- | --- | -| [toastLifeTimeMs](./kibana-plugin-core-public.toastoptions.toastlifetimems.md) | number | How long should the toast remain on screen. | +| [toastLifeTimeMs?](./kibana-plugin-core-public.toastoptions.toastlifetimems.md) | number | (Optional) How long should the toast remain on screen. | diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi._constructor_.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi._constructor_.md index 71faf9a13b640..c50cc4d6469ea 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi._constructor_.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi._constructor_.md @@ -18,5 +18,5 @@ constructor(deps: { | Parameter | Type | Description | | --- | --- | --- | -| deps | {
uiSettings: IUiSettingsClient;
} | | +| deps | { uiSettings: IUiSettingsClient; } | | diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.add.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.add.md index 8cd3829c6f6ac..7bee5af0c3be4 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.add.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.add.md @@ -16,11 +16,11 @@ add(toastOrTitle: ToastInput): Toast; | Parameter | Type | Description | | --- | --- | --- | -| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | +| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | Returns: -`Toast` +Toast a [Toast](./kibana-plugin-core-public.toast.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.adddanger.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.adddanger.md index 420100a1209ab..f73a84996ff92 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.adddanger.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.adddanger.md @@ -16,12 +16,12 @@ addDanger(toastOrTitle: ToastInput, options?: ToastOptions): Toast; | Parameter | Type | Description | | --- | --- | --- | -| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | -| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | +| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | +| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | Returns: -`Toast` +Toast a [Toast](./kibana-plugin-core-public.toast.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.adderror.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.adderror.md index e5f851a225664..c1520ea392f70 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.adderror.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.adderror.md @@ -16,12 +16,12 @@ addError(error: Error, options: ErrorToastOptions): Toast; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | an Error instance. | -| options | ErrorToastOptions | [ErrorToastOptions](./kibana-plugin-core-public.errortoastoptions.md) | +| error | Error | an Error instance. | +| options | ErrorToastOptions | [ErrorToastOptions](./kibana-plugin-core-public.errortoastoptions.md) | Returns: -`Toast` +Toast a [Toast](./kibana-plugin-core-public.toast.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.addinfo.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.addinfo.md index 76508d26b4ae9..7029482663155 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.addinfo.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.addinfo.md @@ -16,12 +16,12 @@ addInfo(toastOrTitle: ToastInput, options?: ToastOptions): Toast; | Parameter | Type | Description | | --- | --- | --- | -| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | -| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | +| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | +| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | Returns: -`Toast` +Toast a [Toast](./kibana-plugin-core-public.toast.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.addsuccess.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.addsuccess.md index c79f48042514a..b9cf4da3b43af 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.addsuccess.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.addsuccess.md @@ -16,12 +16,12 @@ addSuccess(toastOrTitle: ToastInput, options?: ToastOptions): Toast; | Parameter | Type | Description | | --- | --- | --- | -| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | -| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | +| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | +| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | Returns: -`Toast` +Toast a [Toast](./kibana-plugin-core-public.toast.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.addwarning.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.addwarning.md index 6154af148332d..790af0d26220a 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.addwarning.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.addwarning.md @@ -16,12 +16,12 @@ addWarning(toastOrTitle: ToastInput, options?: ToastOptions): Toast; | Parameter | Type | Description | | --- | --- | --- | -| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | -| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | +| toastOrTitle | ToastInput | a [ToastInput](./kibana-plugin-core-public.toastinput.md) | +| options | ToastOptions | a [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | Returns: -`Toast` +Toast a [Toast](./kibana-plugin-core-public.toast.md) diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.get_.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.get_.md index 90b32a8b48e5c..275d30fd54e0f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.get_.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.get_.md @@ -13,5 +13,5 @@ get$(): Rx.Observable; ``` Returns: -`Rx.Observable` +Rx.Observable<Toast\[\]> diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.md index ca4c08989128a..4d7f9dcacfa6f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.md @@ -11,6 +11,7 @@ Methods for adding and removing global toast messages. ```typescript export declare class ToastsApi implements IToasts ``` +Implements: IToasts ## Constructors diff --git a/docs/development/core/public/kibana-plugin-core-public.toastsapi.remove.md b/docs/development/core/public/kibana-plugin-core-public.toastsapi.remove.md index 360fb94522821..aeac9f46b7901 100644 --- a/docs/development/core/public/kibana-plugin-core-public.toastsapi.remove.md +++ b/docs/development/core/public/kibana-plugin-core-public.toastsapi.remove.md @@ -16,9 +16,9 @@ remove(toastOrId: Toast | string): void; | Parameter | Type | Description | | --- | --- | --- | -| toastOrId | Toast | string | a [Toast](./kibana-plugin-core-public.toast.md) returned by [ToastsApi.add()](./kibana-plugin-core-public.toastsapi.add.md) or its id | +| toastOrId | Toast \| string | a [Toast](./kibana-plugin-core-public.toast.md) returned by [ToastsApi.add()](./kibana-plugin-core-public.toastsapi.add.md) or its id | Returns: -`void` +void diff --git a/docs/development/core/public/kibana-plugin-core-public.uisettingsparams.md b/docs/development/core/public/kibana-plugin-core-public.uisettingsparams.md index 54d1a6612f4ba..325ce96f36ca3 100644 --- a/docs/development/core/public/kibana-plugin-core-public.uisettingsparams.md +++ b/docs/development/core/public/kibana-plugin-core-public.uisettingsparams.md @@ -16,18 +16,18 @@ export interface UiSettingsParams | Property | Type | Description | | --- | --- | --- | -| [category](./kibana-plugin-core-public.uisettingsparams.category.md) | string[] | used to group the configured setting in the UI | -| [deprecation](./kibana-plugin-core-public.uisettingsparams.deprecation.md) | DeprecationSettings | optional deprecation information. Used to generate a deprecation warning. | -| [description](./kibana-plugin-core-public.uisettingsparams.description.md) | string | description provided to a user in UI | -| [metric](./kibana-plugin-core-public.uisettingsparams.metric.md) | {
type: UiCounterMetricType;
name: string;
} | Metric to track once this property changes | -| [name](./kibana-plugin-core-public.uisettingsparams.name.md) | string | title in the UI | -| [optionLabels](./kibana-plugin-core-public.uisettingsparams.optionlabels.md) | Record<string, string> | text labels for 'select' type UI element | -| [options](./kibana-plugin-core-public.uisettingsparams.options.md) | string[] | array of permitted values for this setting | -| [order](./kibana-plugin-core-public.uisettingsparams.order.md) | number | index of the settings within its category (ascending order, smallest will be displayed first). Used for ordering in the UI. settings without order defined will be displayed last and ordered by name | -| [readonly](./kibana-plugin-core-public.uisettingsparams.readonly.md) | boolean | a flag indicating that value cannot be changed | -| [requiresPageReload](./kibana-plugin-core-public.uisettingsparams.requirespagereload.md) | boolean | a flag indicating whether new value applying requires page reloading | -| [schema](./kibana-plugin-core-public.uisettingsparams.schema.md) | Type<T> | | -| [sensitive](./kibana-plugin-core-public.uisettingsparams.sensitive.md) | boolean | a flag indicating that value might contain user sensitive data. used by telemetry to mask the value of the setting when sent. | -| [type](./kibana-plugin-core-public.uisettingsparams.type.md) | UiSettingsType | defines a type of UI element [UiSettingsType](./kibana-plugin-core-public.uisettingstype.md) | -| [value](./kibana-plugin-core-public.uisettingsparams.value.md) | T | default value to fall back to if a user doesn't provide any | +| [category?](./kibana-plugin-core-public.uisettingsparams.category.md) | string\[\] | (Optional) used to group the configured setting in the UI | +| [deprecation?](./kibana-plugin-core-public.uisettingsparams.deprecation.md) | DeprecationSettings | (Optional) optional deprecation information. Used to generate a deprecation warning. | +| [description?](./kibana-plugin-core-public.uisettingsparams.description.md) | string | (Optional) description provided to a user in UI | +| [metric?](./kibana-plugin-core-public.uisettingsparams.metric.md) | { type: UiCounterMetricType; name: string; } | (Optional) Metric to track once this property changes | +| [name?](./kibana-plugin-core-public.uisettingsparams.name.md) | string | (Optional) title in the UI | +| [optionLabels?](./kibana-plugin-core-public.uisettingsparams.optionlabels.md) | Record<string, string> | (Optional) text labels for 'select' type UI element | +| [options?](./kibana-plugin-core-public.uisettingsparams.options.md) | string\[\] | (Optional) array of permitted values for this setting | +| [order?](./kibana-plugin-core-public.uisettingsparams.order.md) | number | (Optional) index of the settings within its category (ascending order, smallest will be displayed first). Used for ordering in the UI. settings without order defined will be displayed last and ordered by name | +| [readonly?](./kibana-plugin-core-public.uisettingsparams.readonly.md) | boolean | (Optional) a flag indicating that value cannot be changed | +| [requiresPageReload?](./kibana-plugin-core-public.uisettingsparams.requirespagereload.md) | boolean | (Optional) a flag indicating whether new value applying requires page reloading | +| [schema](./kibana-plugin-core-public.uisettingsparams.schema.md) | Type<T> | | +| [sensitive?](./kibana-plugin-core-public.uisettingsparams.sensitive.md) | boolean | (Optional) a flag indicating that value might contain user sensitive data. used by telemetry to mask the value of the setting when sent. | +| [type?](./kibana-plugin-core-public.uisettingsparams.type.md) | UiSettingsType | (Optional) defines a type of UI element [UiSettingsType](./kibana-plugin-core-public.uisettingstype.md) | +| [value?](./kibana-plugin-core-public.uisettingsparams.value.md) | T | (Optional) default value to fall back to if a user doesn't provide any | diff --git a/docs/development/core/public/kibana-plugin-core-public.userprovidedvalues.md b/docs/development/core/public/kibana-plugin-core-public.userprovidedvalues.md index e59a75500f558..eb8f0124c3341 100644 --- a/docs/development/core/public/kibana-plugin-core-public.userprovidedvalues.md +++ b/docs/development/core/public/kibana-plugin-core-public.userprovidedvalues.md @@ -16,6 +16,6 @@ export interface UserProvidedValues | Property | Type | Description | | --- | --- | --- | -| [isOverridden](./kibana-plugin-core-public.userprovidedvalues.isoverridden.md) | boolean | | -| [userValue](./kibana-plugin-core-public.userprovidedvalues.uservalue.md) | T | | +| [isOverridden?](./kibana-plugin-core-public.userprovidedvalues.isoverridden.md) | boolean | (Optional) | +| [userValue?](./kibana-plugin-core-public.userprovidedvalues.uservalue.md) | T | (Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.appcategory.md b/docs/development/core/server/kibana-plugin-core-server.appcategory.md index a761bf4e5b393..ca5e8b354d451 100644 --- a/docs/development/core/server/kibana-plugin-core-server.appcategory.md +++ b/docs/development/core/server/kibana-plugin-core-server.appcategory.md @@ -16,9 +16,9 @@ export interface AppCategory | Property | Type | Description | | --- | --- | --- | -| [ariaLabel](./kibana-plugin-core-server.appcategory.arialabel.md) | string | If the visual label isn't appropriate for screen readers, can override it here | -| [euiIconType](./kibana-plugin-core-server.appcategory.euiicontype.md) | string | Define an icon to be used for the category If the category is only 1 item, and no icon is defined, will default to the product icon Defaults to initials if no icon is defined | -| [id](./kibana-plugin-core-server.appcategory.id.md) | string | Unique identifier for the categories | -| [label](./kibana-plugin-core-server.appcategory.label.md) | string | Label used for category name. Also used as aria-label if one isn't set. | -| [order](./kibana-plugin-core-server.appcategory.order.md) | number | The order that categories will be sorted in Prefer large steps between categories to allow for further editing (Default categories are in steps of 1000) | +| [ariaLabel?](./kibana-plugin-core-server.appcategory.arialabel.md) | string | (Optional) If the visual label isn't appropriate for screen readers, can override it here | +| [euiIconType?](./kibana-plugin-core-server.appcategory.euiicontype.md) | string | (Optional) Define an icon to be used for the category If the category is only 1 item, and no icon is defined, will default to the product icon Defaults to initials if no icon is defined | +| [id](./kibana-plugin-core-server.appcategory.id.md) | string | Unique identifier for the categories | +| [label](./kibana-plugin-core-server.appcategory.label.md) | string | Label used for category name. Also used as aria-label if one isn't set. | +| [order?](./kibana-plugin-core-server.appcategory.order.md) | number | (Optional) The order that categories will be sorted in Prefer large steps between categories to allow for further editing (Default categories are in steps of 1000) | diff --git a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.md b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.md index 1ad1d87220b74..c5c664e07f297 100644 --- a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.md +++ b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.md @@ -6,7 +6,7 @@ > Warning: This API is now obsolete. > -> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-server.plugin.md) +> Asynchronous lifecycles are deprecated, and should be migrated to sync > A plugin with asynchronous lifecycle methods. @@ -23,5 +23,5 @@ export interface AsyncPlugin(Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.setup.md b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.setup.md index 1d033b7b88b05..73752d6c9bd20 100644 --- a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.setup.md +++ b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.setup.md @@ -14,10 +14,10 @@ setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise; | Parameter | Type | Description | | --- | --- | --- | -| core | CoreSetup | | -| plugins | TPluginsSetup | | +| core | CoreSetup | | +| plugins | TPluginsSetup | | Returns: -`TSetup | Promise` +TSetup \| Promise<TSetup> diff --git a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.start.md b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.start.md index 3cce90f01603b..98cf74341062a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.start.md +++ b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.start.md @@ -14,10 +14,10 @@ start(core: CoreStart, plugins: TPluginsStart): TStart | Promise; | Parameter | Type | Description | | --- | --- | --- | -| core | CoreStart | | -| plugins | TPluginsStart | | +| core | CoreStart | | +| plugins | TPluginsStart | | Returns: -`TStart | Promise` +TStart \| Promise<TStart> diff --git a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.stop.md b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.stop.md index 9272fc2c4eba0..80c554f343346 100644 --- a/docs/development/core/server/kibana-plugin-core-server.asyncplugin.stop.md +++ b/docs/development/core/server/kibana-plugin-core-server.asyncplugin.stop.md @@ -11,5 +11,5 @@ stop?(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.authenticated.md b/docs/development/core/server/kibana-plugin-core-server.authenticated.md index ffbf942926015..90b480d4a026c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.authenticated.md +++ b/docs/development/core/server/kibana-plugin-core-server.authenticated.md @@ -10,10 +10,11 @@ ```typescript export interface Authenticated extends AuthResultParams ``` +Extends: AuthResultParams ## Properties | Property | Type | Description | | --- | --- | --- | -| [type](./kibana-plugin-core-server.authenticated.type.md) | AuthResultType.authenticated | | +| [type](./kibana-plugin-core-server.authenticated.type.md) | AuthResultType.authenticated | | diff --git a/docs/development/core/server/kibana-plugin-core-server.authnothandled.md b/docs/development/core/server/kibana-plugin-core-server.authnothandled.md index c1eaa6899135b..297f60e4bd8ac 100644 --- a/docs/development/core/server/kibana-plugin-core-server.authnothandled.md +++ b/docs/development/core/server/kibana-plugin-core-server.authnothandled.md @@ -15,5 +15,5 @@ export interface AuthNotHandled | Property | Type | Description | | --- | --- | --- | -| [type](./kibana-plugin-core-server.authnothandled.type.md) | AuthResultType.notHandled | | +| [type](./kibana-plugin-core-server.authnothandled.type.md) | AuthResultType.notHandled | | diff --git a/docs/development/core/server/kibana-plugin-core-server.authredirected.md b/docs/development/core/server/kibana-plugin-core-server.authredirected.md index 7b5a4d60fb0bb..4da08e49056f7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.authredirected.md +++ b/docs/development/core/server/kibana-plugin-core-server.authredirected.md @@ -10,10 +10,11 @@ ```typescript export interface AuthRedirected extends AuthRedirectedParams ``` +Extends: AuthRedirectedParams ## Properties | Property | Type | Description | | --- | --- | --- | -| [type](./kibana-plugin-core-server.authredirected.type.md) | AuthResultType.redirected | | +| [type](./kibana-plugin-core-server.authredirected.type.md) | AuthResultType.redirected | | diff --git a/docs/development/core/server/kibana-plugin-core-server.authredirectedparams.md b/docs/development/core/server/kibana-plugin-core-server.authredirectedparams.md index 2e1f04ef4efc6..2f6ef7c6f6ba4 100644 --- a/docs/development/core/server/kibana-plugin-core-server.authredirectedparams.md +++ b/docs/development/core/server/kibana-plugin-core-server.authredirectedparams.md @@ -16,5 +16,5 @@ export interface AuthRedirectedParams | Property | Type | Description | | --- | --- | --- | -| [headers](./kibana-plugin-core-server.authredirectedparams.headers.md) | {
location: string;
} & ResponseHeaders | Headers to attach for auth redirect. Must include "location" header | +| [headers](./kibana-plugin-core-server.authredirectedparams.headers.md) | { location: string; } & ResponseHeaders | Headers to attach for auth redirect. Must include "location" header | diff --git a/docs/development/core/server/kibana-plugin-core-server.authresultparams.md b/docs/development/core/server/kibana-plugin-core-server.authresultparams.md index db4ead393c047..7e907a9bf7a77 100644 --- a/docs/development/core/server/kibana-plugin-core-server.authresultparams.md +++ b/docs/development/core/server/kibana-plugin-core-server.authresultparams.md @@ -16,7 +16,7 @@ export interface AuthResultParams | Property | Type | Description | | --- | --- | --- | -| [requestHeaders](./kibana-plugin-core-server.authresultparams.requestheaders.md) | AuthHeaders | Auth specific headers to attach to a request object. Used to perform a request to Elasticsearch on behalf of an authenticated user. | -| [responseHeaders](./kibana-plugin-core-server.authresultparams.responseheaders.md) | AuthHeaders | Auth specific headers to attach to a response object. Used to send back authentication mechanism related headers to a client when needed. | -| [state](./kibana-plugin-core-server.authresultparams.state.md) | Record<string, any> | Data to associate with an incoming request. Any downstream plugin may get access to the data. | +| [requestHeaders?](./kibana-plugin-core-server.authresultparams.requestheaders.md) | AuthHeaders | (Optional) Auth specific headers to attach to a request object. Used to perform a request to Elasticsearch on behalf of an authenticated user. | +| [responseHeaders?](./kibana-plugin-core-server.authresultparams.responseheaders.md) | AuthHeaders | (Optional) Auth specific headers to attach to a response object. Used to send back authentication mechanism related headers to a client when needed. | +| [state?](./kibana-plugin-core-server.authresultparams.state.md) | Record<string, any> | (Optional) Data to associate with an incoming request. Any downstream plugin may get access to the data. | diff --git a/docs/development/core/server/kibana-plugin-core-server.authtoolkit.md b/docs/development/core/server/kibana-plugin-core-server.authtoolkit.md index 5f8b98ab2e894..24b561d04bbb7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.authtoolkit.md +++ b/docs/development/core/server/kibana-plugin-core-server.authtoolkit.md @@ -16,7 +16,7 @@ export interface AuthToolkit | Property | Type | Description | | --- | --- | --- | -| [authenticated](./kibana-plugin-core-server.authtoolkit.authenticated.md) | (data?: AuthResultParams) => AuthResult | Authentication is successful with given credentials, allow request to pass through | -| [notHandled](./kibana-plugin-core-server.authtoolkit.nothandled.md) | () => AuthResult | User has no credentials. Allows user to access a resource when authRequired is 'optional' Rejects a request when authRequired: true | -| [redirected](./kibana-plugin-core-server.authtoolkit.redirected.md) | (headers: {
location: string;
} & ResponseHeaders) => AuthResult | Redirects user to another location to complete authentication when authRequired: true Allows user to access a resource without redirection when authRequired: 'optional' | +| [authenticated](./kibana-plugin-core-server.authtoolkit.authenticated.md) | (data?: AuthResultParams) => AuthResult | Authentication is successful with given credentials, allow request to pass through | +| [notHandled](./kibana-plugin-core-server.authtoolkit.nothandled.md) | () => AuthResult | User has no credentials. Allows user to access a resource when authRequired is 'optional' Rejects a request when authRequired: true | +| [redirected](./kibana-plugin-core-server.authtoolkit.redirected.md) | (headers: { location: string; } & ResponseHeaders) => AuthResult | Redirects user to another location to complete authentication when authRequired: true Allows user to access a resource without redirection when authRequired: 'optional' | diff --git a/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md index 3e47865062352..bcd96e35295ac 100644 --- a/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md @@ -16,11 +16,11 @@ export interface BaseDeprecationDetails | Property | Type | Description | | --- | --- | --- | -| [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
omitContextFromBody?: boolean;
};
manualSteps: string[];
} | corrective action needed to fix this deprecation. | -| [deprecationType](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md) | 'config' | 'feature' | (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. | -| [documentationUrl](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md) | string | (optional) link to the documentation for more details on the deprecation. | -| [level](./kibana-plugin-core-server.basedeprecationdetails.level.md) | 'warning' | 'critical' | 'fetch_error' | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. | -| [message](./kibana-plugin-core-server.basedeprecationdetails.message.md) | string | The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | -| [requireRestart](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md) | boolean | (optional) specify the fix for this deprecation requires a full kibana restart. | -| [title](./kibana-plugin-core-server.basedeprecationdetails.title.md) | string | The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | +| [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md) | { api?: { path: string; method: 'POST' \| 'PUT'; body?: { \[key: string\]: any; }; omitContextFromBody?: boolean; }; manualSteps: string\[\]; } | corrective action needed to fix this deprecation. | +| [deprecationType?](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md) | 'config' \| 'feature' | (Optional) (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. | +| [documentationUrl?](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md) | string | (Optional) (optional) link to the documentation for more details on the deprecation. | +| [level](./kibana-plugin-core-server.basedeprecationdetails.level.md) | 'warning' \| 'critical' \| 'fetch\_error' | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. | +| [message](./kibana-plugin-core-server.basedeprecationdetails.message.md) | string | The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | +| [requireRestart?](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md) | boolean | (Optional) (optional) specify the fix for this deprecation requires a full kibana restart. | +| [title](./kibana-plugin-core-server.basedeprecationdetails.title.md) | string | The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | diff --git a/docs/development/core/server/kibana-plugin-core-server.basepath.md b/docs/development/core/server/kibana-plugin-core-server.basepath.md index f4bac88cd85f5..4fae861cf1659 100644 --- a/docs/development/core/server/kibana-plugin-core-server.basepath.md +++ b/docs/development/core/server/kibana-plugin-core-server.basepath.md @@ -20,10 +20,10 @@ The constructor for this class is marked as internal. Third-party code should no | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [get](./kibana-plugin-core-server.basepath.get.md) | | (request: KibanaRequest) => string | returns basePath value, specific for an incoming request. | -| [prepend](./kibana-plugin-core-server.basepath.prepend.md) | | (path: string) => string | Prepends path with the basePath. | -| [publicBaseUrl](./kibana-plugin-core-server.basepath.publicbaseurl.md) | | string | The server's publicly exposed base URL, if configured. Includes protocol, host, port (optional) and the [BasePath.serverBasePath](./kibana-plugin-core-server.basepath.serverbasepath.md). | -| [remove](./kibana-plugin-core-server.basepath.remove.md) | | (path: string) => string | Removes the prepended basePath from the path. | -| [serverBasePath](./kibana-plugin-core-server.basepath.serverbasepath.md) | | string | returns the server's basePathSee [BasePath.get](./kibana-plugin-core-server.basepath.get.md) for getting the basePath value for a specific request | -| [set](./kibana-plugin-core-server.basepath.set.md) | | (request: KibanaRequest, requestSpecificBasePath: string) => void | sets basePath value, specific for an incoming request. | +| [get](./kibana-plugin-core-server.basepath.get.md) | | (request: KibanaRequest) => string | returns basePath value, specific for an incoming request. | +| [prepend](./kibana-plugin-core-server.basepath.prepend.md) | | (path: string) => string | Prepends path with the basePath. | +| [publicBaseUrl?](./kibana-plugin-core-server.basepath.publicbaseurl.md) | | string | (Optional) The server's publicly exposed base URL, if configured. Includes protocol, host, port (optional) and the [BasePath.serverBasePath](./kibana-plugin-core-server.basepath.serverbasepath.md). | +| [remove](./kibana-plugin-core-server.basepath.remove.md) | | (path: string) => string | Removes the prepended basePath from the path. | +| [serverBasePath](./kibana-plugin-core-server.basepath.serverbasepath.md) | | string | returns the server's basePathSee [BasePath.get](./kibana-plugin-core-server.basepath.get.md) for getting the basePath value for a specific request | +| [set](./kibana-plugin-core-server.basepath.set.md) | | (request: KibanaRequest, requestSpecificBasePath: string) => void | sets basePath value, specific for an incoming request. | diff --git a/docs/development/core/server/kibana-plugin-core-server.capabilities.md b/docs/development/core/server/kibana-plugin-core-server.capabilities.md index cf47ce4609ea1..a5900e96a86b5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.capabilities.md +++ b/docs/development/core/server/kibana-plugin-core-server.capabilities.md @@ -16,7 +16,7 @@ export interface Capabilities | Property | Type | Description | | --- | --- | --- | -| [catalogue](./kibana-plugin-core-server.capabilities.catalogue.md) | Record<string, boolean> | Catalogue capabilities. Catalogue entries drive the visibility of the Kibana homepage options. | -| [management](./kibana-plugin-core-server.capabilities.management.md) | {
[sectionId: string]: Record<string, boolean>;
} | Management section capabilities. | -| [navLinks](./kibana-plugin-core-server.capabilities.navlinks.md) | Record<string, boolean> | Navigation link capabilities. | +| [catalogue](./kibana-plugin-core-server.capabilities.catalogue.md) | Record<string, boolean> | Catalogue capabilities. Catalogue entries drive the visibility of the Kibana homepage options. | +| [management](./kibana-plugin-core-server.capabilities.management.md) | { \[sectionId: string\]: Record<string, boolean>; } | Management section capabilities. | +| [navLinks](./kibana-plugin-core-server.capabilities.navlinks.md) | Record<string, boolean> | Navigation link capabilities. | diff --git a/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerprovider.md b/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerprovider.md index 01a6f3562e77e..9122f7e0f11ed 100644 --- a/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerprovider.md +++ b/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerprovider.md @@ -16,11 +16,11 @@ registerProvider(provider: CapabilitiesProvider): void; | Parameter | Type | Description | | --- | --- | --- | -| provider | CapabilitiesProvider | | +| provider | CapabilitiesProvider | | Returns: -`void` +void ## Example @@ -41,6 +41,5 @@ public setup(core: CoreSetup, deps: {}) { } }); } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerswitcher.md b/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerswitcher.md index 715f15ec812a3..c07703c1f365f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerswitcher.md +++ b/docs/development/core/server/kibana-plugin-core-server.capabilitiessetup.registerswitcher.md @@ -18,11 +18,11 @@ registerSwitcher(switcher: CapabilitiesSwitcher): void; | Parameter | Type | Description | | --- | --- | --- | -| switcher | CapabilitiesSwitcher | | +| switcher | CapabilitiesSwitcher | | Returns: -`void` +void ## Example @@ -54,6 +54,5 @@ public setup(core: CoreSetup, deps: {}) { return {}; // All capabilities will remain unchanged. }); } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.capabilitiesstart.resolvecapabilities.md b/docs/development/core/server/kibana-plugin-core-server.capabilitiesstart.resolvecapabilities.md index d0e02499c580e..a9dc279526065 100644 --- a/docs/development/core/server/kibana-plugin-core-server.capabilitiesstart.resolvecapabilities.md +++ b/docs/development/core/server/kibana-plugin-core-server.capabilitiesstart.resolvecapabilities.md @@ -16,10 +16,10 @@ resolveCapabilities(request: KibanaRequest, options?: ResolveCapabilitiesOptions | Parameter | Type | Description | | --- | --- | --- | -| request | KibanaRequest | | -| options | ResolveCapabilitiesOptions | | +| request | KibanaRequest | | +| options | ResolveCapabilitiesOptions | | Returns: -`Promise` +Promise<Capabilities> diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md index d1ccbb0b6164a..6065d1fc1889f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md @@ -10,11 +10,12 @@ ```typescript export interface ConfigDeprecationDetails extends BaseDeprecationDetails ``` +Extends: BaseDeprecationDetails ## Properties | Property | Type | Description | | --- | --- | --- | -| [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md) | string | | -| [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md) | 'config' | | +| [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md) | string | | +| [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md) | 'config' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md b/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md index 0d12fc16af423..5e60dd7e2ffd7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md +++ b/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md @@ -13,5 +13,5 @@ createContextContainer(): IContextContainer; ``` Returns: -`IContextContainer` +IContextContainer diff --git a/docs/development/core/server/kibana-plugin-core-server.contextsetup.md b/docs/development/core/server/kibana-plugin-core-server.contextsetup.md index df3ee924fbcca..a15adccc97714 100644 --- a/docs/development/core/server/kibana-plugin-core-server.contextsetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.contextsetup.md @@ -68,7 +68,6 @@ class MyPlugin { } } } - ``` ## Example @@ -127,7 +126,6 @@ class VizRenderingPlugin { }; } } - ``` ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.corepreboot.md b/docs/development/core/server/kibana-plugin-core-server.corepreboot.md index 475b5f109d58c..3ac97d2ca3b37 100644 --- a/docs/development/core/server/kibana-plugin-core-server.corepreboot.md +++ b/docs/development/core/server/kibana-plugin-core-server.corepreboot.md @@ -16,7 +16,7 @@ export interface CorePreboot | Property | Type | Description | | --- | --- | --- | -| [elasticsearch](./kibana-plugin-core-server.corepreboot.elasticsearch.md) | ElasticsearchServicePreboot | [ElasticsearchServicePreboot](./kibana-plugin-core-server.elasticsearchservicepreboot.md) | -| [http](./kibana-plugin-core-server.corepreboot.http.md) | HttpServicePreboot | [HttpServicePreboot](./kibana-plugin-core-server.httpservicepreboot.md) | -| [preboot](./kibana-plugin-core-server.corepreboot.preboot.md) | PrebootServicePreboot | [PrebootServicePreboot](./kibana-plugin-core-server.prebootservicepreboot.md) | +| [elasticsearch](./kibana-plugin-core-server.corepreboot.elasticsearch.md) | ElasticsearchServicePreboot | [ElasticsearchServicePreboot](./kibana-plugin-core-server.elasticsearchservicepreboot.md) | +| [http](./kibana-plugin-core-server.corepreboot.http.md) | HttpServicePreboot | [HttpServicePreboot](./kibana-plugin-core-server.httpservicepreboot.md) | +| [preboot](./kibana-plugin-core-server.corepreboot.preboot.md) | PrebootServicePreboot | [PrebootServicePreboot](./kibana-plugin-core-server.prebootservicepreboot.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.md index b03101b4d9fe6..f4a8ece97e013 100644 --- a/docs/development/core/server/kibana-plugin-core-server.coresetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.md @@ -16,17 +16,17 @@ export interface CoreSetupCapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | -| [context](./kibana-plugin-core-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) | -| [deprecations](./kibana-plugin-core-server.coresetup.deprecations.md) | DeprecationsServiceSetup | [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) | -| [elasticsearch](./kibana-plugin-core-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-core-server.elasticsearchservicesetup.md) | -| [executionContext](./kibana-plugin-core-server.coresetup.executioncontext.md) | ExecutionContextSetup | [ExecutionContextSetup](./kibana-plugin-core-server.executioncontextsetup.md) | -| [getStartServices](./kibana-plugin-core-server.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) | -| [http](./kibana-plugin-core-server.coresetup.http.md) | HttpServiceSetup & {
resources: HttpResources;
} | [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) | -| [i18n](./kibana-plugin-core-server.coresetup.i18n.md) | I18nServiceSetup | [I18nServiceSetup](./kibana-plugin-core-server.i18nservicesetup.md) | -| [logging](./kibana-plugin-core-server.coresetup.logging.md) | LoggingServiceSetup | [LoggingServiceSetup](./kibana-plugin-core-server.loggingservicesetup.md) | -| [metrics](./kibana-plugin-core-server.coresetup.metrics.md) | MetricsServiceSetup | [MetricsServiceSetup](./kibana-plugin-core-server.metricsservicesetup.md) | -| [savedObjects](./kibana-plugin-core-server.coresetup.savedobjects.md) | SavedObjectsServiceSetup | [SavedObjectsServiceSetup](./kibana-plugin-core-server.savedobjectsservicesetup.md) | -| [status](./kibana-plugin-core-server.coresetup.status.md) | StatusServiceSetup | [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) | -| [uiSettings](./kibana-plugin-core-server.coresetup.uisettings.md) | UiSettingsServiceSetup | [UiSettingsServiceSetup](./kibana-plugin-core-server.uisettingsservicesetup.md) | +| [capabilities](./kibana-plugin-core-server.coresetup.capabilities.md) | CapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | +| [context](./kibana-plugin-core-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) | +| [deprecations](./kibana-plugin-core-server.coresetup.deprecations.md) | DeprecationsServiceSetup | [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) | +| [elasticsearch](./kibana-plugin-core-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-core-server.elasticsearchservicesetup.md) | +| [executionContext](./kibana-plugin-core-server.coresetup.executioncontext.md) | ExecutionContextSetup | [ExecutionContextSetup](./kibana-plugin-core-server.executioncontextsetup.md) | +| [getStartServices](./kibana-plugin-core-server.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) | +| [http](./kibana-plugin-core-server.coresetup.http.md) | HttpServiceSetup & { resources: HttpResources; } | [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) | +| [i18n](./kibana-plugin-core-server.coresetup.i18n.md) | I18nServiceSetup | [I18nServiceSetup](./kibana-plugin-core-server.i18nservicesetup.md) | +| [logging](./kibana-plugin-core-server.coresetup.logging.md) | LoggingServiceSetup | [LoggingServiceSetup](./kibana-plugin-core-server.loggingservicesetup.md) | +| [metrics](./kibana-plugin-core-server.coresetup.metrics.md) | MetricsServiceSetup | [MetricsServiceSetup](./kibana-plugin-core-server.metricsservicesetup.md) | +| [savedObjects](./kibana-plugin-core-server.coresetup.savedobjects.md) | SavedObjectsServiceSetup | [SavedObjectsServiceSetup](./kibana-plugin-core-server.savedobjectsservicesetup.md) | +| [status](./kibana-plugin-core-server.coresetup.status.md) | StatusServiceSetup | [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) | +| [uiSettings](./kibana-plugin-core-server.coresetup.uisettings.md) | UiSettingsServiceSetup | [UiSettingsServiceSetup](./kibana-plugin-core-server.uisettingsservicesetup.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.corestart.md b/docs/development/core/server/kibana-plugin-core-server.corestart.md index d7aaba9149cf5..8a4a9b2c33f4b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.corestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.corestart.md @@ -16,11 +16,11 @@ export interface CoreStart | Property | Type | Description | | --- | --- | --- | -| [capabilities](./kibana-plugin-core-server.corestart.capabilities.md) | CapabilitiesStart | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) | -| [elasticsearch](./kibana-plugin-core-server.corestart.elasticsearch.md) | ElasticsearchServiceStart | [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) | -| [executionContext](./kibana-plugin-core-server.corestart.executioncontext.md) | ExecutionContextStart | [ExecutionContextStart](./kibana-plugin-core-server.executioncontextstart.md) | -| [http](./kibana-plugin-core-server.corestart.http.md) | HttpServiceStart | [HttpServiceStart](./kibana-plugin-core-server.httpservicestart.md) | -| [metrics](./kibana-plugin-core-server.corestart.metrics.md) | MetricsServiceStart | [MetricsServiceStart](./kibana-plugin-core-server.metricsservicestart.md) | -| [savedObjects](./kibana-plugin-core-server.corestart.savedobjects.md) | SavedObjectsServiceStart | [SavedObjectsServiceStart](./kibana-plugin-core-server.savedobjectsservicestart.md) | -| [uiSettings](./kibana-plugin-core-server.corestart.uisettings.md) | UiSettingsServiceStart | [UiSettingsServiceStart](./kibana-plugin-core-server.uisettingsservicestart.md) | +| [capabilities](./kibana-plugin-core-server.corestart.capabilities.md) | CapabilitiesStart | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) | +| [elasticsearch](./kibana-plugin-core-server.corestart.elasticsearch.md) | ElasticsearchServiceStart | [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) | +| [executionContext](./kibana-plugin-core-server.corestart.executioncontext.md) | ExecutionContextStart | [ExecutionContextStart](./kibana-plugin-core-server.executioncontextstart.md) | +| [http](./kibana-plugin-core-server.corestart.http.md) | HttpServiceStart | [HttpServiceStart](./kibana-plugin-core-server.httpservicestart.md) | +| [metrics](./kibana-plugin-core-server.corestart.metrics.md) | MetricsServiceStart | [MetricsServiceStart](./kibana-plugin-core-server.metricsservicestart.md) | +| [savedObjects](./kibana-plugin-core-server.corestart.savedobjects.md) | SavedObjectsServiceStart | [SavedObjectsServiceStart](./kibana-plugin-core-server.savedobjectsservicestart.md) | +| [uiSettings](./kibana-plugin-core-server.corestart.uisettings.md) | UiSettingsServiceStart | [UiSettingsServiceStart](./kibana-plugin-core-server.uisettingsservicestart.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.corestatus.md b/docs/development/core/server/kibana-plugin-core-server.corestatus.md index 3fde86a18c58b..8d44ab49dfcb7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.corestatus.md +++ b/docs/development/core/server/kibana-plugin-core-server.corestatus.md @@ -16,6 +16,6 @@ export interface CoreStatus | Property | Type | Description | | --- | --- | --- | -| [elasticsearch](./kibana-plugin-core-server.corestatus.elasticsearch.md) | ServiceStatus | | -| [savedObjects](./kibana-plugin-core-server.corestatus.savedobjects.md) | ServiceStatus | | +| [elasticsearch](./kibana-plugin-core-server.corestatus.elasticsearch.md) | ServiceStatus | | +| [savedObjects](./kibana-plugin-core-server.corestatus.savedobjects.md) | ServiceStatus | | diff --git a/docs/development/core/server/kibana-plugin-core-server.countresponse.md b/docs/development/core/server/kibana-plugin-core-server.countresponse.md index f8664f4878f46..53793dc87bf33 100644 --- a/docs/development/core/server/kibana-plugin-core-server.countresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.countresponse.md @@ -15,6 +15,6 @@ export interface CountResponse | Property | Type | Description | | --- | --- | --- | -| [\_shards](./kibana-plugin-core-server.countresponse._shards.md) | ShardsInfo | | -| [count](./kibana-plugin-core-server.countresponse.count.md) | number | | +| [\_shards](./kibana-plugin-core-server.countresponse._shards.md) | ShardsInfo | | +| [count](./kibana-plugin-core-server.countresponse.count.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.cspconfig.__private_.md b/docs/development/core/server/kibana-plugin-core-server.cspconfig.__private_.md deleted file mode 100644 index 217066481d33c..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.cspconfig.__private_.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [CspConfig](./kibana-plugin-core-server.cspconfig.md) > ["\#private"](./kibana-plugin-core-server.cspconfig.__private_.md) - -## CspConfig."\#private" property - -Signature: - -```typescript -#private; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.cspconfig.md b/docs/development/core/server/kibana-plugin-core-server.cspconfig.md index 46f24dfda6739..3d2f4bb683742 100644 --- a/docs/development/core/server/kibana-plugin-core-server.cspconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.cspconfig.md @@ -11,6 +11,7 @@ CSP configuration for use in Kibana. ```typescript export declare class CspConfig implements ICspConfig ``` +Implements: ICspConfig ## Remarks @@ -20,10 +21,9 @@ The constructor for this class is marked as internal. Third-party code should no | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| ["\#private"](./kibana-plugin-core-server.cspconfig.__private_.md) | | | | -| [DEFAULT](./kibana-plugin-core-server.cspconfig.default.md) | static | CspConfig | | -| [disableEmbedding](./kibana-plugin-core-server.cspconfig.disableembedding.md) | | boolean | | -| [header](./kibana-plugin-core-server.cspconfig.header.md) | | string | | -| [strict](./kibana-plugin-core-server.cspconfig.strict.md) | | boolean | | -| [warnLegacyBrowsers](./kibana-plugin-core-server.cspconfig.warnlegacybrowsers.md) | | boolean | | +| [DEFAULT](./kibana-plugin-core-server.cspconfig.default.md) | static | CspConfig | | +| [disableEmbedding](./kibana-plugin-core-server.cspconfig.disableembedding.md) | | boolean | | +| [header](./kibana-plugin-core-server.cspconfig.header.md) | | string | | +| [strict](./kibana-plugin-core-server.cspconfig.strict.md) | | boolean | | +| [warnLegacyBrowsers](./kibana-plugin-core-server.cspconfig.warnlegacybrowsers.md) | | boolean | | diff --git a/docs/development/core/server/kibana-plugin-core-server.customhttpresponseoptions.md b/docs/development/core/server/kibana-plugin-core-server.customhttpresponseoptions.md index 82089c831d718..84cb55f5c1054 100644 --- a/docs/development/core/server/kibana-plugin-core-server.customhttpresponseoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.customhttpresponseoptions.md @@ -16,8 +16,8 @@ export interface CustomHttpResponseOptionsT | HTTP message to send to the client | -| [bypassErrorFormat](./kibana-plugin-core-server.customhttpresponseoptions.bypasserrorformat.md) | boolean | Bypass the default error formatting | -| [headers](./kibana-plugin-core-server.customhttpresponseoptions.headers.md) | ResponseHeaders | HTTP Headers with additional information about response | -| [statusCode](./kibana-plugin-core-server.customhttpresponseoptions.statuscode.md) | number | | +| [body?](./kibana-plugin-core-server.customhttpresponseoptions.body.md) | T | (Optional) HTTP message to send to the client | +| [bypassErrorFormat?](./kibana-plugin-core-server.customhttpresponseoptions.bypasserrorformat.md) | boolean | (Optional) Bypass the default error formatting | +| [headers?](./kibana-plugin-core-server.customhttpresponseoptions.headers.md) | ResponseHeaders | (Optional) HTTP Headers with additional information about response | +| [statusCode](./kibana-plugin-core-server.customhttpresponseoptions.statuscode.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.deletedocumentresponse.md b/docs/development/core/server/kibana-plugin-core-server.deletedocumentresponse.md index e8ac7d2fd8ec1..fe6712ea3b61c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deletedocumentresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.deletedocumentresponse.md @@ -15,12 +15,12 @@ export interface DeleteDocumentResponse | Property | Type | Description | | --- | --- | --- | -| [\_id](./kibana-plugin-core-server.deletedocumentresponse._id.md) | string | | -| [\_index](./kibana-plugin-core-server.deletedocumentresponse._index.md) | string | | -| [\_shards](./kibana-plugin-core-server.deletedocumentresponse._shards.md) | ShardsResponse | | -| [\_type](./kibana-plugin-core-server.deletedocumentresponse._type.md) | string | | -| [\_version](./kibana-plugin-core-server.deletedocumentresponse._version.md) | number | | -| [error](./kibana-plugin-core-server.deletedocumentresponse.error.md) | {
type: string;
} | | -| [found](./kibana-plugin-core-server.deletedocumentresponse.found.md) | boolean | | -| [result](./kibana-plugin-core-server.deletedocumentresponse.result.md) | string | | +| [\_id](./kibana-plugin-core-server.deletedocumentresponse._id.md) | string | | +| [\_index](./kibana-plugin-core-server.deletedocumentresponse._index.md) | string | | +| [\_shards](./kibana-plugin-core-server.deletedocumentresponse._shards.md) | ShardsResponse | | +| [\_type](./kibana-plugin-core-server.deletedocumentresponse._type.md) | string | | +| [\_version](./kibana-plugin-core-server.deletedocumentresponse._version.md) | number | | +| [error?](./kibana-plugin-core-server.deletedocumentresponse.error.md) | { type: string; } | (Optional) | +| [found](./kibana-plugin-core-server.deletedocumentresponse.found.md) | boolean | | +| [result](./kibana-plugin-core-server.deletedocumentresponse.result.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsclient.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsclient.md index 920dc820f7f81..0e724e251b266 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsclient.md @@ -16,5 +16,5 @@ export interface DeprecationsClient | Property | Type | Description | | --- | --- | --- | -| [getAllDeprecations](./kibana-plugin-core-server.deprecationsclient.getalldeprecations.md) | () => Promise<DomainDeprecationDetails[]> | | +| [getAllDeprecations](./kibana-plugin-core-server.deprecationsclient.getalldeprecations.md) | () => Promise<DomainDeprecationDetails\[\]> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsettings.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsettings.md index 90fd8192b544b..917ca933d63a1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsettings.md +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsettings.md @@ -16,6 +16,6 @@ export interface DeprecationSettings | Property | Type | Description | | --- | --- | --- | -| [docLinksKey](./kibana-plugin-core-server.deprecationsettings.doclinkskey.md) | string | Key to documentation links | -| [message](./kibana-plugin-core-server.deprecationsettings.message.md) | string | Deprecation message | +| [docLinksKey](./kibana-plugin-core-server.deprecationsettings.doclinkskey.md) | string | Key to documentation links | +| [message](./kibana-plugin-core-server.deprecationsettings.message.md) | string | Deprecation message | diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md index 7b2cbdecd146a..1fcefeea9b0ba 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md @@ -75,12 +75,11 @@ export class Plugin() { core.deprecations.registerDeprecations({ getDeprecations }); } } - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [registerDeprecations](./kibana-plugin-core-server.deprecationsservicesetup.registerdeprecations.md) | (deprecationContext: RegisterDeprecationsConfig) => void | | +| [registerDeprecations](./kibana-plugin-core-server.deprecationsservicesetup.registerdeprecations.md) | (deprecationContext: RegisterDeprecationsConfig) => void | | diff --git a/docs/development/core/server/kibana-plugin-core-server.discoveredplugin.md b/docs/development/core/server/kibana-plugin-core-server.discoveredplugin.md index 042f2d1485618..cf98a0cd68dbd 100644 --- a/docs/development/core/server/kibana-plugin-core-server.discoveredplugin.md +++ b/docs/development/core/server/kibana-plugin-core-server.discoveredplugin.md @@ -16,10 +16,10 @@ export interface DiscoveredPlugin | Property | Type | Description | | --- | --- | --- | -| [configPath](./kibana-plugin-core-server.discoveredplugin.configpath.md) | ConfigPath | Root configuration path used by the plugin, defaults to "id" in snake\_case format. | -| [id](./kibana-plugin-core-server.discoveredplugin.id.md) | PluginName | Identifier of the plugin. | -| [optionalPlugins](./kibana-plugin-core-server.discoveredplugin.optionalplugins.md) | readonly PluginName[] | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. | -| [requiredBundles](./kibana-plugin-core-server.discoveredplugin.requiredbundles.md) | readonly PluginName[] | List of plugin ids that this plugin's UI code imports modules from that are not in requiredPlugins. | -| [requiredPlugins](./kibana-plugin-core-server.discoveredplugin.requiredplugins.md) | readonly PluginName[] | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. | -| [type](./kibana-plugin-core-server.discoveredplugin.type.md) | PluginType | Type of the plugin, defaults to standard. | +| [configPath](./kibana-plugin-core-server.discoveredplugin.configpath.md) | ConfigPath | Root configuration path used by the plugin, defaults to "id" in snake\_case format. | +| [id](./kibana-plugin-core-server.discoveredplugin.id.md) | PluginName | Identifier of the plugin. | +| [optionalPlugins](./kibana-plugin-core-server.discoveredplugin.optionalplugins.md) | readonly PluginName\[\] | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. | +| [requiredBundles](./kibana-plugin-core-server.discoveredplugin.requiredbundles.md) | readonly PluginName\[\] | List of plugin ids that this plugin's UI code imports modules from that are not in requiredPlugins. | +| [requiredPlugins](./kibana-plugin-core-server.discoveredplugin.requiredplugins.md) | readonly PluginName\[\] | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. | +| [type](./kibana-plugin-core-server.discoveredplugin.type.md) | PluginType | Type of the plugin, defaults to standard. | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig._constructor_.md index 6661970725f75..a8d9f1183b3e5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig._constructor_.md @@ -16,5 +16,5 @@ constructor(rawConfig: ElasticsearchConfigType); | Parameter | Type | Description | | --- | --- | --- | -| rawConfig | ElasticsearchConfigType | | +| rawConfig | ElasticsearchConfigType | | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md index a9ed614ba7552..c75f6377f4038 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md @@ -22,20 +22,20 @@ export declare class ElasticsearchConfig | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [apiVersion](./kibana-plugin-core-server.elasticsearchconfig.apiversion.md) | | string | Version of the Elasticsearch (6.7, 7.1 or master) client will be connecting to. | -| [customHeaders](./kibana-plugin-core-server.elasticsearchconfig.customheaders.md) | | ElasticsearchConfigType['customHeaders'] | Header names and values to send to Elasticsearch with every request. These headers cannot be overwritten by client-side headers and aren't affected by requestHeadersWhitelist configuration. | -| [healthCheckDelay](./kibana-plugin-core-server.elasticsearchconfig.healthcheckdelay.md) | | Duration | The interval between health check requests Kibana sends to the Elasticsearch. | -| [hosts](./kibana-plugin-core-server.elasticsearchconfig.hosts.md) | | string[] | Hosts that the client will connect to. If sniffing is enabled, this list will be used as seeds to discover the rest of your cluster. | -| [ignoreVersionMismatch](./kibana-plugin-core-server.elasticsearchconfig.ignoreversionmismatch.md) | | boolean | Whether to allow kibana to connect to a non-compatible elasticsearch node. | -| [password](./kibana-plugin-core-server.elasticsearchconfig.password.md) | | string | If Elasticsearch is protected with basic authentication, this setting provides the password that the Kibana server uses to perform its administrative functions. | -| [pingTimeout](./kibana-plugin-core-server.elasticsearchconfig.pingtimeout.md) | | Duration | Timeout after which PING HTTP request will be aborted and retried. | -| [requestHeadersWhitelist](./kibana-plugin-core-server.elasticsearchconfig.requestheaderswhitelist.md) | | string[] | List of Kibana client-side headers to send to Elasticsearch when request scoped cluster client is used. If this is an empty array then \*no\* client-side will be sent. | -| [requestTimeout](./kibana-plugin-core-server.elasticsearchconfig.requesttimeout.md) | | Duration | Timeout after which HTTP request will be aborted and retried. | -| [serviceAccountToken](./kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md) | | string | If Elasticsearch security features are enabled, this setting provides the service account token that the Kibana server users to perform its administrative functions.This is an alternative to specifying a username and password. | -| [shardTimeout](./kibana-plugin-core-server.elasticsearchconfig.shardtimeout.md) | | Duration | Timeout for Elasticsearch to wait for responses from shards. Set to 0 to disable. | -| [sniffInterval](./kibana-plugin-core-server.elasticsearchconfig.sniffinterval.md) | | false | Duration | Interval to perform a sniff operation and make sure the list of nodes is complete. If false then sniffing is disabled. | -| [sniffOnConnectionFault](./kibana-plugin-core-server.elasticsearchconfig.sniffonconnectionfault.md) | | boolean | Specifies whether the client should immediately sniff for a more current list of nodes when a connection dies. | -| [sniffOnStart](./kibana-plugin-core-server.elasticsearchconfig.sniffonstart.md) | | boolean | Specifies whether the client should attempt to detect the rest of the cluster when it is first instantiated. | -| [ssl](./kibana-plugin-core-server.elasticsearchconfig.ssl.md) | | Pick<SslConfigSchema, Exclude<keyof SslConfigSchema, 'certificateAuthorities' | 'keystore' | 'truststore'>> & {
certificateAuthorities?: string[];
} | Set of settings configure SSL connection between Kibana and Elasticsearch that are required when xpack.ssl.verification_mode in Elasticsearch is set to either certificate or full. | -| [username](./kibana-plugin-core-server.elasticsearchconfig.username.md) | | string | If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions. Cannot be used in conjunction with serviceAccountToken. | +| [apiVersion](./kibana-plugin-core-server.elasticsearchconfig.apiversion.md) | | string | Version of the Elasticsearch (6.7, 7.1 or master) client will be connecting to. | +| [customHeaders](./kibana-plugin-core-server.elasticsearchconfig.customheaders.md) | | ElasticsearchConfigType\['customHeaders'\] | Header names and values to send to Elasticsearch with every request. These headers cannot be overwritten by client-side headers and aren't affected by requestHeadersWhitelist configuration. | +| [healthCheckDelay](./kibana-plugin-core-server.elasticsearchconfig.healthcheckdelay.md) | | Duration | The interval between health check requests Kibana sends to the Elasticsearch. | +| [hosts](./kibana-plugin-core-server.elasticsearchconfig.hosts.md) | | string\[\] | Hosts that the client will connect to. If sniffing is enabled, this list will be used as seeds to discover the rest of your cluster. | +| [ignoreVersionMismatch](./kibana-plugin-core-server.elasticsearchconfig.ignoreversionmismatch.md) | | boolean | Whether to allow kibana to connect to a non-compatible elasticsearch node. | +| [password?](./kibana-plugin-core-server.elasticsearchconfig.password.md) | | string | (Optional) If Elasticsearch is protected with basic authentication, this setting provides the password that the Kibana server uses to perform its administrative functions. | +| [pingTimeout](./kibana-plugin-core-server.elasticsearchconfig.pingtimeout.md) | | Duration | Timeout after which PING HTTP request will be aborted and retried. | +| [requestHeadersWhitelist](./kibana-plugin-core-server.elasticsearchconfig.requestheaderswhitelist.md) | | string\[\] | List of Kibana client-side headers to send to Elasticsearch when request scoped cluster client is used. If this is an empty array then \*no\* client-side will be sent. | +| [requestTimeout](./kibana-plugin-core-server.elasticsearchconfig.requesttimeout.md) | | Duration | Timeout after which HTTP request will be aborted and retried. | +| [serviceAccountToken?](./kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md) | | string | (Optional) If Elasticsearch security features are enabled, this setting provides the service account token that the Kibana server users to perform its administrative functions.This is an alternative to specifying a username and password. | +| [shardTimeout](./kibana-plugin-core-server.elasticsearchconfig.shardtimeout.md) | | Duration | Timeout for Elasticsearch to wait for responses from shards. Set to 0 to disable. | +| [sniffInterval](./kibana-plugin-core-server.elasticsearchconfig.sniffinterval.md) | | false \| Duration | Interval to perform a sniff operation and make sure the list of nodes is complete. If false then sniffing is disabled. | +| [sniffOnConnectionFault](./kibana-plugin-core-server.elasticsearchconfig.sniffonconnectionfault.md) | | boolean | Specifies whether the client should immediately sniff for a more current list of nodes when a connection dies. | +| [sniffOnStart](./kibana-plugin-core-server.elasticsearchconfig.sniffonstart.md) | | boolean | Specifies whether the client should attempt to detect the rest of the cluster when it is first instantiated. | +| [ssl](./kibana-plugin-core-server.elasticsearchconfig.ssl.md) | | Pick<SslConfigSchema, Exclude<keyof SslConfigSchema, 'certificateAuthorities' \| 'keystore' \| 'truststore'>> & { certificateAuthorities?: string\[\]; } | Set of settings configure SSL connection between Kibana and Elasticsearch that are required when xpack.ssl.verification_mode in Elasticsearch is set to either certificate or full. | +| [username?](./kibana-plugin-core-server.elasticsearchconfig.username.md) | | string | (Optional) If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions. Cannot be used in conjunction with serviceAccountToken. | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfigpreboot.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfigpreboot.md index bbccea80b672f..d7d3e8d70e8d7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfigpreboot.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfigpreboot.md @@ -16,6 +16,6 @@ export interface ElasticsearchConfigPreboot | Property | Type | Description | | --- | --- | --- | -| [credentialsSpecified](./kibana-plugin-core-server.elasticsearchconfigpreboot.credentialsspecified.md) | boolean | Indicates whether Elasticsearch configuration includes credentials (username, password or serviceAccountToken). | -| [hosts](./kibana-plugin-core-server.elasticsearchconfigpreboot.hosts.md) | string[] | Hosts that the client will connect to. If sniffing is enabled, this list will be used as seeds to discover the rest of your cluster. | +| [credentialsSpecified](./kibana-plugin-core-server.elasticsearchconfigpreboot.credentialsspecified.md) | boolean | Indicates whether Elasticsearch configuration includes credentials (username, password or serviceAccountToken). | +| [hosts](./kibana-plugin-core-server.elasticsearchconfigpreboot.hosts.md) | string\[\] | Hosts that the client will connect to. If sniffing is enabled, this list will be used as seeds to discover the rest of your cluster. | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearcherrordetails.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearcherrordetails.md index 7dbf9e89f9b7c..570a161db20e0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearcherrordetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearcherrordetails.md @@ -15,5 +15,5 @@ export interface ElasticsearchErrorDetails | Property | Type | Description | | --- | --- | --- | -| [error](./kibana-plugin-core-server.elasticsearcherrordetails.error.md) | {
type: string;
reason?: string;
} | | +| [error?](./kibana-plugin-core-server.elasticsearcherrordetails.error.md) | { type: string; reason?: string; } | (Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.config.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.config.md index 12a32b4544aba..c4284248ea894 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.config.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.config.md @@ -17,6 +17,5 @@ readonly config: Readonly; ```js const { hosts, credentialsSpecified } = core.elasticsearch.config; - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.createclient.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.createclient.md index d14e3e4efa400..070cb7905b585 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.createclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicepreboot.createclient.md @@ -18,6 +18,5 @@ readonly createClient: (type: string, clientConfig?: PartialReadonly<ElasticsearchConfigPreboot> | A limited set of Elasticsearch configuration entries. | -| [createClient](./kibana-plugin-core-server.elasticsearchservicepreboot.createclient.md) | (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md). | +| [config](./kibana-plugin-core-server.elasticsearchservicepreboot.config.md) | Readonly<ElasticsearchConfigPreboot> | A limited set of Elasticsearch configuration entries. | +| [createClient](./kibana-plugin-core-server.elasticsearchservicepreboot.createclient.md) | (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md). | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.md index e6a4161674f5b..d18620992075d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.md @@ -15,5 +15,5 @@ export interface ElasticsearchServiceSetup | Property | Type | Description | | --- | --- | --- | -| [legacy](./kibana-plugin-core-server.elasticsearchservicesetup.legacy.md) | {
readonly config$: Observable<ElasticsearchConfig>;
} | | +| [legacy](./kibana-plugin-core-server.elasticsearchservicesetup.legacy.md) | { readonly config$: Observable<ElasticsearchConfig>; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.client.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.client.md index 591f126c423e3..59f302170c53a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.client.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.client.md @@ -17,6 +17,5 @@ readonly client: IClusterClient; ```js const client = core.elasticsearch.client; - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.createclient.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.createclient.md index d4a13812ab533..26930c6f02b32 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.createclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.createclient.md @@ -18,6 +18,5 @@ readonly createClient: (type: string, clientConfig?: PartialIClusterClient | A pre-configured [Elasticsearch client](./kibana-plugin-core-server.iclusterclient.md) | -| [createClient](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md). | -| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | {
readonly config$: Observable<ElasticsearchConfig>;
} | | +| [client](./kibana-plugin-core-server.elasticsearchservicestart.client.md) | IClusterClient | A pre-configured [Elasticsearch client](./kibana-plugin-core-server.iclusterclient.md) | +| [createClient](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md). | +| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | { readonly config$: Observable<ElasticsearchConfig>; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchstatusmeta.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchstatusmeta.md index 90aa2f0100d88..82748932c2102 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchstatusmeta.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchstatusmeta.md @@ -15,7 +15,7 @@ export interface ElasticsearchStatusMeta | Property | Type | Description | | --- | --- | --- | -| [incompatibleNodes](./kibana-plugin-core-server.elasticsearchstatusmeta.incompatiblenodes.md) | NodesVersionCompatibility['incompatibleNodes'] | | -| [nodesInfoRequestError](./kibana-plugin-core-server.elasticsearchstatusmeta.nodesinforequesterror.md) | NodesVersionCompatibility['nodesInfoRequestError'] | | -| [warningNodes](./kibana-plugin-core-server.elasticsearchstatusmeta.warningnodes.md) | NodesVersionCompatibility['warningNodes'] | | +| [incompatibleNodes](./kibana-plugin-core-server.elasticsearchstatusmeta.incompatiblenodes.md) | NodesVersionCompatibility\['incompatibleNodes'\] | | +| [nodesInfoRequestError?](./kibana-plugin-core-server.elasticsearchstatusmeta.nodesinforequesterror.md) | NodesVersionCompatibility\['nodesInfoRequestError'\] | (Optional) | +| [warningNodes](./kibana-plugin-core-server.elasticsearchstatusmeta.warningnodes.md) | NodesVersionCompatibility\['warningNodes'\] | | diff --git a/docs/development/core/server/kibana-plugin-core-server.errorhttpresponseoptions.md b/docs/development/core/server/kibana-plugin-core-server.errorhttpresponseoptions.md index 8a3a9e3cc29f4..3a037e71ac1e2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.errorhttpresponseoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.errorhttpresponseoptions.md @@ -16,6 +16,6 @@ export interface ErrorHttpResponseOptions | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-server.errorhttpresponseoptions.body.md) | ResponseError | HTTP message to send to the client | -| [headers](./kibana-plugin-core-server.errorhttpresponseoptions.headers.md) | ResponseHeaders | HTTP Headers with additional information about response | +| [body?](./kibana-plugin-core-server.errorhttpresponseoptions.body.md) | ResponseError | (Optional) HTTP message to send to the client | +| [headers?](./kibana-plugin-core-server.errorhttpresponseoptions.headers.md) | ResponseHeaders | (Optional) HTTP Headers with additional information about response | diff --git a/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.collect.md b/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.collect.md index 0e07497baf887..36cb2d2d20944 100644 --- a/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.collect.md +++ b/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.collect.md @@ -13,7 +13,7 @@ collect(): IntervalHistogram; ``` Returns: -`IntervalHistogram` +IntervalHistogram {IntervalHistogram} diff --git a/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.reset.md b/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.reset.md index fdba7a79ebda0..a65cc7c99842d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.reset.md +++ b/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.reset.md @@ -13,5 +13,5 @@ reset(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.stop.md b/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.stop.md index 25b61434b0061..d63c963b384e6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.stop.md +++ b/docs/development/core/server/kibana-plugin-core-server.eventloopdelaysmonitor.stop.md @@ -13,5 +13,5 @@ stop(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.executioncontextsetup.withcontext.md b/docs/development/core/server/kibana-plugin-core-server.executioncontextsetup.withcontext.md index 87da071203018..2bfef6db2f907 100644 --- a/docs/development/core/server/kibana-plugin-core-server.executioncontextsetup.withcontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.executioncontextsetup.withcontext.md @@ -16,10 +16,10 @@ withContext(context: KibanaExecutionContext | undefined, fn: (...args: any[]) | Parameter | Type | Description | | --- | --- | --- | -| context | KibanaExecutionContext | undefined | | -| fn | (...args: any[]) => R | | +| context | KibanaExecutionContext \| undefined | | +| fn | (...args: any\[\]) => R | | Returns: -`R` +R diff --git a/docs/development/core/server/kibana-plugin-core-server.fakerequest.md b/docs/development/core/server/kibana-plugin-core-server.fakerequest.md index 93ab54f9ba753..6b8bfe33d19c4 100644 --- a/docs/development/core/server/kibana-plugin-core-server.fakerequest.md +++ b/docs/development/core/server/kibana-plugin-core-server.fakerequest.md @@ -16,5 +16,5 @@ export interface FakeRequest | Property | Type | Description | | --- | --- | --- | -| [headers](./kibana-plugin-core-server.fakerequest.headers.md) | Headers | Headers used for authentication against Elasticsearch | +| [headers](./kibana-plugin-core-server.fakerequest.headers.md) | Headers | Headers used for authentication against Elasticsearch | diff --git a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md index bed3356e36129..c92f352ce7e5e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md @@ -10,10 +10,11 @@ ```typescript export interface FeatureDeprecationDetails extends BaseDeprecationDetails ``` +Extends: BaseDeprecationDetails ## Properties | Property | Type | Description | | --- | --- | --- | -| [deprecationType](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md) | 'feature' | undefined | | +| [deprecationType?](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md) | 'feature' \| undefined | (Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.getdeprecationscontext.md b/docs/development/core/server/kibana-plugin-core-server.getdeprecationscontext.md index 96dd2ceb524ce..2362966866852 100644 --- a/docs/development/core/server/kibana-plugin-core-server.getdeprecationscontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.getdeprecationscontext.md @@ -15,6 +15,6 @@ export interface GetDeprecationsContext | Property | Type | Description | | --- | --- | --- | -| [esClient](./kibana-plugin-core-server.getdeprecationscontext.esclient.md) | IScopedClusterClient | | -| [savedObjectsClient](./kibana-plugin-core-server.getdeprecationscontext.savedobjectsclient.md) | SavedObjectsClientContract | | +| [esClient](./kibana-plugin-core-server.getdeprecationscontext.esclient.md) | IScopedClusterClient | | +| [savedObjectsClient](./kibana-plugin-core-server.getdeprecationscontext.savedobjectsclient.md) | SavedObjectsClientContract | | diff --git a/docs/development/core/server/kibana-plugin-core-server.getresponse.md b/docs/development/core/server/kibana-plugin-core-server.getresponse.md index bab3092c6b1fa..5068be8a5689a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.getresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.getresponse.md @@ -15,13 +15,13 @@ export interface GetResponse | Property | Type | Description | | --- | --- | --- | -| [\_id](./kibana-plugin-core-server.getresponse._id.md) | string | | -| [\_index](./kibana-plugin-core-server.getresponse._index.md) | string | | -| [\_primary\_term](./kibana-plugin-core-server.getresponse._primary_term.md) | number | | -| [\_routing](./kibana-plugin-core-server.getresponse._routing.md) | string | | -| [\_seq\_no](./kibana-plugin-core-server.getresponse._seq_no.md) | number | | -| [\_source](./kibana-plugin-core-server.getresponse._source.md) | T | | -| [\_type](./kibana-plugin-core-server.getresponse._type.md) | string | | -| [\_version](./kibana-plugin-core-server.getresponse._version.md) | number | | -| [found](./kibana-plugin-core-server.getresponse.found.md) | boolean | | +| [\_id](./kibana-plugin-core-server.getresponse._id.md) | string | | +| [\_index](./kibana-plugin-core-server.getresponse._index.md) | string | | +| [\_primary\_term](./kibana-plugin-core-server.getresponse._primary_term.md) | number | | +| [\_routing?](./kibana-plugin-core-server.getresponse._routing.md) | string | (Optional) | +| [\_seq\_no](./kibana-plugin-core-server.getresponse._seq_no.md) | number | | +| [\_source](./kibana-plugin-core-server.getresponse._source.md) | T | | +| [\_type](./kibana-plugin-core-server.getresponse._type.md) | string | | +| [\_version](./kibana-plugin-core-server.getresponse._version.md) | number | | +| [found](./kibana-plugin-core-server.getresponse.found.md) | boolean | | diff --git a/docs/development/core/server/kibana-plugin-core-server.headers.md b/docs/development/core/server/kibana-plugin-core-server.headers_2.md similarity index 78% rename from docs/development/core/server/kibana-plugin-core-server.headers.md rename to docs/development/core/server/kibana-plugin-core-server.headers_2.md index 5b2c40a81878e..398827f2bf3d1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.headers.md +++ b/docs/development/core/server/kibana-plugin-core-server.headers_2.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Headers](./kibana-plugin-core-server.headers.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Headers\_2](./kibana-plugin-core-server.headers_2.md) -## Headers type +## Headers\_2 type Http request headers to read. diff --git a/docs/development/core/server/kibana-plugin-core-server.httpauth.md b/docs/development/core/server/kibana-plugin-core-server.httpauth.md index d9d77809570ab..4b47be615c79c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpauth.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpauth.md @@ -15,6 +15,6 @@ export interface HttpAuth | Property | Type | Description | | --- | --- | --- | -| [get](./kibana-plugin-core-server.httpauth.get.md) | GetAuthState | Gets authentication state for a request. Returned by auth interceptor. [GetAuthState](./kibana-plugin-core-server.getauthstate.md) | -| [isAuthenticated](./kibana-plugin-core-server.httpauth.isauthenticated.md) | IsAuthenticated | Returns authentication status for a request. [IsAuthenticated](./kibana-plugin-core-server.isauthenticated.md) | +| [get](./kibana-plugin-core-server.httpauth.get.md) | GetAuthState | Gets authentication state for a request. Returned by auth interceptor. [GetAuthState](./kibana-plugin-core-server.getauthstate.md) | +| [isAuthenticated](./kibana-plugin-core-server.httpauth.isauthenticated.md) | IsAuthenticated | Returns authentication status for a request. [IsAuthenticated](./kibana-plugin-core-server.isauthenticated.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresources.md b/docs/development/core/server/kibana-plugin-core-server.httpresources.md index 25acffc1a040f..0b1854d7cbcd9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpresources.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpresources.md @@ -16,5 +16,5 @@ export interface HttpResources | Property | Type | Description | | --- | --- | --- | -| [register](./kibana-plugin-core-server.httpresources.register.md) | <P, Q, B, Context extends RequestHandlerContext = RequestHandlerContext>(route: RouteConfig<P, Q, B, 'get'>, handler: HttpResourcesRequestHandler<P, Q, B, Context>) => void | To register a route handler executing passed function to form response. | +| [register](./kibana-plugin-core-server.httpresources.register.md) | <P, Q, B, Context extends RequestHandlerContext = RequestHandlerContext>(route: RouteConfig<P, Q, B, 'get'>, handler: HttpResourcesRequestHandler<P, Q, B, Context>) => void | To register a route handler executing passed function to form response. | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.md index 6563e3c636a99..9fcdc1b338783 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.md @@ -16,5 +16,5 @@ export interface HttpResourcesRenderOptions | Property | Type | Description | | --- | --- | --- | -| [headers](./kibana-plugin-core-server.httpresourcesrenderoptions.headers.md) | ResponseHeaders | HTTP Headers with additional information about response. | +| [headers?](./kibana-plugin-core-server.httpresourcesrenderoptions.headers.md) | ResponseHeaders | (Optional) HTTP Headers with additional information about response. | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.md index 1c221e13f534f..05e7af5dcbedf 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.md @@ -16,8 +16,8 @@ export interface HttpResourcesServiceToolkit | Property | Type | Description | | --- | --- | --- | -| [renderAnonymousCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md) | (options?: HttpResourcesRenderOptions) => Promise<IKibanaResponse> | To respond with HTML page bootstrapping Kibana application without retrieving user-specific information. | -| [renderCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md) | (options?: HttpResourcesRenderOptions) => Promise<IKibanaResponse> | To respond with HTML page bootstrapping Kibana application. | -| [renderHtml](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderhtml.md) | (options: HttpResourcesResponseOptions) => IKibanaResponse | To respond with a custom HTML page. | -| [renderJs](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderjs.md) | (options: HttpResourcesResponseOptions) => IKibanaResponse | To respond with a custom JS script file. | +| [renderAnonymousCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md) | (options?: HttpResourcesRenderOptions) => Promise<IKibanaResponse> | To respond with HTML page bootstrapping Kibana application without retrieving user-specific information. | +| [renderCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md) | (options?: HttpResourcesRenderOptions) => Promise<IKibanaResponse> | To respond with HTML page bootstrapping Kibana application. | +| [renderHtml](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderhtml.md) | (options: HttpResourcesResponseOptions) => IKibanaResponse | To respond with a custom HTML page. | +| [renderJs](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderjs.md) | (options: HttpResourcesResponseOptions) => IKibanaResponse | To respond with a custom JS script file. | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresponseoptions.md b/docs/development/core/server/kibana-plugin-core-server.httpresponseoptions.md index 497adc6a5ec5d..9d10d91244157 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpresponseoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpresponseoptions.md @@ -16,7 +16,7 @@ export interface HttpResponseOptions | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-server.httpresponseoptions.body.md) | HttpResponsePayload | HTTP message to send to the client | -| [bypassErrorFormat](./kibana-plugin-core-server.httpresponseoptions.bypasserrorformat.md) | boolean | Bypass the default error formatting | -| [headers](./kibana-plugin-core-server.httpresponseoptions.headers.md) | ResponseHeaders | HTTP Headers with additional information about response | +| [body?](./kibana-plugin-core-server.httpresponseoptions.body.md) | HttpResponsePayload | (Optional) HTTP message to send to the client | +| [bypassErrorFormat?](./kibana-plugin-core-server.httpresponseoptions.bypasserrorformat.md) | boolean | (Optional) Bypass the default error formatting | +| [headers?](./kibana-plugin-core-server.httpresponseoptions.headers.md) | ResponseHeaders | (Optional) HTTP Headers with additional information about response | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpserverinfo.md b/docs/development/core/server/kibana-plugin-core-server.httpserverinfo.md index 890bfaa834dc5..151cb5d272403 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpserverinfo.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpserverinfo.md @@ -16,8 +16,8 @@ export interface HttpServerInfo | Property | Type | Description | | --- | --- | --- | -| [hostname](./kibana-plugin-core-server.httpserverinfo.hostname.md) | string | The hostname of the server | -| [name](./kibana-plugin-core-server.httpserverinfo.name.md) | string | The name of the Kibana server | -| [port](./kibana-plugin-core-server.httpserverinfo.port.md) | number | The port the server is listening on | -| [protocol](./kibana-plugin-core-server.httpserverinfo.protocol.md) | 'http' | 'https' | 'socket' | The protocol used by the server | +| [hostname](./kibana-plugin-core-server.httpserverinfo.hostname.md) | string | The hostname of the server | +| [name](./kibana-plugin-core-server.httpserverinfo.name.md) | string | The name of the Kibana server | +| [port](./kibana-plugin-core-server.httpserverinfo.port.md) | number | The port the server is listening on | +| [protocol](./kibana-plugin-core-server.httpserverinfo.protocol.md) | 'http' \| 'https' \| 'socket' | The protocol used by the server | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.md b/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.md index ab0fc365fc651..87c62b63014e1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.md @@ -23,7 +23,6 @@ const validate = { id: schema.string(), }), }; - ``` - Declare a function to respond to incoming request. The function will receive `request` object containing request details: url, headers, matched route, as well as validated `params`, `query`, `body`. And `response` object instructing HTTP server to create HTTP response with information sent back to the client as the response body, headers, and HTTP status. Any exception raised during the handler call will generate `500 Server error` response and log error details for further investigation. See below for returning custom error responses. @@ -40,7 +39,6 @@ const handler = async (context: RequestHandlerContext, request: KibanaRequest, r headers: { 'content-type': 'application/json' } }); } - ``` \* - Acquire `preboot` [IRouter](./kibana-plugin-core-server.irouter.md) instance and register route handler for GET request to 'path/{id}' path. @@ -65,15 +63,14 @@ httpPreboot.registerRoutes('my-plugin', (router) => { }); }); }); - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [basePath](./kibana-plugin-core-server.httpservicepreboot.basepath.md) | IBasePath | Access or manipulate the Kibana base path See [IBasePath](./kibana-plugin-core-server.ibasepath.md). | -| [getServerInfo](./kibana-plugin-core-server.httpservicepreboot.getserverinfo.md) | () => HttpServerInfo | Provides common [information](./kibana-plugin-core-server.httpserverinfo.md) about the running preboot http server. | +| [basePath](./kibana-plugin-core-server.httpservicepreboot.basepath.md) | IBasePath | Access or manipulate the Kibana base path See [IBasePath](./kibana-plugin-core-server.ibasepath.md). | +| [getServerInfo](./kibana-plugin-core-server.httpservicepreboot.getserverinfo.md) | () => HttpServerInfo | Provides common [information](./kibana-plugin-core-server.httpserverinfo.md) about the running preboot http server. | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.registerroutes.md b/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.registerroutes.md index c188f0ba0ce94..dd90074fad39a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.registerroutes.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpservicepreboot.registerroutes.md @@ -16,12 +16,12 @@ registerRoutes(path: string, callback: (router: IRouter) => void): void; | Parameter | Type | Description | | --- | --- | --- | -| path | string | | -| callback | (router: IRouter) => void | | +| path | string | | +| callback | (router: IRouter) => void | | Returns: -`void` +void ## Remarks @@ -35,6 +35,5 @@ registerRoutes('my-plugin', (router) => { // handler is called when '/my-plugin/path' resource is requested with `GET` method router.get({ path: '/path', validate: false }, (context, req, res) => res.ok({ content: 'ok' })); }); - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.createrouter.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.createrouter.md index f009dd3fc2b16..7bdc7cd2e4e33 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.createrouter.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.createrouter.md @@ -23,6 +23,5 @@ Each route can have only one handler function, which is executed when the route const router = createRouter(); // handler is called when '/path' resource is requested with `GET` method router.get({ path: '/path', validate: false }, (context, req, res) => res.ok({ content: 'ok' })); - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md index dbc2a516fa17b..81ddeaaaa5a12 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md @@ -18,7 +18,6 @@ To handle an incoming request in your plugin you should: - Create a `Router` ins ```ts const router = httpSetup.createRouter(); - ``` - Use `@kbn/config-schema` package to create a schema to validate the request `params`, `query`, and `body`. Every incoming request will be validated against the created schema. If validation failed, the request is rejected with `400` status and `Bad request` error without calling the route's handler. To opt out of validating the request, specify `false`. @@ -29,7 +28,6 @@ const validate = { id: schema.string(), }), }; - ``` - Declare a function to respond to incoming request. The function will receive `request` object containing request details: url, headers, matched route, as well as validated `params`, `query`, `body`. And `response` object instructing HTTP server to create HTTP response with information sent back to the client as the response body, headers, and HTTP status. Unlike, `hapi` route handler in the Legacy platform, any exception raised during the handler call will generate `500 Server error` response and log error details for further investigation. See below for returning custom error responses. @@ -46,7 +44,6 @@ const handler = async (context: RequestHandlerContext, request: KibanaRequest, r } }); } - ``` - Register route handler for GET request to 'path/{id}' path @@ -74,23 +71,22 @@ async (context, request, response) => { } }); }); - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [auth](./kibana-plugin-core-server.httpservicesetup.auth.md) | HttpAuth | Auth status. See [HttpAuth](./kibana-plugin-core-server.httpauth.md) | -| [basePath](./kibana-plugin-core-server.httpservicesetup.basepath.md) | IBasePath | Access or manipulate the Kibana base path See [IBasePath](./kibana-plugin-core-server.ibasepath.md). | -| [createCookieSessionStorageFactory](./kibana-plugin-core-server.httpservicesetup.createcookiesessionstoragefactory.md) | <T>(cookieOptions: SessionStorageCookieOptions<T>) => Promise<SessionStorageFactory<T>> | Creates cookie based session storage factory [SessionStorageFactory](./kibana-plugin-core-server.sessionstoragefactory.md) | -| [createRouter](./kibana-plugin-core-server.httpservicesetup.createrouter.md) | <Context extends RequestHandlerContext = RequestHandlerContext>() => IRouter<Context> | Provides ability to declare a handler function for a particular path and HTTP request method. | -| [csp](./kibana-plugin-core-server.httpservicesetup.csp.md) | ICspConfig | The CSP config used for Kibana. | -| [getServerInfo](./kibana-plugin-core-server.httpservicesetup.getserverinfo.md) | () => HttpServerInfo | Provides common [information](./kibana-plugin-core-server.httpserverinfo.md) about the running http server. | -| [registerAuth](./kibana-plugin-core-server.httpservicesetup.registerauth.md) | (handler: AuthenticationHandler) => void | To define custom authentication and/or authorization mechanism for incoming requests. | -| [registerOnPostAuth](./kibana-plugin-core-server.httpservicesetup.registeronpostauth.md) | (handler: OnPostAuthHandler) => void | To define custom logic after Auth interceptor did make sure a user has access to the requested resource. | -| [registerOnPreAuth](./kibana-plugin-core-server.httpservicesetup.registeronpreauth.md) | (handler: OnPreAuthHandler) => void | To define custom logic to perform for incoming requests before the Auth interceptor performs a check that user has access to requested resources. | -| [registerOnPreResponse](./kibana-plugin-core-server.httpservicesetup.registeronpreresponse.md) | (handler: OnPreResponseHandler) => void | To define custom logic to perform for the server response. | -| [registerOnPreRouting](./kibana-plugin-core-server.httpservicesetup.registeronprerouting.md) | (handler: OnPreRoutingHandler) => void | To define custom logic to perform for incoming requests before server performs a route lookup. | -| [registerRouteHandlerContext](./kibana-plugin-core-server.httpservicesetup.registerroutehandlercontext.md) | <Context extends RequestHandlerContext, ContextName extends keyof Context>(contextName: ContextName, provider: RequestHandlerContextProvider<Context, ContextName>) => RequestHandlerContextContainer | Register a context provider for a route handler. | +| [auth](./kibana-plugin-core-server.httpservicesetup.auth.md) | HttpAuth | Auth status. See [HttpAuth](./kibana-plugin-core-server.httpauth.md) | +| [basePath](./kibana-plugin-core-server.httpservicesetup.basepath.md) | IBasePath | Access or manipulate the Kibana base path See [IBasePath](./kibana-plugin-core-server.ibasepath.md). | +| [createCookieSessionStorageFactory](./kibana-plugin-core-server.httpservicesetup.createcookiesessionstoragefactory.md) | <T>(cookieOptions: SessionStorageCookieOptions<T>) => Promise<SessionStorageFactory<T>> | Creates cookie based session storage factory [SessionStorageFactory](./kibana-plugin-core-server.sessionstoragefactory.md) | +| [createRouter](./kibana-plugin-core-server.httpservicesetup.createrouter.md) | <Context extends RequestHandlerContext = RequestHandlerContext>() => IRouter<Context> | Provides ability to declare a handler function for a particular path and HTTP request method. | +| [csp](./kibana-plugin-core-server.httpservicesetup.csp.md) | ICspConfig | The CSP config used for Kibana. | +| [getServerInfo](./kibana-plugin-core-server.httpservicesetup.getserverinfo.md) | () => HttpServerInfo | Provides common [information](./kibana-plugin-core-server.httpserverinfo.md) about the running http server. | +| [registerAuth](./kibana-plugin-core-server.httpservicesetup.registerauth.md) | (handler: AuthenticationHandler) => void | To define custom authentication and/or authorization mechanism for incoming requests. | +| [registerOnPostAuth](./kibana-plugin-core-server.httpservicesetup.registeronpostauth.md) | (handler: OnPostAuthHandler) => void | To define custom logic after Auth interceptor did make sure a user has access to the requested resource. | +| [registerOnPreAuth](./kibana-plugin-core-server.httpservicesetup.registeronpreauth.md) | (handler: OnPreAuthHandler) => void | To define custom logic to perform for incoming requests before the Auth interceptor performs a check that user has access to requested resources. | +| [registerOnPreResponse](./kibana-plugin-core-server.httpservicesetup.registeronpreresponse.md) | (handler: OnPreResponseHandler) => void | To define custom logic to perform for the server response. | +| [registerOnPreRouting](./kibana-plugin-core-server.httpservicesetup.registeronprerouting.md) | (handler: OnPreRoutingHandler) => void | To define custom logic to perform for incoming requests before server performs a route lookup. | +| [registerRouteHandlerContext](./kibana-plugin-core-server.httpservicesetup.registerroutehandlercontext.md) | <Context extends RequestHandlerContext, ContextName extends keyof Context>(contextName: ContextName, provider: RequestHandlerContextProvider<Context, ContextName>) => RequestHandlerContextContainer | Register a context provider for a route handler. | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registerroutehandlercontext.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registerroutehandlercontext.md index df3f80580f6da..c793080305d0c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registerroutehandlercontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registerroutehandlercontext.md @@ -37,6 +37,5 @@ registerRouteHandlerContext: HttpAuth | Auth status. See [HttpAuth](./kibana-plugin-core-server.httpauth.md) | -| [basePath](./kibana-plugin-core-server.httpservicestart.basepath.md) | IBasePath | Access or manipulate the Kibana base path See [IBasePath](./kibana-plugin-core-server.ibasepath.md). | -| [getServerInfo](./kibana-plugin-core-server.httpservicestart.getserverinfo.md) | () => HttpServerInfo | Provides common [information](./kibana-plugin-core-server.httpserverinfo.md) about the running http server. | +| [auth](./kibana-plugin-core-server.httpservicestart.auth.md) | HttpAuth | Auth status. See [HttpAuth](./kibana-plugin-core-server.httpauth.md) | +| [basePath](./kibana-plugin-core-server.httpservicestart.basepath.md) | IBasePath | Access or manipulate the Kibana base path See [IBasePath](./kibana-plugin-core-server.ibasepath.md). | +| [getServerInfo](./kibana-plugin-core-server.httpservicestart.getserverinfo.md) | () => HttpServerInfo | Provides common [information](./kibana-plugin-core-server.httpserverinfo.md) about the running http server. | diff --git a/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.getlocale.md b/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.getlocale.md index 2fe8e564e7ce5..fa98f34c6ac5e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.getlocale.md +++ b/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.getlocale.md @@ -13,5 +13,5 @@ getLocale(): string; ``` Returns: -`string` +string diff --git a/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.gettranslationfiles.md b/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.gettranslationfiles.md index 81caed287454e..ebdb0babc3af7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.gettranslationfiles.md +++ b/docs/development/core/server/kibana-plugin-core-server.i18nservicesetup.gettranslationfiles.md @@ -13,5 +13,5 @@ getTranslationFiles(): string[]; ``` Returns: -`string[]` +string\[\] diff --git a/docs/development/core/server/kibana-plugin-core-server.iclusterclient.md b/docs/development/core/server/kibana-plugin-core-server.iclusterclient.md index f6bacee322538..969a32d96a3a0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iclusterclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.iclusterclient.md @@ -16,6 +16,6 @@ export interface IClusterClient | Property | Type | Description | | --- | --- | --- | -| [asInternalUser](./kibana-plugin-core-server.iclusterclient.asinternaluser.md) | ElasticsearchClient | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the ES cluster on behalf of the Kibana internal user | -| [asScoped](./kibana-plugin-core-server.iclusterclient.asscoped.md) | (request: ScopeableRequest) => IScopedClusterClient | Creates a [scoped cluster client](./kibana-plugin-core-server.iscopedclusterclient.md) bound to given [request](./kibana-plugin-core-server.scopeablerequest.md) | +| [asInternalUser](./kibana-plugin-core-server.iclusterclient.asinternaluser.md) | ElasticsearchClient | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the ES cluster on behalf of the Kibana internal user | +| [asScoped](./kibana-plugin-core-server.iclusterclient.asscoped.md) | (request: ScopeableRequest) => IScopedClusterClient | Creates a [scoped cluster client](./kibana-plugin-core-server.iscopedclusterclient.md) bound to given [request](./kibana-plugin-core-server.scopeablerequest.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md index 7d7368426b1c2..ac13b86295f6d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md +++ b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md @@ -16,12 +16,12 @@ createHandler(pluginOpaqueId: PluginOpaqueId, handler: RequestHandler): (...rest | Parameter | Type | Description | | --- | --- | --- | -| pluginOpaqueId | PluginOpaqueId | The plugin opaque ID for the plugin that registers this handler. | -| handler | RequestHandler | Handler function to pass context object to. | +| pluginOpaqueId | PluginOpaqueId | The plugin opaque ID for the plugin that registers this handler. | +| handler | RequestHandler | Handler function to pass context object to. | Returns: -`(...rest: HandlerParameters) => ShallowPromise>` +(...rest: HandlerParameters<RequestHandler>) => ShallowPromise<ReturnType<RequestHandler>> A function that takes `RequestHandler` parameters, calls `handler` with a new context, and returns a Promise of the `handler` return value. diff --git a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md index 8b4d3f39e345e..99cddecb38d43 100644 --- a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md +++ b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md @@ -68,7 +68,6 @@ class MyPlugin { } } } - ``` ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.registercontext.md b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.registercontext.md index 7f531fa8ba0d2..32b177df2b2ed 100644 --- a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.registercontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.registercontext.md @@ -16,13 +16,13 @@ registerContextPluginOpaqueId | The plugin opaque ID for the plugin that registers this context. | -| contextName | ContextName | The key of the TContext object this provider supplies the value for. | -| provider | IContextProvider<Context, ContextName> | A [IContextProvider](./kibana-plugin-core-server.icontextprovider.md) to be called each time a new context is created. | +| pluginOpaqueId | PluginOpaqueId | The plugin opaque ID for the plugin that registers this context. | +| contextName | ContextName | The key of the TContext object this provider supplies the value for. | +| provider | IContextProvider<Context, ContextName> | A [IContextProvider](./kibana-plugin-core-server.icontextprovider.md) to be called each time a new context is created. | Returns: -`this` +this The [IContextContainer](./kibana-plugin-core-server.icontextcontainer.md) for method chaining. diff --git a/docs/development/core/server/kibana-plugin-core-server.icspconfig.md b/docs/development/core/server/kibana-plugin-core-server.icspconfig.md index 9da31cdc11e36..d5667900a41e2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.icspconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.icspconfig.md @@ -16,8 +16,8 @@ export interface ICspConfig | Property | Type | Description | | --- | --- | --- | -| [disableEmbedding](./kibana-plugin-core-server.icspconfig.disableembedding.md) | boolean | Whether or not embedding (using iframes) should be allowed by the CSP. If embedding is disabled, a restrictive 'frame-ancestors' rule will be added to the default CSP rules. | -| [header](./kibana-plugin-core-server.icspconfig.header.md) | string | The CSP rules in a formatted directives string for use in a Content-Security-Policy header. | -| [strict](./kibana-plugin-core-server.icspconfig.strict.md) | boolean | Specify whether browsers that do not support CSP should be able to use Kibana. Use true to block and false to allow. | -| [warnLegacyBrowsers](./kibana-plugin-core-server.icspconfig.warnlegacybrowsers.md) | boolean | Specify whether users with legacy browsers should be warned about their lack of Kibana security compliance. | +| [disableEmbedding](./kibana-plugin-core-server.icspconfig.disableembedding.md) | boolean | Whether or not embedding (using iframes) should be allowed by the CSP. If embedding is disabled, a restrictive 'frame-ancestors' rule will be added to the default CSP rules. | +| [header](./kibana-plugin-core-server.icspconfig.header.md) | string | The CSP rules in a formatted directives string for use in a Content-Security-Policy header. | +| [strict](./kibana-plugin-core-server.icspconfig.strict.md) | boolean | Specify whether browsers that do not support CSP should be able to use Kibana. Use true to block and false to allow. | +| [warnLegacyBrowsers](./kibana-plugin-core-server.icspconfig.warnlegacybrowsers.md) | boolean | Specify whether users with legacy browsers should be warned about their lack of Kibana security compliance. | diff --git a/docs/development/core/server/kibana-plugin-core-server.icustomclusterclient.md b/docs/development/core/server/kibana-plugin-core-server.icustomclusterclient.md index 189a50b5d6c20..1c65137d1ddc1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.icustomclusterclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.icustomclusterclient.md @@ -11,10 +11,11 @@ See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md) ```typescript export interface ICustomClusterClient extends IClusterClient ``` +Extends: IClusterClient ## Properties | Property | Type | Description | | --- | --- | --- | -| [close](./kibana-plugin-core-server.icustomclusterclient.close.md) | () => Promise<void> | Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API. | +| [close](./kibana-plugin-core-server.icustomclusterclient.close.md) | () => Promise<void> | Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API. | diff --git a/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tojson.md b/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tojson.md index 6b643f7f72c95..a561e6c319408 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tojson.md +++ b/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tojson.md @@ -11,5 +11,5 @@ toJSON(): Readonly; ``` Returns: -`Readonly` +Readonly<KibanaExecutionContext> diff --git a/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tostring.md b/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tostring.md index 60f9f499cf36c..666da5bef3969 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tostring.md +++ b/docs/development/core/server/kibana-plugin-core-server.iexecutioncontextcontainer.tostring.md @@ -11,5 +11,5 @@ toString(): string; ``` Returns: -`string` +string diff --git a/docs/development/core/server/kibana-plugin-core-server.iexternalurlconfig.md b/docs/development/core/server/kibana-plugin-core-server.iexternalurlconfig.md index 8df4db4aa9b5e..b5490a9548dc1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iexternalurlconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.iexternalurlconfig.md @@ -16,5 +16,5 @@ export interface IExternalUrlConfig | Property | Type | Description | | --- | --- | --- | -| [policy](./kibana-plugin-core-server.iexternalurlconfig.policy.md) | IExternalUrlPolicy[] | A set of policies describing which external urls are allowed. | +| [policy](./kibana-plugin-core-server.iexternalurlconfig.policy.md) | IExternalUrlPolicy\[\] | A set of policies describing which external urls are allowed. | diff --git a/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.host.md b/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.host.md index d1380d9a37846..a549f80509474 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.host.md +++ b/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.host.md @@ -19,6 +19,5 @@ host?: string; // allows access to all of google.com, using any protocol. allow: true, host: 'google.com' - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.md b/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.md index d7fcc1d96bdfe..45f7798eaf336 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.md +++ b/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.md @@ -16,7 +16,7 @@ export interface IExternalUrlPolicy | Property | Type | Description | | --- | --- | --- | -| [allow](./kibana-plugin-core-server.iexternalurlpolicy.allow.md) | boolean | Indicates if this policy allows or denies access to the described destination. | -| [host](./kibana-plugin-core-server.iexternalurlpolicy.host.md) | string | Optional host describing the external destination. May be combined with protocol. | -| [protocol](./kibana-plugin-core-server.iexternalurlpolicy.protocol.md) | string | Optional protocol describing the external destination. May be combined with host. | +| [allow](./kibana-plugin-core-server.iexternalurlpolicy.allow.md) | boolean | Indicates if this policy allows or denies access to the described destination. | +| [host?](./kibana-plugin-core-server.iexternalurlpolicy.host.md) | string | (Optional) Optional host describing the external destination. May be combined with protocol. | +| [protocol?](./kibana-plugin-core-server.iexternalurlpolicy.protocol.md) | string | (Optional) Optional protocol describing the external destination. May be combined with host. | diff --git a/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.protocol.md b/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.protocol.md index 54e5eb5bc68f5..86f6e6164de4e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.protocol.md +++ b/docs/development/core/server/kibana-plugin-core-server.iexternalurlpolicy.protocol.md @@ -19,6 +19,5 @@ protocol?: string; // allows access to all destinations over the `https` protocol. allow: true, protocol: 'https' - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.ikibanaresponse.md b/docs/development/core/server/kibana-plugin-core-server.ikibanaresponse.md index 339ae189f1513..c71f5360834e8 100644 --- a/docs/development/core/server/kibana-plugin-core-server.ikibanaresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.ikibanaresponse.md @@ -16,7 +16,7 @@ export interface IKibanaResponseHttpResponseOptions | | -| [payload](./kibana-plugin-core-server.ikibanaresponse.payload.md) | T | | -| [status](./kibana-plugin-core-server.ikibanaresponse.status.md) | number | | +| [options](./kibana-plugin-core-server.ikibanaresponse.options.md) | HttpResponseOptions | | +| [payload?](./kibana-plugin-core-server.ikibanaresponse.payload.md) | T | (Optional) | +| [status](./kibana-plugin-core-server.ikibanaresponse.status.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate.md b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate.md index 79dca660a5f30..9f0dce061bcfc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate.md +++ b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate.md @@ -14,9 +14,9 @@ getPeerCertificate(detailed: true): DetailedPeerCertificate | null; | Parameter | Type | Description | | --- | --- | --- | -| detailed | true | | +| detailed | true | | Returns: -`DetailedPeerCertificate | null` +DetailedPeerCertificate \| null diff --git a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_1.md b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_1.md index 28c126fc4f733..363fce50251d8 100644 --- a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_1.md +++ b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_1.md @@ -14,9 +14,9 @@ getPeerCertificate(detailed: false): PeerCertificate | null; | Parameter | Type | Description | | --- | --- | --- | -| detailed | false | | +| detailed | false | | Returns: -`PeerCertificate | null` +PeerCertificate \| null diff --git a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_2.md b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_2.md index afeb36a9d5f3e..24b11b6966000 100644 --- a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_2.md +++ b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getpeercertificate_2.md @@ -16,11 +16,11 @@ getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificat | Parameter | Type | Description | | --- | --- | --- | -| detailed | boolean | If true; the full chain with issuer property will be returned. | +| detailed | boolean | If true; the full chain with issuer property will be returned. | Returns: -`PeerCertificate | DetailedPeerCertificate | null` +PeerCertificate \| DetailedPeerCertificate \| null An object representing the peer's certificate. diff --git a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getprotocol.md b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getprotocol.md index 720091174629a..d605f2fd21bef 100644 --- a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getprotocol.md +++ b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.getprotocol.md @@ -13,5 +13,5 @@ getProtocol(): string | null; ``` Returns: -`string | null` +string \| null diff --git a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.md b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.md index 99923aecef8df..bc8f59df9d211 100644 --- a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.md +++ b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.md @@ -16,8 +16,8 @@ export interface IKibanaSocket | Property | Type | Description | | --- | --- | --- | -| [authorizationError](./kibana-plugin-core-server.ikibanasocket.authorizationerror.md) | Error | The reason why the peer's certificate has not been verified. This property becomes available only when authorized is false. | -| [authorized](./kibana-plugin-core-server.ikibanasocket.authorized.md) | boolean | Indicates whether or not the peer certificate was signed by one of the specified CAs. When TLS isn't used the value is undefined. | +| [authorizationError?](./kibana-plugin-core-server.ikibanasocket.authorizationerror.md) | Error | (Optional) The reason why the peer's certificate has not been verified. This property becomes available only when authorized is false. | +| [authorized?](./kibana-plugin-core-server.ikibanasocket.authorized.md) | boolean | (Optional) Indicates whether or not the peer certificate was signed by one of the specified CAs. When TLS isn't used the value is undefined. | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.renegotiate.md b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.renegotiate.md index f39d3c08d9f0b..b4addde9b3179 100644 --- a/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.renegotiate.md +++ b/docs/development/core/server/kibana-plugin-core-server.ikibanasocket.renegotiate.md @@ -19,11 +19,11 @@ renegotiate(options: { | Parameter | Type | Description | | --- | --- | --- | -| options | {
rejectUnauthorized?: boolean;
requestCert?: boolean;
} | The options may contain the following fields: rejectUnauthorized, requestCert (See tls.createServer() for details). | +| options | { rejectUnauthorized?: boolean; requestCert?: boolean; } | The options may contain the following fields: rejectUnauthorized, requestCert (See tls.createServer() for details). | Returns: -`Promise` +Promise<void> A Promise that will be resolved if renegotiation succeeded, or will be rejected if renegotiation failed. diff --git a/docs/development/core/server/kibana-plugin-core-server.intervalhistogram.md b/docs/development/core/server/kibana-plugin-core-server.intervalhistogram.md index d7fb889dce322..39f2d570cd259 100644 --- a/docs/development/core/server/kibana-plugin-core-server.intervalhistogram.md +++ b/docs/development/core/server/kibana-plugin-core-server.intervalhistogram.md @@ -16,12 +16,12 @@ export interface IntervalHistogram | Property | Type | Description | | --- | --- | --- | -| [exceeds](./kibana-plugin-core-server.intervalhistogram.exceeds.md) | number | | -| [fromTimestamp](./kibana-plugin-core-server.intervalhistogram.fromtimestamp.md) | string | | -| [lastUpdatedAt](./kibana-plugin-core-server.intervalhistogram.lastupdatedat.md) | string | | -| [max](./kibana-plugin-core-server.intervalhistogram.max.md) | number | | -| [mean](./kibana-plugin-core-server.intervalhistogram.mean.md) | number | | -| [min](./kibana-plugin-core-server.intervalhistogram.min.md) | number | | -| [percentiles](./kibana-plugin-core-server.intervalhistogram.percentiles.md) | {
50: number;
75: number;
95: number;
99: number;
} | | -| [stddev](./kibana-plugin-core-server.intervalhistogram.stddev.md) | number | | +| [exceeds](./kibana-plugin-core-server.intervalhistogram.exceeds.md) | number | | +| [fromTimestamp](./kibana-plugin-core-server.intervalhistogram.fromtimestamp.md) | string | | +| [lastUpdatedAt](./kibana-plugin-core-server.intervalhistogram.lastupdatedat.md) | string | | +| [max](./kibana-plugin-core-server.intervalhistogram.max.md) | number | | +| [mean](./kibana-plugin-core-server.intervalhistogram.mean.md) | number | | +| [min](./kibana-plugin-core-server.intervalhistogram.min.md) | number | | +| [percentiles](./kibana-plugin-core-server.intervalhistogram.percentiles.md) | { 50: number; 75: number; 95: number; 99: number; } | | +| [stddev](./kibana-plugin-core-server.intervalhistogram.stddev.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.irenderoptions.md b/docs/development/core/server/kibana-plugin-core-server.irenderoptions.md index 51712a3ea1871..b7c43bc77867d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.irenderoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.irenderoptions.md @@ -15,5 +15,5 @@ export interface IRenderOptions | Property | Type | Description | | --- | --- | --- | -| [includeUserSettings](./kibana-plugin-core-server.irenderoptions.includeusersettings.md) | boolean | Set whether to output user settings in the page metadata. true by default. | +| [includeUserSettings?](./kibana-plugin-core-server.irenderoptions.includeusersettings.md) | boolean | (Optional) Set whether to output user settings in the page metadata. true by default. | diff --git a/docs/development/core/server/kibana-plugin-core-server.irouter.md b/docs/development/core/server/kibana-plugin-core-server.irouter.md index a0a27e828f865..a751ea399c5a9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.irouter.md +++ b/docs/development/core/server/kibana-plugin-core-server.irouter.md @@ -16,11 +16,11 @@ export interface IRouterRouteRegistrar<'delete', Context> | Register a route handler for DELETE request. | -| [get](./kibana-plugin-core-server.irouter.get.md) | RouteRegistrar<'get', Context> | Register a route handler for GET request. | -| [handleLegacyErrors](./kibana-plugin-core-server.irouter.handlelegacyerrors.md) | RequestHandlerWrapper | Wrap a router handler to catch and converts legacy boom errors to proper custom errors. | -| [patch](./kibana-plugin-core-server.irouter.patch.md) | RouteRegistrar<'patch', Context> | Register a route handler for PATCH request. | -| [post](./kibana-plugin-core-server.irouter.post.md) | RouteRegistrar<'post', Context> | Register a route handler for POST request. | -| [put](./kibana-plugin-core-server.irouter.put.md) | RouteRegistrar<'put', Context> | Register a route handler for PUT request. | -| [routerPath](./kibana-plugin-core-server.irouter.routerpath.md) | string | Resulted path | +| [delete](./kibana-plugin-core-server.irouter.delete.md) | RouteRegistrar<'delete', Context> | Register a route handler for DELETE request. | +| [get](./kibana-plugin-core-server.irouter.get.md) | RouteRegistrar<'get', Context> | Register a route handler for GET request. | +| [handleLegacyErrors](./kibana-plugin-core-server.irouter.handlelegacyerrors.md) | RequestHandlerWrapper | Wrap a router handler to catch and converts legacy boom errors to proper custom errors. | +| [patch](./kibana-plugin-core-server.irouter.patch.md) | RouteRegistrar<'patch', Context> | Register a route handler for PATCH request. | +| [post](./kibana-plugin-core-server.irouter.post.md) | RouteRegistrar<'post', Context> | Register a route handler for POST request. | +| [put](./kibana-plugin-core-server.irouter.put.md) | RouteRegistrar<'put', Context> | Register a route handler for PUT request. | +| [routerPath](./kibana-plugin-core-server.irouter.routerpath.md) | string | Resulted path | diff --git a/docs/development/core/server/kibana-plugin-core-server.isavedobjectspointintimefinder.md b/docs/development/core/server/kibana-plugin-core-server.isavedobjectspointintimefinder.md index 950d6c078654c..748ffbdc3c4e8 100644 --- a/docs/development/core/server/kibana-plugin-core-server.isavedobjectspointintimefinder.md +++ b/docs/development/core/server/kibana-plugin-core-server.isavedobjectspointintimefinder.md @@ -15,6 +15,6 @@ export interface ISavedObjectsPointInTimeFinder | Property | Type | Description | | --- | --- | --- | -| [close](./kibana-plugin-core-server.isavedobjectspointintimefinder.close.md) | () => Promise<void> | Closes the Point-In-Time associated with this finder instance.Once you have retrieved all of the results you need, it is recommended to call close() to clean up the PIT and prevent Elasticsearch from consuming resources unnecessarily. This is only required if you are done iterating and have not yet paged through all of the results: the PIT will automatically be closed for you once you reach the last page of results, or if the underlying call to find fails for any reason. | -| [find](./kibana-plugin-core-server.isavedobjectspointintimefinder.find.md) | () => AsyncGenerator<SavedObjectsFindResponse<T, A>> | An async generator which wraps calls to savedObjectsClient.find and iterates over multiple pages of results using _pit and search_after. This will open a new Point-In-Time (PIT), and continue paging until a set of results is received that's smaller than the designated perPage size. | +| [close](./kibana-plugin-core-server.isavedobjectspointintimefinder.close.md) | () => Promise<void> | Closes the Point-In-Time associated with this finder instance.Once you have retrieved all of the results you need, it is recommended to call close() to clean up the PIT and prevent Elasticsearch from consuming resources unnecessarily. This is only required if you are done iterating and have not yet paged through all of the results: the PIT will automatically be closed for you once you reach the last page of results, or if the underlying call to find fails for any reason. | +| [find](./kibana-plugin-core-server.isavedobjectspointintimefinder.find.md) | () => AsyncGenerator<SavedObjectsFindResponse<T, A>> | An async generator which wraps calls to savedObjectsClient.find and iterates over multiple pages of results using _pit and search_after. This will open a new Point-In-Time (PIT), and continue paging until a set of results is received that's smaller than the designated perPage size. | diff --git a/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md b/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md index f39db268288a6..f0d75f2f08fe4 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md @@ -16,6 +16,6 @@ export interface IScopedClusterClient | Property | Type | Description | | --- | --- | --- | -| [asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md) | ElasticsearchClient | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the user that initiated the request to the Kibana server. | -| [asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md) | ElasticsearchClient | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the internal Kibana user. | +| [asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md) | ElasticsearchClient | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the user that initiated the request to the Kibana server. | +| [asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md) | ElasticsearchClient | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the internal Kibana user. | diff --git a/docs/development/core/server/kibana-plugin-core-server.iuisettingsclient.md b/docs/development/core/server/kibana-plugin-core-server.iuisettingsclient.md index dd4a69c13a2d9..ad7819719e14a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.iuisettingsclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.iuisettingsclient.md @@ -16,14 +16,14 @@ export interface IUiSettingsClient | Property | Type | Description | | --- | --- | --- | -| [get](./kibana-plugin-core-server.iuisettingsclient.get.md) | <T = any>(key: string) => Promise<T> | Retrieves uiSettings values set by the user with fallbacks to default values if not specified. | -| [getAll](./kibana-plugin-core-server.iuisettingsclient.getall.md) | <T = any>() => Promise<Record<string, T>> | Retrieves a set of all uiSettings values set by the user with fallbacks to default values if not specified. | -| [getRegistered](./kibana-plugin-core-server.iuisettingsclient.getregistered.md) | () => Readonly<Record<string, PublicUiSettingsParams>> | Returns registered uiSettings values [UiSettingsParams](./kibana-plugin-core-server.uisettingsparams.md) | -| [getUserProvided](./kibana-plugin-core-server.iuisettingsclient.getuserprovided.md) | <T = any>() => Promise<Record<string, UserProvidedValues<T>>> | Retrieves a set of all uiSettings values set by the user. | -| [isOverridden](./kibana-plugin-core-server.iuisettingsclient.isoverridden.md) | (key: string) => boolean | Shows whether the uiSettings value set by the user. | -| [isSensitive](./kibana-plugin-core-server.iuisettingsclient.issensitive.md) | (key: string) => boolean | Shows whether the uiSetting is a sensitive value. Used by telemetry to not send sensitive values. | -| [remove](./kibana-plugin-core-server.iuisettingsclient.remove.md) | (key: string) => Promise<void> | Removes uiSettings value by key. | -| [removeMany](./kibana-plugin-core-server.iuisettingsclient.removemany.md) | (keys: string[]) => Promise<void> | Removes multiple uiSettings values by keys. | -| [set](./kibana-plugin-core-server.iuisettingsclient.set.md) | (key: string, value: any) => Promise<void> | Writes uiSettings value and marks it as set by the user. | -| [setMany](./kibana-plugin-core-server.iuisettingsclient.setmany.md) | (changes: Record<string, any>) => Promise<void> | Writes multiple uiSettings values and marks them as set by the user. | +| [get](./kibana-plugin-core-server.iuisettingsclient.get.md) | <T = any>(key: string) => Promise<T> | Retrieves uiSettings values set by the user with fallbacks to default values if not specified. | +| [getAll](./kibana-plugin-core-server.iuisettingsclient.getall.md) | <T = any>() => Promise<Record<string, T>> | Retrieves a set of all uiSettings values set by the user with fallbacks to default values if not specified. | +| [getRegistered](./kibana-plugin-core-server.iuisettingsclient.getregistered.md) | () => Readonly<Record<string, PublicUiSettingsParams>> | Returns registered uiSettings values [UiSettingsParams](./kibana-plugin-core-server.uisettingsparams.md) | +| [getUserProvided](./kibana-plugin-core-server.iuisettingsclient.getuserprovided.md) | <T = any>() => Promise<Record<string, UserProvidedValues<T>>> | Retrieves a set of all uiSettings values set by the user. | +| [isOverridden](./kibana-plugin-core-server.iuisettingsclient.isoverridden.md) | (key: string) => boolean | Shows whether the uiSettings value set by the user. | +| [isSensitive](./kibana-plugin-core-server.iuisettingsclient.issensitive.md) | (key: string) => boolean | Shows whether the uiSetting is a sensitive value. Used by telemetry to not send sensitive values. | +| [remove](./kibana-plugin-core-server.iuisettingsclient.remove.md) | (key: string) => Promise<void> | Removes uiSettings value by key. | +| [removeMany](./kibana-plugin-core-server.iuisettingsclient.removemany.md) | (keys: string\[\]) => Promise<void> | Removes multiple uiSettings values by keys. | +| [set](./kibana-plugin-core-server.iuisettingsclient.set.md) | (key: string, value: any) => Promise<void> | Writes uiSettings value and marks it as set by the user. | +| [setMany](./kibana-plugin-core-server.iuisettingsclient.setmany.md) | (changes: Record<string, any>) => Promise<void> | Writes multiple uiSettings values and marks them as set by the user. | diff --git a/docs/development/core/server/kibana-plugin-core-server.kibanarequest._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.kibanarequest._constructor_.md index b44607c1c4135..682d6c87629fc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.kibanarequest._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.kibanarequest._constructor_.md @@ -16,9 +16,9 @@ constructor(request: Request, params: Params, query: Query, body: Body, withoutS | Parameter | Type | Description | | --- | --- | --- | -| request | Request | | -| params | Params | | -| query | Query | | -| body | Body | | -| withoutSecretHeaders | boolean | | +| request | Request | | +| params | Params | | +| query | Query | | +| body | Body | | +| withoutSecretHeaders | boolean | | diff --git a/docs/development/core/server/kibana-plugin-core-server.kibanarequest.md b/docs/development/core/server/kibana-plugin-core-server.kibanarequest.md index 4129662acb2b1..f4e2dda2d5499 100644 --- a/docs/development/core/server/kibana-plugin-core-server.kibanarequest.md +++ b/docs/development/core/server/kibana-plugin-core-server.kibanarequest.md @@ -22,17 +22,17 @@ export declare class KibanaRequest{
isAuthenticated: boolean;
} | | -| [body](./kibana-plugin-core-server.kibanarequest.body.md) | | Body | | -| [events](./kibana-plugin-core-server.kibanarequest.events.md) | | KibanaRequestEvents | Request events [KibanaRequestEvents](./kibana-plugin-core-server.kibanarequestevents.md) | -| [headers](./kibana-plugin-core-server.kibanarequest.headers.md) | | Headers | Readonly copy of incoming request headers. | -| [id](./kibana-plugin-core-server.kibanarequest.id.md) | | string | A identifier to identify this request. | -| [isSystemRequest](./kibana-plugin-core-server.kibanarequest.issystemrequest.md) | | boolean | Whether or not the request is a "system request" rather than an application-level request. Can be set on the client using the HttpFetchOptions#asSystemRequest option. | -| [params](./kibana-plugin-core-server.kibanarequest.params.md) | | Params | | -| [query](./kibana-plugin-core-server.kibanarequest.query.md) | | Query | | -| [rewrittenUrl](./kibana-plugin-core-server.kibanarequest.rewrittenurl.md) | | URL | URL rewritten in onPreRouting request interceptor. | -| [route](./kibana-plugin-core-server.kibanarequest.route.md) | | RecursiveReadonly<KibanaRequestRoute<Method>> | matched route details | -| [socket](./kibana-plugin-core-server.kibanarequest.socket.md) | | IKibanaSocket | [IKibanaSocket](./kibana-plugin-core-server.ikibanasocket.md) | -| [url](./kibana-plugin-core-server.kibanarequest.url.md) | | URL | a WHATWG URL standard object. | -| [uuid](./kibana-plugin-core-server.kibanarequest.uuid.md) | | string | A UUID to identify this request. | +| [auth](./kibana-plugin-core-server.kibanarequest.auth.md) | | { isAuthenticated: boolean; } | | +| [body](./kibana-plugin-core-server.kibanarequest.body.md) | | Body | | +| [events](./kibana-plugin-core-server.kibanarequest.events.md) | | KibanaRequestEvents | Request events [KibanaRequestEvents](./kibana-plugin-core-server.kibanarequestevents.md) | +| [headers](./kibana-plugin-core-server.kibanarequest.headers.md) | | Headers | Readonly copy of incoming request headers. | +| [id](./kibana-plugin-core-server.kibanarequest.id.md) | | string | A identifier to identify this request. | +| [isSystemRequest](./kibana-plugin-core-server.kibanarequest.issystemrequest.md) | | boolean | Whether or not the request is a "system request" rather than an application-level request. Can be set on the client using the HttpFetchOptions#asSystemRequest option. | +| [params](./kibana-plugin-core-server.kibanarequest.params.md) | | Params | | +| [query](./kibana-plugin-core-server.kibanarequest.query.md) | | Query | | +| [rewrittenUrl?](./kibana-plugin-core-server.kibanarequest.rewrittenurl.md) | | URL | (Optional) URL rewritten in onPreRouting request interceptor. | +| [route](./kibana-plugin-core-server.kibanarequest.route.md) | | RecursiveReadonly<KibanaRequestRoute<Method>> | matched route details | +| [socket](./kibana-plugin-core-server.kibanarequest.socket.md) | | IKibanaSocket | [IKibanaSocket](./kibana-plugin-core-server.ikibanasocket.md) | +| [url](./kibana-plugin-core-server.kibanarequest.url.md) | | URL | a WHATWG URL standard object. | +| [uuid](./kibana-plugin-core-server.kibanarequest.uuid.md) | | string | A UUID to identify this request. | diff --git a/docs/development/core/server/kibana-plugin-core-server.kibanarequestevents.md b/docs/development/core/server/kibana-plugin-core-server.kibanarequestevents.md index dfd7efd27cb5a..c61e4aeec7c85 100644 --- a/docs/development/core/server/kibana-plugin-core-server.kibanarequestevents.md +++ b/docs/development/core/server/kibana-plugin-core-server.kibanarequestevents.md @@ -16,6 +16,6 @@ export interface KibanaRequestEvents | Property | Type | Description | | --- | --- | --- | -| [aborted$](./kibana-plugin-core-server.kibanarequestevents.aborted_.md) | Observable<void> | Observable that emits once if and when the request has been aborted. | -| [completed$](./kibana-plugin-core-server.kibanarequestevents.completed_.md) | Observable<void> | Observable that emits once if and when the request has been completely handled. | +| [aborted$](./kibana-plugin-core-server.kibanarequestevents.aborted_.md) | Observable<void> | Observable that emits once if and when the request has been aborted. | +| [completed$](./kibana-plugin-core-server.kibanarequestevents.completed_.md) | Observable<void> | Observable that emits once if and when the request has been completely handled. | diff --git a/docs/development/core/server/kibana-plugin-core-server.kibanarequestroute.md b/docs/development/core/server/kibana-plugin-core-server.kibanarequestroute.md index 480b580abc8a7..196c352e21f8a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.kibanarequestroute.md +++ b/docs/development/core/server/kibana-plugin-core-server.kibanarequestroute.md @@ -16,7 +16,7 @@ export interface KibanaRequestRoute | Property | Type | Description | | --- | --- | --- | -| [method](./kibana-plugin-core-server.kibanarequestroute.method.md) | Method | | -| [options](./kibana-plugin-core-server.kibanarequestroute.options.md) | KibanaRequestRouteOptions<Method> | | -| [path](./kibana-plugin-core-server.kibanarequestroute.path.md) | string | | +| [method](./kibana-plugin-core-server.kibanarequestroute.method.md) | Method | | +| [options](./kibana-plugin-core-server.kibanarequestroute.options.md) | KibanaRequestRouteOptions<Method> | | +| [path](./kibana-plugin-core-server.kibanarequestroute.path.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md b/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md index 8ddc0da5f1b28..b2e2b4bc6003f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md +++ b/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md @@ -40,7 +40,6 @@ return response.ok({ body: Buffer.from(...) }); const stream = new Stream.PassThrough(); fs.createReadStream('./file').pipe(stream); return res.ok({ body: stream }); - ``` HTTP headers are configurable via response factory parameter `options` [HttpResponseOptions](./kibana-plugin-core-server.httpresponseoptions.md). @@ -51,7 +50,6 @@ return response.ok({ 'content-type': 'application/json' } }); - ``` 2. Redirection response. Redirection URL is configures via 'Location' header. @@ -62,7 +60,6 @@ return response.redirected({ location: '/new-url', }, }); - ``` 3. Error response. You may pass an error message to the client, where error message can be: - `string` send message text - `Error` send the message text of given Error object. - `{ message: string | Error, attributes: {data: Record, ...} }` - send message text and attach additional error data. @@ -100,7 +97,6 @@ try { }); } - ``` 4. Custom response. `ResponseFactory` may not cover your use case, so you can use the `custom` function to customize the response. @@ -112,6 +108,5 @@ return response.custom({ location: '/created-url' } }) - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.loggercontextconfiginput.md b/docs/development/core/server/kibana-plugin-core-server.loggercontextconfiginput.md index fb6922d839cb8..2628d1ada88f8 100644 --- a/docs/development/core/server/kibana-plugin-core-server.loggercontextconfiginput.md +++ b/docs/development/core/server/kibana-plugin-core-server.loggercontextconfiginput.md @@ -15,6 +15,6 @@ export interface LoggerContextConfigInput | Property | Type | Description | | --- | --- | --- | -| [appenders](./kibana-plugin-core-server.loggercontextconfiginput.appenders.md) | Record<string, AppenderConfigType> | Map<string, AppenderConfigType> | | -| [loggers](./kibana-plugin-core-server.loggercontextconfiginput.loggers.md) | LoggerConfigType[] | | +| [appenders?](./kibana-plugin-core-server.loggercontextconfiginput.appenders.md) | Record<string, AppenderConfigType> \| Map<string, AppenderConfigType> | (Optional) | +| [loggers?](./kibana-plugin-core-server.loggercontextconfiginput.loggers.md) | LoggerConfigType\[\] | (Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.loggingservicesetup.configure.md b/docs/development/core/server/kibana-plugin-core-server.loggingservicesetup.configure.md index 52ab5f1098457..022cbb3b7cbae 100644 --- a/docs/development/core/server/kibana-plugin-core-server.loggingservicesetup.configure.md +++ b/docs/development/core/server/kibana-plugin-core-server.loggingservicesetup.configure.md @@ -16,11 +16,11 @@ configure(config$: Observable): void; | Parameter | Type | Description | | --- | --- | --- | -| config$ | Observable<LoggerContextConfigInput> | | +| config$ | Observable<LoggerContextConfigInput> | | Returns: -`void` +void ## Remarks @@ -37,6 +37,5 @@ core.logging.configure( loggers: [{ name: 'search', appenders: ['default'] }] }) ) - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index f22a0fb8283d7..2eed71cc6ecea 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -8,7 +8,7 @@ The Kibana Core APIs for server-side plugins. A plugin requires a `kibana.json` file at it's root directory that follows [the manfiest schema](./kibana-plugin-core-server.pluginmanifest.md) to define static plugin information required to load the plugin. -A plugin's `server/index` file must contain a named import, `plugin`, that implements [PluginInitializer](./kibana-plugin-core-server.plugininitializer.md) which returns an object that implements [Plugin](./kibana-plugin-core-server.plugin.md). +A plugin's `server/index` file must contain a named import, `plugin`, that implements [PluginInitializer](./kibana-plugin-core-server.plugininitializer.md) which returns an object that implements . The plugin integrates with the core system via lifecycle events: `setup`, `start`, and `stop`. In each lifecycle method, the plugin will receive the corresponding core services available (either [CoreSetup](./kibana-plugin-core-server.coresetup.md) or [CoreStart](./kibana-plugin-core-server.corestart.md)) and any interfaces returned by dependency plugins' lifecycle method. Anything returned by the plugin's lifecycle method will be exposed to downstream dependencies when their corresponding lifecycle methods are invoked. @@ -124,7 +124,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [OpsOsMetrics](./kibana-plugin-core-server.opsosmetrics.md) | OS related metrics | | [OpsProcessMetrics](./kibana-plugin-core-server.opsprocessmetrics.md) | Process related metrics | | [OpsServerMetrics](./kibana-plugin-core-server.opsservermetrics.md) | server related metrics | -| [Plugin](./kibana-plugin-core-server.plugin.md) | The interface that should be returned by a PluginInitializer for a standard plugin. | +| [Plugin\_2](./kibana-plugin-core-server.plugin_2.md) | The interface that should be returned by a PluginInitializer for a standard plugin. | | [PluginConfigDescriptor](./kibana-plugin-core-server.pluginconfigdescriptor.md) | Describes a plugin configuration properties. | | [PluginInitializerContext](./kibana-plugin-core-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. | | [PluginManifest](./kibana-plugin-core-server.pluginmanifest.md) | Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file. | @@ -259,7 +259,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [HandlerContextType](./kibana-plugin-core-server.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md) to represent the type of the context. | | [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-core-server.icontextcontainer.md) | | [HandlerParameters](./kibana-plugin-core-server.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md), excluding the [HandlerContextType](./kibana-plugin-core-server.handlercontexttype.md). | -| [Headers](./kibana-plugin-core-server.headers.md) | Http request headers to read. | +| [Headers\_2](./kibana-plugin-core-server.headers_2.md) | Http request headers to read. | | [HttpResourcesRequestHandler](./kibana-plugin-core-server.httpresourcesrequesthandler.md) | Extended version of [RequestHandler](./kibana-plugin-core-server.requesthandler.md) having access to [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) to respond with HTML or JS resources. | | [HttpResourcesResponseOptions](./kibana-plugin-core-server.httpresourcesresponseoptions.md) | HTTP Resources response parameters | | [HttpResponsePayload](./kibana-plugin-core-server.httpresponsepayload.md) | Data send to the client as a response payload. | diff --git a/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.getopsmetrics_.md b/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.getopsmetrics_.md index 61107fbf20ad9..0db06b231f60e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.getopsmetrics_.md +++ b/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.getopsmetrics_.md @@ -19,6 +19,5 @@ getOpsMetrics$: () => Observable; core.metrics.getOpsMetrics$().subscribe(metrics => { // do something with the metrics }) - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.md index 5fcb1417dea0e..d9b05589ab6a7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.metricsservicesetup.md @@ -16,6 +16,6 @@ export interface MetricsServiceSetup | Property | Type | Description | | --- | --- | --- | -| [collectionInterval](./kibana-plugin-core-server.metricsservicesetup.collectioninterval.md) | number | Interval metrics are collected in milliseconds | -| [getOpsMetrics$](./kibana-plugin-core-server.metricsservicesetup.getopsmetrics_.md) | () => Observable<OpsMetrics> | Retrieve an observable emitting the [OpsMetrics](./kibana-plugin-core-server.opsmetrics.md) gathered. The observable will emit an initial value during core's start phase, and a new value every fixed interval of time, based on the opts.interval configuration property. | +| [collectionInterval](./kibana-plugin-core-server.metricsservicesetup.collectioninterval.md) | number | Interval metrics are collected in milliseconds | +| [getOpsMetrics$](./kibana-plugin-core-server.metricsservicesetup.getopsmetrics_.md) | () => Observable<OpsMetrics> | Retrieve an observable emitting the [OpsMetrics](./kibana-plugin-core-server.opsmetrics.md) gathered. The observable will emit an initial value during core's start phase, and a new value every fixed interval of time, based on the opts.interval configuration property. | diff --git a/docs/development/core/server/kibana-plugin-core-server.nodesversioncompatibility.md b/docs/development/core/server/kibana-plugin-core-server.nodesversioncompatibility.md index cbdac9d5455b0..a282bf4b7b4b6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.nodesversioncompatibility.md +++ b/docs/development/core/server/kibana-plugin-core-server.nodesversioncompatibility.md @@ -14,10 +14,10 @@ export interface NodesVersionCompatibility | Property | Type | Description | | --- | --- | --- | -| [incompatibleNodes](./kibana-plugin-core-server.nodesversioncompatibility.incompatiblenodes.md) | NodeInfo[] | | -| [isCompatible](./kibana-plugin-core-server.nodesversioncompatibility.iscompatible.md) | boolean | | -| [kibanaVersion](./kibana-plugin-core-server.nodesversioncompatibility.kibanaversion.md) | string | | -| [message](./kibana-plugin-core-server.nodesversioncompatibility.message.md) | string | | -| [nodesInfoRequestError](./kibana-plugin-core-server.nodesversioncompatibility.nodesinforequesterror.md) | Error | | -| [warningNodes](./kibana-plugin-core-server.nodesversioncompatibility.warningnodes.md) | NodeInfo[] | | +| [incompatibleNodes](./kibana-plugin-core-server.nodesversioncompatibility.incompatiblenodes.md) | NodeInfo\[\] | | +| [isCompatible](./kibana-plugin-core-server.nodesversioncompatibility.iscompatible.md) | boolean | | +| [kibanaVersion](./kibana-plugin-core-server.nodesversioncompatibility.kibanaversion.md) | string | | +| [message?](./kibana-plugin-core-server.nodesversioncompatibility.message.md) | string | (Optional) | +| [nodesInfoRequestError?](./kibana-plugin-core-server.nodesversioncompatibility.nodesinforequesterror.md) | Error | (Optional) | +| [warningNodes](./kibana-plugin-core-server.nodesversioncompatibility.warningnodes.md) | NodeInfo\[\] | | diff --git a/docs/development/core/server/kibana-plugin-core-server.onpostauthtoolkit.md b/docs/development/core/server/kibana-plugin-core-server.onpostauthtoolkit.md index ba9f7d60667ac..069f63fe01b77 100644 --- a/docs/development/core/server/kibana-plugin-core-server.onpostauthtoolkit.md +++ b/docs/development/core/server/kibana-plugin-core-server.onpostauthtoolkit.md @@ -16,5 +16,5 @@ export interface OnPostAuthToolkit | Property | Type | Description | | --- | --- | --- | -| [next](./kibana-plugin-core-server.onpostauthtoolkit.next.md) | () => OnPostAuthResult | To pass request to the next handler | +| [next](./kibana-plugin-core-server.onpostauthtoolkit.next.md) | () => OnPostAuthResult | To pass request to the next handler | diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md b/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md index 8031dbc64fa6d..44eed5818c610 100644 --- a/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md +++ b/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md @@ -16,5 +16,5 @@ export interface OnPreAuthToolkit | Property | Type | Description | | --- | --- | --- | -| [next](./kibana-plugin-core-server.onpreauthtoolkit.next.md) | () => OnPreAuthResult | To pass request to the next handler | +| [next](./kibana-plugin-core-server.onpreauthtoolkit.next.md) | () => OnPreAuthResult | To pass request to the next handler | diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreresponseextensions.md b/docs/development/core/server/kibana-plugin-core-server.onpreresponseextensions.md index eaaa94b936fd8..078ccc38a70c1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.onpreresponseextensions.md +++ b/docs/development/core/server/kibana-plugin-core-server.onpreresponseextensions.md @@ -16,5 +16,5 @@ export interface OnPreResponseExtensions | Property | Type | Description | | --- | --- | --- | -| [headers](./kibana-plugin-core-server.onpreresponseextensions.headers.md) | ResponseHeaders | additional headers to attach to the response | +| [headers?](./kibana-plugin-core-server.onpreresponseextensions.headers.md) | ResponseHeaders | (Optional) additional headers to attach to the response | diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreresponseinfo.md b/docs/development/core/server/kibana-plugin-core-server.onpreresponseinfo.md index 3e5c882b2fb29..60f7f39ed30a6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.onpreresponseinfo.md +++ b/docs/development/core/server/kibana-plugin-core-server.onpreresponseinfo.md @@ -16,5 +16,5 @@ export interface OnPreResponseInfo | Property | Type | Description | | --- | --- | --- | -| [statusCode](./kibana-plugin-core-server.onpreresponseinfo.statuscode.md) | number | | +| [statusCode](./kibana-plugin-core-server.onpreresponseinfo.statuscode.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreresponserender.md b/docs/development/core/server/kibana-plugin-core-server.onpreresponserender.md index 0a7ce2d546701..a5afa1a709326 100644 --- a/docs/development/core/server/kibana-plugin-core-server.onpreresponserender.md +++ b/docs/development/core/server/kibana-plugin-core-server.onpreresponserender.md @@ -16,6 +16,6 @@ export interface OnPreResponseRender | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-server.onpreresponserender.body.md) | string | the body to use in the response | -| [headers](./kibana-plugin-core-server.onpreresponserender.headers.md) | ResponseHeaders | additional headers to attach to the response | +| [body](./kibana-plugin-core-server.onpreresponserender.body.md) | string | the body to use in the response | +| [headers?](./kibana-plugin-core-server.onpreresponserender.headers.md) | ResponseHeaders | (Optional) additional headers to attach to the response | diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md b/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md index 14070038132da..197b7b692e734 100644 --- a/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md +++ b/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md @@ -16,6 +16,6 @@ export interface OnPreResponseToolkit | Property | Type | Description | | --- | --- | --- | -| [next](./kibana-plugin-core-server.onpreresponsetoolkit.next.md) | (responseExtensions?: OnPreResponseExtensions) => OnPreResponseResult | To pass request to the next handler | -| [render](./kibana-plugin-core-server.onpreresponsetoolkit.render.md) | (responseRender: OnPreResponseRender) => OnPreResponseResult | To override the response with a different body | +| [next](./kibana-plugin-core-server.onpreresponsetoolkit.next.md) | (responseExtensions?: OnPreResponseExtensions) => OnPreResponseResult | To pass request to the next handler | +| [render](./kibana-plugin-core-server.onpreresponsetoolkit.render.md) | (responseRender: OnPreResponseRender) => OnPreResponseResult | To override the response with a different body | diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.md b/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.md index c564896b46a27..e3bdeb3c451c4 100644 --- a/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.md +++ b/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.md @@ -16,6 +16,6 @@ export interface OnPreRoutingToolkit | Property | Type | Description | | --- | --- | --- | -| [next](./kibana-plugin-core-server.onpreroutingtoolkit.next.md) | () => OnPreRoutingResult | To pass request to the next handler | -| [rewriteUrl](./kibana-plugin-core-server.onpreroutingtoolkit.rewriteurl.md) | (url: string) => OnPreRoutingResult | Rewrite requested resources url before is was authenticated and routed to a handler | +| [next](./kibana-plugin-core-server.onpreroutingtoolkit.next.md) | () => OnPreRoutingResult | To pass request to the next handler | +| [rewriteUrl](./kibana-plugin-core-server.onpreroutingtoolkit.rewriteurl.md) | (url: string) => OnPreRoutingResult | Rewrite requested resources url before is was authenticated and routed to a handler | diff --git a/docs/development/core/server/kibana-plugin-core-server.opsmetrics.md b/docs/development/core/server/kibana-plugin-core-server.opsmetrics.md index 4774215cef071..dcecfd35a8d2d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.opsmetrics.md +++ b/docs/development/core/server/kibana-plugin-core-server.opsmetrics.md @@ -16,11 +16,11 @@ export interface OpsMetrics | Property | Type | Description | | --- | --- | --- | -| [collected\_at](./kibana-plugin-core-server.opsmetrics.collected_at.md) | Date | Time metrics were recorded at. | -| [concurrent\_connections](./kibana-plugin-core-server.opsmetrics.concurrent_connections.md) | OpsServerMetrics['concurrent_connections'] | number of current concurrent connections to the server | -| [os](./kibana-plugin-core-server.opsmetrics.os.md) | OpsOsMetrics | OS related metrics | -| [process](./kibana-plugin-core-server.opsmetrics.process.md) | OpsProcessMetrics | Process related metrics. | -| [processes](./kibana-plugin-core-server.opsmetrics.processes.md) | OpsProcessMetrics[] | Process related metrics. Reports an array of objects for each kibana pid. | -| [requests](./kibana-plugin-core-server.opsmetrics.requests.md) | OpsServerMetrics['requests'] | server requests stats | -| [response\_times](./kibana-plugin-core-server.opsmetrics.response_times.md) | OpsServerMetrics['response_times'] | server response time stats | +| [collected\_at](./kibana-plugin-core-server.opsmetrics.collected_at.md) | Date | Time metrics were recorded at. | +| [concurrent\_connections](./kibana-plugin-core-server.opsmetrics.concurrent_connections.md) | OpsServerMetrics\['concurrent\_connections'\] | number of current concurrent connections to the server | +| [os](./kibana-plugin-core-server.opsmetrics.os.md) | OpsOsMetrics | OS related metrics | +| [process](./kibana-plugin-core-server.opsmetrics.process.md) | OpsProcessMetrics | Process related metrics. | +| [processes](./kibana-plugin-core-server.opsmetrics.processes.md) | OpsProcessMetrics\[\] | Process related metrics. Reports an array of objects for each kibana pid. | +| [requests](./kibana-plugin-core-server.opsmetrics.requests.md) | OpsServerMetrics\['requests'\] | server requests stats | +| [response\_times](./kibana-plugin-core-server.opsmetrics.response_times.md) | OpsServerMetrics\['response\_times'\] | server response time stats | diff --git a/docs/development/core/server/kibana-plugin-core-server.opsosmetrics.md b/docs/development/core/server/kibana-plugin-core-server.opsosmetrics.md index 8938608531139..08f205d48dd09 100644 --- a/docs/development/core/server/kibana-plugin-core-server.opsosmetrics.md +++ b/docs/development/core/server/kibana-plugin-core-server.opsosmetrics.md @@ -16,13 +16,13 @@ export interface OpsOsMetrics | Property | Type | Description | | --- | --- | --- | -| [cpu](./kibana-plugin-core-server.opsosmetrics.cpu.md) | {
control_group: string;
cfs_period_micros: number;
cfs_quota_micros: number;
stat: {
number_of_elapsed_periods: number;
number_of_times_throttled: number;
time_throttled_nanos: number;
};
} | cpu cgroup metrics, undefined when not running in a cgroup | -| [cpuacct](./kibana-plugin-core-server.opsosmetrics.cpuacct.md) | {
control_group: string;
usage_nanos: number;
} | cpu accounting metrics, undefined when not running in a cgroup | -| [distro](./kibana-plugin-core-server.opsosmetrics.distro.md) | string | The os distrib. Only present for linux platforms | -| [distroRelease](./kibana-plugin-core-server.opsosmetrics.distrorelease.md) | string | The os distrib release, prefixed by the os distrib. Only present for linux platforms | -| [load](./kibana-plugin-core-server.opsosmetrics.load.md) | {
'1m': number;
'5m': number;
'15m': number;
} | cpu load metrics | -| [memory](./kibana-plugin-core-server.opsosmetrics.memory.md) | {
total_in_bytes: number;
free_in_bytes: number;
used_in_bytes: number;
} | system memory usage metrics | -| [platform](./kibana-plugin-core-server.opsosmetrics.platform.md) | NodeJS.Platform | The os platform | -| [platformRelease](./kibana-plugin-core-server.opsosmetrics.platformrelease.md) | string | The os platform release, prefixed by the platform name | -| [uptime\_in\_millis](./kibana-plugin-core-server.opsosmetrics.uptime_in_millis.md) | number | the OS uptime | +| [cpu?](./kibana-plugin-core-server.opsosmetrics.cpu.md) | { control\_group: string; cfs\_period\_micros: number; cfs\_quota\_micros: number; stat: { number\_of\_elapsed\_periods: number; number\_of\_times\_throttled: number; time\_throttled\_nanos: number; }; } | (Optional) cpu cgroup metrics, undefined when not running in a cgroup | +| [cpuacct?](./kibana-plugin-core-server.opsosmetrics.cpuacct.md) | { control\_group: string; usage\_nanos: number; } | (Optional) cpu accounting metrics, undefined when not running in a cgroup | +| [distro?](./kibana-plugin-core-server.opsosmetrics.distro.md) | string | (Optional) The os distrib. Only present for linux platforms | +| [distroRelease?](./kibana-plugin-core-server.opsosmetrics.distrorelease.md) | string | (Optional) The os distrib release, prefixed by the os distrib. Only present for linux platforms | +| [load](./kibana-plugin-core-server.opsosmetrics.load.md) | { '1m': number; '5m': number; '15m': number; } | cpu load metrics | +| [memory](./kibana-plugin-core-server.opsosmetrics.memory.md) | { total\_in\_bytes: number; free\_in\_bytes: number; used\_in\_bytes: number; } | system memory usage metrics | +| [platform](./kibana-plugin-core-server.opsosmetrics.platform.md) | NodeJS.Platform | The os platform | +| [platformRelease](./kibana-plugin-core-server.opsosmetrics.platformrelease.md) | string | The os platform release, prefixed by the platform name | +| [uptime\_in\_millis](./kibana-plugin-core-server.opsosmetrics.uptime_in_millis.md) | number | the OS uptime | diff --git a/docs/development/core/server/kibana-plugin-core-server.opsprocessmetrics.md b/docs/development/core/server/kibana-plugin-core-server.opsprocessmetrics.md index 198b668afca60..43a4333d7bd2c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.opsprocessmetrics.md +++ b/docs/development/core/server/kibana-plugin-core-server.opsprocessmetrics.md @@ -16,9 +16,9 @@ export interface OpsProcessMetrics | Property | Type | Description | | --- | --- | --- | -| [event\_loop\_delay\_histogram](./kibana-plugin-core-server.opsprocessmetrics.event_loop_delay_histogram.md) | IntervalHistogram | node event loop delay histogram since last collection | -| [event\_loop\_delay](./kibana-plugin-core-server.opsprocessmetrics.event_loop_delay.md) | number | mean event loop delay since last collection | -| [memory](./kibana-plugin-core-server.opsprocessmetrics.memory.md) | {
heap: {
total_in_bytes: number;
used_in_bytes: number;
size_limit: number;
};
resident_set_size_in_bytes: number;
} | process memory usage | -| [pid](./kibana-plugin-core-server.opsprocessmetrics.pid.md) | number | pid of the kibana process | -| [uptime\_in\_millis](./kibana-plugin-core-server.opsprocessmetrics.uptime_in_millis.md) | number | uptime of the kibana process | +| [event\_loop\_delay\_histogram](./kibana-plugin-core-server.opsprocessmetrics.event_loop_delay_histogram.md) | IntervalHistogram | node event loop delay histogram since last collection | +| [event\_loop\_delay](./kibana-plugin-core-server.opsprocessmetrics.event_loop_delay.md) | number | mean event loop delay since last collection | +| [memory](./kibana-plugin-core-server.opsprocessmetrics.memory.md) | { heap: { total\_in\_bytes: number; used\_in\_bytes: number; size\_limit: number; }; resident\_set\_size\_in\_bytes: number; } | process memory usage | +| [pid](./kibana-plugin-core-server.opsprocessmetrics.pid.md) | number | pid of the kibana process | +| [uptime\_in\_millis](./kibana-plugin-core-server.opsprocessmetrics.uptime_in_millis.md) | number | uptime of the kibana process | diff --git a/docs/development/core/server/kibana-plugin-core-server.opsservermetrics.md b/docs/development/core/server/kibana-plugin-core-server.opsservermetrics.md index ad6f64600a96e..ddabbd124627b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.opsservermetrics.md +++ b/docs/development/core/server/kibana-plugin-core-server.opsservermetrics.md @@ -16,7 +16,7 @@ export interface OpsServerMetrics | Property | Type | Description | | --- | --- | --- | -| [concurrent\_connections](./kibana-plugin-core-server.opsservermetrics.concurrent_connections.md) | number | number of current concurrent connections to the server | -| [requests](./kibana-plugin-core-server.opsservermetrics.requests.md) | {
disconnects: number;
total: number;
statusCodes: Record<number, number>;
} | server requests stats | -| [response\_times](./kibana-plugin-core-server.opsservermetrics.response_times.md) | {
avg_in_millis: number;
max_in_millis: number;
} | server response time stats | +| [concurrent\_connections](./kibana-plugin-core-server.opsservermetrics.concurrent_connections.md) | number | number of current concurrent connections to the server | +| [requests](./kibana-plugin-core-server.opsservermetrics.requests.md) | { disconnects: number; total: number; statusCodes: Record<number, number>; } | server requests stats | +| [response\_times](./kibana-plugin-core-server.opsservermetrics.response_times.md) | { avg\_in\_millis: number; max\_in\_millis: number; } | server response time stats | diff --git a/docs/development/core/server/kibana-plugin-core-server.plugin.md b/docs/development/core/server/kibana-plugin-core-server.plugin_2.md similarity index 57% rename from docs/development/core/server/kibana-plugin-core-server.plugin.md rename to docs/development/core/server/kibana-plugin-core-server.plugin_2.md index b1fce06d46f3a..79dbbb56c86fd 100644 --- a/docs/development/core/server/kibana-plugin-core-server.plugin.md +++ b/docs/development/core/server/kibana-plugin-core-server.plugin_2.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin](./kibana-plugin-core-server.plugin.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin\_2](./kibana-plugin-core-server.plugin_2.md) -## Plugin interface +## Plugin\_2 interface The interface that should be returned by a `PluginInitializer` for a `standard` plugin. @@ -16,7 +16,7 @@ export interface Plugin(Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.plugin.setup.md b/docs/development/core/server/kibana-plugin-core-server.plugin_2.setup.md similarity index 57% rename from docs/development/core/server/kibana-plugin-core-server.plugin.setup.md rename to docs/development/core/server/kibana-plugin-core-server.plugin_2.setup.md index a8b0aae28d251..cedce40b58000 100644 --- a/docs/development/core/server/kibana-plugin-core-server.plugin.setup.md +++ b/docs/development/core/server/kibana-plugin-core-server.plugin_2.setup.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin](./kibana-plugin-core-server.plugin.md) > [setup](./kibana-plugin-core-server.plugin.setup.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin\_2](./kibana-plugin-core-server.plugin_2.md) > [setup](./kibana-plugin-core-server.plugin_2.setup.md) -## Plugin.setup() method +## Plugin\_2.setup() method Signature: @@ -14,10 +14,10 @@ setup(core: CoreSetup, plugins: TPluginsSetup): TSetup; | Parameter | Type | Description | | --- | --- | --- | -| core | CoreSetup | | -| plugins | TPluginsSetup | | +| core | CoreSetup | | +| plugins | TPluginsSetup | | Returns: -`TSetup` +TSetup diff --git a/docs/development/core/server/kibana-plugin-core-server.plugin.start.md b/docs/development/core/server/kibana-plugin-core-server.plugin_2.start.md similarity index 57% rename from docs/development/core/server/kibana-plugin-core-server.plugin.start.md rename to docs/development/core/server/kibana-plugin-core-server.plugin_2.start.md index 851f84474fe11..08eb5431a2cf2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.plugin.start.md +++ b/docs/development/core/server/kibana-plugin-core-server.plugin_2.start.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin](./kibana-plugin-core-server.plugin.md) > [start](./kibana-plugin-core-server.plugin.start.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin\_2](./kibana-plugin-core-server.plugin_2.md) > [start](./kibana-plugin-core-server.plugin_2.start.md) -## Plugin.start() method +## Plugin\_2.start() method Signature: @@ -14,10 +14,10 @@ start(core: CoreStart, plugins: TPluginsStart): TStart; | Parameter | Type | Description | | --- | --- | --- | -| core | CoreStart | | -| plugins | TPluginsStart | | +| core | CoreStart | | +| plugins | TPluginsStart | | Returns: -`TStart` +TStart diff --git a/docs/development/core/server/kibana-plugin-core-server.plugin.stop.md b/docs/development/core/server/kibana-plugin-core-server.plugin_2.stop.md similarity index 56% rename from docs/development/core/server/kibana-plugin-core-server.plugin.stop.md rename to docs/development/core/server/kibana-plugin-core-server.plugin_2.stop.md index 5396e3d9c59f2..5b62a5e82b2ed 100644 --- a/docs/development/core/server/kibana-plugin-core-server.plugin.stop.md +++ b/docs/development/core/server/kibana-plugin-core-server.plugin_2.stop.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin](./kibana-plugin-core-server.plugin.md) > [stop](./kibana-plugin-core-server.plugin.stop.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Plugin\_2](./kibana-plugin-core-server.plugin_2.md) > [stop](./kibana-plugin-core-server.plugin_2.stop.md) -## Plugin.stop() method +## Plugin\_2.stop() method Signature: @@ -11,5 +11,5 @@ stop?(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.pluginconfigdescriptor.md b/docs/development/core/server/kibana-plugin-core-server.pluginconfigdescriptor.md index 80e807a1361fd..b9cf0eea3362d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.pluginconfigdescriptor.md +++ b/docs/development/core/server/kibana-plugin-core-server.pluginconfigdescriptor.md @@ -37,15 +37,14 @@ export const config: PluginConfigDescriptor = { unused('deprecatedProperty'), ], }; - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [deprecations](./kibana-plugin-core-server.pluginconfigdescriptor.deprecations.md) | ConfigDeprecationProvider | Provider for the to apply to the plugin configuration. | -| [exposeToBrowser](./kibana-plugin-core-server.pluginconfigdescriptor.exposetobrowser.md) | {
[P in keyof T]?: boolean;
} | List of configuration properties that will be available on the client-side plugin. | -| [exposeToUsage](./kibana-plugin-core-server.pluginconfigdescriptor.exposetousage.md) | MakeUsageFromSchema<T> | Expose non-default configs to usage collection to be sent via telemetry. set a config to true to report the actual changed config value. set a config to false to report the changed config value as \[redacted\].All changed configs except booleans and numbers will be reported as \[redacted\] unless otherwise specified.[MakeUsageFromSchema](./kibana-plugin-core-server.makeusagefromschema.md) | -| [schema](./kibana-plugin-core-server.pluginconfigdescriptor.schema.md) | PluginConfigSchema<T> | Schema to use to validate the plugin configuration.[PluginConfigSchema](./kibana-plugin-core-server.pluginconfigschema.md) | +| [deprecations?](./kibana-plugin-core-server.pluginconfigdescriptor.deprecations.md) | ConfigDeprecationProvider | (Optional) Provider for the to apply to the plugin configuration. | +| [exposeToBrowser?](./kibana-plugin-core-server.pluginconfigdescriptor.exposetobrowser.md) | { \[P in keyof T\]?: boolean; } | (Optional) List of configuration properties that will be available on the client-side plugin. | +| [exposeToUsage?](./kibana-plugin-core-server.pluginconfigdescriptor.exposetousage.md) | MakeUsageFromSchema<T> | (Optional) Expose non-default configs to usage collection to be sent via telemetry. set a config to true to report the actual changed config value. set a config to false to report the changed config value as \[redacted\].All changed configs except booleans and numbers will be reported as \[redacted\] unless otherwise specified.[MakeUsageFromSchema](./kibana-plugin-core-server.makeusagefromschema.md) | +| [schema](./kibana-plugin-core-server.pluginconfigdescriptor.schema.md) | PluginConfigSchema<T> | Schema to use to validate the plugin configuration.[PluginConfigSchema](./kibana-plugin-core-server.pluginconfigschema.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.logger.md b/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.logger.md index e5de046eccf1d..74bf5b0c1384c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.logger.md +++ b/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.logger.md @@ -27,6 +27,5 @@ export class MyPlugin implements Plugin { // `mySubLogger` context: `plugins.myPlugin.sub` } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.md b/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.md index 9bc9d6d83674c..e2d115578d7c1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.md @@ -16,8 +16,8 @@ export interface PluginInitializerContext | Property | Type | Description | | --- | --- | --- | -| [config](./kibana-plugin-core-server.plugininitializercontext.config.md) | {
legacy: {
globalConfig$: Observable<SharedGlobalConfig>;
get: () => SharedGlobalConfig;
};
create: <T = ConfigSchema>() => Observable<T>;
get: <T = ConfigSchema>() => T;
} | Accessors for the plugin's configuration | -| [env](./kibana-plugin-core-server.plugininitializercontext.env.md) | {
mode: EnvironmentMode;
packageInfo: Readonly<PackageInfo>;
instanceUuid: string;
configs: readonly string[];
} | | -| [logger](./kibana-plugin-core-server.plugininitializercontext.logger.md) | LoggerFactory | instance already bound to the plugin's logging context | -| [opaqueId](./kibana-plugin-core-server.plugininitializercontext.opaqueid.md) | PluginOpaqueId | | +| [config](./kibana-plugin-core-server.plugininitializercontext.config.md) | { legacy: { globalConfig$: Observable<SharedGlobalConfig>; get: () => SharedGlobalConfig; }; create: <T = ConfigSchema>() => Observable<T>; get: <T = ConfigSchema>() => T; } | Accessors for the plugin's configuration | +| [env](./kibana-plugin-core-server.plugininitializercontext.env.md) | { mode: EnvironmentMode; packageInfo: Readonly<PackageInfo>; instanceUuid: string; configs: readonly string\[\]; } | | +| [logger](./kibana-plugin-core-server.plugininitializercontext.logger.md) | LoggerFactory | instance already bound to the plugin's logging context | +| [opaqueId](./kibana-plugin-core-server.plugininitializercontext.opaqueid.md) | PluginOpaqueId | | diff --git a/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md index e82599c11f51a..4c7c63b791a79 100644 --- a/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md +++ b/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md @@ -20,18 +20,18 @@ Should never be used in code outside of Core but is exported for documentation p | Property | Type | Description | | --- | --- | --- | -| [configPath](./kibana-plugin-core-server.pluginmanifest.configpath.md) | ConfigPath | Root used by the plugin, defaults to "id" in snake\_case format. | -| [description](./kibana-plugin-core-server.pluginmanifest.description.md) | string | TODO: make required once all plugins specify this. A brief description of what this plugin does and any capabilities it provides. | -| [extraPublicDirs](./kibana-plugin-core-server.pluginmanifest.extrapublicdirs.md) | string[] | Specifies directory names that can be imported by other ui-plugins built using the same instance of the @kbn/optimizer. A temporary measure we plan to replace with better mechanisms for sharing static code between plugins | -| [id](./kibana-plugin-core-server.pluginmanifest.id.md) | PluginName | Identifier of the plugin. Must be a string in camelCase. Part of a plugin public contract. Other plugins leverage it to access plugin API, navigate to the plugin, etc. | -| [kibanaVersion](./kibana-plugin-core-server.pluginmanifest.kibanaversion.md) | string | The version of Kibana the plugin is compatible with, defaults to "version". | -| [optionalPlugins](./kibana-plugin-core-server.pluginmanifest.optionalplugins.md) | readonly PluginName[] | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. | -| [owner](./kibana-plugin-core-server.pluginmanifest.owner.md) | {
readonly name: string;
readonly githubTeam?: string;
} | | -| [requiredBundles](./kibana-plugin-core-server.pluginmanifest.requiredbundles.md) | readonly string[] | List of plugin ids that this plugin's UI code imports modules from that are not in requiredPlugins. | -| [requiredPlugins](./kibana-plugin-core-server.pluginmanifest.requiredplugins.md) | readonly PluginName[] | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. | -| [server](./kibana-plugin-core-server.pluginmanifest.server.md) | boolean | Specifies whether plugin includes some server-side specific functionality. | -| [serviceFolders](./kibana-plugin-core-server.pluginmanifest.servicefolders.md) | readonly string[] | Only used for the automatically generated API documentation. Specifying service folders will cause your plugin API reference to be broken up into sub sections. | -| [type](./kibana-plugin-core-server.pluginmanifest.type.md) | PluginType | Type of the plugin, defaults to standard. | -| [ui](./kibana-plugin-core-server.pluginmanifest.ui.md) | boolean | Specifies whether plugin includes some client/browser specific functionality that should be included into client bundle via public/ui_plugin.js file. | -| [version](./kibana-plugin-core-server.pluginmanifest.version.md) | string | Version of the plugin. | +| [configPath](./kibana-plugin-core-server.pluginmanifest.configpath.md) | ConfigPath | Root used by the plugin, defaults to "id" in snake\_case format. | +| [description?](./kibana-plugin-core-server.pluginmanifest.description.md) | string | (Optional) TODO: make required once all plugins specify this. A brief description of what this plugin does and any capabilities it provides. | +| [extraPublicDirs?](./kibana-plugin-core-server.pluginmanifest.extrapublicdirs.md) | string\[\] | (Optional) Specifies directory names that can be imported by other ui-plugins built using the same instance of the @kbn/optimizer. A temporary measure we plan to replace with better mechanisms for sharing static code between plugins | +| [id](./kibana-plugin-core-server.pluginmanifest.id.md) | PluginName | Identifier of the plugin. Must be a string in camelCase. Part of a plugin public contract. Other plugins leverage it to access plugin API, navigate to the plugin, etc. | +| [kibanaVersion](./kibana-plugin-core-server.pluginmanifest.kibanaversion.md) | string | The version of Kibana the plugin is compatible with, defaults to "version". | +| [optionalPlugins](./kibana-plugin-core-server.pluginmanifest.optionalplugins.md) | readonly PluginName\[\] | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. | +| [owner](./kibana-plugin-core-server.pluginmanifest.owner.md) | { readonly name: string; readonly githubTeam?: string; } | | +| [requiredBundles](./kibana-plugin-core-server.pluginmanifest.requiredbundles.md) | readonly string\[\] | List of plugin ids that this plugin's UI code imports modules from that are not in requiredPlugins. | +| [requiredPlugins](./kibana-plugin-core-server.pluginmanifest.requiredplugins.md) | readonly PluginName\[\] | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. | +| [server](./kibana-plugin-core-server.pluginmanifest.server.md) | boolean | Specifies whether plugin includes some server-side specific functionality. | +| [serviceFolders?](./kibana-plugin-core-server.pluginmanifest.servicefolders.md) | readonly string\[\] | (Optional) Only used for the automatically generated API documentation. Specifying service folders will cause your plugin API reference to be broken up into sub sections. | +| [type](./kibana-plugin-core-server.pluginmanifest.type.md) | PluginType | Type of the plugin, defaults to standard. | +| [ui](./kibana-plugin-core-server.pluginmanifest.ui.md) | boolean | Specifies whether plugin includes some client/browser specific functionality that should be included into client bundle via public/ui_plugin.js file. | +| [version](./kibana-plugin-core-server.pluginmanifest.version.md) | string | Version of the plugin. | diff --git a/docs/development/core/server/kibana-plugin-core-server.prebootplugin.md b/docs/development/core/server/kibana-plugin-core-server.prebootplugin.md index df851daab7806..8bbb042965dde 100644 --- a/docs/development/core/server/kibana-plugin-core-server.prebootplugin.md +++ b/docs/development/core/server/kibana-plugin-core-server.prebootplugin.md @@ -17,5 +17,5 @@ export interface PrebootPlugin(Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.prebootplugin.setup.md b/docs/development/core/server/kibana-plugin-core-server.prebootplugin.setup.md index 0ee2a26293e98..f55819eeaca57 100644 --- a/docs/development/core/server/kibana-plugin-core-server.prebootplugin.setup.md +++ b/docs/development/core/server/kibana-plugin-core-server.prebootplugin.setup.md @@ -14,10 +14,10 @@ setup(core: CorePreboot, plugins: TPluginsSetup): TSetup; | Parameter | Type | Description | | --- | --- | --- | -| core | CorePreboot | | -| plugins | TPluginsSetup | | +| core | CorePreboot | | +| plugins | TPluginsSetup | | Returns: -`TSetup` +TSetup diff --git a/docs/development/core/server/kibana-plugin-core-server.prebootplugin.stop.md b/docs/development/core/server/kibana-plugin-core-server.prebootplugin.stop.md index 89566b2ae6687..c93dcb7709a11 100644 --- a/docs/development/core/server/kibana-plugin-core-server.prebootplugin.stop.md +++ b/docs/development/core/server/kibana-plugin-core-server.prebootplugin.stop.md @@ -11,5 +11,5 @@ stop?(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.prebootservicepreboot.md b/docs/development/core/server/kibana-plugin-core-server.prebootservicepreboot.md index bf503499b6298..c9c7c15ac3275 100644 --- a/docs/development/core/server/kibana-plugin-core-server.prebootservicepreboot.md +++ b/docs/development/core/server/kibana-plugin-core-server.prebootservicepreboot.md @@ -22,7 +22,6 @@ core.preboot.holdSetupUntilResolved('Just waiting for 5 seconds', setTimeout(resolve, 5000); }) ); - ``` If the supplied `Promise` resolves to an object with the `shouldReloadConfig` property set to `true`, Kibana will also reload its configuration from disk. @@ -33,13 +32,12 @@ core.preboot.holdSetupUntilResolved('Just waiting for 5 seconds before reloading setTimeout(() => resolve({ shouldReloadConfig: true }), 5000); }) ); - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [holdSetupUntilResolved](./kibana-plugin-core-server.prebootservicepreboot.holdsetupuntilresolved.md) | (reason: string, promise: Promise<{
shouldReloadConfig: boolean;
} | undefined>) => void | Registers a Promise as a precondition before Kibana can proceed to setup. This method can be invoked multiple times and from multiple preboot plugins. Kibana will proceed to setup only when all registered Promises instances are resolved, or it will shut down if any of them is rejected. | -| [isSetupOnHold](./kibana-plugin-core-server.prebootservicepreboot.issetuponhold.md) | () => boolean | Indicates whether Kibana is currently on hold and cannot proceed to setup yet. | +| [holdSetupUntilResolved](./kibana-plugin-core-server.prebootservicepreboot.holdsetupuntilresolved.md) | (reason: string, promise: Promise<{ shouldReloadConfig: boolean; } \| undefined>) => void | Registers a Promise as a precondition before Kibana can proceed to setup. This method can be invoked multiple times and from multiple preboot plugins. Kibana will proceed to setup only when all registered Promises instances are resolved, or it will shut down if any of them is rejected. | +| [isSetupOnHold](./kibana-plugin-core-server.prebootservicepreboot.issetuponhold.md) | () => boolean | Indicates whether Kibana is currently on hold and cannot proceed to setup yet. | diff --git a/docs/development/core/server/kibana-plugin-core-server.registerdeprecationsconfig.md b/docs/development/core/server/kibana-plugin-core-server.registerdeprecationsconfig.md index 444c2653512de..b7787a1406319 100644 --- a/docs/development/core/server/kibana-plugin-core-server.registerdeprecationsconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.registerdeprecationsconfig.md @@ -15,5 +15,5 @@ export interface RegisterDeprecationsConfig | Property | Type | Description | | --- | --- | --- | -| [getDeprecations](./kibana-plugin-core-server.registerdeprecationsconfig.getdeprecations.md) | (context: GetDeprecationsContext) => MaybePromise<DeprecationsDetails[]> | | +| [getDeprecations](./kibana-plugin-core-server.registerdeprecationsconfig.getdeprecations.md) | (context: GetDeprecationsContext) => MaybePromise<DeprecationsDetails\[\]> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandler.md b/docs/development/core/server/kibana-plugin-core-server.requesthandler.md index d32ac4d80c337..0ba0f72d7ab2f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.requesthandler.md +++ b/docs/development/core/server/kibana-plugin-core-server.requesthandler.md @@ -37,6 +37,5 @@ router.get( return response.ok(data); } ); - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md index 15a2e235fff29..0d705c9daa333 100644 --- a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md @@ -18,5 +18,5 @@ export interface RequestHandlerContext | Property | Type | Description | | --- | --- | --- | -| [core](./kibana-plugin-core-server.requesthandlercontext.core.md) | {
savedObjects: {
client: SavedObjectsClientContract;
typeRegistry: ISavedObjectTypeRegistry;
getClient: (options?: SavedObjectsClientProviderOptions) => SavedObjectsClientContract;
getExporter: (client: SavedObjectsClientContract) => ISavedObjectsExporter;
getImporter: (client: SavedObjectsClientContract) => ISavedObjectsImporter;
};
elasticsearch: {
client: IScopedClusterClient;
};
uiSettings: {
client: IUiSettingsClient;
};
deprecations: {
client: DeprecationsClient;
};
} | | +| [core](./kibana-plugin-core-server.requesthandlercontext.core.md) | { savedObjects: { client: SavedObjectsClientContract; typeRegistry: ISavedObjectTypeRegistry; getClient: (options?: SavedObjectsClientProviderOptions) => SavedObjectsClientContract; getExporter: (client: SavedObjectsClientContract) => ISavedObjectsExporter; getImporter: (client: SavedObjectsClientContract) => ISavedObjectsImporter; }; elasticsearch: { client: IScopedClusterClient; }; uiSettings: { client: IUiSettingsClient; }; deprecations: { client: DeprecationsClient; }; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlerwrapper.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlerwrapper.md index 76c7ee4f22902..6ae585b4eeb04 100644 --- a/docs/development/core/server/kibana-plugin-core-server.requesthandlerwrapper.md +++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlerwrapper.md @@ -22,6 +22,5 @@ export const wrapper: RequestHandlerWrapper = handler => { ... }; } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.resolvecapabilitiesoptions.md b/docs/development/core/server/kibana-plugin-core-server.resolvecapabilitiesoptions.md index f118c34c9be0f..e23d07d7683de 100644 --- a/docs/development/core/server/kibana-plugin-core-server.resolvecapabilitiesoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.resolvecapabilitiesoptions.md @@ -16,5 +16,5 @@ export interface ResolveCapabilitiesOptions | Property | Type | Description | | --- | --- | --- | -| [useDefaultCapabilities](./kibana-plugin-core-server.resolvecapabilitiesoptions.usedefaultcapabilities.md) | boolean | Indicates if capability switchers are supposed to return a default set of capabilities. | +| [useDefaultCapabilities](./kibana-plugin-core-server.resolvecapabilitiesoptions.usedefaultcapabilities.md) | boolean | Indicates if capability switchers are supposed to return a default set of capabilities. | diff --git a/docs/development/core/server/kibana-plugin-core-server.routeconfig.md b/docs/development/core/server/kibana-plugin-core-server.routeconfig.md index b61ac23e68cb8..6297e2745cd31 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routeconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.routeconfig.md @@ -16,7 +16,7 @@ export interface RouteConfig | Property | Type | Description | | --- | --- | --- | -| [options](./kibana-plugin-core-server.routeconfig.options.md) | RouteConfigOptions<Method> | Additional route options [RouteConfigOptions](./kibana-plugin-core-server.routeconfigoptions.md). | -| [path](./kibana-plugin-core-server.routeconfig.path.md) | string | The endpoint \_within\_ the router path to register the route. | -| [validate](./kibana-plugin-core-server.routeconfig.validate.md) | RouteValidatorFullConfig<P, Q, B> | false | A schema created with @kbn/config-schema that every request will be validated against. | +| [options?](./kibana-plugin-core-server.routeconfig.options.md) | RouteConfigOptions<Method> | (Optional) Additional route options [RouteConfigOptions](./kibana-plugin-core-server.routeconfigoptions.md). | +| [path](./kibana-plugin-core-server.routeconfig.path.md) | string | The endpoint \_within\_ the router path to register the route. | +| [validate](./kibana-plugin-core-server.routeconfig.validate.md) | RouteValidatorFullConfig<P, Q, B> \| false | A schema created with @kbn/config-schema that every request will be validated against. | diff --git a/docs/development/core/server/kibana-plugin-core-server.routeconfig.validate.md b/docs/development/core/server/kibana-plugin-core-server.routeconfig.validate.md index 3bbabc04f2500..1f9cc216cad35 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routeconfig.validate.md +++ b/docs/development/core/server/kibana-plugin-core-server.routeconfig.validate.md @@ -57,6 +57,5 @@ router.get({ console.log(req.params.id); // value myValidationLibrary.validate({ params: req.params }); }); - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.routeconfigoptions.md b/docs/development/core/server/kibana-plugin-core-server.routeconfigoptions.md index cf0fe32c14d1d..2dcd8ee5420ab 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routeconfigoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.routeconfigoptions.md @@ -16,9 +16,9 @@ export interface RouteConfigOptions | Property | Type | Description | | --- | --- | --- | -| [authRequired](./kibana-plugin-core-server.routeconfigoptions.authrequired.md) | boolean | 'optional' | Defines authentication mode for a route: - true. A user has to have valid credentials to access a resource - false. A user can access a resource without any credentials. - 'optional'. A user can access a resource, and will be authenticated if provided credentials are valid. Can be useful when we grant access to a resource but want to identify a user if possible.Defaults to true if an auth mechanism is registered. | -| [body](./kibana-plugin-core-server.routeconfigoptions.body.md) | Method extends 'get' | 'options' ? undefined : RouteConfigOptionsBody | Additional body options [RouteConfigOptionsBody](./kibana-plugin-core-server.routeconfigoptionsbody.md). | -| [tags](./kibana-plugin-core-server.routeconfigoptions.tags.md) | readonly string[] | Additional metadata tag strings to attach to the route. | -| [timeout](./kibana-plugin-core-server.routeconfigoptions.timeout.md) | {
payload?: Method extends 'get' | 'options' ? undefined : number;
idleSocket?: number;
} | Defines per-route timeouts. | -| [xsrfRequired](./kibana-plugin-core-server.routeconfigoptions.xsrfrequired.md) | Method extends 'get' ? never : boolean | Defines xsrf protection requirements for a route: - true. Requires an incoming POST/PUT/DELETE request to contain kbn-xsrf header. - false. Disables xsrf protection.Set to true by default | +| [authRequired?](./kibana-plugin-core-server.routeconfigoptions.authrequired.md) | boolean \| 'optional' | (Optional) Defines authentication mode for a route: - true. A user has to have valid credentials to access a resource - false. A user can access a resource without any credentials. - 'optional'. A user can access a resource, and will be authenticated if provided credentials are valid. Can be useful when we grant access to a resource but want to identify a user if possible.Defaults to true if an auth mechanism is registered. | +| [body?](./kibana-plugin-core-server.routeconfigoptions.body.md) | Method extends 'get' \| 'options' ? undefined : RouteConfigOptionsBody | (Optional) Additional body options [RouteConfigOptionsBody](./kibana-plugin-core-server.routeconfigoptionsbody.md). | +| [tags?](./kibana-plugin-core-server.routeconfigoptions.tags.md) | readonly string\[\] | (Optional) Additional metadata tag strings to attach to the route. | +| [timeout?](./kibana-plugin-core-server.routeconfigoptions.timeout.md) | { payload?: Method extends 'get' \| 'options' ? undefined : number; idleSocket?: number; } | (Optional) Defines per-route timeouts. | +| [xsrfRequired?](./kibana-plugin-core-server.routeconfigoptions.xsrfrequired.md) | Method extends 'get' ? never : boolean | (Optional) Defines xsrf protection requirements for a route: - true. Requires an incoming POST/PUT/DELETE request to contain kbn-xsrf header. - false. Disables xsrf protection.Set to true by default | diff --git a/docs/development/core/server/kibana-plugin-core-server.routeconfigoptionsbody.md b/docs/development/core/server/kibana-plugin-core-server.routeconfigoptionsbody.md index d27c67891161a..fdae03f7cd7c9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routeconfigoptionsbody.md +++ b/docs/development/core/server/kibana-plugin-core-server.routeconfigoptionsbody.md @@ -16,8 +16,8 @@ export interface RouteConfigOptionsBody | Property | Type | Description | | --- | --- | --- | -| [accepts](./kibana-plugin-core-server.routeconfigoptionsbody.accepts.md) | RouteContentType | RouteContentType[] | string | string[] | A string or an array of strings with the allowed mime types for the endpoint. Use this settings to limit the set of allowed mime types. Note that allowing additional mime types not listed above will not enable them to be parsed, and if parse is true, the request will result in an error response.Default value: allows parsing of the following mime types: \* application/json \* application/\*+json \* application/octet-stream \* application/x-www-form-urlencoded \* multipart/form-data \* text/\* | -| [maxBytes](./kibana-plugin-core-server.routeconfigoptionsbody.maxbytes.md) | number | Limits the size of incoming payloads to the specified byte count. Allowing very large payloads may cause the server to run out of memory.Default value: The one set in the kibana.yml config file under the parameter server.maxPayload. | -| [output](./kibana-plugin-core-server.routeconfigoptionsbody.output.md) | typeof validBodyOutput[number] | The processed payload format. The value must be one of: \* 'data' - the incoming payload is read fully into memory. If parse is true, the payload is parsed (JSON, form-decoded, multipart) based on the 'Content-Type' header. If parse is false, a raw Buffer is returned. \* 'stream' - the incoming payload is made available via a Stream.Readable interface. If the payload is 'multipart/form-data' and parse is true, field values are presented as text while files are provided as streams. File streams from a 'multipart/form-data' upload will also have a hapi property containing the filename and headers properties. Note that payload streams for multipart payloads are a synthetic interface created on top of the entire multipart content loaded into memory. To avoid loading large multipart payloads into memory, set parse to false and handle the multipart payload in the handler using a streaming parser (e.g. pez).Default value: 'data', unless no validation.body is provided in the route definition. In that case the default is 'stream' to alleviate memory pressure. | -| [parse](./kibana-plugin-core-server.routeconfigoptionsbody.parse.md) | boolean | 'gunzip' | Determines if the incoming payload is processed or presented raw. Available values: \* true - if the request 'Content-Type' matches the allowed mime types set by allow (for the whole payload as well as parts), the payload is converted into an object when possible. If the format is unknown, a Bad Request (400) error response is sent. Any known content encoding is decoded. \* false - the raw payload is returned unmodified. \* 'gunzip' - the raw payload is returned unmodified after any known content encoding is decoded.Default value: true, unless no validation.body is provided in the route definition. In that case the default is false to alleviate memory pressure. | +| [accepts?](./kibana-plugin-core-server.routeconfigoptionsbody.accepts.md) | RouteContentType \| RouteContentType\[\] \| string \| string\[\] | (Optional) A string or an array of strings with the allowed mime types for the endpoint. Use this settings to limit the set of allowed mime types. Note that allowing additional mime types not listed above will not enable them to be parsed, and if parse is true, the request will result in an error response.Default value: allows parsing of the following mime types: \* application/json \* application/\*+json \* application/octet-stream \* application/x-www-form-urlencoded \* multipart/form-data \* text/\* | +| [maxBytes?](./kibana-plugin-core-server.routeconfigoptionsbody.maxbytes.md) | number | (Optional) Limits the size of incoming payloads to the specified byte count. Allowing very large payloads may cause the server to run out of memory.Default value: The one set in the kibana.yml config file under the parameter server.maxPayload. | +| [output?](./kibana-plugin-core-server.routeconfigoptionsbody.output.md) | typeof validBodyOutput\[number\] | (Optional) The processed payload format. The value must be one of: \* 'data' - the incoming payload is read fully into memory. If parse is true, the payload is parsed (JSON, form-decoded, multipart) based on the 'Content-Type' header. If parse is false, a raw Buffer is returned. \* 'stream' - the incoming payload is made available via a Stream.Readable interface. If the payload is 'multipart/form-data' and parse is true, field values are presented as text while files are provided as streams. File streams from a 'multipart/form-data' upload will also have a hapi property containing the filename and headers properties. Note that payload streams for multipart payloads are a synthetic interface created on top of the entire multipart content loaded into memory. To avoid loading large multipart payloads into memory, set parse to false and handle the multipart payload in the handler using a streaming parser (e.g. pez).Default value: 'data', unless no validation.body is provided in the route definition. In that case the default is 'stream' to alleviate memory pressure. | +| [parse?](./kibana-plugin-core-server.routeconfigoptionsbody.parse.md) | boolean \| 'gunzip' | (Optional) Determines if the incoming payload is processed or presented raw. Available values: \* true - if the request 'Content-Type' matches the allowed mime types set by allow (for the whole payload as well as parts), the payload is converted into an object when possible. If the format is unknown, a Bad Request (400) error response is sent. Any known content encoding is decoded. \* false - the raw payload is returned unmodified. \* 'gunzip' - the raw payload is returned unmodified after any known content encoding is decoded.Default value: true, unless no validation.body is provided in the route definition. In that case the default is false to alleviate memory pressure. | diff --git a/docs/development/core/server/kibana-plugin-core-server.routevalidationerror._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.routevalidationerror._constructor_.md index ddacc1f7af2e6..ad1a4bae0dab1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routevalidationerror._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.routevalidationerror._constructor_.md @@ -16,6 +16,6 @@ constructor(error: Error | string, path?: string[]); | Parameter | Type | Description | | --- | --- | --- | -| error | Error | string | | -| path | string[] | | +| error | Error \| string | | +| path | string\[\] | | diff --git a/docs/development/core/server/kibana-plugin-core-server.routevalidationerror.md b/docs/development/core/server/kibana-plugin-core-server.routevalidationerror.md index 037e53c32bbc0..60a47236b4be5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routevalidationerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.routevalidationerror.md @@ -11,6 +11,7 @@ Error to return when the validation is not successful. ```typescript export declare class RouteValidationError extends SchemaTypeError ``` +Extends: SchemaTypeError ## Constructors diff --git a/docs/development/core/server/kibana-plugin-core-server.routevalidationfunction.md b/docs/development/core/server/kibana-plugin-core-server.routevalidationfunction.md index 3ee61a07987b8..e3fd33552f7df 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routevalidationfunction.md +++ b/docs/development/core/server/kibana-plugin-core-server.routevalidationfunction.md @@ -37,6 +37,5 @@ const myBodyValidation: RouteValidationFunction = (data, validat return badRequest('Wrong payload', ['body']); } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.routevalidationresultfactory.md b/docs/development/core/server/kibana-plugin-core-server.routevalidationresultfactory.md index eee77a91d73de..69e8b5e73136e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routevalidationresultfactory.md +++ b/docs/development/core/server/kibana-plugin-core-server.routevalidationresultfactory.md @@ -18,6 +18,6 @@ export interface RouteValidationResultFactory | Property | Type | Description | | --- | --- | --- | -| [badRequest](./kibana-plugin-core-server.routevalidationresultfactory.badrequest.md) | (error: Error | string, path?: string[]) => {
error: RouteValidationError;
} | | -| [ok](./kibana-plugin-core-server.routevalidationresultfactory.ok.md) | <T>(value: T) => {
value: T;
} | | +| [badRequest](./kibana-plugin-core-server.routevalidationresultfactory.badrequest.md) | (error: Error \| string, path?: string\[\]) => { error: RouteValidationError; } | | +| [ok](./kibana-plugin-core-server.routevalidationresultfactory.ok.md) | <T>(value: T) => { value: T; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.routevalidatorconfig.md b/docs/development/core/server/kibana-plugin-core-server.routevalidatorconfig.md index c8ed3612ec9f1..848bf6aa4b15e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routevalidatorconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.routevalidatorconfig.md @@ -16,7 +16,7 @@ export interface RouteValidatorConfig | Property | Type | Description | | --- | --- | --- | -| [body](./kibana-plugin-core-server.routevalidatorconfig.body.md) | RouteValidationSpec<B> | Validation logic for the body payload | -| [params](./kibana-plugin-core-server.routevalidatorconfig.params.md) | RouteValidationSpec<P> | Validation logic for the URL params | -| [query](./kibana-plugin-core-server.routevalidatorconfig.query.md) | RouteValidationSpec<Q> | Validation logic for the Query params | +| [body?](./kibana-plugin-core-server.routevalidatorconfig.body.md) | RouteValidationSpec<B> | (Optional) Validation logic for the body payload | +| [params?](./kibana-plugin-core-server.routevalidatorconfig.params.md) | RouteValidationSpec<P> | (Optional) Validation logic for the URL params | +| [query?](./kibana-plugin-core-server.routevalidatorconfig.query.md) | RouteValidationSpec<Q> | (Optional) Validation logic for the Query params | diff --git a/docs/development/core/server/kibana-plugin-core-server.routevalidatoroptions.md b/docs/development/core/server/kibana-plugin-core-server.routevalidatoroptions.md index 0d9a1369c3c3b..f054ca388762a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.routevalidatoroptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.routevalidatoroptions.md @@ -16,5 +16,5 @@ export interface RouteValidatorOptions | Property | Type | Description | | --- | --- | --- | -| [unsafe](./kibana-plugin-core-server.routevalidatoroptions.unsafe.md) | {
params?: boolean;
query?: boolean;
body?: boolean;
} | Set the unsafe config to avoid running some additional internal \*safe\* validations on top of your custom validation | +| [unsafe?](./kibana-plugin-core-server.routevalidatoroptions.unsafe.md) | { params?: boolean; query?: boolean; body?: boolean; } | (Optional) Set the unsafe config to avoid running some additional internal \*safe\* validations on top of your custom validation | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobject.md index 4c62b359b284d..cffb47659dc23 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobject.md @@ -14,15 +14,15 @@ export interface SavedObject | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-server.savedobject.attributes.md) | T | The data for a Saved Object is stored as an object in the attributes property. | -| [coreMigrationVersion](./kibana-plugin-core-server.savedobject.coremigrationversion.md) | string | A semver value that is used when upgrading objects between Kibana versions. | -| [error](./kibana-plugin-core-server.savedobject.error.md) | SavedObjectError | | -| [id](./kibana-plugin-core-server.savedobject.id.md) | string | The ID of this Saved Object, guaranteed to be unique for all objects of the same type | -| [migrationVersion](./kibana-plugin-core-server.savedobject.migrationversion.md) | SavedObjectsMigrationVersion | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | -| [namespaces](./kibana-plugin-core-server.savedobject.namespaces.md) | string[] | Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with namespaceType: 'agnostic'. | -| [originId](./kibana-plugin-core-server.savedobject.originid.md) | string | The ID of the saved object this originated from. This is set if this object's id was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space. | -| [references](./kibana-plugin-core-server.savedobject.references.md) | SavedObjectReference[] | A reference to another saved object. | -| [type](./kibana-plugin-core-server.savedobject.type.md) | string | The type of Saved Object. Each plugin can define it's own custom Saved Object types. | -| [updated\_at](./kibana-plugin-core-server.savedobject.updated_at.md) | string | Timestamp of the last time this document had been updated. | -| [version](./kibana-plugin-core-server.savedobject.version.md) | string | An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. | +| [attributes](./kibana-plugin-core-server.savedobject.attributes.md) | T | The data for a Saved Object is stored as an object in the attributes property. | +| [coreMigrationVersion?](./kibana-plugin-core-server.savedobject.coremigrationversion.md) | string | (Optional) A semver value that is used when upgrading objects between Kibana versions. | +| [error?](./kibana-plugin-core-server.savedobject.error.md) | SavedObjectError | (Optional) | +| [id](./kibana-plugin-core-server.savedobject.id.md) | string | The ID of this Saved Object, guaranteed to be unique for all objects of the same type | +| [migrationVersion?](./kibana-plugin-core-server.savedobject.migrationversion.md) | SavedObjectsMigrationVersion | (Optional) Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | +| [namespaces?](./kibana-plugin-core-server.savedobject.namespaces.md) | string\[\] | (Optional) Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with namespaceType: 'agnostic'. | +| [originId?](./kibana-plugin-core-server.savedobject.originid.md) | string | (Optional) The ID of the saved object this originated from. This is set if this object's id was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space. | +| [references](./kibana-plugin-core-server.savedobject.references.md) | SavedObjectReference\[\] | A reference to another saved object. | +| [type](./kibana-plugin-core-server.savedobject.type.md) | string | The type of Saved Object. Each plugin can define it's own custom Saved Object types. | +| [updated\_at?](./kibana-plugin-core-server.savedobject.updated_at.md) | string | (Optional) Timestamp of the last time this document had been updated. | +| [version?](./kibana-plugin-core-server.savedobject.version.md) | string | (Optional) An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectexportbaseoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectexportbaseoptions.md index cd0c352086425..d2749cb85cd3a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectexportbaseoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectexportbaseoptions.md @@ -15,9 +15,9 @@ export interface SavedObjectExportBaseOptions | Property | Type | Description | | --- | --- | --- | -| [excludeExportDetails](./kibana-plugin-core-server.savedobjectexportbaseoptions.excludeexportdetails.md) | boolean | flag to not append [export details](./kibana-plugin-core-server.savedobjectsexportresultdetails.md) to the end of the export stream. | -| [includeNamespaces](./kibana-plugin-core-server.savedobjectexportbaseoptions.includenamespaces.md) | boolean | Flag to also include namespace information in the export stream. By default, namespace information is not included in exported objects. This is only intended to be used internally during copy-to-space operations, and it is not exposed as an option for the external HTTP route for exports. | -| [includeReferencesDeep](./kibana-plugin-core-server.savedobjectexportbaseoptions.includereferencesdeep.md) | boolean | flag to also include all related saved objects in the export stream. | -| [namespace](./kibana-plugin-core-server.savedobjectexportbaseoptions.namespace.md) | string | optional namespace to override the namespace used by the savedObjectsClient. | -| [request](./kibana-plugin-core-server.savedobjectexportbaseoptions.request.md) | KibanaRequest | The http request initiating the export. | +| [excludeExportDetails?](./kibana-plugin-core-server.savedobjectexportbaseoptions.excludeexportdetails.md) | boolean | (Optional) flag to not append [export details](./kibana-plugin-core-server.savedobjectsexportresultdetails.md) to the end of the export stream. | +| [includeNamespaces?](./kibana-plugin-core-server.savedobjectexportbaseoptions.includenamespaces.md) | boolean | (Optional) Flag to also include namespace information in the export stream. By default, namespace information is not included in exported objects. This is only intended to be used internally during copy-to-space operations, and it is not exposed as an option for the external HTTP route for exports. | +| [includeReferencesDeep?](./kibana-plugin-core-server.savedobjectexportbaseoptions.includereferencesdeep.md) | boolean | (Optional) flag to also include all related saved objects in the export stream. | +| [namespace?](./kibana-plugin-core-server.savedobjectexportbaseoptions.namespace.md) | string | (Optional) optional namespace to override the namespace used by the savedObjectsClient. | +| [request](./kibana-plugin-core-server.savedobjectexportbaseoptions.request.md) | KibanaRequest | The http request initiating the export. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationcontext.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationcontext.md index 21ca234fde185..3a265cc8e1d42 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationcontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationcontext.md @@ -16,8 +16,8 @@ export interface SavedObjectMigrationContext | Property | Type | Description | | --- | --- | --- | -| [convertToMultiNamespaceTypeVersion](./kibana-plugin-core-server.savedobjectmigrationcontext.converttomultinamespacetypeversion.md) | string | The version in which this object type is being converted to a multi-namespace type | -| [isSingleNamespaceType](./kibana-plugin-core-server.savedobjectmigrationcontext.issinglenamespacetype.md) | boolean | Whether this is a single-namespace type or not | -| [log](./kibana-plugin-core-server.savedobjectmigrationcontext.log.md) | SavedObjectsMigrationLogger | logger instance to be used by the migration handler | -| [migrationVersion](./kibana-plugin-core-server.savedobjectmigrationcontext.migrationversion.md) | string | The migration version that this migration function is defined for | +| [convertToMultiNamespaceTypeVersion?](./kibana-plugin-core-server.savedobjectmigrationcontext.converttomultinamespacetypeversion.md) | string | (Optional) The version in which this object type is being converted to a multi-namespace type | +| [isSingleNamespaceType](./kibana-plugin-core-server.savedobjectmigrationcontext.issinglenamespacetype.md) | boolean | Whether this is a single-namespace type or not | +| [log](./kibana-plugin-core-server.savedobjectmigrationcontext.log.md) | SavedObjectsMigrationLogger | logger instance to be used by the migration handler | +| [migrationVersion](./kibana-plugin-core-server.savedobjectmigrationcontext.migrationversion.md) | string | The migration version that this migration function is defined for | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationfn.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationfn.md index a3294fb0a087a..1c96c63a3d4fe 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationfn.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationfn.md @@ -39,6 +39,5 @@ const migrateToV2: SavedObjectMigrationFn = }, }; }; - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationmap.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationmap.md index c07a41e28d45b..64575d34bfb10 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationmap.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationmap.md @@ -22,6 +22,5 @@ const migrationsMap: SavedObjectMigrationMap = { '1.0.0': migrateToV1, '2.1.0': migrateToV21 } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectreference.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectreference.md index 1c8b580187395..bf21b13acfcfc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectreference.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectreference.md @@ -16,7 +16,7 @@ export interface SavedObjectReference | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectreference.id.md) | string | | -| [name](./kibana-plugin-core-server.savedobjectreference.name.md) | string | | -| [type](./kibana-plugin-core-server.savedobjectreference.type.md) | string | | +| [id](./kibana-plugin-core-server.savedobjectreference.id.md) | string | | +| [name](./kibana-plugin-core-server.savedobjectreference.name.md) | string | | +| [type](./kibana-plugin-core-server.savedobjectreference.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectreferencewithcontext.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectreferencewithcontext.md index 1f8b33c6e94e8..8cdfbb4fde480 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectreferencewithcontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectreferencewithcontext.md @@ -16,10 +16,10 @@ export interface SavedObjectReferenceWithContext | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectreferencewithcontext.id.md) | string | The ID of the referenced object | -| [inboundReferences](./kibana-plugin-core-server.savedobjectreferencewithcontext.inboundreferences.md) | Array<{
type: string;
id: string;
name: string;
}> | References to this object; note that this does not contain \_all inbound references everywhere for this object\_, it only contains inbound references for the scope of this operation | -| [isMissing](./kibana-plugin-core-server.savedobjectreferencewithcontext.ismissing.md) | boolean | Whether or not this object or reference is missing | -| [spaces](./kibana-plugin-core-server.savedobjectreferencewithcontext.spaces.md) | string[] | The space(s) that the referenced object exists in | -| [spacesWithMatchingAliases](./kibana-plugin-core-server.savedobjectreferencewithcontext.spaceswithmatchingaliases.md) | string[] | The space(s) that legacy URL aliases matching this type/id exist in | -| [type](./kibana-plugin-core-server.savedobjectreferencewithcontext.type.md) | string | The type of the referenced object | +| [id](./kibana-plugin-core-server.savedobjectreferencewithcontext.id.md) | string | The ID of the referenced object | +| [inboundReferences](./kibana-plugin-core-server.savedobjectreferencewithcontext.inboundreferences.md) | Array<{ type: string; id: string; name: string; }> | References to this object; note that this does not contain \_all inbound references everywhere for this object\_, it only contains inbound references for the scope of this operation | +| [isMissing?](./kibana-plugin-core-server.savedobjectreferencewithcontext.ismissing.md) | boolean | (Optional) Whether or not this object or reference is missing | +| [spaces](./kibana-plugin-core-server.savedobjectreferencewithcontext.spaces.md) | string\[\] | The space(s) that the referenced object exists in | +| [spacesWithMatchingAliases?](./kibana-plugin-core-server.savedobjectreferencewithcontext.spaceswithmatchingaliases.md) | string\[\] | (Optional) The space(s) that legacy URL aliases matching this type/id exist in | +| [type](./kibana-plugin-core-server.savedobjectreferencewithcontext.type.md) | string | The type of the referenced object | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbaseoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbaseoptions.md index 72f07c42949d1..6686ad7ca8bad 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbaseoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbaseoptions.md @@ -15,5 +15,5 @@ export interface SavedObjectsBaseOptions | Property | Type | Description | | --- | --- | --- | -| [namespace](./kibana-plugin-core-server.savedobjectsbaseoptions.namespace.md) | string | Specify the namespace for this operation | +| [namespace?](./kibana-plugin-core-server.savedobjectsbaseoptions.namespace.md) | string | (Optional) Specify the namespace for this operation | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkcreateobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkcreateobject.md index 463c3fe81b702..441df5d50c612 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkcreateobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkcreateobject.md @@ -15,13 +15,13 @@ export interface SavedObjectsBulkCreateObject | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-server.savedobjectsbulkcreateobject.attributes.md) | T | | -| [coreMigrationVersion](./kibana-plugin-core-server.savedobjectsbulkcreateobject.coremigrationversion.md) | string | A semver value that is used when upgrading objects between Kibana versions. If undefined, this will be automatically set to the current Kibana version when the object is created. If this is set to a non-semver value, or it is set to a semver value greater than the current Kibana version, it will result in an error. | -| [id](./kibana-plugin-core-server.savedobjectsbulkcreateobject.id.md) | string | | -| [initialNamespaces](./kibana-plugin-core-server.savedobjectsbulkcreateobject.initialnamespaces.md) | string[] | Optional initial namespaces for the object to be created in. If this is defined, it will supersede the namespace ID that is in [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md).\* For shareable object types (registered with namespaceType: 'multiple'): this option can be used to specify one or more spaces, including the "All spaces" identifier ('*'). \* For isolated object types (registered with namespaceType: 'single' or namespaceType: 'multiple-isolated'): this option can only be used to specify a single space, and the "All spaces" identifier ('*') is not allowed. \* For global object types (registered with namespaceType: 'agnostic'): this option cannot be used. | -| [migrationVersion](./kibana-plugin-core-server.savedobjectsbulkcreateobject.migrationversion.md) | SavedObjectsMigrationVersion | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | -| [originId](./kibana-plugin-core-server.savedobjectsbulkcreateobject.originid.md) | string | Optional ID of the original saved object, if this object's id was regenerated | -| [references](./kibana-plugin-core-server.savedobjectsbulkcreateobject.references.md) | SavedObjectReference[] | | -| [type](./kibana-plugin-core-server.savedobjectsbulkcreateobject.type.md) | string | | -| [version](./kibana-plugin-core-server.savedobjectsbulkcreateobject.version.md) | string | | +| [attributes](./kibana-plugin-core-server.savedobjectsbulkcreateobject.attributes.md) | T | | +| [coreMigrationVersion?](./kibana-plugin-core-server.savedobjectsbulkcreateobject.coremigrationversion.md) | string | (Optional) A semver value that is used when upgrading objects between Kibana versions. If undefined, this will be automatically set to the current Kibana version when the object is created. If this is set to a non-semver value, or it is set to a semver value greater than the current Kibana version, it will result in an error. | +| [id?](./kibana-plugin-core-server.savedobjectsbulkcreateobject.id.md) | string | (Optional) | +| [initialNamespaces?](./kibana-plugin-core-server.savedobjectsbulkcreateobject.initialnamespaces.md) | string\[\] | (Optional) Optional initial namespaces for the object to be created in. If this is defined, it will supersede the namespace ID that is in [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md).\* For shareable object types (registered with namespaceType: 'multiple'): this option can be used to specify one or more spaces, including the "All spaces" identifier ('*'). \* For isolated object types (registered with namespaceType: 'single' or namespaceType: 'multiple-isolated'): this option can only be used to specify a single space, and the "All spaces" identifier ('*') is not allowed. \* For global object types (registered with namespaceType: 'agnostic'): this option cannot be used. | +| [migrationVersion?](./kibana-plugin-core-server.savedobjectsbulkcreateobject.migrationversion.md) | SavedObjectsMigrationVersion | (Optional) Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | +| [originId?](./kibana-plugin-core-server.savedobjectsbulkcreateobject.originid.md) | string | (Optional) Optional ID of the original saved object, if this object's id was regenerated | +| [references?](./kibana-plugin-core-server.savedobjectsbulkcreateobject.references.md) | SavedObjectReference\[\] | (Optional) | +| [type](./kibana-plugin-core-server.savedobjectsbulkcreateobject.type.md) | string | | +| [version?](./kibana-plugin-core-server.savedobjectsbulkcreateobject.version.md) | string | (Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkgetobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkgetobject.md index 0ad5f1d66ee52..0eb5b507a1f03 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkgetobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkgetobject.md @@ -15,8 +15,8 @@ export interface SavedObjectsBulkGetObject | Property | Type | Description | | --- | --- | --- | -| [fields](./kibana-plugin-core-server.savedobjectsbulkgetobject.fields.md) | string[] | SavedObject fields to include in the response | -| [id](./kibana-plugin-core-server.savedobjectsbulkgetobject.id.md) | string | | -| [namespaces](./kibana-plugin-core-server.savedobjectsbulkgetobject.namespaces.md) | string[] | Optional namespace(s) for the object to be retrieved in. If this is defined, it will supersede the namespace ID that is in the top-level options.\* For shareable object types (registered with namespaceType: 'multiple'): this option can be used to specify one or more spaces, including the "All spaces" identifier ('*'). \* For isolated object types (registered with namespaceType: 'single' or namespaceType: 'multiple-isolated'): this option can only be used to specify a single space, and the "All spaces" identifier ('*') is not allowed. \* For global object types (registered with namespaceType: 'agnostic'): this option cannot be used. | -| [type](./kibana-plugin-core-server.savedobjectsbulkgetobject.type.md) | string | | +| [fields?](./kibana-plugin-core-server.savedobjectsbulkgetobject.fields.md) | string\[\] | (Optional) SavedObject fields to include in the response | +| [id](./kibana-plugin-core-server.savedobjectsbulkgetobject.id.md) | string | | +| [namespaces?](./kibana-plugin-core-server.savedobjectsbulkgetobject.namespaces.md) | string\[\] | (Optional) Optional namespace(s) for the object to be retrieved in. If this is defined, it will supersede the namespace ID that is in the top-level options.\* For shareable object types (registered with namespaceType: 'multiple'): this option can be used to specify one or more spaces, including the "All spaces" identifier ('*'). \* For isolated object types (registered with namespaceType: 'single' or namespaceType: 'multiple-isolated'): this option can only be used to specify a single space, and the "All spaces" identifier ('*') is not allowed. \* For global object types (registered with namespaceType: 'agnostic'): this option cannot be used. | +| [type](./kibana-plugin-core-server.savedobjectsbulkgetobject.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveobject.md index 3960511b21434..a81e18cf3593a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveobject.md @@ -15,6 +15,6 @@ export interface SavedObjectsBulkResolveObject | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectsbulkresolveobject.id.md) | string | | -| [type](./kibana-plugin-core-server.savedobjectsbulkresolveobject.type.md) | string | | +| [id](./kibana-plugin-core-server.savedobjectsbulkresolveobject.id.md) | string | | +| [type](./kibana-plugin-core-server.savedobjectsbulkresolveobject.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveresponse.md index 8384ecc1861f4..e280877d77cd6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresolveresponse.md @@ -15,5 +15,5 @@ export interface SavedObjectsBulkResolveResponse | Property | Type | Description | | --- | --- | --- | -| [resolved\_objects](./kibana-plugin-core-server.savedobjectsbulkresolveresponse.resolved_objects.md) | Array<SavedObjectsResolveResponse<T>> | | +| [resolved\_objects](./kibana-plugin-core-server.savedobjectsbulkresolveresponse.resolved_objects.md) | Array<SavedObjectsResolveResponse<T>> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresponse.md index bf08ae7816b93..e47350e4bf888 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkresponse.md @@ -15,5 +15,5 @@ export interface SavedObjectsBulkResponse | Property | Type | Description | | --- | --- | --- | -| [saved\_objects](./kibana-plugin-core-server.savedobjectsbulkresponse.saved_objects.md) | Array<SavedObject<T>> | | +| [saved\_objects](./kibana-plugin-core-server.savedobjectsbulkresponse.saved_objects.md) | Array<SavedObject<T>> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateobject.md index dc30400bbd741..fa20d5d13d8f2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateobject.md @@ -10,13 +10,14 @@ ```typescript export interface SavedObjectsBulkUpdateObject extends Pick, 'version' | 'references'> ``` +Extends: Pick<SavedObjectsUpdateOptions<T>, 'version' \| 'references'> ## Properties | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-server.savedobjectsbulkupdateobject.attributes.md) | Partial<T> | The data for a Saved Object is stored as an object in the attributes property. | -| [id](./kibana-plugin-core-server.savedobjectsbulkupdateobject.id.md) | string | The ID of this Saved Object, guaranteed to be unique for all objects of the same type | -| [namespace](./kibana-plugin-core-server.savedobjectsbulkupdateobject.namespace.md) | string | Optional namespace string to use when searching for this object. If this is defined, it will supersede the namespace ID that is in [SavedObjectsBulkUpdateOptions](./kibana-plugin-core-server.savedobjectsbulkupdateoptions.md).Note: the default namespace's string representation is 'default', and its ID representation is undefined. | -| [type](./kibana-plugin-core-server.savedobjectsbulkupdateobject.type.md) | string | The type of this Saved Object. Each plugin can define it's own custom Saved Object types. | +| [attributes](./kibana-plugin-core-server.savedobjectsbulkupdateobject.attributes.md) | Partial<T> | The data for a Saved Object is stored as an object in the attributes property. | +| [id](./kibana-plugin-core-server.savedobjectsbulkupdateobject.id.md) | string | The ID of this Saved Object, guaranteed to be unique for all objects of the same type | +| [namespace?](./kibana-plugin-core-server.savedobjectsbulkupdateobject.namespace.md) | string | (Optional) Optional namespace string to use when searching for this object. If this is defined, it will supersede the namespace ID that is in [SavedObjectsBulkUpdateOptions](./kibana-plugin-core-server.savedobjectsbulkupdateoptions.md).Note: the default namespace's string representation is 'default', and its ID representation is undefined. | +| [type](./kibana-plugin-core-server.savedobjectsbulkupdateobject.type.md) | string | The type of this Saved Object. Each plugin can define it's own custom Saved Object types. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateoptions.md index bf5d1fc536f94..97285b326dbae 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateoptions.md @@ -10,10 +10,11 @@ ```typescript export interface SavedObjectsBulkUpdateOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [refresh](./kibana-plugin-core-server.savedobjectsbulkupdateoptions.refresh.md) | MutatingOperationRefreshSetting | The Elasticsearch Refresh setting for this operation | +| [refresh?](./kibana-plugin-core-server.savedobjectsbulkupdateoptions.refresh.md) | MutatingOperationRefreshSetting | (Optional) The Elasticsearch Refresh setting for this operation | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateresponse.md index 361575b3b1ce2..e1a1af2da25cc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsbulkupdateresponse.md @@ -15,5 +15,5 @@ export interface SavedObjectsBulkUpdateResponse | Property | Type | Description | | --- | --- | --- | -| [saved\_objects](./kibana-plugin-core-server.savedobjectsbulkupdateresponse.saved_objects.md) | Array<SavedObjectsUpdateResponse<T>> | | +| [saved\_objects](./kibana-plugin-core-server.savedobjectsbulkupdateresponse.saved_objects.md) | Array<SavedObjectsUpdateResponse<T>> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsobject.md index c327cc4a20551..af7d9ff74db25 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsobject.md @@ -15,6 +15,6 @@ export interface SavedObjectsCheckConflictsObject | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectscheckconflictsobject.id.md) | string | | -| [type](./kibana-plugin-core-server.savedobjectscheckconflictsobject.type.md) | string | | +| [id](./kibana-plugin-core-server.savedobjectscheckconflictsobject.id.md) | string | | +| [type](./kibana-plugin-core-server.savedobjectscheckconflictsobject.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsresponse.md index 499398586e7dd..68bbdbe67c273 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscheckconflictsresponse.md @@ -15,5 +15,5 @@ export interface SavedObjectsCheckConflictsResponse | Property | Type | Description | | --- | --- | --- | -| [errors](./kibana-plugin-core-server.savedobjectscheckconflictsresponse.errors.md) | Array<{
id: string;
type: string;
error: SavedObjectError;
}> | | +| [errors](./kibana-plugin-core-server.savedobjectscheckconflictsresponse.errors.md) | Array<{ id: string; type: string; error: SavedObjectError; }> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkcreate.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkcreate.md index b175fe84fc4c3..a88d82ef49e7d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkcreate.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkcreate.md @@ -16,10 +16,10 @@ bulkCreate(objects: Array>, options | Parameter | Type | Description | | --- | --- | --- | -| objects | Array<SavedObjectsBulkCreateObject<T>> | | -| options | SavedObjectsCreateOptions | | +| objects | Array<SavedObjectsBulkCreateObject<T>> | | +| options | SavedObjectsCreateOptions | | Returns: -`Promise>` +Promise<SavedObjectsBulkResponse<T>> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkget.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkget.md index 82cf65a78bcff..077cb08843acc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkget.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkget.md @@ -16,12 +16,12 @@ bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjec | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsBulkGetObject[] | an array of ids, or an array of objects containing id, type and optionally fields | -| options | SavedObjectsBaseOptions | | +| objects | SavedObjectsBulkGetObject\[\] | an array of ids, or an array of objects containing id, type and optionally fields | +| options | SavedObjectsBaseOptions | | Returns: -`Promise>` +Promise<SavedObjectsBulkResponse<T>> ## Example diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkresolve.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkresolve.md index 0525b361ebecf..3cf6e4d8d76a5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkresolve.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkresolve.md @@ -16,12 +16,12 @@ bulkResolve(objects: SavedObjectsBulkResolveObject[], options?: Sav | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsBulkResolveObject[] | an array of objects containing id, type | -| options | SavedObjectsBaseOptions | | +| objects | SavedObjectsBulkResolveObject\[\] | an array of objects containing id, type | +| options | SavedObjectsBaseOptions | | Returns: -`Promise>` +Promise<SavedObjectsBulkResolveResponse<T>> ## Example diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkupdate.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkupdate.md index cfd178a03f98f..6c4034357a4ea 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkupdate.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.bulkupdate.md @@ -16,10 +16,10 @@ bulkUpdate(objects: Array>, options | Parameter | Type | Description | | --- | --- | --- | -| objects | Array<SavedObjectsBulkUpdateObject<T>> | | -| options | SavedObjectsBulkUpdateOptions | | +| objects | Array<SavedObjectsBulkUpdateObject<T>> | | +| options | SavedObjectsBulkUpdateOptions | | Returns: -`Promise>` +Promise<SavedObjectsBulkUpdateResponse<T>> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.checkconflicts.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.checkconflicts.md index 5cffb0c498b0b..69d52ee098a30 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.checkconflicts.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.checkconflicts.md @@ -16,10 +16,10 @@ checkConflicts(objects?: SavedObjectsCheckConflictsObject[], options?: SavedObje | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsCheckConflictsObject[] | | -| options | SavedObjectsBaseOptions | | +| objects | SavedObjectsCheckConflictsObject\[\] | | +| options | SavedObjectsBaseOptions | | Returns: -`Promise` +Promise<SavedObjectsCheckConflictsResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.closepointintime.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.closepointintime.md index 79c7d18adf306..beb5ea847bf45 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.closepointintime.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.closepointintime.md @@ -18,10 +18,10 @@ closePointInTime(id: string, options?: SavedObjectsClosePointInTimeOptions): Pro | Parameter | Type | Description | | --- | --- | --- | -| id | string | | -| options | SavedObjectsClosePointInTimeOptions | | +| id | string | | +| options | SavedObjectsClosePointInTimeOptions | | Returns: -`Promise` +Promise<SavedObjectsClosePointInTimeResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.collectmultinamespacereferences.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.collectmultinamespacereferences.md index 155167d32a738..64ccd4187597c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.collectmultinamespacereferences.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.collectmultinamespacereferences.md @@ -16,10 +16,10 @@ collectMultiNamespaceReferences(objects: SavedObjectsCollectMultiNamespaceRefere | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsCollectMultiNamespaceReferencesObject[] | | -| options | SavedObjectsCollectMultiNamespaceReferencesOptions | | +| objects | SavedObjectsCollectMultiNamespaceReferencesObject\[\] | | +| options | SavedObjectsCollectMultiNamespaceReferencesOptions | | Returns: -`Promise` +Promise<SavedObjectsCollectMultiNamespaceReferencesResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.create.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.create.md index e2575c20b31f8..9f9b72984bbb6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.create.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.create.md @@ -16,11 +16,11 @@ create(type: string, attributes: T, options?: SavedObjectsCreateOpt | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| attributes | T | | -| options | SavedObjectsCreateOptions | | +| type | string | | +| attributes | T | | +| options | SavedObjectsCreateOptions | | Returns: -`Promise>` +Promise<SavedObject<T>> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.createpointintimefinder.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.createpointintimefinder.md index 39d09807e4f3b..eab4312b1daa4 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.createpointintimefinder.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.createpointintimefinder.md @@ -22,12 +22,12 @@ createPointInTimeFinder(findOptions: SavedObjectsCreat | Parameter | Type | Description | | --- | --- | --- | -| findOptions | SavedObjectsCreatePointInTimeFinderOptions | | -| dependencies | SavedObjectsCreatePointInTimeFinderDependencies | | +| findOptions | SavedObjectsCreatePointInTimeFinderOptions | | +| dependencies | SavedObjectsCreatePointInTimeFinderDependencies | | Returns: -`ISavedObjectsPointInTimeFinder` +ISavedObjectsPointInTimeFinder<T, A> ## Example @@ -48,6 +48,5 @@ for await (const response of finder.find()) { await finder.close(); } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.delete.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.delete.md index 07e635efd0e8c..64ed7778d3bec 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.delete.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.delete.md @@ -16,11 +16,11 @@ delete(type: string, id: string, options?: SavedObjectsDeleteOptions): Promise<{ | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| options | SavedObjectsDeleteOptions | | +| type | string | | +| id | string | | +| options | SavedObjectsDeleteOptions | | Returns: -`Promise<{}>` +Promise<{}> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.find.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.find.md index 56d76125108d1..dc48f7481dc01 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.find.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.find.md @@ -16,9 +16,9 @@ find(options: SavedObjectsFindOptions): PromiseSavedObjectsFindOptions | | +| options | SavedObjectsFindOptions | | Returns: -`Promise>` +Promise<SavedObjectsFindResponse<T, A>> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.get.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.get.md index 166265ca320b8..00b6dd28bb7aa 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.get.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.get.md @@ -16,11 +16,11 @@ get(type: string, id: string, options?: SavedObjectsBaseOptions): P | Parameter | Type | Description | | --- | --- | --- | -| type | string | The type of SavedObject to retrieve | -| id | string | The ID of the SavedObject to retrieve | -| options | SavedObjectsBaseOptions | | +| type | string | The type of SavedObject to retrieve | +| id | string | The ID of the SavedObject to retrieve | +| options | SavedObjectsBaseOptions | | Returns: -`Promise>` +Promise<SavedObject<T>> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.md index e92b6d8e151b1..c77bcfac2f0e7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.md @@ -18,8 +18,8 @@ The constructor for this class is marked as internal. Third-party code should no | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [errors](./kibana-plugin-core-server.savedobjectsclient.errors.md) | | typeof SavedObjectsErrorHelpers | | -| [errors](./kibana-plugin-core-server.savedobjectsclient.errors.md) | static | typeof SavedObjectsErrorHelpers | | +| [errors](./kibana-plugin-core-server.savedobjectsclient.errors.md) | | typeof SavedObjectsErrorHelpers | | +| [errors](./kibana-plugin-core-server.savedobjectsclient.errors.md) | static | typeof SavedObjectsErrorHelpers | | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.openpointintimefortype.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.openpointintimefortype.md index c76159ffa5032..c449fc7b1c3f6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.openpointintimefortype.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.openpointintimefortype.md @@ -18,10 +18,10 @@ openPointInTimeForType(type: string | string[], options?: SavedObjectsOpenPointI | Parameter | Type | Description | | --- | --- | --- | -| type | string | string[] | | -| options | SavedObjectsOpenPointInTimeOptions | | +| type | string \| string\[\] | | +| options | SavedObjectsOpenPointInTimeOptions | | Returns: -`Promise` +Promise<SavedObjectsOpenPointInTimeResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.removereferencesto.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.removereferencesto.md index 002992a17c313..560c210b0105b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.removereferencesto.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.removereferencesto.md @@ -16,11 +16,11 @@ removeReferencesTo(type: string, id: string, options?: SavedObjectsRemoveReferen | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| options | SavedObjectsRemoveReferencesToOptions | | +| type | string | | +| id | string | | +| options | SavedObjectsRemoveReferencesToOptions | | Returns: -`Promise` +Promise<SavedObjectsRemoveReferencesToResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.resolve.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.resolve.md index b9a63f0b8c05a..31eabe46d6cb3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.resolve.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.resolve.md @@ -16,11 +16,11 @@ resolve(type: string, id: string, options?: SavedObjectsBaseOptions | Parameter | Type | Description | | --- | --- | --- | -| type | string | The type of SavedObject to retrieve | -| id | string | The ID of the SavedObject to retrieve | -| options | SavedObjectsBaseOptions | | +| type | string | The type of SavedObject to retrieve | +| id | string | The ID of the SavedObject to retrieve | +| options | SavedObjectsBaseOptions | | Returns: -`Promise>` +Promise<SavedObjectsResolveResponse<T>> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.update.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.update.md index 8c4e5962e1dba..20a67387813ff 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.update.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.update.md @@ -16,12 +16,12 @@ update(type: string, id: string, attributes: Partial, options?: | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| attributes | Partial<T> | | -| options | SavedObjectsUpdateOptions<T> | | +| type | string | | +| id | string | | +| attributes | Partial<T> | | +| options | SavedObjectsUpdateOptions<T> | | Returns: -`Promise>` +Promise<SavedObjectsUpdateResponse<T>> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.updateobjectsspaces.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.updateobjectsspaces.md index 7ababbbe1f535..09012607fd932 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.updateobjectsspaces.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.updateobjectsspaces.md @@ -16,12 +16,12 @@ updateObjectsSpaces(objects: SavedObjectsUpdateObjectsSpacesObject[], spacesToAd | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsUpdateObjectsSpacesObject[] | | -| spacesToAdd | string[] | | -| spacesToRemove | string[] | | -| options | SavedObjectsUpdateObjectsSpacesOptions | | +| objects | SavedObjectsUpdateObjectsSpacesObject\[\] | | +| spacesToAdd | string\[\] | | +| spacesToRemove | string\[\] | | +| options | SavedObjectsUpdateObjectsSpacesOptions | | Returns: -`Promise` +Promise<import("./lib").SavedObjectsUpdateObjectsSpacesResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientprovideroptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientprovideroptions.md index be1f73f064843..a02f54214163b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientprovideroptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientprovideroptions.md @@ -16,6 +16,6 @@ export interface SavedObjectsClientProviderOptions | Property | Type | Description | | --- | --- | --- | -| [excludedWrappers](./kibana-plugin-core-server.savedobjectsclientprovideroptions.excludedwrappers.md) | string[] | | -| [includedHiddenTypes](./kibana-plugin-core-server.savedobjectsclientprovideroptions.includedhiddentypes.md) | string[] | | +| [excludedWrappers?](./kibana-plugin-core-server.savedobjectsclientprovideroptions.excludedwrappers.md) | string\[\] | (Optional) | +| [includedHiddenTypes?](./kibana-plugin-core-server.savedobjectsclientprovideroptions.includedhiddentypes.md) | string\[\] | (Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientwrapperoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientwrapperoptions.md index 5b0a9edd24f35..16d104e4a8dff 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientwrapperoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclientwrapperoptions.md @@ -16,7 +16,7 @@ export interface SavedObjectsClientWrapperOptions | Property | Type | Description | | --- | --- | --- | -| [client](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.client.md) | SavedObjectsClientContract | | -| [request](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.request.md) | KibanaRequest | | -| [typeRegistry](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.typeregistry.md) | ISavedObjectTypeRegistry | | +| [client](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.client.md) | SavedObjectsClientContract | | +| [request](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.request.md) | KibanaRequest | | +| [typeRegistry](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.typeregistry.md) | ISavedObjectTypeRegistry | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclosepointintimeresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclosepointintimeresponse.md index 43ecd1298d5d9..27010232bd46b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsclosepointintimeresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsclosepointintimeresponse.md @@ -15,6 +15,6 @@ export interface SavedObjectsClosePointInTimeResponse | Property | Type | Description | | --- | --- | --- | -| [num\_freed](./kibana-plugin-core-server.savedobjectsclosepointintimeresponse.num_freed.md) | number | The number of search contexts that have been successfully closed. | -| [succeeded](./kibana-plugin-core-server.savedobjectsclosepointintimeresponse.succeeded.md) | boolean | If true, all search contexts associated with the PIT id are successfully closed. | +| [num\_freed](./kibana-plugin-core-server.savedobjectsclosepointintimeresponse.num_freed.md) | number | The number of search contexts that have been successfully closed. | +| [succeeded](./kibana-plugin-core-server.savedobjectsclosepointintimeresponse.succeeded.md) | boolean | If true, all search contexts associated with the PIT id are successfully closed. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.md index b4e6379234f79..5f419a63e8c70 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.md @@ -18,6 +18,6 @@ export interface SavedObjectsCollectMultiNamespaceReferencesObject | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.id.md) | string | | -| [type](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.type.md) | string | | +| [id](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.id.md) | string | | +| [type](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.md index 9311a66269753..57298e40a88ba 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.md @@ -11,10 +11,11 @@ Options for collecting references. ```typescript export interface SavedObjectsCollectMultiNamespaceReferencesOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [purpose](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.purpose.md) | 'collectMultiNamespaceReferences' | 'updateObjectsSpaces' | Optional purpose used to determine filtering and authorization checks; default is 'collectMultiNamespaceReferences' | +| [purpose?](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.purpose.md) | 'collectMultiNamespaceReferences' \| 'updateObjectsSpaces' | (Optional) Optional purpose used to determine filtering and authorization checks; default is 'collectMultiNamespaceReferences' | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.md index bc72e73994468..514e9271aa17e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.md @@ -16,5 +16,5 @@ export interface SavedObjectsCollectMultiNamespaceReferencesResponse | Property | Type | Description | | --- | --- | --- | -| [objects](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.objects.md) | SavedObjectReferenceWithContext[] | | +| [objects](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.objects.md) | SavedObjectReferenceWithContext\[\] | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscreateoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscreateoptions.md index 7eaa9c51f5c82..646a0f6fcf548 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscreateoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscreateoptions.md @@ -10,18 +10,19 @@ ```typescript export interface SavedObjectsCreateOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [coreMigrationVersion](./kibana-plugin-core-server.savedobjectscreateoptions.coremigrationversion.md) | string | A semver value that is used when upgrading objects between Kibana versions. If undefined, this will be automatically set to the current Kibana version when the object is created. If this is set to a non-semver value, or it is set to a semver value greater than the current Kibana version, it will result in an error. | -| [id](./kibana-plugin-core-server.savedobjectscreateoptions.id.md) | string | (not recommended) Specify an id for the document | -| [initialNamespaces](./kibana-plugin-core-server.savedobjectscreateoptions.initialnamespaces.md) | string[] | Optional initial namespaces for the object to be created in. If this is defined, it will supersede the namespace ID that is in [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md).\* For shareable object types (registered with namespaceType: 'multiple'): this option can be used to specify one or more spaces, including the "All spaces" identifier ('*'). \* For isolated object types (registered with namespaceType: 'single' or namespaceType: 'multiple-isolated'): this option can only be used to specify a single space, and the "All spaces" identifier ('*') is not allowed. \* For global object types (registered with namespaceType: 'agnostic'): this option cannot be used. | -| [migrationVersion](./kibana-plugin-core-server.savedobjectscreateoptions.migrationversion.md) | SavedObjectsMigrationVersion | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | -| [originId](./kibana-plugin-core-server.savedobjectscreateoptions.originid.md) | string | Optional ID of the original saved object, if this object's id was regenerated | -| [overwrite](./kibana-plugin-core-server.savedobjectscreateoptions.overwrite.md) | boolean | Overwrite existing documents (defaults to false) | -| [references](./kibana-plugin-core-server.savedobjectscreateoptions.references.md) | SavedObjectReference[] | | -| [refresh](./kibana-plugin-core-server.savedobjectscreateoptions.refresh.md) | MutatingOperationRefreshSetting | The Elasticsearch Refresh setting for this operation | -| [version](./kibana-plugin-core-server.savedobjectscreateoptions.version.md) | string | An opaque version number which changes on each successful write operation. Can be used in conjunction with overwrite for implementing optimistic concurrency control. | +| [coreMigrationVersion?](./kibana-plugin-core-server.savedobjectscreateoptions.coremigrationversion.md) | string | (Optional) A semver value that is used when upgrading objects between Kibana versions. If undefined, this will be automatically set to the current Kibana version when the object is created. If this is set to a non-semver value, or it is set to a semver value greater than the current Kibana version, it will result in an error. | +| [id?](./kibana-plugin-core-server.savedobjectscreateoptions.id.md) | string | (Optional) (not recommended) Specify an id for the document | +| [initialNamespaces?](./kibana-plugin-core-server.savedobjectscreateoptions.initialnamespaces.md) | string\[\] | (Optional) Optional initial namespaces for the object to be created in. If this is defined, it will supersede the namespace ID that is in [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md).\* For shareable object types (registered with namespaceType: 'multiple'): this option can be used to specify one or more spaces, including the "All spaces" identifier ('*'). \* For isolated object types (registered with namespaceType: 'single' or namespaceType: 'multiple-isolated'): this option can only be used to specify a single space, and the "All spaces" identifier ('*') is not allowed. \* For global object types (registered with namespaceType: 'agnostic'): this option cannot be used. | +| [migrationVersion?](./kibana-plugin-core-server.savedobjectscreateoptions.migrationversion.md) | SavedObjectsMigrationVersion | (Optional) Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | +| [originId?](./kibana-plugin-core-server.savedobjectscreateoptions.originid.md) | string | (Optional) Optional ID of the original saved object, if this object's id was regenerated | +| [overwrite?](./kibana-plugin-core-server.savedobjectscreateoptions.overwrite.md) | boolean | (Optional) Overwrite existing documents (defaults to false) | +| [references?](./kibana-plugin-core-server.savedobjectscreateoptions.references.md) | SavedObjectReference\[\] | (Optional) | +| [refresh?](./kibana-plugin-core-server.savedobjectscreateoptions.refresh.md) | MutatingOperationRefreshSetting | (Optional) The Elasticsearch Refresh setting for this operation | +| [version?](./kibana-plugin-core-server.savedobjectscreateoptions.version.md) | string | (Optional) An opaque version number which changes on each successful write operation. Can be used in conjunction with overwrite for implementing optimistic concurrency control. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.md index 47c640bfabcb0..f647a9c1367b3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.md @@ -15,5 +15,5 @@ export interface SavedObjectsCreatePointInTimeFinderDependencies | Property | Type | Description | | --- | --- | --- | -| [client](./kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.client.md) | Pick<SavedObjectsClientContract, 'find' | 'openPointInTimeForType' | 'closePointInTime'> | | +| [client](./kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.client.md) | Pick<SavedObjectsClientContract, 'find' \| 'openPointInTimeForType' \| 'closePointInTime'> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md index ba81a3e8c32d0..49b6c36cf3ed2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md @@ -10,10 +10,11 @@ ```typescript export interface SavedObjectsDeleteByNamespaceOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [refresh](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.refresh.md) | boolean | The Elasticsearch supports only boolean flag for this operation | +| [refresh?](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.refresh.md) | boolean | (Optional) The Elasticsearch supports only boolean flag for this operation | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeleteoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeleteoptions.md index 245819e44d37d..e1bc1fcec3f2d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeleteoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsdeleteoptions.md @@ -10,11 +10,12 @@ ```typescript export interface SavedObjectsDeleteOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [force](./kibana-plugin-core-server.savedobjectsdeleteoptions.force.md) | boolean | Force deletion of an object that exists in multiple namespaces | -| [refresh](./kibana-plugin-core-server.savedobjectsdeleteoptions.refresh.md) | MutatingOperationRefreshSetting | The Elasticsearch Refresh setting for this operation | +| [force?](./kibana-plugin-core-server.savedobjectsdeleteoptions.force.md) | boolean | (Optional) Force deletion of an object that exists in multiple namespaces | +| [refresh?](./kibana-plugin-core-server.savedobjectsdeleteoptions.refresh.md) | MutatingOperationRefreshSetting | (Optional) The Elasticsearch Refresh setting for this operation | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createbadrequesterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createbadrequesterror.md index 03d5aceec6127..f101aa98d8bd3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createbadrequesterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createbadrequesterror.md @@ -14,9 +14,9 @@ static createBadRequestError(reason?: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| reason | string | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createconflicterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createconflicterror.md index 97d33c3060bb0..426de67ded2dc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createconflicterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createconflicterror.md @@ -14,11 +14,11 @@ static createConflictError(type: string, id: string, reason?: string): Decorated | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| reason | string | | +| type | string | | +| id | string | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfounderror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfounderror.md index 9df39c82745d9..6ac403b442367 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfounderror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfounderror.md @@ -14,10 +14,10 @@ static createGenericNotFoundError(type?: string | null, id?: string | null): Dec | Parameter | Type | Description | | --- | --- | --- | -| type | string | null | | -| id | string | null | | +| type | string \| null | | +| id | string \| null | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createindexaliasnotfounderror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createindexaliasnotfounderror.md index 2b897db7bba4c..4f9fa9d4484bd 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createindexaliasnotfounderror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createindexaliasnotfounderror.md @@ -14,9 +14,9 @@ static createIndexAliasNotFoundError(alias: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| alias | string | | +| alias | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createinvalidversionerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createinvalidversionerror.md index c3eca80ef3efe..59e2a65694008 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createinvalidversionerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createinvalidversionerror.md @@ -14,9 +14,9 @@ static createInvalidVersionError(versionInput?: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| versionInput | string | | +| versionInput | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createtoomanyrequestserror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createtoomanyrequestserror.md index 6d93dc97a107e..3d4903c3482ed 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createtoomanyrequestserror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createtoomanyrequestserror.md @@ -14,10 +14,10 @@ static createTooManyRequestsError(type: string, id: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | +| type | string | | +| id | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createunsupportedtypeerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createunsupportedtypeerror.md index bcfd5d4296a45..4ca95c1565db6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createunsupportedtypeerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createunsupportedtypeerror.md @@ -14,9 +14,9 @@ static createUnsupportedTypeError(type: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratebadrequesterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratebadrequesterror.md index 604f2bd93cc74..043950407519f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratebadrequesterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratebadrequesterror.md @@ -14,10 +14,10 @@ static decorateBadRequestError(error: Error, reason?: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateconflicterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateconflicterror.md index 172f8f5ee6b4d..dfb981a0a656e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateconflicterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateconflicterror.md @@ -14,10 +14,10 @@ static decorateConflictError(error: Error, reason?: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateescannotexecutescripterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateescannotexecutescripterror.md index 94060bba50067..18b019f1b5364 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateescannotexecutescripterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateescannotexecutescripterror.md @@ -14,10 +14,10 @@ static decorateEsCannotExecuteScriptError(error: Error, reason?: string): Decora | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateesunavailableerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateesunavailableerror.md index 54135f9875f5f..9d272b1e78454 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateesunavailableerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateesunavailableerror.md @@ -14,10 +14,10 @@ static decorateEsUnavailableError(error: Error, reason?: string): DecoratedError | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateforbiddenerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateforbiddenerror.md index 82d84defba6f7..11b53ec219334 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateforbiddenerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateforbiddenerror.md @@ -14,10 +14,10 @@ static decorateForbiddenError(error: Error, reason?: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorategeneralerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorategeneralerror.md index 310258bc9a6e9..595789611b5c3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorategeneralerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorategeneralerror.md @@ -14,10 +14,10 @@ static decorateGeneralError(error: Error, reason?: string): DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateindexaliasnotfounderror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateindexaliasnotfounderror.md index c7e10fc42ead1..a2e74ca7769e0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateindexaliasnotfounderror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateindexaliasnotfounderror.md @@ -14,10 +14,10 @@ static decorateIndexAliasNotFoundError(error: Error, alias: string): DecoratedEr | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| alias | string | | +| error | Error | | +| alias | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratenotauthorizederror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratenotauthorizederror.md index 81405a6597f77..d50d5d9ebf45f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratenotauthorizederror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratenotauthorizederror.md @@ -14,10 +14,10 @@ static decorateNotAuthorizedError(error: Error, reason?: string): DecoratedError | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoraterequestentitytoolargeerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoraterequestentitytoolargeerror.md index edfa466aa9726..487d64f83ca30 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoraterequestentitytoolargeerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoraterequestentitytoolargeerror.md @@ -14,10 +14,10 @@ static decorateRequestEntityTooLargeError(error: Error, reason?: string): Decora | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratetoomanyrequestserror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratetoomanyrequestserror.md index 46c94e1756edd..b85cf196c3cdb 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratetoomanyrequestserror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decoratetoomanyrequestserror.md @@ -14,10 +14,10 @@ static decorateTooManyRequestsError(error: Error, reason?: string): DecoratedErr | Parameter | Type | Description | | --- | --- | --- | -| error | Error | | -| reason | string | | +| error | Error | | +| reason | string | | Returns: -`DecoratedError` +DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isbadrequesterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isbadrequesterror.md index 2fd613920fb10..5dd6a50b61e55 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isbadrequesterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isbadrequesterror.md @@ -14,9 +14,9 @@ static isBadRequestError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isconflicterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isconflicterror.md index c8066c396f835..9762462af9ef3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isconflicterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isconflicterror.md @@ -14,9 +14,9 @@ static isConflictError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isescannotexecutescripterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isescannotexecutescripterror.md index debb94fe4f8d8..e007dd30f2bb0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isescannotexecutescripterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isescannotexecutescripterror.md @@ -14,9 +14,9 @@ static isEsCannotExecuteScriptError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isesunavailableerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isesunavailableerror.md index 6f38d414b30c3..a6fb911f5e0eb 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isesunavailableerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isesunavailableerror.md @@ -14,9 +14,9 @@ static isEsUnavailableError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isforbiddenerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isforbiddenerror.md index 74cfecd49f4a9..e45ef7a7ed3f3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isforbiddenerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isforbiddenerror.md @@ -14,9 +14,9 @@ static isForbiddenError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isgeneralerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isgeneralerror.md index 4b4ede2f77a7e..cbec5d3b36a80 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isgeneralerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isgeneralerror.md @@ -14,9 +14,9 @@ static isGeneralError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isinvalidversionerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isinvalidversionerror.md index 8fde00aad394a..8ad480147adf6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isinvalidversionerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isinvalidversionerror.md @@ -14,9 +14,9 @@ static isInvalidVersionError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotauthorizederror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotauthorizederror.md index 39811943abe45..5e85718bde511 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotauthorizederror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotauthorizederror.md @@ -14,9 +14,9 @@ static isNotAuthorizedError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotfounderror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotfounderror.md index d37fec7ca08be..05e848322ae9f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotfounderror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isnotfounderror.md @@ -14,9 +14,9 @@ static isNotFoundError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isrequestentitytoolargeerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isrequestentitytoolargeerror.md index e2699c53b3836..d6674f0a588e9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isrequestentitytoolargeerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isrequestentitytoolargeerror.md @@ -14,9 +14,9 @@ static isRequestEntityTooLargeError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.issavedobjectsclienterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.issavedobjectsclienterror.md index 0dc0df0401b7b..0505c3a450a32 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.issavedobjectsclienterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.issavedobjectsclienterror.md @@ -14,9 +14,9 @@ static isSavedObjectsClientError(error: any): error is DecoratedError; | Parameter | Type | Description | | --- | --- | --- | -| error | any | | +| error | any | | Returns: -`error is DecoratedError` +error is DecoratedError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.istoomanyrequestserror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.istoomanyrequestserror.md index 4422966ee3e50..3f9c360710ae3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.istoomanyrequestserror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.istoomanyrequestserror.md @@ -14,9 +14,9 @@ static isTooManyRequestsError(error: Error | DecoratedError): boolean; | Parameter | Type | Description | | --- | --- | --- | -| error | Error | DecoratedError | | +| error | Error \| DecoratedError | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbyobjectoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbyobjectoptions.md index cb20fc5400125..853125f2d1d1f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbyobjectoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbyobjectoptions.md @@ -11,10 +11,11 @@ Options for the [export by objects API](./kibana-plugin-core-server.savedobjects ```typescript export interface SavedObjectsExportByObjectOptions extends SavedObjectExportBaseOptions ``` +Extends: SavedObjectExportBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [objects](./kibana-plugin-core-server.savedobjectsexportbyobjectoptions.objects.md) | Array<{
id: string;
type: string;
}> | optional array of objects to export. | +| [objects](./kibana-plugin-core-server.savedobjectsexportbyobjectoptions.objects.md) | Array<{ id: string; type: string; }> | optional array of objects to export. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbytypeoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbytypeoptions.md index 26ebfd658f19b..707db0dca30a7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbytypeoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportbytypeoptions.md @@ -11,12 +11,13 @@ Options for the [export by type API](./kibana-plugin-core-server.savedobjectsexp ```typescript export interface SavedObjectsExportByTypeOptions extends SavedObjectExportBaseOptions ``` +Extends: SavedObjectExportBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [hasReference](./kibana-plugin-core-server.savedobjectsexportbytypeoptions.hasreference.md) | SavedObjectsFindOptionsReference[] | optional array of references to search object for. | -| [search](./kibana-plugin-core-server.savedobjectsexportbytypeoptions.search.md) | string | optional query string to filter exported objects. | -| [types](./kibana-plugin-core-server.savedobjectsexportbytypeoptions.types.md) | string[] | array of saved object types. | +| [hasReference?](./kibana-plugin-core-server.savedobjectsexportbytypeoptions.hasreference.md) | SavedObjectsFindOptionsReference\[\] | (Optional) optional array of references to search object for. | +| [search?](./kibana-plugin-core-server.savedobjectsexportbytypeoptions.search.md) | string | (Optional) optional query string to filter exported objects. | +| [types](./kibana-plugin-core-server.savedobjectsexportbytypeoptions.types.md) | string\[\] | array of saved object types. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.__private_.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.__private_.md deleted file mode 100644 index 23f49a703814f..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.__private_.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsExporter](./kibana-plugin-core-server.savedobjectsexporter.md) > ["\#private"](./kibana-plugin-core-server.savedobjectsexporter.__private_.md) - -## SavedObjectsExporter."\#private" property - -Signature: - -```typescript -#private; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter._constructor_.md index 3f3d708c590ee..1c2f60570348e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter._constructor_.md @@ -21,5 +21,5 @@ constructor({ savedObjectsClient, typeRegistry, exportSizeLimit, logger, }: { | Parameter | Type | Description | | --- | --- | --- | -| { savedObjectsClient, typeRegistry, exportSizeLimit, logger, } | {
savedObjectsClient: SavedObjectsClientContract;
typeRegistry: ISavedObjectTypeRegistry;
exportSizeLimit: number;
logger: Logger;
} | | +| { savedObjectsClient, typeRegistry, exportSizeLimit, logger, } | { savedObjectsClient: SavedObjectsClientContract; typeRegistry: ISavedObjectTypeRegistry; exportSizeLimit: number; logger: Logger; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbyobjects.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbyobjects.md index a7dc5a71b835d..b143d17fa59bd 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbyobjects.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbyobjects.md @@ -18,11 +18,11 @@ exportByObjects(options: SavedObjectsExportByObjectOptions): PromiseSavedObjectsExportByObjectOptions | | +| options | SavedObjectsExportByObjectOptions | | Returns: -`Promise` +Promise<import("stream").Readable> ## Exceptions diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbytypes.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbytypes.md index 83da41bad7fe0..cf32d988f6eca 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbytypes.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.exportbytypes.md @@ -18,11 +18,11 @@ exportByTypes(options: SavedObjectsExportByTypeOptions): PromiseSavedObjectsExportByTypeOptions | | +| options | SavedObjectsExportByTypeOptions | | Returns: -`Promise` +Promise<import("stream").Readable> ## Exceptions diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.md index ce23e91633b07..66f52f4aa4902 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporter.md @@ -17,12 +17,6 @@ export declare class SavedObjectsExporter | --- | --- | --- | | [(constructor)({ savedObjectsClient, typeRegistry, exportSizeLimit, logger, })](./kibana-plugin-core-server.savedobjectsexporter._constructor_.md) | | Constructs a new instance of the SavedObjectsExporter class | -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| ["\#private"](./kibana-plugin-core-server.savedobjectsexporter.__private_.md) | | | | - ## Methods | Method | Modifiers | Description | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror._constructor_.md index 33bc6113d56e1..ee25dbf8c22e7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror._constructor_.md @@ -16,7 +16,7 @@ constructor(type: string, message: string, attributes?: Record | un | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| message | string | | -| attributes | Record<string, any> | undefined | | +| type | string | | +| message | string | | +| attributes | Record<string, any> \| undefined | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.exportsizeexceeded.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.exportsizeexceeded.md index c4097724b193d..b69c46383aae4 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.exportsizeexceeded.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.exportsizeexceeded.md @@ -14,9 +14,9 @@ static exportSizeExceeded(limit: number): SavedObjectsExportError; | Parameter | Type | Description | | --- | --- | --- | -| limit | number | | +| limit | number | | Returns: -`SavedObjectsExportError` +SavedObjectsExportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.invalidtransformerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.invalidtransformerror.md index 103d1ff8a912b..a6f0190f27fb6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.invalidtransformerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.invalidtransformerror.md @@ -16,9 +16,9 @@ static invalidTransformError(objectKeys: string[]): SavedObjectsExportError; | Parameter | Type | Description | | --- | --- | --- | -| objectKeys | string[] | | +| objectKeys | string\[\] | | Returns: -`SavedObjectsExportError` +SavedObjectsExportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.md index 2a503f9377dac..4c70b8395d8a6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.md @@ -10,6 +10,7 @@ ```typescript export declare class SavedObjectsExportError extends Error ``` +Extends: Error ## Constructors @@ -21,8 +22,8 @@ export declare class SavedObjectsExportError extends Error | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [attributes](./kibana-plugin-core-server.savedobjectsexporterror.attributes.md) | | Record<string, any> | undefined | | -| [type](./kibana-plugin-core-server.savedobjectsexporterror.type.md) | | string | | +| [attributes?](./kibana-plugin-core-server.savedobjectsexporterror.attributes.md) | | Record<string, any> \| undefined | (Optional) | +| [type](./kibana-plugin-core-server.savedobjectsexporterror.type.md) | | string | | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objectfetcherror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objectfetcherror.md index afaa4693f3c70..172b9e0f3ef18 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objectfetcherror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objectfetcherror.md @@ -14,9 +14,9 @@ static objectFetchError(objects: SavedObject[]): SavedObjectsExportError; | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObject[] | | +| objects | SavedObject\[\] | | Returns: -`SavedObjectsExportError` +SavedObjectsExportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objecttransformerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objecttransformerror.md index 393cf20dbae16..46d415068e9e5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objecttransformerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporterror.objecttransformerror.md @@ -16,10 +16,10 @@ static objectTransformError(objects: SavedObject[], cause: Error): SavedObjectsE | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObject[] | | -| cause | Error | | +| objects | SavedObject\[\] | | +| cause | Error | | Returns: -`SavedObjectsExportError` +SavedObjectsExportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportexcludedobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportexcludedobject.md index 4766ae25a936d..053e9b8bec463 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportexcludedobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportexcludedobject.md @@ -15,7 +15,7 @@ export interface SavedObjectsExportExcludedObject | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectsexportexcludedobject.id.md) | string | id of the excluded object | -| [reason](./kibana-plugin-core-server.savedobjectsexportexcludedobject.reason.md) | string | optional cause of the exclusion | -| [type](./kibana-plugin-core-server.savedobjectsexportexcludedobject.type.md) | string | type of the excluded object | +| [id](./kibana-plugin-core-server.savedobjectsexportexcludedobject.id.md) | string | id of the excluded object | +| [reason?](./kibana-plugin-core-server.savedobjectsexportexcludedobject.reason.md) | string | (Optional) optional cause of the exclusion | +| [type](./kibana-plugin-core-server.savedobjectsexportexcludedobject.type.md) | string | type of the excluded object | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportresultdetails.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportresultdetails.md index f017f2329170b..872147dc81456 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportresultdetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexportresultdetails.md @@ -16,9 +16,9 @@ export interface SavedObjectsExportResultDetails | Property | Type | Description | | --- | --- | --- | -| [excludedObjects](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjects.md) | SavedObjectsExportExcludedObject[] | excluded objects details | -| [excludedObjectsCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjectscount.md) | number | number of objects that were excluded from the export | -| [exportedCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.exportedcount.md) | number | number of successfully exported objects | -| [missingRefCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.missingrefcount.md) | number | number of missing references | -| [missingReferences](./kibana-plugin-core-server.savedobjectsexportresultdetails.missingreferences.md) | Array<{
id: string;
type: string;
}> | missing references details | +| [excludedObjects](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjects.md) | SavedObjectsExportExcludedObject\[\] | excluded objects details | +| [excludedObjectsCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjectscount.md) | number | number of objects that were excluded from the export | +| [exportedCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.exportedcount.md) | number | number of successfully exported objects | +| [missingRefCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.missingrefcount.md) | number | number of missing references | +| [missingReferences](./kibana-plugin-core-server.savedobjectsexportresultdetails.missingreferences.md) | Array<{ id: string; type: string; }> | missing references details | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransform.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransform.md index 2effed1ae9d70..2f83d5188e891 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransform.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransform.md @@ -45,7 +45,6 @@ export class Plugin() { }); } } - ``` ## Example 2 @@ -81,6 +80,5 @@ export class Plugin() { }); } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransformcontext.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransformcontext.md index 271f0048842b2..c277308c6fc3b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransformcontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsexporttransformcontext.md @@ -16,5 +16,5 @@ export interface SavedObjectsExportTransformContext | Property | Type | Description | | --- | --- | --- | -| [request](./kibana-plugin-core-server.savedobjectsexporttransformcontext.request.md) | KibanaRequest | The request that initiated the export request. Can be used to create scoped services or client inside the [transformation](./kibana-plugin-core-server.savedobjectsexporttransform.md) | +| [request](./kibana-plugin-core-server.savedobjectsexporttransformcontext.request.md) | KibanaRequest | The request that initiated the export request. Can be used to create scoped services or client inside the [transformation](./kibana-plugin-core-server.savedobjectsexporttransform.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md index d3696ee71049a..5f3bb46cc7a99 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md @@ -15,22 +15,22 @@ export interface SavedObjectsFindOptions | Property | Type | Description | | --- | --- | --- | -| [defaultSearchOperator](./kibana-plugin-core-server.savedobjectsfindoptions.defaultsearchoperator.md) | 'AND' | 'OR' | The search operator to use with the provided filter. Defaults to OR | -| [fields](./kibana-plugin-core-server.savedobjectsfindoptions.fields.md) | string[] | An array of fields to include in the results | -| [filter](./kibana-plugin-core-server.savedobjectsfindoptions.filter.md) | string | KueryNode | | -| [hasReference](./kibana-plugin-core-server.savedobjectsfindoptions.hasreference.md) | SavedObjectsFindOptionsReference | SavedObjectsFindOptionsReference[] | Search for documents having a reference to the specified objects. Use hasReferenceOperator to specify the operator to use when searching for multiple references. | -| [hasReferenceOperator](./kibana-plugin-core-server.savedobjectsfindoptions.hasreferenceoperator.md) | 'AND' | 'OR' | The operator to use when searching by multiple references using the hasReference option. Defaults to OR | -| [namespaces](./kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md) | string[] | | -| [page](./kibana-plugin-core-server.savedobjectsfindoptions.page.md) | number | | -| [perPage](./kibana-plugin-core-server.savedobjectsfindoptions.perpage.md) | number | | -| [pit](./kibana-plugin-core-server.savedobjectsfindoptions.pit.md) | SavedObjectsPitParams | Search against a specific Point In Time (PIT) that you've opened with [SavedObjectsClient.openPointInTimeForType()](./kibana-plugin-core-server.savedobjectsclient.openpointintimefortype.md). | -| [preference](./kibana-plugin-core-server.savedobjectsfindoptions.preference.md) | string | An optional ES preference value to be used for the query \* | -| [rootSearchFields](./kibana-plugin-core-server.savedobjectsfindoptions.rootsearchfields.md) | string[] | The fields to perform the parsed query against. Unlike the searchFields argument, these are expected to be root fields and will not be modified. If used in conjunction with searchFields, both are concatenated together. | -| [search](./kibana-plugin-core-server.savedobjectsfindoptions.search.md) | string | Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String query argument for more information | -| [searchAfter](./kibana-plugin-core-server.savedobjectsfindoptions.searchafter.md) | estypes.Id[] | Use the sort values from the previous page to retrieve the next page of results. | -| [searchFields](./kibana-plugin-core-server.savedobjectsfindoptions.searchfields.md) | string[] | The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | -| [sortField](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | string | | -| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | | -| [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | string | string[] | | -| [typeToNamespacesMap](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | +| [defaultSearchOperator?](./kibana-plugin-core-server.savedobjectsfindoptions.defaultsearchoperator.md) | 'AND' \| 'OR' | (Optional) The search operator to use with the provided filter. Defaults to OR | +| [fields?](./kibana-plugin-core-server.savedobjectsfindoptions.fields.md) | string\[\] | (Optional) An array of fields to include in the results | +| [filter?](./kibana-plugin-core-server.savedobjectsfindoptions.filter.md) | string \| KueryNode | (Optional) | +| [hasReference?](./kibana-plugin-core-server.savedobjectsfindoptions.hasreference.md) | SavedObjectsFindOptionsReference \| SavedObjectsFindOptionsReference\[\] | (Optional) Search for documents having a reference to the specified objects. Use hasReferenceOperator to specify the operator to use when searching for multiple references. | +| [hasReferenceOperator?](./kibana-plugin-core-server.savedobjectsfindoptions.hasreferenceoperator.md) | 'AND' \| 'OR' | (Optional) The operator to use when searching by multiple references using the hasReference option. Defaults to OR | +| [namespaces?](./kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md) | string\[\] | (Optional) | +| [page?](./kibana-plugin-core-server.savedobjectsfindoptions.page.md) | number | (Optional) | +| [perPage?](./kibana-plugin-core-server.savedobjectsfindoptions.perpage.md) | number | (Optional) | +| [pit?](./kibana-plugin-core-server.savedobjectsfindoptions.pit.md) | SavedObjectsPitParams | (Optional) Search against a specific Point In Time (PIT) that you've opened with [SavedObjectsClient.openPointInTimeForType()](./kibana-plugin-core-server.savedobjectsclient.openpointintimefortype.md). | +| [preference?](./kibana-plugin-core-server.savedobjectsfindoptions.preference.md) | string | (Optional) An optional ES preference value to be used for the query \* | +| [rootSearchFields?](./kibana-plugin-core-server.savedobjectsfindoptions.rootsearchfields.md) | string\[\] | (Optional) The fields to perform the parsed query against. Unlike the searchFields argument, these are expected to be root fields and will not be modified. If used in conjunction with searchFields, both are concatenated together. | +| [search?](./kibana-plugin-core-server.savedobjectsfindoptions.search.md) | string | (Optional) Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String query argument for more information | +| [searchAfter?](./kibana-plugin-core-server.savedobjectsfindoptions.searchafter.md) | estypes.Id\[\] | (Optional) Use the sort values from the previous page to retrieve the next page of results. | +| [searchFields?](./kibana-plugin-core-server.savedobjectsfindoptions.searchfields.md) | string\[\] | (Optional) The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | +| [sortField?](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | string | (Optional) | +| [sortOrder?](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | (Optional) | +| [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | string \| string\[\] | | +| [typeToNamespacesMap?](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string\[\] \| undefined> | (Optional) This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptionsreference.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptionsreference.md index db04ef7b162a0..21eb9f06cc11d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptionsreference.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptionsreference.md @@ -15,6 +15,6 @@ export interface SavedObjectsFindOptionsReference | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectsfindoptionsreference.id.md) | string | | -| [type](./kibana-plugin-core-server.savedobjectsfindoptionsreference.type.md) | string | | +| [id](./kibana-plugin-core-server.savedobjectsfindoptionsreference.id.md) | string | | +| [type](./kibana-plugin-core-server.savedobjectsfindoptionsreference.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresponse.md index 8176baf44acbd..4afb825fd0f44 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresponse.md @@ -18,10 +18,10 @@ export interface SavedObjectsFindResponse | Property | Type | Description | | --- | --- | --- | -| [aggregations](./kibana-plugin-core-server.savedobjectsfindresponse.aggregations.md) | A | | -| [page](./kibana-plugin-core-server.savedobjectsfindresponse.page.md) | number | | -| [per\_page](./kibana-plugin-core-server.savedobjectsfindresponse.per_page.md) | number | | -| [pit\_id](./kibana-plugin-core-server.savedobjectsfindresponse.pit_id.md) | string | | -| [saved\_objects](./kibana-plugin-core-server.savedobjectsfindresponse.saved_objects.md) | Array<SavedObjectsFindResult<T>> | | -| [total](./kibana-plugin-core-server.savedobjectsfindresponse.total.md) | number | | +| [aggregations?](./kibana-plugin-core-server.savedobjectsfindresponse.aggregations.md) | A | (Optional) | +| [page](./kibana-plugin-core-server.savedobjectsfindresponse.page.md) | number | | +| [per\_page](./kibana-plugin-core-server.savedobjectsfindresponse.per_page.md) | number | | +| [pit\_id?](./kibana-plugin-core-server.savedobjectsfindresponse.pit_id.md) | string | (Optional) | +| [saved\_objects](./kibana-plugin-core-server.savedobjectsfindresponse.saved_objects.md) | Array<SavedObjectsFindResult<T>> | | +| [total](./kibana-plugin-core-server.savedobjectsfindresponse.total.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.md index a729ce32e1c80..f2ba01697da17 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.md @@ -10,11 +10,12 @@ ```typescript export interface SavedObjectsFindResult extends SavedObject ``` +Extends: SavedObject<T> ## Properties | Property | Type | Description | | --- | --- | --- | -| [score](./kibana-plugin-core-server.savedobjectsfindresult.score.md) | number | The Elasticsearch _score of this result. | -| [sort](./kibana-plugin-core-server.savedobjectsfindresult.sort.md) | string[] | The Elasticsearch sort value of this result. | +| [score](./kibana-plugin-core-server.savedobjectsfindresult.score.md) | number | The Elasticsearch _score of this result. | +| [sort?](./kibana-plugin-core-server.savedobjectsfindresult.sort.md) | string\[\] | (Optional) The Elasticsearch sort value of this result. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.sort.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.sort.md index e73d6b4926d89..5df1b3291b072 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.sort.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindresult.sort.md @@ -36,6 +36,5 @@ const page2 = await savedObjectsClient.find({ searchAfter: lastHit.sort, }); await savedObjectsClient.closePointInTime(page2.pit_id); - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.md index c8b96004662d4..c4ec5fdd2f8e6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.md @@ -18,8 +18,8 @@ export interface SavedObjectsImportActionRequiredWarning | Property | Type | Description | | --- | --- | --- | -| [actionPath](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.actionpath.md) | string | The path (without the basePath) that the user should be redirect to address this warning. | -| [buttonLabel](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.buttonlabel.md) | string | An optional label to use for the link button. If unspecified, a default label will be used. | -| [message](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.message.md) | string | The translated message to display to the user. | -| [type](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.type.md) | 'action_required' | | +| [actionPath](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.actionpath.md) | string | The path (without the basePath) that the user should be redirect to address this warning. | +| [buttonLabel?](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.buttonlabel.md) | string | (Optional) An optional label to use for the link button. If unspecified, a default label will be used. | +| [message](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.message.md) | string | The translated message to display to the user. | +| [type](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.type.md) | 'action\_required' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md index d2c0a397ebe8a..7d275fa199c5b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportAmbiguousConflictError | Property | Type | Description | | --- | --- | --- | -| [destinations](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.destinations.md) | Array<{
id: string;
title?: string;
updatedAt?: string;
}> | | -| [type](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.type.md) | 'ambiguous_conflict' | | +| [destinations](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.destinations.md) | Array<{ id: string; title?: string; updatedAt?: string; }> | | +| [type](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.type.md) | 'ambiguous\_conflict' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportconflicterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportconflicterror.md index 153cd55c9199e..9456e042035fe 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportconflicterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportconflicterror.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportConflictError | Property | Type | Description | | --- | --- | --- | -| [destinationId](./kibana-plugin-core-server.savedobjectsimportconflicterror.destinationid.md) | string | | -| [type](./kibana-plugin-core-server.savedobjectsimportconflicterror.type.md) | 'conflict' | | +| [destinationId?](./kibana-plugin-core-server.savedobjectsimportconflicterror.destinationid.md) | string | (Optional) | +| [type](./kibana-plugin-core-server.savedobjectsimportconflicterror.type.md) | 'conflict' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.__private_.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.__private_.md deleted file mode 100644 index 2d780a957e087..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.__private_.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImporter](./kibana-plugin-core-server.savedobjectsimporter.md) > ["\#private"](./kibana-plugin-core-server.savedobjectsimporter.__private_.md) - -## SavedObjectsImporter."\#private" property - -Signature: - -```typescript -#private; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter._constructor_.md index 67df4dbf09ad6..8451e35d1518e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter._constructor_.md @@ -20,5 +20,5 @@ constructor({ savedObjectsClient, typeRegistry, importSizeLimit, }: { | Parameter | Type | Description | | --- | --- | --- | -| { savedObjectsClient, typeRegistry, importSizeLimit, } | {
savedObjectsClient: SavedObjectsClientContract;
typeRegistry: ISavedObjectTypeRegistry;
importSizeLimit: number;
} | | +| { savedObjectsClient, typeRegistry, importSizeLimit, } | { savedObjectsClient: SavedObjectsClientContract; typeRegistry: ISavedObjectTypeRegistry; importSizeLimit: number; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.import.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.import.md index 5b1b2d733fa0e..1ca6058e7d742 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.import.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.import.md @@ -16,11 +16,11 @@ import({ readStream, createNewCopies, namespace, overwrite, }: SavedObjectsImpor | Parameter | Type | Description | | --- | --- | --- | -| { readStream, createNewCopies, namespace, overwrite, } | SavedObjectsImportOptions | | +| { readStream, createNewCopies, namespace, overwrite, } | SavedObjectsImportOptions | | Returns: -`Promise` +Promise<SavedObjectsImportResponse> ## Exceptions diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.md index cd5c71077e666..18ce27ca2c0dc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.md @@ -17,12 +17,6 @@ export declare class SavedObjectsImporter | --- | --- | --- | | [(constructor)({ savedObjectsClient, typeRegistry, importSizeLimit, })](./kibana-plugin-core-server.savedobjectsimporter._constructor_.md) | | Constructs a new instance of the SavedObjectsImporter class | -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| ["\#private"](./kibana-plugin-core-server.savedobjectsimporter.__private_.md) | | | | - ## Methods | Method | Modifiers | Description | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.resolveimporterrors.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.resolveimporterrors.md index 9418b581ad5b2..e1c95723ed3a5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.resolveimporterrors.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporter.resolveimporterrors.md @@ -16,11 +16,11 @@ resolveImportErrors({ readStream, createNewCopies, namespace, retries, }: SavedO | Parameter | Type | Description | | --- | --- | --- | -| { readStream, createNewCopies, namespace, retries, } | SavedObjectsResolveImportErrorsOptions | | +| { readStream, createNewCopies, namespace, retries, } | SavedObjectsResolveImportErrorsOptions | | Returns: -`Promise` +Promise<SavedObjectsImportResponse> ## Exceptions diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.importsizeexceeded.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.importsizeexceeded.md index 9dcc43633d9eb..421557445670e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.importsizeexceeded.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.importsizeexceeded.md @@ -14,9 +14,9 @@ static importSizeExceeded(limit: number): SavedObjectsImportError; | Parameter | Type | Description | | --- | --- | --- | -| limit | number | | +| limit | number | | Returns: -`SavedObjectsImportError` +SavedObjectsImportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.md index b37b6143e7b73..2e4fd1a01eb04 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.md @@ -10,13 +10,14 @@ ```typescript export declare class SavedObjectsImportError extends Error ``` +Extends: Error ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [attributes](./kibana-plugin-core-server.savedobjectsimporterror.attributes.md) | | Record<string, any> | undefined | | -| [type](./kibana-plugin-core-server.savedobjectsimporterror.type.md) | | string | | +| [attributes?](./kibana-plugin-core-server.savedobjectsimporterror.attributes.md) | | Record<string, any> \| undefined | (Optional) | +| [type](./kibana-plugin-core-server.savedobjectsimporterror.type.md) | | string | | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueimportobjects.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueimportobjects.md index a4a1975af0b4c..29533db10302c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueimportobjects.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueimportobjects.md @@ -14,9 +14,9 @@ static nonUniqueImportObjects(nonUniqueEntries: string[]): SavedObjectsImportErr | Parameter | Type | Description | | --- | --- | --- | -| nonUniqueEntries | string[] | | +| nonUniqueEntries | string\[\] | | Returns: -`SavedObjectsImportError` +SavedObjectsImportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretrydestinations.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretrydestinations.md index a60f6c34cb7e2..4fd23c3f6d62d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretrydestinations.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretrydestinations.md @@ -14,9 +14,9 @@ static nonUniqueRetryDestinations(nonUniqueRetryDestinations: string[]): SavedOb | Parameter | Type | Description | | --- | --- | --- | -| nonUniqueRetryDestinations | string[] | | +| nonUniqueRetryDestinations | string\[\] | | Returns: -`SavedObjectsImportError` +SavedObjectsImportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretryobjects.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretryobjects.md index 187904ccf59a2..bf8a2c2c01760 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretryobjects.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.nonuniqueretryobjects.md @@ -14,9 +14,9 @@ static nonUniqueRetryObjects(nonUniqueRetryObjects: string[]): SavedObjectsImpor | Parameter | Type | Description | | --- | --- | --- | -| nonUniqueRetryObjects | string[] | | +| nonUniqueRetryObjects | string\[\] | | Returns: -`SavedObjectsImportError` +SavedObjectsImportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.referencesfetcherror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.referencesfetcherror.md index c9392739838dc..4202f164900b3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.referencesfetcherror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporterror.referencesfetcherror.md @@ -14,9 +14,9 @@ static referencesFetchError(objects: SavedObject[]): SavedObjectsImportError; | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObject[] | | +| objects | SavedObject\[\] | | Returns: -`SavedObjectsImportError` +SavedObjectsImportError diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportfailure.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportfailure.md index 536f48f45e0c5..52db837479cf6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportfailure.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportfailure.md @@ -16,10 +16,10 @@ export interface SavedObjectsImportFailure | Property | Type | Description | | --- | --- | --- | -| [error](./kibana-plugin-core-server.savedobjectsimportfailure.error.md) | SavedObjectsImportConflictError | SavedObjectsImportAmbiguousConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError | | -| [id](./kibana-plugin-core-server.savedobjectsimportfailure.id.md) | string | | -| [meta](./kibana-plugin-core-server.savedobjectsimportfailure.meta.md) | {
title?: string;
icon?: string;
} | | -| [overwrite](./kibana-plugin-core-server.savedobjectsimportfailure.overwrite.md) | boolean | If overwrite is specified, an attempt was made to overwrite an existing object. | -| [title](./kibana-plugin-core-server.savedobjectsimportfailure.title.md) | string | | -| [type](./kibana-plugin-core-server.savedobjectsimportfailure.type.md) | string | | +| [error](./kibana-plugin-core-server.savedobjectsimportfailure.error.md) | SavedObjectsImportConflictError \| SavedObjectsImportAmbiguousConflictError \| SavedObjectsImportUnsupportedTypeError \| SavedObjectsImportMissingReferencesError \| SavedObjectsImportUnknownError | | +| [id](./kibana-plugin-core-server.savedobjectsimportfailure.id.md) | string | | +| [meta](./kibana-plugin-core-server.savedobjectsimportfailure.meta.md) | { title?: string; icon?: string; } | | +| [overwrite?](./kibana-plugin-core-server.savedobjectsimportfailure.overwrite.md) | boolean | (Optional) If overwrite is specified, an attempt was made to overwrite an existing object. | +| [title?](./kibana-plugin-core-server.savedobjectsimportfailure.title.md) | string | (Optional) | +| [type](./kibana-plugin-core-server.savedobjectsimportfailure.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporthookresult.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporthookresult.md index 9756ce7fac350..eb16aa2fb0285 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporthookresult.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimporthookresult.md @@ -16,5 +16,5 @@ export interface SavedObjectsImportHookResult | Property | Type | Description | | --- | --- | --- | -| [warnings](./kibana-plugin-core-server.savedobjectsimporthookresult.warnings.md) | SavedObjectsImportWarning[] | An optional list of warnings to display in the UI when the import succeeds. | +| [warnings?](./kibana-plugin-core-server.savedobjectsimporthookresult.warnings.md) | SavedObjectsImportWarning\[\] | (Optional) An optional list of warnings to display in the UI when the import succeeds. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.md index 01557eff549f6..25d2a88e87e8b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportMissingReferencesError | Property | Type | Description | | --- | --- | --- | -| [references](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.references.md) | Array<{
type: string;
id: string;
}> | | -| [type](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.type.md) | 'missing_references' | | +| [references](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.references.md) | Array<{ type: string; id: string; }> | | +| [type](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.type.md) | 'missing\_references' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportoptions.md index ddda72938b13a..58d0f4bf982c3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportoptions.md @@ -16,8 +16,8 @@ export interface SavedObjectsImportOptions | Property | Type | Description | | --- | --- | --- | -| [createNewCopies](./kibana-plugin-core-server.savedobjectsimportoptions.createnewcopies.md) | boolean | If true, will create new copies of import objects, each with a random id and undefined originId. | -| [namespace](./kibana-plugin-core-server.savedobjectsimportoptions.namespace.md) | string | if specified, will import in given namespace, else will import as global object | -| [overwrite](./kibana-plugin-core-server.savedobjectsimportoptions.overwrite.md) | boolean | If true, will override existing object if present. Note: this has no effect when used with the createNewCopies option. | -| [readStream](./kibana-plugin-core-server.savedobjectsimportoptions.readstream.md) | Readable | The stream of [saved objects](./kibana-plugin-core-server.savedobject.md) to import | +| [createNewCopies](./kibana-plugin-core-server.savedobjectsimportoptions.createnewcopies.md) | boolean | If true, will create new copies of import objects, each with a random id and undefined originId. | +| [namespace?](./kibana-plugin-core-server.savedobjectsimportoptions.namespace.md) | string | (Optional) if specified, will import in given namespace, else will import as global object | +| [overwrite](./kibana-plugin-core-server.savedobjectsimportoptions.overwrite.md) | boolean | If true, will override existing object if present. Note: this has no effect when used with the createNewCopies option. | +| [readStream](./kibana-plugin-core-server.savedobjectsimportoptions.readstream.md) | Readable | The stream of [saved objects](./kibana-plugin-core-server.savedobject.md) to import | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportresponse.md index 55f651197490f..e39b4b02bb55d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportresponse.md @@ -16,9 +16,9 @@ export interface SavedObjectsImportResponse | Property | Type | Description | | --- | --- | --- | -| [errors](./kibana-plugin-core-server.savedobjectsimportresponse.errors.md) | SavedObjectsImportFailure[] | | -| [success](./kibana-plugin-core-server.savedobjectsimportresponse.success.md) | boolean | | -| [successCount](./kibana-plugin-core-server.savedobjectsimportresponse.successcount.md) | number | | -| [successResults](./kibana-plugin-core-server.savedobjectsimportresponse.successresults.md) | SavedObjectsImportSuccess[] | | -| [warnings](./kibana-plugin-core-server.savedobjectsimportresponse.warnings.md) | SavedObjectsImportWarning[] | | +| [errors?](./kibana-plugin-core-server.savedobjectsimportresponse.errors.md) | SavedObjectsImportFailure\[\] | (Optional) | +| [success](./kibana-plugin-core-server.savedobjectsimportresponse.success.md) | boolean | | +| [successCount](./kibana-plugin-core-server.savedobjectsimportresponse.successcount.md) | number | | +| [successResults?](./kibana-plugin-core-server.savedobjectsimportresponse.successresults.md) | SavedObjectsImportSuccess\[\] | (Optional) | +| [warnings](./kibana-plugin-core-server.savedobjectsimportresponse.warnings.md) | SavedObjectsImportWarning\[\] | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportretry.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportretry.md index 70693e6f43a39..b79ec63ed86c0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportretry.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportretry.md @@ -16,11 +16,11 @@ export interface SavedObjectsImportRetry | Property | Type | Description | | --- | --- | --- | -| [createNewCopy](./kibana-plugin-core-server.savedobjectsimportretry.createnewcopy.md) | boolean | If createNewCopy is specified, the new object has a new (undefined) origin ID. This is only needed for the case where createNewCopies mode is disabled and ambiguous source conflicts are detected. | -| [destinationId](./kibana-plugin-core-server.savedobjectsimportretry.destinationid.md) | string | The object ID that will be created or overwritten. If not specified, the id field will be used. | -| [id](./kibana-plugin-core-server.savedobjectsimportretry.id.md) | string | | -| [ignoreMissingReferences](./kibana-plugin-core-server.savedobjectsimportretry.ignoremissingreferences.md) | boolean | If ignoreMissingReferences is specified, reference validation will be skipped for this object. | -| [overwrite](./kibana-plugin-core-server.savedobjectsimportretry.overwrite.md) | boolean | | -| [replaceReferences](./kibana-plugin-core-server.savedobjectsimportretry.replacereferences.md) | Array<{
type: string;
from: string;
to: string;
}> | | -| [type](./kibana-plugin-core-server.savedobjectsimportretry.type.md) | string | | +| [createNewCopy?](./kibana-plugin-core-server.savedobjectsimportretry.createnewcopy.md) | boolean | (Optional) If createNewCopy is specified, the new object has a new (undefined) origin ID. This is only needed for the case where createNewCopies mode is disabled and ambiguous source conflicts are detected. | +| [destinationId?](./kibana-plugin-core-server.savedobjectsimportretry.destinationid.md) | string | (Optional) The object ID that will be created or overwritten. If not specified, the id field will be used. | +| [id](./kibana-plugin-core-server.savedobjectsimportretry.id.md) | string | | +| [ignoreMissingReferences?](./kibana-plugin-core-server.savedobjectsimportretry.ignoremissingreferences.md) | boolean | (Optional) If ignoreMissingReferences is specified, reference validation will be skipped for this object. | +| [overwrite](./kibana-plugin-core-server.savedobjectsimportretry.overwrite.md) | boolean | | +| [replaceReferences](./kibana-plugin-core-server.savedobjectsimportretry.replacereferences.md) | Array<{ type: string; from: string; to: string; }> | | +| [type](./kibana-plugin-core-server.savedobjectsimportretry.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsimplewarning.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsimplewarning.md index 52d46e4f8db80..7dc4285400478 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsimplewarning.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsimplewarning.md @@ -16,6 +16,6 @@ export interface SavedObjectsImportSimpleWarning | Property | Type | Description | | --- | --- | --- | -| [message](./kibana-plugin-core-server.savedobjectsimportsimplewarning.message.md) | string | The translated message to display to the user | -| [type](./kibana-plugin-core-server.savedobjectsimportsimplewarning.type.md) | 'simple' | | +| [message](./kibana-plugin-core-server.savedobjectsimportsimplewarning.message.md) | string | The translated message to display to the user | +| [type](./kibana-plugin-core-server.savedobjectsimportsimplewarning.type.md) | 'simple' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsuccess.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsuccess.md index 18a226f636b1d..74242ba6d75be 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsuccess.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportsuccess.md @@ -16,10 +16,10 @@ export interface SavedObjectsImportSuccess | Property | Type | Description | | --- | --- | --- | -| [createNewCopy](./kibana-plugin-core-server.savedobjectsimportsuccess.createnewcopy.md) | boolean | | -| [destinationId](./kibana-plugin-core-server.savedobjectsimportsuccess.destinationid.md) | string | If destinationId is specified, the new object has a new ID that is different from the import ID. | -| [id](./kibana-plugin-core-server.savedobjectsimportsuccess.id.md) | string | | -| [meta](./kibana-plugin-core-server.savedobjectsimportsuccess.meta.md) | {
title?: string;
icon?: string;
} | | -| [overwrite](./kibana-plugin-core-server.savedobjectsimportsuccess.overwrite.md) | boolean | If overwrite is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution). | -| [type](./kibana-plugin-core-server.savedobjectsimportsuccess.type.md) | string | | +| [createNewCopy?](./kibana-plugin-core-server.savedobjectsimportsuccess.createnewcopy.md) | boolean | (Optional) | +| [destinationId?](./kibana-plugin-core-server.savedobjectsimportsuccess.destinationid.md) | string | (Optional) If destinationId is specified, the new object has a new ID that is different from the import ID. | +| [id](./kibana-plugin-core-server.savedobjectsimportsuccess.id.md) | string | | +| [meta](./kibana-plugin-core-server.savedobjectsimportsuccess.meta.md) | { title?: string; icon?: string; } | | +| [overwrite?](./kibana-plugin-core-server.savedobjectsimportsuccess.overwrite.md) | boolean | (Optional) If overwrite is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution). | +| [type](./kibana-plugin-core-server.savedobjectsimportsuccess.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunknownerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunknownerror.md index c178d363761ef..158afd45752fc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunknownerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunknownerror.md @@ -16,7 +16,7 @@ export interface SavedObjectsImportUnknownError | Property | Type | Description | | --- | --- | --- | -| [message](./kibana-plugin-core-server.savedobjectsimportunknownerror.message.md) | string | | -| [statusCode](./kibana-plugin-core-server.savedobjectsimportunknownerror.statuscode.md) | number | | -| [type](./kibana-plugin-core-server.savedobjectsimportunknownerror.type.md) | 'unknown' | | +| [message](./kibana-plugin-core-server.savedobjectsimportunknownerror.message.md) | string | | +| [statusCode](./kibana-plugin-core-server.savedobjectsimportunknownerror.statuscode.md) | number | | +| [type](./kibana-plugin-core-server.savedobjectsimportunknownerror.type.md) | 'unknown' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunsupportedtypeerror.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunsupportedtypeerror.md index 3f580b27b7fde..48aff60c69d13 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunsupportedtypeerror.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsimportunsupportedtypeerror.md @@ -16,5 +16,5 @@ export interface SavedObjectsImportUnsupportedTypeError | Property | Type | Description | | --- | --- | --- | -| [type](./kibana-plugin-core-server.savedobjectsimportunsupportedtypeerror.type.md) | 'unsupported_type' | | +| [type](./kibana-plugin-core-server.savedobjectsimportunsupportedtypeerror.type.md) | 'unsupported\_type' | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounterfield.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounterfield.md index 10615c7da4c34..a45d48523f461 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounterfield.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounterfield.md @@ -15,6 +15,6 @@ export interface SavedObjectsIncrementCounterField | Property | Type | Description | | --- | --- | --- | -| [fieldName](./kibana-plugin-core-server.savedobjectsincrementcounterfield.fieldname.md) | string | The field name to increment the counter by. | -| [incrementBy](./kibana-plugin-core-server.savedobjectsincrementcounterfield.incrementby.md) | number | The number to increment the field by (defaults to 1). | +| [fieldName](./kibana-plugin-core-server.savedobjectsincrementcounterfield.fieldname.md) | string | The field name to increment the counter by. | +| [incrementBy?](./kibana-plugin-core-server.savedobjectsincrementcounterfield.incrementby.md) | number | (Optional) The number to increment the field by (defaults to 1). | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounteroptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounteroptions.md index 8da2458cf007e..8740ffb1be185 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounteroptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsincrementcounteroptions.md @@ -10,13 +10,14 @@ ```typescript export interface SavedObjectsIncrementCounterOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [initialize](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.initialize.md) | boolean | (default=false) If true, sets all the counter fields to 0 if they don't already exist. Existing fields will be left as-is and won't be incremented. | -| [migrationVersion](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.migrationversion.md) | SavedObjectsMigrationVersion | [SavedObjectsMigrationVersion](./kibana-plugin-core-server.savedobjectsmigrationversion.md) | -| [refresh](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.refresh.md) | MutatingOperationRefreshSetting | (default='wait\_for') The Elasticsearch refresh setting for this operation. See [MutatingOperationRefreshSetting](./kibana-plugin-core-server.mutatingoperationrefreshsetting.md) | -| [upsertAttributes](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.upsertattributes.md) | Attributes | Attributes to use when upserting the document if it doesn't exist. | +| [initialize?](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.initialize.md) | boolean | (Optional) (default=false) If true, sets all the counter fields to 0 if they don't already exist. Existing fields will be left as-is and won't be incremented. | +| [migrationVersion?](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.migrationversion.md) | SavedObjectsMigrationVersion | (Optional) [SavedObjectsMigrationVersion](./kibana-plugin-core-server.savedobjectsmigrationversion.md) | +| [refresh?](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.refresh.md) | MutatingOperationRefreshSetting | (Optional) (default='wait\_for') The Elasticsearch refresh setting for this operation. See [MutatingOperationRefreshSetting](./kibana-plugin-core-server.mutatingoperationrefreshsetting.md) | +| [upsertAttributes?](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.upsertattributes.md) | Attributes | (Optional) Attributes to use when upserting the document if it doesn't exist. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md index 697f8823c4966..80f332c395159 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md @@ -15,9 +15,9 @@ export interface SavedObjectsMigrationLogger | Property | Type | Description | | --- | --- | --- | -| [debug](./kibana-plugin-core-server.savedobjectsmigrationlogger.debug.md) | (msg: string) => void | | -| [error](./kibana-plugin-core-server.savedobjectsmigrationlogger.error.md) | <Meta extends LogMeta = LogMeta>(msg: string, meta: Meta) => void | | -| [info](./kibana-plugin-core-server.savedobjectsmigrationlogger.info.md) | (msg: string) => void | | -| [warn](./kibana-plugin-core-server.savedobjectsmigrationlogger.warn.md) | (msg: string) => void | | -| [warning](./kibana-plugin-core-server.savedobjectsmigrationlogger.warning.md) | (msg: string) => void | | +| [debug](./kibana-plugin-core-server.savedobjectsmigrationlogger.debug.md) | (msg: string) => void | | +| [error](./kibana-plugin-core-server.savedobjectsmigrationlogger.error.md) | <Meta extends LogMeta = LogMeta>(msg: string, meta: Meta) => void | | +| [info](./kibana-plugin-core-server.savedobjectsmigrationlogger.info.md) | (msg: string) => void | | +| [warn](./kibana-plugin-core-server.savedobjectsmigrationlogger.warn.md) | (msg: string) => void | | +| [warning](./kibana-plugin-core-server.savedobjectsmigrationlogger.warning.md) | (msg: string) => void | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeoptions.md index fc825e3bf2937..331fb6cbe0a6e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeoptions.md @@ -15,7 +15,7 @@ export interface SavedObjectsOpenPointInTimeOptions | Property | Type | Description | | --- | --- | --- | -| [keepAlive](./kibana-plugin-core-server.savedobjectsopenpointintimeoptions.keepalive.md) | string | Optionally specify how long ES should keep the PIT alive until the next request. Defaults to 5m. | -| [namespaces](./kibana-plugin-core-server.savedobjectsopenpointintimeoptions.namespaces.md) | string[] | An optional list of namespaces to be used when opening the PIT.When the spaces plugin is enabled: - this will default to the user's current space (as determined by the URL) - if specified, the user's current space will be ignored - ['*'] will search across all available spaces | -| [preference](./kibana-plugin-core-server.savedobjectsopenpointintimeoptions.preference.md) | string | An optional ES preference value to be used for the query. | +| [keepAlive?](./kibana-plugin-core-server.savedobjectsopenpointintimeoptions.keepalive.md) | string | (Optional) Optionally specify how long ES should keep the PIT alive until the next request. Defaults to 5m. | +| [namespaces?](./kibana-plugin-core-server.savedobjectsopenpointintimeoptions.namespaces.md) | string\[\] | (Optional) An optional list of namespaces to be used when opening the PIT.When the spaces plugin is enabled: - this will default to the user's current space (as determined by the URL) - if specified, the user's current space will be ignored - ['*'] will search across all available spaces | +| [preference?](./kibana-plugin-core-server.savedobjectsopenpointintimeoptions.preference.md) | string | (Optional) An optional ES preference value to be used for the query. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeresponse.md index c4be2692763a5..e3804d63a1e6c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsopenpointintimeresponse.md @@ -15,5 +15,5 @@ export interface SavedObjectsOpenPointInTimeResponse | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectsopenpointintimeresponse.id.md) | string | PIT ID returned from ES. | +| [id](./kibana-plugin-core-server.savedobjectsopenpointintimeresponse.id.md) | string | PIT ID returned from ES. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectspitparams.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectspitparams.md index 7bffca7cda281..3109a6bd88f7e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectspitparams.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectspitparams.md @@ -15,6 +15,6 @@ export interface SavedObjectsPitParams | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectspitparams.id.md) | string | | -| [keepAlive](./kibana-plugin-core-server.savedobjectspitparams.keepalive.md) | string | | +| [id](./kibana-plugin-core-server.savedobjectspitparams.id.md) | string | | +| [keepAlive?](./kibana-plugin-core-server.savedobjectspitparams.keepalive.md) | string | (Optional) | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdoc.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdoc.md index 54bca496b9930..8bce7fac941af 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdoc.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdoc.md @@ -16,8 +16,8 @@ export interface SavedObjectsRawDoc | Property | Type | Description | | --- | --- | --- | -| [\_id](./kibana-plugin-core-server.savedobjectsrawdoc._id.md) | string | | -| [\_primary\_term](./kibana-plugin-core-server.savedobjectsrawdoc._primary_term.md) | number | | -| [\_seq\_no](./kibana-plugin-core-server.savedobjectsrawdoc._seq_no.md) | number | | -| [\_source](./kibana-plugin-core-server.savedobjectsrawdoc._source.md) | SavedObjectsRawDocSource | | +| [\_id](./kibana-plugin-core-server.savedobjectsrawdoc._id.md) | string | | +| [\_primary\_term?](./kibana-plugin-core-server.savedobjectsrawdoc._primary_term.md) | number | (Optional) | +| [\_seq\_no?](./kibana-plugin-core-server.savedobjectsrawdoc._seq_no.md) | number | (Optional) | +| [\_source](./kibana-plugin-core-server.savedobjectsrawdoc._source.md) | SavedObjectsRawDocSource | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdocparseoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdocparseoptions.md index 708d1bc9c514d..dc2166258d0c0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdocparseoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdocparseoptions.md @@ -16,5 +16,5 @@ export interface SavedObjectsRawDocParseOptions | Property | Type | Description | | --- | --- | --- | -| [namespaceTreatment](./kibana-plugin-core-server.savedobjectsrawdocparseoptions.namespacetreatment.md) | 'strict' | 'lax' | Optional setting to allow for lax handling of the raw document ID and namespace field. This is needed when a previously single-namespace object type is converted to a multi-namespace object type, and it is only intended to be used during upgrade migrations.If not specified, the default treatment is strict. | +| [namespaceTreatment?](./kibana-plugin-core-server.savedobjectsrawdocparseoptions.namespacetreatment.md) | 'strict' \| 'lax' | (Optional) Optional setting to allow for lax handling of the raw document ID and namespace field. This is needed when a previously single-namespace object type is converted to a multi-namespace object type, and it is only intended to be used during upgrade migrations.If not specified, the default treatment is strict. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestooptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestooptions.md index 0874aa460e220..c10f74297305d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestooptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestooptions.md @@ -10,10 +10,11 @@ ```typescript export interface SavedObjectsRemoveReferencesToOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [refresh](./kibana-plugin-core-server.savedobjectsremovereferencestooptions.refresh.md) | boolean | The Elasticsearch Refresh setting for this operation. Defaults to true | +| [refresh?](./kibana-plugin-core-server.savedobjectsremovereferencestooptions.refresh.md) | boolean | (Optional) The Elasticsearch Refresh setting for this operation. Defaults to true | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestoresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestoresponse.md index b5468a300d51d..cd10a9f916b03 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestoresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsremovereferencestoresponse.md @@ -10,10 +10,11 @@ ```typescript export interface SavedObjectsRemoveReferencesToResponse extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [updated](./kibana-plugin-core-server.savedobjectsremovereferencestoresponse.updated.md) | number | The number of objects that have been updated by this operation | +| [updated](./kibana-plugin-core-server.savedobjectsremovereferencestoresponse.updated.md) | number | The number of objects that have been updated by this operation | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkcreate.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkcreate.md index 17daf3ab1f042..e71a9d266a3db 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkcreate.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkcreate.md @@ -16,12 +16,12 @@ bulkCreate(objects: Array>, options | Parameter | Type | Description | | --- | --- | --- | -| objects | Array<SavedObjectsBulkCreateObject<T>> | | -| options | SavedObjectsCreateOptions | | +| objects | Array<SavedObjectsBulkCreateObject<T>> | \[{ type, id, attributes, references, migrationVersion }\] | +| options | SavedObjectsCreateOptions | {boolean} \[options.overwrite=false\] - overwrites existing documents {string} \[options.namespace\] | Returns: -`Promise>` +Promise<SavedObjectsBulkResponse<T>> {promise} - {saved\_objects: \[\[{ id, type, version, references, attributes, error: { message } }\]} diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkget.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkget.md index 354ee4dfff62c..ab265132d606f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkget.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkget.md @@ -16,12 +16,12 @@ bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjec | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsBulkGetObject[] | | -| options | SavedObjectsBaseOptions | | +| objects | SavedObjectsBulkGetObject\[\] | an array of objects containing id, type and optionally fields | +| options | SavedObjectsBaseOptions | {string} \[options.namespace\] | Returns: -`Promise>` +Promise<SavedObjectsBulkResponse<T>> {promise} - { saved\_objects: \[{ id, type, version, attributes }\] } diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkresolve.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkresolve.md index f489972207a61..a67521753892d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkresolve.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkresolve.md @@ -16,12 +16,12 @@ bulkResolve(objects: SavedObjectsBulkResolveObject[], options?: Sav | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsBulkResolveObject[] | | -| options | SavedObjectsBaseOptions | | +| objects | SavedObjectsBulkResolveObject\[\] | an array of objects containing id, type | +| options | SavedObjectsBaseOptions | {string} \[options.namespace\] | Returns: -`Promise>` +Promise<SavedObjectsBulkResolveResponse<T>> {promise} - { resolved\_objects: \[{ saved\_object, outcome }\] } diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkupdate.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkupdate.md index de61549b7680d..c4244a8e34e3c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkupdate.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.bulkupdate.md @@ -16,12 +16,12 @@ bulkUpdate(objects: Array>, options | Parameter | Type | Description | | --- | --- | --- | -| objects | Array<SavedObjectsBulkUpdateObject<T>> | | -| options | SavedObjectsBulkUpdateOptions | | +| objects | Array<SavedObjectsBulkUpdateObject<T>> | \[{ type, id, attributes, options: { version, namespace } references }\] {string} options.version - ensures version matches that of persisted object {string} \[options.namespace\] | +| options | SavedObjectsBulkUpdateOptions | | Returns: -`Promise>` +Promise<SavedObjectsBulkUpdateResponse<T>> {promise} - {saved\_objects: \[\[{ id, type, version, references, attributes, error: { message } }\]} diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.checkconflicts.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.checkconflicts.md index 6e44bd704d6a7..48adf6a2dba4a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.checkconflicts.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.checkconflicts.md @@ -16,10 +16,10 @@ checkConflicts(objects?: SavedObjectsCheckConflictsObject[], options?: SavedObje | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsCheckConflictsObject[] | | -| options | SavedObjectsBaseOptions | | +| objects | SavedObjectsCheckConflictsObject\[\] | | +| options | SavedObjectsBaseOptions | | Returns: -`Promise` +Promise<SavedObjectsCheckConflictsResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.closepointintime.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.closepointintime.md index b9d81c89bffd7..e25cd9dfcaae7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.closepointintime.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.closepointintime.md @@ -18,12 +18,12 @@ closePointInTime(id: string, options?: SavedObjectsClosePointInTimeOptions): Pro | Parameter | Type | Description | | --- | --- | --- | -| id | string | | -| options | SavedObjectsClosePointInTimeOptions | | +| id | string | | +| options | SavedObjectsClosePointInTimeOptions | [SavedObjectsClosePointInTimeOptions](./kibana-plugin-core-server.savedobjectsclosepointintimeoptions.md) | Returns: -`Promise` +Promise<SavedObjectsClosePointInTimeResponse> {promise} - [SavedObjectsClosePointInTimeResponse](./kibana-plugin-core-server.savedobjectsclosepointintimeresponse.md) @@ -55,6 +55,5 @@ const response = await repository.find({ }); await repository.closePointInTime(response.pit_id); - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.collectmultinamespacereferences.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.collectmultinamespacereferences.md index 450cd14a20524..b22b3bd8c0b53 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.collectmultinamespacereferences.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.collectmultinamespacereferences.md @@ -16,10 +16,10 @@ collectMultiNamespaceReferences(objects: SavedObjectsCollectMultiNamespaceRefere | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsCollectMultiNamespaceReferencesObject[] | | -| options | SavedObjectsCollectMultiNamespaceReferencesOptions | | +| objects | SavedObjectsCollectMultiNamespaceReferencesObject\[\] | The objects to get the references for. | +| options | SavedObjectsCollectMultiNamespaceReferencesOptions | | Returns: -`Promise` +Promise<import("./collect\_multi\_namespace\_references").SavedObjectsCollectMultiNamespaceReferencesResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.create.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.create.md index 316f72f626101..0c5412e2cd2df 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.create.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.create.md @@ -16,13 +16,13 @@ create(type: string, attributes: T, options?: SavedObjectsCreateOpt | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| attributes | T | | -| options | SavedObjectsCreateOptions | | +| type | string | | +| attributes | T | | +| options | SavedObjectsCreateOptions | {string} \[options.id\] - force id on creation, not recommended {boolean} \[options.overwrite=false\] {object} \[options.migrationVersion=undefined\] {string} \[options.namespace\] {array} \[options.references=\[\]\] - \[{ name, type, id }\] | Returns: -`Promise>` +Promise<SavedObject<T>> {promise} - { id, type, version, attributes } diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.createpointintimefinder.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.createpointintimefinder.md index c92a1986966fd..4cbf51b85f26d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.createpointintimefinder.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.createpointintimefinder.md @@ -22,12 +22,12 @@ createPointInTimeFinder(findOptions: SavedObjectsCreat | Parameter | Type | Description | | --- | --- | --- | -| findOptions | SavedObjectsCreatePointInTimeFinderOptions | | -| dependencies | SavedObjectsCreatePointInTimeFinderDependencies | | +| findOptions | SavedObjectsCreatePointInTimeFinderOptions | | +| dependencies | SavedObjectsCreatePointInTimeFinderDependencies | | Returns: -`ISavedObjectsPointInTimeFinder` +ISavedObjectsPointInTimeFinder<T, A> ## Example @@ -48,6 +48,5 @@ for await (const response of finder.find()) { await finder.close(); } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.delete.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.delete.md index c10ab0ab57eb3..2caa59210b9d3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.delete.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.delete.md @@ -16,13 +16,13 @@ delete(type: string, id: string, options?: SavedObjectsDeleteOptions): Promise<{ | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| options | SavedObjectsDeleteOptions | | +| type | string | | +| id | string | | +| options | SavedObjectsDeleteOptions | {string} \[options.namespace\] | Returns: -`Promise<{}>` +Promise<{}> {promise} diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.deletebynamespace.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.deletebynamespace.md index 3cdfb095d1334..2e9048bcbe188 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.deletebynamespace.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.deletebynamespace.md @@ -16,12 +16,12 @@ deleteByNamespace(namespace: string, options?: SavedObjectsDeleteByNamespaceOpti | Parameter | Type | Description | | --- | --- | --- | -| namespace | string | | -| options | SavedObjectsDeleteByNamespaceOptions | | +| namespace | string | | +| options | SavedObjectsDeleteByNamespaceOptions | | Returns: -`Promise` +Promise<any> {promise} - { took, timed\_out, total, deleted, batches, version\_conflicts, noops, retries, failures } diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md index 5c823b7567918..58c14917aa2c9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md @@ -14,11 +14,11 @@ find(options: SavedObjectsFindOptions): PromiseSavedObjectsFindOptions | | +| options | SavedObjectsFindOptions | {(string\|Array)} \[options.type\] {string} \[options.search\] {string} \[options.defaultSearchOperator\] {Array} \[options.searchFields\] - see Elasticsearch Simple Query String Query field argument for more information {integer} \[options.page=1\] {integer} \[options.perPage=20\] {Array} \[options.searchAfter\] {string} \[options.sortField\] {string} \[options.sortOrder\] {Array} \[options.fields\] {string} \[options.namespace\] {object} \[options.hasReference\] - { type, id } {string} \[options.pit\] {string} \[options.preference\] | Returns: -`Promise>` +Promise<SavedObjectsFindResponse<T, A>> {promise} - { saved\_objects: \[{ id, type, version, attributes }\], total, per\_page, page } diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.get.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.get.md index f9368a1b400cb..9f2b1b924857b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.get.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.get.md @@ -16,13 +16,13 @@ get(type: string, id: string, options?: SavedObjectsBaseOptions): P | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| options | SavedObjectsBaseOptions | | +| type | string | | +| id | string | | +| options | SavedObjectsBaseOptions | {string} \[options.namespace\] | Returns: -`Promise>` +Promise<SavedObject<T>> {promise} - { id, type, version, attributes } diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md index 007b453817c8d..0a51ec9429fe9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md @@ -16,14 +16,14 @@ incrementCounter(type: string, id: string, counterFields: Arraystring | The type of saved object whose fields should be incremented | -| id | string | The id of the document whose fields should be incremented | -| counterFields | Array<string | SavedObjectsIncrementCounterField> | An array of field names to increment or an array of [SavedObjectsIncrementCounterField](./kibana-plugin-core-server.savedobjectsincrementcounterfield.md) | -| options | SavedObjectsIncrementCounterOptions<T> | [SavedObjectsIncrementCounterOptions](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.md) | +| type | string | The type of saved object whose fields should be incremented | +| id | string | The id of the document whose fields should be incremented | +| counterFields | Array<string \| SavedObjectsIncrementCounterField> | An array of field names to increment or an array of [SavedObjectsIncrementCounterField](./kibana-plugin-core-server.savedobjectsincrementcounterfield.md) | +| options | SavedObjectsIncrementCounterOptions<T> | [SavedObjectsIncrementCounterOptions](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.md) | Returns: -`Promise>` +Promise<SavedObject<T>> The saved object after the specified fields were incremented @@ -65,6 +65,5 @@ repository.incrementCounter<{ appId: string }>( [ 'stats.apiCalls'], { upsertAttributes: { appId: 'myId' } } ) - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.openpointintimefortype.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.openpointintimefortype.md index b33765bb79dd8..e0eb4bc603a2d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.openpointintimefortype.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.openpointintimefortype.md @@ -18,12 +18,12 @@ openPointInTimeForType(type: string | string[], { keepAlive, preference }?: Save | Parameter | Type | Description | | --- | --- | --- | -| type | string | string[] | | -| { keepAlive, preference } | SavedObjectsOpenPointInTimeOptions | | +| type | string \| string\[\] | | +| { keepAlive, preference } | SavedObjectsOpenPointInTimeOptions | | Returns: -`Promise` +Promise<SavedObjectsOpenPointInTimeResponse> {promise} - { id: string } @@ -50,6 +50,5 @@ const page2 = await savedObjectsClient.find({ searchAfter: lastHit.sort, }); await savedObjectsClient.closePointInTime(page2.pit_id); - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.removereferencesto.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.removereferencesto.md index ff05926360938..6691bf69e58dc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.removereferencesto.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.removereferencesto.md @@ -16,13 +16,13 @@ removeReferencesTo(type: string, id: string, options?: SavedObjectsRemoveReferen | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| options | SavedObjectsRemoveReferencesToOptions | | +| type | string | | +| id | string | | +| options | SavedObjectsRemoveReferencesToOptions | | Returns: -`Promise` +Promise<SavedObjectsRemoveReferencesToResponse> ## Remarks diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.resolve.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.resolve.md index 7d0a1c7d204be..bf558eca975fd 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.resolve.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.resolve.md @@ -16,13 +16,13 @@ resolve(type: string, id: string, options?: SavedObjectsBaseOptions | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| options | SavedObjectsBaseOptions | | +| type | string | | +| id | string | | +| options | SavedObjectsBaseOptions | {string} \[options.namespace\] | Returns: -`Promise>` +Promise<SavedObjectsResolveResponse<T>> {promise} - { saved\_object, outcome } diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.update.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.update.md index d0d48b8938db8..681ba9eb3f014 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.update.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.update.md @@ -16,14 +16,14 @@ update(type: string, id: string, attributes: Partial, options?: | Parameter | Type | Description | | --- | --- | --- | -| type | string | | -| id | string | | -| attributes | Partial<T> | | -| options | SavedObjectsUpdateOptions<T> | | +| type | string | | +| id | string | | +| attributes | Partial<T> | | +| options | SavedObjectsUpdateOptions<T> | {string} options.version - ensures version matches that of persisted object {string} \[options.namespace\] {array} \[options.references\] - \[{ name, type, id }\] | Returns: -`Promise>` +Promise<SavedObjectsUpdateResponse<T>> {promise} diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.updateobjectsspaces.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.updateobjectsspaces.md index 6914c1b46b829..c226e8d2d2b1d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.updateobjectsspaces.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.updateobjectsspaces.md @@ -16,12 +16,12 @@ updateObjectsSpaces(objects: SavedObjectsUpdateObjectsSpacesObject[], spacesToAd | Parameter | Type | Description | | --- | --- | --- | -| objects | SavedObjectsUpdateObjectsSpacesObject[] | | -| spacesToAdd | string[] | | -| spacesToRemove | string[] | | -| options | SavedObjectsUpdateObjectsSpacesOptions | | +| objects | SavedObjectsUpdateObjectsSpacesObject\[\] | | +| spacesToAdd | string\[\] | | +| spacesToRemove | string\[\] | | +| options | SavedObjectsUpdateObjectsSpacesOptions | | Returns: -`Promise` +Promise<import("./update\_objects\_spaces").SavedObjectsUpdateObjectsSpacesResponse> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepositoryfactory.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepositoryfactory.md index dec768b68cd3a..72aa79ed4df29 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepositoryfactory.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepositoryfactory.md @@ -16,6 +16,6 @@ export interface SavedObjectsRepositoryFactory | Property | Type | Description | | --- | --- | --- | -| [createInternalRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createinternalrepository.md) | (includedHiddenTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. | -| [createScopedRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createscopedrepository.md) | (req: KibanaRequest, includedHiddenTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. | +| [createInternalRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createinternalrepository.md) | (includedHiddenTypes?: string\[\]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. | +| [createScopedRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createscopedrepository.md) | (req: KibanaRequest, includedHiddenTypes?: string\[\]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md index dcd2305c831f4..7a005db4334ba 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md @@ -16,8 +16,8 @@ export interface SavedObjectsResolveImportErrorsOptions | Property | Type | Description | | --- | --- | --- | -| [createNewCopies](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.createnewcopies.md) | boolean | If true, will create new copies of import objects, each with a random id and undefined originId. | -| [namespace](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.namespace.md) | string | if specified, will import in given namespace | -| [readStream](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.readstream.md) | Readable | The stream of [saved objects](./kibana-plugin-core-server.savedobject.md) to resolve errors from | -| [retries](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.retries.md) | SavedObjectsImportRetry[] | saved object import references to retry | +| [createNewCopies](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.createnewcopies.md) | boolean | If true, will create new copies of import objects, each with a random id and undefined originId. | +| [namespace?](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.namespace.md) | string | (Optional) if specified, will import in given namespace | +| [readStream](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.readstream.md) | Readable | The stream of [saved objects](./kibana-plugin-core-server.savedobject.md) to resolve errors from | +| [retries](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.retries.md) | SavedObjectsImportRetry\[\] | saved object import references to retry | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveresponse.md index bbffd9902c0e7..1eab71a7d7e75 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsresolveresponse.md @@ -15,7 +15,7 @@ export interface SavedObjectsResolveResponse | Property | Type | Description | | --- | --- | --- | -| [alias\_target\_id](./kibana-plugin-core-server.savedobjectsresolveresponse.alias_target_id.md) | string | The ID of the object that the legacy URL alias points to. This is only defined when the outcome is 'aliasMatch' or 'conflict'. | -| [outcome](./kibana-plugin-core-server.savedobjectsresolveresponse.outcome.md) | 'exactMatch' | 'aliasMatch' | 'conflict' | The outcome for a successful resolve call is one of the following values:\* 'exactMatch' -- One document exactly matched the given ID. \* 'aliasMatch' -- One document with a legacy URL alias matched the given ID; in this case the saved_object.id field is different than the given ID. \* 'conflict' -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the saved_object object is the exact match, and the saved_object.id field is the same as the given ID. | -| [saved\_object](./kibana-plugin-core-server.savedobjectsresolveresponse.saved_object.md) | SavedObject<T> | The saved object that was found. | +| [alias\_target\_id?](./kibana-plugin-core-server.savedobjectsresolveresponse.alias_target_id.md) | string | (Optional) The ID of the object that the legacy URL alias points to. This is only defined when the outcome is 'aliasMatch' or 'conflict'. | +| [outcome](./kibana-plugin-core-server.savedobjectsresolveresponse.outcome.md) | 'exactMatch' \| 'aliasMatch' \| 'conflict' | The outcome for a successful resolve call is one of the following values:\* 'exactMatch' -- One document exactly matched the given ID. \* 'aliasMatch' -- One document with a legacy URL alias matched the given ID; in this case the saved_object.id field is different than the given ID. \* 'conflict' -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the saved_object object is the exact match, and the saved_object.id field is the same as the given ID. | +| [saved\_object](./kibana-plugin-core-server.savedobjectsresolveresponse.saved_object.md) | SavedObject<T> | The saved object that was found. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawid.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawid.md index a9dfd84cf0b42..6172a05d5c8fa 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawid.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawid.md @@ -16,11 +16,11 @@ generateRawId(namespace: string | undefined, type: string, id: string): string; | Parameter | Type | Description | | --- | --- | --- | -| namespace | string | undefined | | -| type | string | | -| id | string | | +| namespace | string \| undefined | The namespace of the saved object | +| type | string | The saved object type | +| id | string | The id of the saved object | Returns: -`string` +string diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawlegacyurlaliasid.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawlegacyurlaliasid.md index d33f42ee2cf5f..a0465b96f05b5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawlegacyurlaliasid.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.generaterawlegacyurlaliasid.md @@ -16,11 +16,11 @@ generateRawLegacyUrlAliasId(namespace: string, type: string, id: string): string | Parameter | Type | Description | | --- | --- | --- | -| namespace | string | | -| type | string | | -| id | string | | +| namespace | string | The namespace of the saved object | +| type | string | The saved object type | +| id | string | The id of the saved object | Returns: -`string` +string diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.israwsavedobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.israwsavedobject.md index 1094cc25ab557..00963e353aa20 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.israwsavedobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.israwsavedobject.md @@ -16,10 +16,10 @@ isRawSavedObject(doc: SavedObjectsRawDoc, options?: SavedObjectsRawDocParseOptio | Parameter | Type | Description | | --- | --- | --- | -| doc | SavedObjectsRawDoc | | -| options | SavedObjectsRawDocParseOptions | | +| doc | SavedObjectsRawDoc | The raw ES document to be tested | +| options | SavedObjectsRawDocParseOptions | Options for parsing the raw document. | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.rawtosavedobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.rawtosavedobject.md index d71db9caf6a3b..9ac0ae0feee09 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.rawtosavedobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.rawtosavedobject.md @@ -16,10 +16,10 @@ rawToSavedObject(doc: SavedObjectsRawDoc, options?: SavedObjectsRaw | Parameter | Type | Description | | --- | --- | --- | -| doc | SavedObjectsRawDoc | | -| options | SavedObjectsRawDocParseOptions | | +| doc | SavedObjectsRawDoc | The raw ES document to be converted to saved object format. | +| options | SavedObjectsRawDocParseOptions | Options for parsing the raw document. | Returns: -`SavedObjectSanitizedDoc` +SavedObjectSanitizedDoc<T> diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.savedobjecttoraw.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.savedobjecttoraw.md index 16d499a7b7b38..560011fc09638 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.savedobjecttoraw.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsserializer.savedobjecttoraw.md @@ -16,9 +16,9 @@ savedObjectToRaw(savedObj: SavedObjectSanitizedDoc): SavedObjectsRawDoc; | Parameter | Type | Description | | --- | --- | --- | -| savedObj | SavedObjectSanitizedDoc | | +| savedObj | SavedObjectSanitizedDoc | The saved object to be converted to raw ES format. | Returns: -`SavedObjectsRawDoc` +SavedObjectsRawDoc diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.md index 336d9f63f0ced..28afaacce7ce6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.md @@ -29,7 +29,6 @@ export class Plugin() { }) } } - ``` ## Example 2 @@ -44,15 +43,14 @@ export class Plugin() { core.savedObjects.registerType(mySoType); } } - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [addClientWrapper](./kibana-plugin-core-server.savedobjectsservicesetup.addclientwrapper.md) | (priority: number, id: string, factory: SavedObjectsClientWrapperFactory) => void | Add a [client wrapper factory](./kibana-plugin-core-server.savedobjectsclientwrapperfactory.md) with the given priority. | -| [getKibanaIndex](./kibana-plugin-core-server.savedobjectsservicesetup.getkibanaindex.md) | () => string | Returns the default index used for saved objects. | -| [registerType](./kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | <Attributes = any>(type: SavedObjectsType<Attributes>) => void | Register a [savedObjects type](./kibana-plugin-core-server.savedobjectstype.md) definition.See the [mappings format](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) and [migration format](./kibana-plugin-core-server.savedobjectmigrationmap.md) for more details about these. | -| [setClientFactoryProvider](./kibana-plugin-core-server.savedobjectsservicesetup.setclientfactoryprovider.md) | (clientFactoryProvider: SavedObjectsClientFactoryProvider) => void | Set the default [factory provider](./kibana-plugin-core-server.savedobjectsclientfactoryprovider.md) for creating Saved Objects clients. Only one provider can be set, subsequent calls to this method will fail. | +| [addClientWrapper](./kibana-plugin-core-server.savedobjectsservicesetup.addclientwrapper.md) | (priority: number, id: string, factory: SavedObjectsClientWrapperFactory) => void | Add a [client wrapper factory](./kibana-plugin-core-server.savedobjectsclientwrapperfactory.md) with the given priority. | +| [getKibanaIndex](./kibana-plugin-core-server.savedobjectsservicesetup.getkibanaindex.md) | () => string | Returns the default index used for saved objects. | +| [registerType](./kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | <Attributes = any>(type: SavedObjectsType<Attributes>) => void | Register a [savedObjects type](./kibana-plugin-core-server.savedobjectstype.md) definition.See the [mappings format](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) and [migration format](./kibana-plugin-core-server.savedobjectmigrationmap.md) for more details about these. | +| [setClientFactoryProvider](./kibana-plugin-core-server.savedobjectsservicesetup.setclientfactoryprovider.md) | (clientFactoryProvider: SavedObjectsClientFactoryProvider) => void | Set the default [factory provider](./kibana-plugin-core-server.savedobjectsclientfactoryprovider.md) for creating Saved Objects clients. Only one provider can be set, subsequent calls to this method will fail. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md index 7f74ce4d7bea7..3085224fdaa6b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md @@ -51,6 +51,5 @@ export class Plugin() { core.savedObjects.registerType(myType); } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.md index 075a363fe1aa2..ae7480ab1e65b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.md @@ -16,11 +16,11 @@ export interface SavedObjectsServiceStart | Property | Type | Description | | --- | --- | --- | -| [createExporter](./kibana-plugin-core-server.savedobjectsservicestart.createexporter.md) | (client: SavedObjectsClientContract) => ISavedObjectsExporter | Creates an [exporter](./kibana-plugin-core-server.isavedobjectsexporter.md) bound to given client. | -| [createImporter](./kibana-plugin-core-server.savedobjectsservicestart.createimporter.md) | (client: SavedObjectsClientContract) => ISavedObjectsImporter | Creates an [importer](./kibana-plugin-core-server.isavedobjectsimporter.md) bound to given client. | -| [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md) | (includedHiddenTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. | -| [createScopedRepository](./kibana-plugin-core-server.savedobjectsservicestart.createscopedrepository.md) | (req: KibanaRequest, includedHiddenTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. | -| [createSerializer](./kibana-plugin-core-server.savedobjectsservicestart.createserializer.md) | () => SavedObjectsSerializer | Creates a [serializer](./kibana-plugin-core-server.savedobjectsserializer.md) that is aware of all registered types. | -| [getScopedClient](./kibana-plugin-core-server.savedobjectsservicestart.getscopedclient.md) | (req: KibanaRequest, options?: SavedObjectsClientProviderOptions) => SavedObjectsClientContract | Creates a [Saved Objects client](./kibana-plugin-core-server.savedobjectsclientcontract.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. If other plugins have registered Saved Objects client wrappers, these will be applied to extend the functionality of the client.A client that is already scoped to the incoming request is also exposed from the route handler context see [RequestHandlerContext](./kibana-plugin-core-server.requesthandlercontext.md). | -| [getTypeRegistry](./kibana-plugin-core-server.savedobjectsservicestart.gettyperegistry.md) | () => ISavedObjectTypeRegistry | Returns the [registry](./kibana-plugin-core-server.isavedobjecttyperegistry.md) containing all registered [saved object types](./kibana-plugin-core-server.savedobjectstype.md) | +| [createExporter](./kibana-plugin-core-server.savedobjectsservicestart.createexporter.md) | (client: SavedObjectsClientContract) => ISavedObjectsExporter | Creates an [exporter](./kibana-plugin-core-server.isavedobjectsexporter.md) bound to given client. | +| [createImporter](./kibana-plugin-core-server.savedobjectsservicestart.createimporter.md) | (client: SavedObjectsClientContract) => ISavedObjectsImporter | Creates an [importer](./kibana-plugin-core-server.isavedobjectsimporter.md) bound to given client. | +| [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md) | (includedHiddenTypes?: string\[\]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. | +| [createScopedRepository](./kibana-plugin-core-server.savedobjectsservicestart.createscopedrepository.md) | (req: KibanaRequest, includedHiddenTypes?: string\[\]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. | +| [createSerializer](./kibana-plugin-core-server.savedobjectsservicestart.createserializer.md) | () => SavedObjectsSerializer | Creates a [serializer](./kibana-plugin-core-server.savedobjectsserializer.md) that is aware of all registered types. | +| [getScopedClient](./kibana-plugin-core-server.savedobjectsservicestart.getscopedclient.md) | (req: KibanaRequest, options?: SavedObjectsClientProviderOptions) => SavedObjectsClientContract | Creates a [Saved Objects client](./kibana-plugin-core-server.savedobjectsclientcontract.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. If other plugins have registered Saved Objects client wrappers, these will be applied to extend the functionality of the client.A client that is already scoped to the incoming request is also exposed from the route handler context see [RequestHandlerContext](./kibana-plugin-core-server.requesthandlercontext.md). | +| [getTypeRegistry](./kibana-plugin-core-server.savedobjectsservicestart.gettyperegistry.md) | () => ISavedObjectTypeRegistry | Returns the [registry](./kibana-plugin-core-server.isavedobjecttyperegistry.md) containing all registered [saved object types](./kibana-plugin-core-server.savedobjectstype.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstatusmeta.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstatusmeta.md index 3a0b23d18632f..890ed36535b3f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstatusmeta.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstatusmeta.md @@ -16,5 +16,5 @@ export interface SavedObjectStatusMeta | Property | Type | Description | | --- | --- | --- | -| [migratedIndices](./kibana-plugin-core-server.savedobjectstatusmeta.migratedindices.md) | {
[status: string]: number;
skipped: number;
migrated: number;
} | | +| [migratedIndices](./kibana-plugin-core-server.savedobjectstatusmeta.migratedindices.md) | { \[status: string\]: number; skipped: number; migrated: number; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.converttomultinamespacetypeversion.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.converttomultinamespacetypeversion.md index 20346919fc652..a3fac34153633 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.converttomultinamespacetypeversion.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.converttomultinamespacetypeversion.md @@ -19,7 +19,6 @@ Example of a single-namespace type in 7.12: namespaceType: 'single', mappings: {...} } - ``` Example after converting to a multi-namespace (isolated) type in 8.0: @@ -31,7 +30,6 @@ Example after converting to a multi-namespace (isolated) type in 8.0: mappings: {...}, convertToMultiNamespaceTypeVersion: '8.0.0' } - ``` Example after converting to a multi-namespace (shareable) type in 8.1: @@ -43,7 +41,6 @@ Example after converting to a multi-namespace (shareable) type in 8.1: mappings: {...}, convertToMultiNamespaceTypeVersion: '8.0.0' } - ``` Note: migration function(s) can be optionally specified for any of these versions and will not interfere with the conversion process. diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md index bdb90be2bc8fc..3c76a898d06f6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md @@ -18,8 +18,8 @@ This is only internal for now, and will only be public when we expose the regist | Property | Type | Description | | --- | --- | --- | -| [convertToAliasScript](./kibana-plugin-core-server.savedobjectstype.converttoaliasscript.md) | string | If defined, will be used to convert the type to an alias. | -| [convertToMultiNamespaceTypeVersion](./kibana-plugin-core-server.savedobjectstype.converttomultinamespacetypeversion.md) | string | If defined, objects of this type will be converted to a 'multiple' or 'multiple-isolated' namespace type when migrating to this version.Requirements:1. This string value must be a valid semver version 2. This type must have previously specified [\`namespaceType: 'single'\`](./kibana-plugin-core-server.savedobjectsnamespacetype.md) 3. This type must also specify [\`namespaceType: 'multiple'\`](./kibana-plugin-core-server.savedobjectsnamespacetype.md) \*or\* [\`namespaceType: 'multiple-isolated'\`](./kibana-plugin-core-server.savedobjectsnamespacetype.md)Example of a single-namespace type in 7.12: +| [convertToAliasScript?](./kibana-plugin-core-server.savedobjectstype.converttoaliasscript.md) | string | (Optional) If defined, will be used to convert the type to an alias. | +| [convertToMultiNamespaceTypeVersion?](./kibana-plugin-core-server.savedobjectstype.converttomultinamespacetypeversion.md) | string | (Optional) If defined, objects of this type will be converted to a 'multiple' or 'multiple-isolated' namespace type when migrating to this version.Requirements:1. This string value must be a valid semver version 2. This type must have previously specified [\`namespaceType: 'single'\`](./kibana-plugin-core-server.savedobjectsnamespacetype.md) 3. This type must also specify [\`namespaceType: 'multiple'\`](./kibana-plugin-core-server.savedobjectsnamespacetype.md) \*or\* [\`namespaceType: 'multiple-isolated'\`](./kibana-plugin-core-server.savedobjectsnamespacetype.md)Example of a single-namespace type in 7.12: ```ts { name: 'foo', @@ -27,7 +27,6 @@ This is only internal for now, and will only be public when we expose the regist namespaceType: 'single', mappings: {...} } - ``` Example after converting to a multi-namespace (isolated) type in 8.0: ```ts @@ -38,7 +37,6 @@ Example after converting to a multi-namespace (isolated) type in 8.0: mappings: {...}, convertToMultiNamespaceTypeVersion: '8.0.0' } - ``` Example after converting to a multi-namespace (shareable) type in 8.1: ```ts @@ -49,15 +47,14 @@ Example after converting to a multi-namespace (shareable) type in 8.1: mappings: {...}, convertToMultiNamespaceTypeVersion: '8.0.0' } - ``` Note: migration function(s) can be optionally specified for any of these versions and will not interfere with the conversion process. | -| [excludeOnUpgrade](./kibana-plugin-core-server.savedobjectstype.excludeonupgrade.md) | SavedObjectTypeExcludeFromUpgradeFilterHook | If defined, allows a type to exclude unneeded documents from the migration process and effectively be deleted. See [SavedObjectTypeExcludeFromUpgradeFilterHook](./kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md) for more details. | -| [hidden](./kibana-plugin-core-server.savedobjectstype.hidden.md) | boolean | Is the type hidden by default. If true, repositories will not have access to this type unless explicitly declared as an extraType when creating the repository.See [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md). | -| [indexPattern](./kibana-plugin-core-server.savedobjectstype.indexpattern.md) | string | If defined, the type instances will be stored in the given index instead of the default one. | -| [management](./kibana-plugin-core-server.savedobjectstype.management.md) | SavedObjectsTypeManagementDefinition<Attributes> | An optional [saved objects management section](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.md) definition for the type. | -| [mappings](./kibana-plugin-core-server.savedobjectstype.mappings.md) | SavedObjectsTypeMappingDefinition | The [mapping definition](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) for the type. | -| [migrations](./kibana-plugin-core-server.savedobjectstype.migrations.md) | SavedObjectMigrationMap | (() => SavedObjectMigrationMap) | An optional map of [migrations](./kibana-plugin-core-server.savedobjectmigrationfn.md) or a function returning a map of [migrations](./kibana-plugin-core-server.savedobjectmigrationfn.md) to be used to migrate the type. | -| [name](./kibana-plugin-core-server.savedobjectstype.name.md) | string | The name of the type, which is also used as the internal id. | -| [namespaceType](./kibana-plugin-core-server.savedobjectstype.namespacetype.md) | SavedObjectsNamespaceType | The [namespace type](./kibana-plugin-core-server.savedobjectsnamespacetype.md) for the type. | +| [excludeOnUpgrade?](./kibana-plugin-core-server.savedobjectstype.excludeonupgrade.md) | SavedObjectTypeExcludeFromUpgradeFilterHook | (Optional) If defined, allows a type to exclude unneeded documents from the migration process and effectively be deleted. See [SavedObjectTypeExcludeFromUpgradeFilterHook](./kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md) for more details. | +| [hidden](./kibana-plugin-core-server.savedobjectstype.hidden.md) | boolean | Is the type hidden by default. If true, repositories will not have access to this type unless explicitly declared as an extraType when creating the repository.See [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md). | +| [indexPattern?](./kibana-plugin-core-server.savedobjectstype.indexpattern.md) | string | (Optional) If defined, the type instances will be stored in the given index instead of the default one. | +| [management?](./kibana-plugin-core-server.savedobjectstype.management.md) | SavedObjectsTypeManagementDefinition<Attributes> | (Optional) An optional [saved objects management section](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.md) definition for the type. | +| [mappings](./kibana-plugin-core-server.savedobjectstype.mappings.md) | SavedObjectsTypeMappingDefinition | The [mapping definition](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) for the type. | +| [migrations?](./kibana-plugin-core-server.savedobjectstype.migrations.md) | SavedObjectMigrationMap \| (() => SavedObjectMigrationMap) | (Optional) An optional map of [migrations](./kibana-plugin-core-server.savedobjectmigrationfn.md) or a function returning a map of [migrations](./kibana-plugin-core-server.savedobjectmigrationfn.md) to be used to migrate the type. | +| [name](./kibana-plugin-core-server.savedobjectstype.name.md) | string | The name of the type, which is also used as the internal id. | +| [namespaceType](./kibana-plugin-core-server.savedobjectstype.namespacetype.md) | SavedObjectsNamespaceType | The [namespace type](./kibana-plugin-core-server.savedobjectsnamespacetype.md) for the type. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.isexportable.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.isexportable.md index fef178e1d9847..c6dff60610990 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.isexportable.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.isexportable.md @@ -44,6 +44,5 @@ export class Plugin() { }); } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.md index 057eb6284bf9e..eeda40cd59664 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.md @@ -16,15 +16,15 @@ export interface SavedObjectsTypeManagementDefinition | Property | Type | Description | | --- | --- | --- | -| [defaultSearchField](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.defaultsearchfield.md) | string | The default search field to use for this type. Defaults to id. | -| [displayName](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.displayname.md) | string | When specified, will be used instead of the type's name in SO management section's labels. | -| [getEditUrl](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.getediturl.md) | (savedObject: SavedObject<Attributes>) => string | Function returning the url to use to redirect to the editing page of this object. If not defined, editing will not be allowed. | -| [getInAppUrl](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.getinappurl.md) | (savedObject: SavedObject<Attributes>) => {
path: string;
uiCapabilitiesPath: string;
} | Function returning the url to use to redirect to this object from the management section. If not defined, redirecting to the object will not be allowed. | -| [getTitle](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.gettitle.md) | (savedObject: SavedObject<Attributes>) => string | Function returning the title to display in the management table. If not defined, will use the object's type and id to generate a label. | -| [icon](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.icon.md) | string | The eui icon name to display in the management table. If not defined, the default icon will be used. | -| [importableAndExportable](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.importableandexportable.md) | boolean | Is the type importable or exportable. Defaults to false. | -| [isExportable](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.isexportable.md) | SavedObjectsExportablePredicate<Attributes> | Optional hook to specify whether an object should be exportable.If specified, isExportable will be called during export for each of this type's objects in the export, and the ones not matching the predicate will be excluded from the export.When implementing both isExportable and onExport, it is mandatory that isExportable returns the same value for an object before and after going though the export transform. E.g isExportable(objectBeforeTransform) === isExportable(objectAfterTransform) | -| [onExport](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.onexport.md) | SavedObjectsExportTransform<Attributes> | An optional export transform function that can be used transform the objects of the registered type during the export process.It can be used to either mutate the exported objects, or add additional objects (of any type) to the export list.See [the transform type documentation](./kibana-plugin-core-server.savedobjectsexporttransform.md) for more info and examples.When implementing both isExportable and onExport, it is mandatory that isExportable returns the same value for an object before and after going though the export transform. E.g isExportable(objectBeforeTransform) === isExportable(objectAfterTransform) | -| [onImport](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.onimport.md) | SavedObjectsImportHook<Attributes> | An optional [import hook](./kibana-plugin-core-server.savedobjectsimporthook.md) to use when importing given type.Import hooks are executed during the savedObjects import process and allow to interact with the imported objects. See the [hook documentation](./kibana-plugin-core-server.savedobjectsimporthook.md) for more info. | -| [visibleInManagement](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.visibleinmanagement.md) | boolean | When set to false, the type will not be listed or searchable in the SO management section. Main usage of setting this property to false for a type is when objects from the type should be included in the export via references or export hooks, but should not directly appear in the SOM. Defaults to true. | +| [defaultSearchField?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.defaultsearchfield.md) | string | (Optional) The default search field to use for this type. Defaults to id. | +| [displayName?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.displayname.md) | string | (Optional) When specified, will be used instead of the type's name in SO management section's labels. | +| [getEditUrl?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.getediturl.md) | (savedObject: SavedObject<Attributes>) => string | (Optional) Function returning the url to use to redirect to the editing page of this object. If not defined, editing will not be allowed. | +| [getInAppUrl?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.getinappurl.md) | (savedObject: SavedObject<Attributes>) => { path: string; uiCapabilitiesPath: string; } | (Optional) Function returning the url to use to redirect to this object from the management section. If not defined, redirecting to the object will not be allowed. | +| [getTitle?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.gettitle.md) | (savedObject: SavedObject<Attributes>) => string | (Optional) Function returning the title to display in the management table. If not defined, will use the object's type and id to generate a label. | +| [icon?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.icon.md) | string | (Optional) The eui icon name to display in the management table. If not defined, the default icon will be used. | +| [importableAndExportable?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.importableandexportable.md) | boolean | (Optional) Is the type importable or exportable. Defaults to false. | +| [isExportable?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.isexportable.md) | SavedObjectsExportablePredicate<Attributes> | (Optional) Optional hook to specify whether an object should be exportable.If specified, isExportable will be called during export for each of this type's objects in the export, and the ones not matching the predicate will be excluded from the export.When implementing both isExportable and onExport, it is mandatory that isExportable returns the same value for an object before and after going though the export transform. E.g isExportable(objectBeforeTransform) === isExportable(objectAfterTransform) | +| [onExport?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.onexport.md) | SavedObjectsExportTransform<Attributes> | (Optional) An optional export transform function that can be used transform the objects of the registered type during the export process.It can be used to either mutate the exported objects, or add additional objects (of any type) to the export list.See [the transform type documentation](./kibana-plugin-core-server.savedobjectsexporttransform.md) for more info and examples.When implementing both isExportable and onExport, it is mandatory that isExportable returns the same value for an object before and after going though the export transform. E.g isExportable(objectBeforeTransform) === isExportable(objectAfterTransform) | +| [onImport?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.onimport.md) | SavedObjectsImportHook<Attributes> | (Optional) An optional [import hook](./kibana-plugin-core-server.savedobjectsimporthook.md) to use when importing given type.Import hooks are executed during the savedObjects import process and allow to interact with the imported objects. See the [hook documentation](./kibana-plugin-core-server.savedobjectsimporthook.md) for more info. | +| [visibleInManagement?](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.visibleinmanagement.md) | boolean | (Optional) When set to false, the type will not be listed or searchable in the SO management section. Main usage of setting this property to false for a type is when objects from the type should be included in the export via references or export hooks, but should not directly appear in the SOM. Defaults to true. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.onimport.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.onimport.md index 332247b8eb8e1..c54570d79a7e2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.onimport.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemanagementdefinition.onimport.md @@ -50,6 +50,5 @@ export class Plugin() { }); } } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md index 3d3b73880fa7f..7f4c82c23e2ca 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md @@ -34,13 +34,12 @@ const typeDefinition: SavedObjectsTypeMappingDefinition = { }, } } - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [dynamic](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | false | 'strict' | The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings. | -| [properties](./kibana-plugin-core-server.savedobjectstypemappingdefinition.properties.md) | SavedObjectsMappingProperties | The underlying properties of the type mapping | +| [dynamic?](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | false \| 'strict' | (Optional) The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings. | +| [properties](./kibana-plugin-core-server.savedobjectstypemappingdefinition.properties.md) | SavedObjectsMappingProperties | The underlying properties of the type mapping | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.md index 847e40a8896b4..6fa04623c96a6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.md @@ -16,6 +16,6 @@ export interface SavedObjectsUpdateObjectsSpacesObject | Property | Type | Description | | --- | --- | --- | -| [id](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.id.md) | string | The type of the object to update | -| [type](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.type.md) | string | The ID of the object to update | +| [id](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.id.md) | string | The type of the object to update | +| [type](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesobject.type.md) | string | The ID of the object to update | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesoptions.md index 49ee013c5d2da..b8f17699b1841 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesoptions.md @@ -11,10 +11,11 @@ Options for the update operation. ```typescript export interface SavedObjectsUpdateObjectsSpacesOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [refresh](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesoptions.refresh.md) | MutatingOperationRefreshSetting | The Elasticsearch Refresh setting for this operation | +| [refresh?](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesoptions.refresh.md) | MutatingOperationRefreshSetting | (Optional) The Elasticsearch Refresh setting for this operation | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponse.md index bf53277887bda..aff67e0c54e66 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponse.md @@ -16,5 +16,5 @@ export interface SavedObjectsUpdateObjectsSpacesResponse | Property | Type | Description | | --- | --- | --- | -| [objects](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponse.objects.md) | SavedObjectsUpdateObjectsSpacesResponseObject[] | | +| [objects](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponse.objects.md) | SavedObjectsUpdateObjectsSpacesResponseObject\[\] | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.md index 03802278ee5a3..5078473e9e6bd 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.md @@ -16,8 +16,8 @@ export interface SavedObjectsUpdateObjectsSpacesResponseObject | Property | Type | Description | | --- | --- | --- | -| [error](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.error.md) | SavedObjectError | Included if there was an error updating this object's spaces | -| [id](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.id.md) | string | The ID of the referenced object | -| [spaces](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.spaces.md) | string[] | The space(s) that the referenced object exists in | -| [type](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.type.md) | string | The type of the referenced object | +| [error?](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.error.md) | SavedObjectError | (Optional) Included if there was an error updating this object's spaces | +| [id](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.id.md) | string | The ID of the referenced object | +| [spaces](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.spaces.md) | string\[\] | The space(s) that the referenced object exists in | +| [type](./kibana-plugin-core-server.savedobjectsupdateobjectsspacesresponseobject.type.md) | string | The type of the referenced object | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateoptions.md index 3111c1c8e65f1..b81a59c745e7b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateoptions.md @@ -10,13 +10,14 @@ ```typescript export interface SavedObjectsUpdateOptions extends SavedObjectsBaseOptions ``` +Extends: SavedObjectsBaseOptions ## Properties | Property | Type | Description | | --- | --- | --- | -| [references](./kibana-plugin-core-server.savedobjectsupdateoptions.references.md) | SavedObjectReference[] | A reference to another saved object. | -| [refresh](./kibana-plugin-core-server.savedobjectsupdateoptions.refresh.md) | MutatingOperationRefreshSetting | The Elasticsearch Refresh setting for this operation | -| [upsert](./kibana-plugin-core-server.savedobjectsupdateoptions.upsert.md) | Attributes | If specified, will be used to perform an upsert if the document doesn't exist | -| [version](./kibana-plugin-core-server.savedobjectsupdateoptions.version.md) | string | An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. | +| [references?](./kibana-plugin-core-server.savedobjectsupdateoptions.references.md) | SavedObjectReference\[\] | (Optional) A reference to another saved object. | +| [refresh?](./kibana-plugin-core-server.savedobjectsupdateoptions.refresh.md) | MutatingOperationRefreshSetting | (Optional) The Elasticsearch Refresh setting for this operation | +| [upsert?](./kibana-plugin-core-server.savedobjectsupdateoptions.upsert.md) | Attributes | (Optional) If specified, will be used to perform an upsert if the document doesn't exist | +| [version?](./kibana-plugin-core-server.savedobjectsupdateoptions.version.md) | string | (Optional) An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateresponse.md index d8130830eb1f7..5c773d92c6364 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsupdateresponse.md @@ -10,11 +10,12 @@ ```typescript export interface SavedObjectsUpdateResponse extends Omit, 'attributes' | 'references'> ``` +Extends: Omit<SavedObject<T>, 'attributes' \| 'references'> ## Properties | Property | Type | Description | | --- | --- | --- | -| [attributes](./kibana-plugin-core-server.savedobjectsupdateresponse.attributes.md) | Partial<T> | | -| [references](./kibana-plugin-core-server.savedobjectsupdateresponse.references.md) | SavedObjectReference[] | undefined | | +| [attributes](./kibana-plugin-core-server.savedobjectsupdateresponse.attributes.md) | Partial<T> | | +| [references](./kibana-plugin-core-server.savedobjectsupdateresponse.references.md) | SavedObjectReference\[\] \| undefined | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.generateid.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.generateid.md index f095184484992..887f2fb5d9fe1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.generateid.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.generateid.md @@ -13,5 +13,5 @@ static generateId(): string; ``` Returns: -`string` +string diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.getconvertedobjectid.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.getconvertedobjectid.md index c6a429d345ed1..502d9dcab8cf7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.getconvertedobjectid.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.getconvertedobjectid.md @@ -16,13 +16,13 @@ static getConvertedObjectId(namespace: string | undefined, type: string, id: str | Parameter | Type | Description | | --- | --- | --- | -| namespace | string | undefined | | -| type | string | | -| id | string | | +| namespace | string \| undefined | The namespace of the saved object before it is converted. | +| type | string | The type of the saved object before it is converted. | +| id | string | The ID of the saved object before it is converted. | Returns: -`string` +string {string} The ID of the saved object after it is converted. diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.israndomid.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.israndomid.md index 5a44321ee060f..75db00c449654 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.israndomid.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.israndomid.md @@ -16,9 +16,9 @@ static isRandomId(id: string | undefined): boolean; | Parameter | Type | Description | | --- | --- | --- | -| id | string | undefined | | +| id | string \| undefined | The ID of a saved object. Use uuid.validate once upgraded to v5.3+ | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.md index ab6382aca6a52..9a8c5cf9889b2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.md @@ -15,9 +15,9 @@ export declare class SavedObjectsUtils | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [createEmptyFindResponse](./kibana-plugin-core-server.savedobjectsutils.createemptyfindresponse.md) | static | <T, A>({ page, perPage, }: SavedObjectsFindOptions) => SavedObjectsFindResponse<T, A> | Creates an empty response for a find operation. This is only intended to be used by saved objects client wrappers. | -| [namespaceIdToString](./kibana-plugin-core-server.savedobjectsutils.namespaceidtostring.md) | static | (namespace?: string | undefined) => string | Converts a given saved object namespace ID to its string representation. All namespace IDs have an identical string representation, with the exception of the undefined namespace ID (which has a namespace string of 'default'). | -| [namespaceStringToId](./kibana-plugin-core-server.savedobjectsutils.namespacestringtoid.md) | static | (namespace: string) => string | undefined | Converts a given saved object namespace string to its ID representation. All namespace strings have an identical ID representation, with the exception of the 'default' namespace string (which has a namespace ID of undefined). | +| [createEmptyFindResponse](./kibana-plugin-core-server.savedobjectsutils.createemptyfindresponse.md) | static | <T, A>({ page, perPage, }: SavedObjectsFindOptions) => SavedObjectsFindResponse<T, A> | Creates an empty response for a find operation. This is only intended to be used by saved objects client wrappers. | +| [namespaceIdToString](./kibana-plugin-core-server.savedobjectsutils.namespaceidtostring.md) | static | (namespace?: string \| undefined) => string | Converts a given saved object namespace ID to its string representation. All namespace IDs have an identical string representation, with the exception of the undefined namespace ID (which has a namespace string of 'default'). | +| [namespaceStringToId](./kibana-plugin-core-server.savedobjectsutils.namespacestringtoid.md) | static | (namespace: string) => string \| undefined | Converts a given saved object namespace string to its ID representation. All namespace strings have an identical ID representation, with the exception of the 'default' namespace string (which has a namespace ID of undefined). | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md index 20d631ff74aca..7e4733f892955 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md @@ -15,5 +15,5 @@ getAllTypes(): SavedObjectsType[]; ``` Returns: -`SavedObjectsType[]` +SavedObjectsType<any>\[\] diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getimportableandexportabletypes.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getimportableandexportabletypes.md index 1e29e632a6ec3..a20360128406a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getimportableandexportabletypes.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getimportableandexportabletypes.md @@ -13,5 +13,5 @@ getImportableAndExportableTypes(): SavedObjectsType[]; ``` Returns: -`SavedObjectsType[]` +SavedObjectsType<any>\[\] diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getindex.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getindex.md index dca43c48ec46d..9da28c7f01278 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getindex.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getindex.md @@ -16,9 +16,9 @@ getIndex(type: string): string | undefined; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`string | undefined` +string \| undefined diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.gettype.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.gettype.md index 160aadb73cced..d6fc255958c8c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.gettype.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.gettype.md @@ -16,9 +16,9 @@ getType(type: string): SavedObjectsType | undefined; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`SavedObjectsType | undefined` +SavedObjectsType<any> \| undefined diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md index 05f22dcf7010b..9588e77e646fc 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md @@ -15,5 +15,5 @@ getVisibleTypes(): SavedObjectsType[]; ``` Returns: -`SavedObjectsType[]` +SavedObjectsType<any>\[\] diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ishidden.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ishidden.md index aa19fa9b4364c..2d29e753218d7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ishidden.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ishidden.md @@ -16,9 +16,9 @@ isHidden(type: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isimportableandexportable.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isimportableandexportable.md index aeefc207da4fe..8487af6a58911 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isimportableandexportable.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isimportableandexportable.md @@ -16,9 +16,9 @@ isImportableAndExportable(type: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ismultinamespace.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ismultinamespace.md index 0ff07ae2804ff..d4ec6de2392dd 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ismultinamespace.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.ismultinamespace.md @@ -16,9 +16,9 @@ isMultiNamespace(type: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isnamespaceagnostic.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isnamespaceagnostic.md index 859c7b9711816..d6eca4981f7ab 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isnamespaceagnostic.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isnamespaceagnostic.md @@ -16,9 +16,9 @@ isNamespaceAgnostic(type: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isshareable.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isshareable.md index ee240268f9d67..0b67992e53080 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isshareable.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.isshareable.md @@ -16,9 +16,9 @@ isShareable(type: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.issinglenamespace.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.issinglenamespace.md index 18146b2fd6ea1..d1db00d0c8162 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.issinglenamespace.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.issinglenamespace.md @@ -16,9 +16,9 @@ isSingleNamespace(type: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| type | string | | +| type | string | | Returns: -`boolean` +boolean diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.registertype.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.registertype.md index 7108805852c86..c0442e2aaa4ce 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.registertype.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.registertype.md @@ -16,9 +16,9 @@ registerType(type: SavedObjectsType): void; | Parameter | Type | Description | | --- | --- | --- | -| type | SavedObjectsType | | +| type | SavedObjectsType | | Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.searchresponse.md b/docs/development/core/server/kibana-plugin-core-server.searchresponse.md index cbaab4632014d..7deca96e4054c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.searchresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.searchresponse.md @@ -15,11 +15,11 @@ export interface SearchResponse | Property | Type | Description | | --- | --- | --- | -| [\_scroll\_id](./kibana-plugin-core-server.searchresponse._scroll_id.md) | string | | -| [\_shards](./kibana-plugin-core-server.searchresponse._shards.md) | ShardsResponse | | -| [aggregations](./kibana-plugin-core-server.searchresponse.aggregations.md) | any | | -| [hits](./kibana-plugin-core-server.searchresponse.hits.md) | {
total: number;
max_score: number;
hits: Array<{
_index: string;
_type: string;
_id: string;
_score: number;
_source: T;
_version?: number;
_explanation?: Explanation;
fields?: any;
highlight?: any;
inner_hits?: any;
matched_queries?: string[];
sort?: unknown[];
}>;
} | | -| [pit\_id](./kibana-plugin-core-server.searchresponse.pit_id.md) | string | | -| [timed\_out](./kibana-plugin-core-server.searchresponse.timed_out.md) | boolean | | -| [took](./kibana-plugin-core-server.searchresponse.took.md) | number | | +| [\_scroll\_id?](./kibana-plugin-core-server.searchresponse._scroll_id.md) | string | (Optional) | +| [\_shards](./kibana-plugin-core-server.searchresponse._shards.md) | ShardsResponse | | +| [aggregations?](./kibana-plugin-core-server.searchresponse.aggregations.md) | any | (Optional) | +| [hits](./kibana-plugin-core-server.searchresponse.hits.md) | { total: number; max\_score: number; hits: Array<{ \_index: string; \_type: string; \_id: string; \_score: number; \_source: T; \_version?: number; \_explanation?: Explanation; fields?: any; highlight?: any; inner\_hits?: any; matched\_queries?: string\[\]; sort?: unknown\[\]; }>; } | | +| [pit\_id?](./kibana-plugin-core-server.searchresponse.pit_id.md) | string | (Optional) | +| [timed\_out](./kibana-plugin-core-server.searchresponse.timed_out.md) | boolean | | +| [took](./kibana-plugin-core-server.searchresponse.took.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.servicestatus.md b/docs/development/core/server/kibana-plugin-core-server.servicestatus.md index d35fc951c57ff..5c04cb33a7529 100644 --- a/docs/development/core/server/kibana-plugin-core-server.servicestatus.md +++ b/docs/development/core/server/kibana-plugin-core-server.servicestatus.md @@ -16,9 +16,9 @@ export interface ServiceStatus | unknown = unkn | Property | Type | Description | | --- | --- | --- | -| [detail](./kibana-plugin-core-server.servicestatus.detail.md) | string | A more detailed description of the service status. | -| [documentationUrl](./kibana-plugin-core-server.servicestatus.documentationurl.md) | string | A URL to open in a new tab about how to resolve or troubleshoot the problem. | -| [level](./kibana-plugin-core-server.servicestatus.level.md) | ServiceStatusLevel | The current availability level of the service. | -| [meta](./kibana-plugin-core-server.servicestatus.meta.md) | Meta | Any JSON-serializable data to be included in the HTTP API response. Useful for providing more fine-grained, machine-readable information about the service status. May include status information for underlying features. | -| [summary](./kibana-plugin-core-server.servicestatus.summary.md) | string | A high-level summary of the service status. | +| [detail?](./kibana-plugin-core-server.servicestatus.detail.md) | string | (Optional) A more detailed description of the service status. | +| [documentationUrl?](./kibana-plugin-core-server.servicestatus.documentationurl.md) | string | (Optional) A URL to open in a new tab about how to resolve or troubleshoot the problem. | +| [level](./kibana-plugin-core-server.servicestatus.level.md) | ServiceStatusLevel | The current availability level of the service. | +| [meta?](./kibana-plugin-core-server.servicestatus.meta.md) | Meta | (Optional) Any JSON-serializable data to be included in the HTTP API response. Useful for providing more fine-grained, machine-readable information about the service status. May include status information for underlying features. | +| [summary](./kibana-plugin-core-server.servicestatus.summary.md) | string | A high-level summary of the service status. | diff --git a/docs/development/core/server/kibana-plugin-core-server.sessioncookievalidationresult.md b/docs/development/core/server/kibana-plugin-core-server.sessioncookievalidationresult.md index 0c190c4819b5b..6c1a5e7af78a7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.sessioncookievalidationresult.md +++ b/docs/development/core/server/kibana-plugin-core-server.sessioncookievalidationresult.md @@ -16,6 +16,6 @@ export interface SessionCookieValidationResult | Property | Type | Description | | --- | --- | --- | -| [isValid](./kibana-plugin-core-server.sessioncookievalidationresult.isvalid.md) | boolean | Whether the cookie is valid or not. | -| [path](./kibana-plugin-core-server.sessioncookievalidationresult.path.md) | string | The "Path" attribute of the cookie; if the cookie is invalid, this is used to clear it. | +| [isValid](./kibana-plugin-core-server.sessioncookievalidationresult.isvalid.md) | boolean | Whether the cookie is valid or not. | +| [path?](./kibana-plugin-core-server.sessioncookievalidationresult.path.md) | string | (Optional) The "Path" attribute of the cookie; if the cookie is invalid, this is used to clear it. | diff --git a/docs/development/core/server/kibana-plugin-core-server.sessionstorage.clear.md b/docs/development/core/server/kibana-plugin-core-server.sessionstorage.clear.md index 731050a488075..ac34c9b17be8d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.sessionstorage.clear.md +++ b/docs/development/core/server/kibana-plugin-core-server.sessionstorage.clear.md @@ -13,5 +13,5 @@ clear(): void; ``` Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.sessionstorage.get.md b/docs/development/core/server/kibana-plugin-core-server.sessionstorage.get.md index 4e4b2d9aa21ca..9e867b9e0fcc8 100644 --- a/docs/development/core/server/kibana-plugin-core-server.sessionstorage.get.md +++ b/docs/development/core/server/kibana-plugin-core-server.sessionstorage.get.md @@ -13,5 +13,5 @@ get(): Promise; ``` Returns: -`Promise` +Promise<T \| null> diff --git a/docs/development/core/server/kibana-plugin-core-server.sessionstorage.set.md b/docs/development/core/server/kibana-plugin-core-server.sessionstorage.set.md index 15a4d9ec75948..a17aadf8fb984 100644 --- a/docs/development/core/server/kibana-plugin-core-server.sessionstorage.set.md +++ b/docs/development/core/server/kibana-plugin-core-server.sessionstorage.set.md @@ -16,9 +16,9 @@ set(sessionValue: T): void; | Parameter | Type | Description | | --- | --- | --- | -| sessionValue | T | value to put | +| sessionValue | T | value to put | Returns: -`void` +void diff --git a/docs/development/core/server/kibana-plugin-core-server.sessionstoragecookieoptions.md b/docs/development/core/server/kibana-plugin-core-server.sessionstoragecookieoptions.md index b5dad11117359..425daf32f5cb3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.sessionstoragecookieoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.sessionstoragecookieoptions.md @@ -16,9 +16,9 @@ export interface SessionStorageCookieOptions | Property | Type | Description | | --- | --- | --- | -| [encryptionKey](./kibana-plugin-core-server.sessionstoragecookieoptions.encryptionkey.md) | string | A key used to encrypt a cookie's value. Should be at least 32 characters long. | -| [isSecure](./kibana-plugin-core-server.sessionstoragecookieoptions.issecure.md) | boolean | Flag indicating whether the cookie should be sent only via a secure connection. | -| [name](./kibana-plugin-core-server.sessionstoragecookieoptions.name.md) | string | Name of the session cookie. | -| [sameSite](./kibana-plugin-core-server.sessionstoragecookieoptions.samesite.md) | 'Strict' | 'Lax' | 'None' | Defines SameSite attribute of the Set-Cookie Header. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite | -| [validate](./kibana-plugin-core-server.sessionstoragecookieoptions.validate.md) | (sessionValue: T | T[]) => SessionCookieValidationResult | Function called to validate a cookie's decrypted value. | +| [encryptionKey](./kibana-plugin-core-server.sessionstoragecookieoptions.encryptionkey.md) | string | A key used to encrypt a cookie's value. Should be at least 32 characters long. | +| [isSecure](./kibana-plugin-core-server.sessionstoragecookieoptions.issecure.md) | boolean | Flag indicating whether the cookie should be sent only via a secure connection. | +| [name](./kibana-plugin-core-server.sessionstoragecookieoptions.name.md) | string | Name of the session cookie. | +| [sameSite?](./kibana-plugin-core-server.sessionstoragecookieoptions.samesite.md) | 'Strict' \| 'Lax' \| 'None' | (Optional) Defines SameSite attribute of the Set-Cookie Header. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite | +| [validate](./kibana-plugin-core-server.sessionstoragecookieoptions.validate.md) | (sessionValue: T \| T\[\]) => SessionCookieValidationResult | Function called to validate a cookie's decrypted value. | diff --git a/docs/development/core/server/kibana-plugin-core-server.sessionstoragefactory.md b/docs/development/core/server/kibana-plugin-core-server.sessionstoragefactory.md index 848558291eb0e..7bdea28beeda1 100644 --- a/docs/development/core/server/kibana-plugin-core-server.sessionstoragefactory.md +++ b/docs/development/core/server/kibana-plugin-core-server.sessionstoragefactory.md @@ -16,5 +16,5 @@ export interface SessionStorageFactory | Property | Type | Description | | --- | --- | --- | -| [asScoped](./kibana-plugin-core-server.sessionstoragefactory.asscoped.md) | (request: KibanaRequest) => SessionStorage<T> | | +| [asScoped](./kibana-plugin-core-server.sessionstoragefactory.asscoped.md) | (request: KibanaRequest) => SessionStorage<T> | | diff --git a/docs/development/core/server/kibana-plugin-core-server.shardsinfo.md b/docs/development/core/server/kibana-plugin-core-server.shardsinfo.md index 9eafe3792c14a..6c006c020d3fb 100644 --- a/docs/development/core/server/kibana-plugin-core-server.shardsinfo.md +++ b/docs/development/core/server/kibana-plugin-core-server.shardsinfo.md @@ -15,8 +15,8 @@ export interface ShardsInfo | Property | Type | Description | | --- | --- | --- | -| [failed](./kibana-plugin-core-server.shardsinfo.failed.md) | number | | -| [skipped](./kibana-plugin-core-server.shardsinfo.skipped.md) | number | | -| [successful](./kibana-plugin-core-server.shardsinfo.successful.md) | number | | -| [total](./kibana-plugin-core-server.shardsinfo.total.md) | number | | +| [failed](./kibana-plugin-core-server.shardsinfo.failed.md) | number | | +| [skipped](./kibana-plugin-core-server.shardsinfo.skipped.md) | number | | +| [successful](./kibana-plugin-core-server.shardsinfo.successful.md) | number | | +| [total](./kibana-plugin-core-server.shardsinfo.total.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.shardsresponse.md b/docs/development/core/server/kibana-plugin-core-server.shardsresponse.md index 722ffd8efdb57..65e113f05212f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.shardsresponse.md +++ b/docs/development/core/server/kibana-plugin-core-server.shardsresponse.md @@ -15,8 +15,8 @@ export interface ShardsResponse | Property | Type | Description | | --- | --- | --- | -| [failed](./kibana-plugin-core-server.shardsresponse.failed.md) | number | | -| [skipped](./kibana-plugin-core-server.shardsresponse.skipped.md) | number | | -| [successful](./kibana-plugin-core-server.shardsresponse.successful.md) | number | | -| [total](./kibana-plugin-core-server.shardsresponse.total.md) | number | | +| [failed](./kibana-plugin-core-server.shardsresponse.failed.md) | number | | +| [skipped](./kibana-plugin-core-server.shardsresponse.skipped.md) | number | | +| [successful](./kibana-plugin-core-server.shardsresponse.successful.md) | number | | +| [total](./kibana-plugin-core-server.shardsresponse.total.md) | number | | diff --git a/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md index f522d11a7ffef..5409772c369c2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md @@ -30,7 +30,6 @@ core.status.set( }) ; ); ); - ``` ## Example 2 @@ -64,18 +63,17 @@ core.status.set( }) ) ); - ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [core$](./kibana-plugin-core-server.statusservicesetup.core_.md) | Observable<CoreStatus> | Current status for all Core services. | -| [dependencies$](./kibana-plugin-core-server.statusservicesetup.dependencies_.md) | Observable<Record<string, ServiceStatus>> | Current status for all plugins this plugin depends on. Each key of the Record is a plugin id. | -| [derivedStatus$](./kibana-plugin-core-server.statusservicesetup.derivedstatus_.md) | Observable<ServiceStatus> | The status of this plugin as derived from its dependencies. | -| [isStatusPageAnonymous](./kibana-plugin-core-server.statusservicesetup.isstatuspageanonymous.md) | () => boolean | Whether or not the status HTTP APIs are available to unauthenticated users when an authentication provider is present. | -| [overall$](./kibana-plugin-core-server.statusservicesetup.overall_.md) | Observable<ServiceStatus> | Overall system status for all of Kibana. | +| [core$](./kibana-plugin-core-server.statusservicesetup.core_.md) | Observable<CoreStatus> | Current status for all Core services. | +| [dependencies$](./kibana-plugin-core-server.statusservicesetup.dependencies_.md) | Observable<Record<string, ServiceStatus>> | Current status for all plugins this plugin depends on. Each key of the Record is a plugin id. | +| [derivedStatus$](./kibana-plugin-core-server.statusservicesetup.derivedstatus_.md) | Observable<ServiceStatus> | The status of this plugin as derived from its dependencies. | +| [isStatusPageAnonymous](./kibana-plugin-core-server.statusservicesetup.isstatuspageanonymous.md) | () => boolean | Whether or not the status HTTP APIs are available to unauthenticated users when an authentication provider is present. | +| [overall$](./kibana-plugin-core-server.statusservicesetup.overall_.md) | Observable<ServiceStatus> | Overall system status for all of Kibana. | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.set.md b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.set.md index bf08ca1682f3b..b60319e19529a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.set.md +++ b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.set.md @@ -16,11 +16,11 @@ set(status$: Observable): void; | Parameter | Type | Description | | --- | --- | --- | -| status$ | Observable<ServiceStatus> | | +| status$ | Observable<ServiceStatus> | | Returns: -`void` +void ## Remarks diff --git a/docs/development/core/server/kibana-plugin-core-server.uisettingsparams.md b/docs/development/core/server/kibana-plugin-core-server.uisettingsparams.md index c0da909cfe5ec..531a0e75c97b0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.uisettingsparams.md +++ b/docs/development/core/server/kibana-plugin-core-server.uisettingsparams.md @@ -16,18 +16,18 @@ export interface UiSettingsParams | Property | Type | Description | | --- | --- | --- | -| [category](./kibana-plugin-core-server.uisettingsparams.category.md) | string[] | used to group the configured setting in the UI | -| [deprecation](./kibana-plugin-core-server.uisettingsparams.deprecation.md) | DeprecationSettings | optional deprecation information. Used to generate a deprecation warning. | -| [description](./kibana-plugin-core-server.uisettingsparams.description.md) | string | description provided to a user in UI | -| [metric](./kibana-plugin-core-server.uisettingsparams.metric.md) | {
type: UiCounterMetricType;
name: string;
} | Metric to track once this property changes | -| [name](./kibana-plugin-core-server.uisettingsparams.name.md) | string | title in the UI | -| [optionLabels](./kibana-plugin-core-server.uisettingsparams.optionlabels.md) | Record<string, string> | text labels for 'select' type UI element | -| [options](./kibana-plugin-core-server.uisettingsparams.options.md) | string[] | array of permitted values for this setting | -| [order](./kibana-plugin-core-server.uisettingsparams.order.md) | number | index of the settings within its category (ascending order, smallest will be displayed first). Used for ordering in the UI. settings without order defined will be displayed last and ordered by name | -| [readonly](./kibana-plugin-core-server.uisettingsparams.readonly.md) | boolean | a flag indicating that value cannot be changed | -| [requiresPageReload](./kibana-plugin-core-server.uisettingsparams.requirespagereload.md) | boolean | a flag indicating whether new value applying requires page reloading | -| [schema](./kibana-plugin-core-server.uisettingsparams.schema.md) | Type<T> | | -| [sensitive](./kibana-plugin-core-server.uisettingsparams.sensitive.md) | boolean | a flag indicating that value might contain user sensitive data. used by telemetry to mask the value of the setting when sent. | -| [type](./kibana-plugin-core-server.uisettingsparams.type.md) | UiSettingsType | defines a type of UI element [UiSettingsType](./kibana-plugin-core-server.uisettingstype.md) | -| [value](./kibana-plugin-core-server.uisettingsparams.value.md) | T | default value to fall back to if a user doesn't provide any | +| [category?](./kibana-plugin-core-server.uisettingsparams.category.md) | string\[\] | (Optional) used to group the configured setting in the UI | +| [deprecation?](./kibana-plugin-core-server.uisettingsparams.deprecation.md) | DeprecationSettings | (Optional) optional deprecation information. Used to generate a deprecation warning. | +| [description?](./kibana-plugin-core-server.uisettingsparams.description.md) | string | (Optional) description provided to a user in UI | +| [metric?](./kibana-plugin-core-server.uisettingsparams.metric.md) | { type: UiCounterMetricType; name: string; } | (Optional) Metric to track once this property changes | +| [name?](./kibana-plugin-core-server.uisettingsparams.name.md) | string | (Optional) title in the UI | +| [optionLabels?](./kibana-plugin-core-server.uisettingsparams.optionlabels.md) | Record<string, string> | (Optional) text labels for 'select' type UI element | +| [options?](./kibana-plugin-core-server.uisettingsparams.options.md) | string\[\] | (Optional) array of permitted values for this setting | +| [order?](./kibana-plugin-core-server.uisettingsparams.order.md) | number | (Optional) index of the settings within its category (ascending order, smallest will be displayed first). Used for ordering in the UI. settings without order defined will be displayed last and ordered by name | +| [readonly?](./kibana-plugin-core-server.uisettingsparams.readonly.md) | boolean | (Optional) a flag indicating that value cannot be changed | +| [requiresPageReload?](./kibana-plugin-core-server.uisettingsparams.requirespagereload.md) | boolean | (Optional) a flag indicating whether new value applying requires page reloading | +| [schema](./kibana-plugin-core-server.uisettingsparams.schema.md) | Type<T> | | +| [sensitive?](./kibana-plugin-core-server.uisettingsparams.sensitive.md) | boolean | (Optional) a flag indicating that value might contain user sensitive data. used by telemetry to mask the value of the setting when sent. | +| [type?](./kibana-plugin-core-server.uisettingsparams.type.md) | UiSettingsType | (Optional) defines a type of UI element [UiSettingsType](./kibana-plugin-core-server.uisettingstype.md) | +| [value?](./kibana-plugin-core-server.uisettingsparams.value.md) | T | (Optional) default value to fall back to if a user doesn't provide any | diff --git a/docs/development/core/server/kibana-plugin-core-server.uisettingsservicesetup.register.md b/docs/development/core/server/kibana-plugin-core-server.uisettingsservicesetup.register.md index 24bfc32cb1139..97b06ddb00e70 100644 --- a/docs/development/core/server/kibana-plugin-core-server.uisettingsservicesetup.register.md +++ b/docs/development/core/server/kibana-plugin-core-server.uisettingsservicesetup.register.md @@ -16,11 +16,11 @@ register(settings: Record): void; | Parameter | Type | Description | | --- | --- | --- | -| settings | Record<string, UiSettingsParams> | | +| settings | Record<string, UiSettingsParams> | | Returns: -`void` +void ## Example @@ -35,6 +35,5 @@ setup(core: CoreSetup){ }, }]); } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.uisettingsservicestart.asscopedtoclient.md b/docs/development/core/server/kibana-plugin-core-server.uisettingsservicestart.asscopedtoclient.md index 1703df00a5e71..1d76bc26a4150 100644 --- a/docs/development/core/server/kibana-plugin-core-server.uisettingsservicestart.asscopedtoclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.uisettingsservicestart.asscopedtoclient.md @@ -18,11 +18,11 @@ asScopedToClient(savedObjectsClient: SavedObjectsClientContract): IUiSettingsCli | Parameter | Type | Description | | --- | --- | --- | -| savedObjectsClient | SavedObjectsClientContract | | +| savedObjectsClient | SavedObjectsClientContract | | Returns: -`IUiSettingsClient` +IUiSettingsClient ## Example @@ -32,6 +32,5 @@ start(core: CoreStart) { const soClient = core.savedObjects.getScopedClient(arbitraryRequest); const uiSettingsClient = core.uiSettings.asScopedToClient(soClient); } - ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.userprovidedvalues.md b/docs/development/core/server/kibana-plugin-core-server.userprovidedvalues.md index eddfcb456826e..fe8aaf233fbf7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.userprovidedvalues.md +++ b/docs/development/core/server/kibana-plugin-core-server.userprovidedvalues.md @@ -16,6 +16,6 @@ export interface UserProvidedValues | Property | Type | Description | | --- | --- | --- | -| [isOverridden](./kibana-plugin-core-server.userprovidedvalues.isoverridden.md) | boolean | | -| [userValue](./kibana-plugin-core-server.userprovidedvalues.uservalue.md) | T | | +| [isOverridden?](./kibana-plugin-core-server.userprovidedvalues.isoverridden.md) | boolean | (Optional) | +| [userValue?](./kibana-plugin-core-server.userprovidedvalues.uservalue.md) | T | (Optional) | diff --git a/package.json b/package.json index 21ed1c1579095..c30294bf86718 100644 --- a/package.json +++ b/package.json @@ -463,8 +463,8 @@ "@kbn/test-subj-selector": "link:bazel-bin/packages/kbn-test-subj-selector", "@loaders.gl/polyfills": "^2.3.5", "@mapbox/vector-tile": "1.3.1", - "@microsoft/api-documenter": "7.7.2", - "@microsoft/api-extractor": "7.7.0", + "@microsoft/api-documenter": "7.13.68", + "@microsoft/api-extractor": "7.18.19", "@octokit/rest": "^16.35.0", "@percy/agent": "^0.28.6", "@storybook/addon-a11y": "^6.1.20", diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 67edf0cf37614..1dc7ead282927 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -4,8 +4,11 @@ ```ts +/// + import { Action } from 'history'; import Boom from '@hapi/boom'; +import { ByteSizeValue } from '@kbn/config-schema'; import { ConfigPath } from '@kbn/config'; import { DetailedPeerCertificate } from 'tls'; import { EnvironmentMode } from '@kbn/config'; @@ -16,12 +19,12 @@ import { EuiConfirmModalProps } from '@elastic/eui'; import { EuiFlyoutSize } from '@elastic/eui'; import { EuiGlobalToastListToast } from '@elastic/eui'; import { EuiOverlayMaskProps } from '@elastic/eui'; -import { History } from 'history'; +import { History as History_2 } from 'history'; import { Href } from 'history'; import { IconType } from '@elastic/eui'; import { IncomingHttpHeaders } from 'http'; -import { KibanaClient } from '@elastic/elasticsearch/lib/api/kibana'; -import { Location } from 'history'; +import type { KibanaClient } from '@elastic/elasticsearch/lib/api/kibana'; +import { Location as Location_2 } from 'history'; import { LocationDescriptorObject } from 'history'; import { Logger } from '@kbn/logging'; import { LogMeta } from '@kbn/logging'; @@ -31,21 +34,21 @@ import { Observable } from 'rxjs'; import { PackageInfo } from '@kbn/config'; import { Path } from 'history'; import { PeerCertificate } from 'tls'; -import { PublicMethodsOf } from '@kbn/utility-types'; +import type { PublicMethodsOf } from '@kbn/utility-types'; import { PublicUiSettingsParams as PublicUiSettingsParams_2 } from 'src/core/server/types'; -import React from 'react'; +import { default as React_2 } from 'react'; import { RecursiveReadonly } from '@kbn/utility-types'; -import { Request } from '@hapi/hapi'; +import { Request as Request_2 } from '@hapi/hapi'; import * as Rx from 'rxjs'; import { SchemaTypeError } from '@kbn/config-schema'; -import { TransportRequestOptions } from '@elastic/elasticsearch'; -import { TransportRequestParams } from '@elastic/elasticsearch'; -import { TransportResult } from '@elastic/elasticsearch'; +import type { TransportRequestOptions } from '@elastic/elasticsearch'; +import type { TransportRequestParams } from '@elastic/elasticsearch'; +import type { TransportResult } from '@elastic/elasticsearch'; import { Type } from '@kbn/config-schema'; import { TypeOf } from '@kbn/config-schema'; import { UiCounterMetricType } from '@kbn/analytics'; import { UnregisterCallback } from 'history'; -import { URL } from 'url'; +import { URL as URL_2 } from 'url'; import { UserProvidedValues as UserProvidedValues_2 } from 'src/core/server/types'; // @internal (undocumented) @@ -251,7 +254,7 @@ export type ChromeHelpExtensionLinkBase = Pick; // (undocumented) stop(): void; - } +} // @internal (undocumented) export const DEFAULT_APP_CATEGORIES: Record; @@ -913,7 +916,7 @@ export type HttpStart = HttpSetup; // @public export interface I18nStart { Context: ({ children }: { - children: React.ReactNode; + children: React_2.ReactNode; }) => JSX.Element; } @@ -1137,7 +1140,7 @@ export interface OverlayStart { export { PackageInfo } // @public -export interface Plugin { +interface Plugin_2 { // (undocumented) setup(core: CoreSetup, plugins: TPluginsSetup): TSetup; // (undocumented) @@ -1145,9 +1148,10 @@ export interface Plugin = (core: PluginInitializerContext) => Plugin | AsyncPlugin; +export type PluginInitializer = (core: PluginInitializerContext) => Plugin_2 | AsyncPlugin; // @public export interface PluginInitializerContext { @@ -1608,10 +1612,10 @@ export interface SavedObjectsUpdateOptions { } // @public -export class ScopedHistory implements History { - constructor(parentHistory: History, basePath: string); +export class ScopedHistory implements History_2 { + constructor(parentHistory: History_2, basePath: string); get action(): Action; - block: (prompt?: string | boolean | History.TransitionPromptHook | undefined) => UnregisterCallback; + block: (prompt?: string | boolean | History_2.TransitionPromptHook | undefined) => UnregisterCallback; createHref: (location: LocationDescriptorObject, { prependBasePath }?: { prependBasePath?: boolean | undefined; }) => Href; @@ -1620,11 +1624,11 @@ export class ScopedHistory implements History void; goForward: () => void; get length(): number; - listen: (listener: (location: Location, action: Action) => void) => UnregisterCallback; - get location(): Location; + listen: (listener: (location: Location_2, action: Action) => void) => UnregisterCallback; + get location(): Location_2; push: (pathOrLocation: Path | LocationDescriptorObject, state?: HistoryLocationState | undefined) => void; replace: (pathOrLocation: Path | LocationDescriptorObject, state?: HistoryLocationState | undefined) => void; - } +} // @public export class SimpleSavedObject { @@ -1700,7 +1704,7 @@ export class ToastsApi implements IToasts { overlays: OverlayStart; i18n: I18nStart; }): void; - } +} // @public (undocumented) export type ToastsSetup = IToasts; @@ -1755,7 +1759,6 @@ export interface UserProvidedValues { userValue?: T; } - // Warnings were encountered during analysis: // // src/core/public/core_system.ts:168:21 - (ae-forgotten-export) The symbol "InternalApplicationStart" needs to be exported by the entry point index.d.ts diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index f135d8caaf54e..18d1e479dddee 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -4,11 +4,14 @@ ```ts +/// + import { AddConfigDeprecation } from '@kbn/config'; import Boom from '@hapi/boom'; import { ByteSizeValue } from '@kbn/config-schema'; import { CliArgs } from '@kbn/config'; -import { ClientOptions } from '@elastic/elasticsearch/lib/client'; +import type { ClientOptions } from '@elastic/elasticsearch/lib/client'; +import { ConditionalType } from '@kbn/config-schema/target_types/types'; import { ConfigDeprecation } from '@kbn/config'; import { ConfigDeprecationContext } from '@kbn/config'; import { ConfigDeprecationFactory } from '@kbn/config'; @@ -26,13 +29,14 @@ import { EcsEventType } from '@kbn/logging'; import { EnvironmentMode } from '@kbn/config'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { IncomingHttpHeaders } from 'http'; -import { KibanaClient } from '@elastic/elasticsearch/lib/api/kibana'; +import type { KibanaClient } from '@elastic/elasticsearch/lib/api/kibana'; import { Logger } from '@kbn/logging'; import { LoggerFactory } from '@kbn/logging'; -import { LogLevel } from '@kbn/logging'; +import { LogLevel as LogLevel_2 } from '@kbn/logging'; +import { LogLevelId } from '@kbn/logging'; import { LogMeta } from '@kbn/logging'; import { LogRecord } from '@kbn/logging'; -import { MaybePromise } from '@kbn/utility-types'; +import type { MaybePromise } from '@kbn/utility-types'; import { ObjectType } from '@kbn/config-schema'; import { Observable } from 'rxjs'; import { PackageInfo } from '@kbn/config'; @@ -41,20 +45,20 @@ import { PeerCertificate } from 'tls'; import { PublicMethodsOf } from '@kbn/utility-types'; import { Readable } from 'stream'; import { RecursiveReadonly } from '@kbn/utility-types'; -import { Request } from '@hapi/hapi'; -import { RequestHandlerContext as RequestHandlerContext_2 } from 'src/core/server'; +import { Request as Request_2 } from '@hapi/hapi'; +import type { RequestHandlerContext as RequestHandlerContext_2 } from 'src/core/server'; import { ResponseObject } from '@hapi/hapi'; import { ResponseToolkit } from '@hapi/hapi'; import { SchemaTypeError } from '@kbn/config-schema'; import { ShallowPromise } from '@kbn/utility-types'; import { Stream } from 'stream'; -import { TransportRequestOptions } from '@elastic/elasticsearch'; -import { TransportRequestParams } from '@elastic/elasticsearch'; -import { TransportResult } from '@elastic/elasticsearch'; +import type { TransportRequestOptions } from '@elastic/elasticsearch'; +import type { TransportRequestParams } from '@elastic/elasticsearch'; +import type { TransportResult } from '@elastic/elasticsearch'; import { Type } from '@kbn/config-schema'; import { TypeOf } from '@kbn/config-schema'; import { UiCounterMetricType } from '@kbn/analytics'; -import { URL } from 'url'; +import { URL as URL_2 } from 'url'; export { AddConfigDeprecation } @@ -223,42 +227,42 @@ export type CapabilitiesSwitcher = (request: KibanaRequest, uiCapabilities: Capa // @alpha export const config: { elasticsearch: { - schema: import("@kbn/config-schema").ObjectType<{ - sniffOnStart: Type; - sniffInterval: Type; - sniffOnConnectionFault: Type; - hosts: Type; - username: Type; - password: Type; - serviceAccountToken: Type; - requestHeadersWhitelist: Type; - customHeaders: Type>; - shardTimeout: Type; - requestTimeout: Type; - pingTimeout: Type; - logQueries: Type; - ssl: import("@kbn/config-schema").ObjectType<{ - verificationMode: Type<"none" | "certificate" | "full">; - certificateAuthorities: Type; - certificate: Type; - key: Type; - keyPassphrase: Type; - keystore: import("@kbn/config-schema").ObjectType<{ - path: Type; - password: Type; - }>; - truststore: import("@kbn/config-schema").ObjectType<{ - path: Type; - password: Type; - }>; - alwaysPresentCertificate: Type; - }>; - apiVersion: Type; - healthCheck: import("@kbn/config-schema").ObjectType<{ - delay: Type; - }>; - ignoreVersionMismatch: import("@kbn/config-schema/target_types/types").ConditionalType; - skipStartupConnectionCheck: import("@kbn/config-schema/target_types/types").ConditionalType; + schema: ObjectType< { + sniffOnStart: Type; + sniffInterval: Type; + sniffOnConnectionFault: Type; + hosts: Type; + username: Type; + password: Type; + serviceAccountToken: Type; + requestHeadersWhitelist: Type; + customHeaders: Type>; + shardTimeout: Type; + requestTimeout: Type; + pingTimeout: Type; + logQueries: Type; + ssl: ObjectType< { + verificationMode: Type<"none" | "certificate" | "full">; + certificateAuthorities: Type; + certificate: Type; + key: Type; + keyPassphrase: Type; + keystore: ObjectType< { + path: Type; + password: Type; + }>; + truststore: ObjectType< { + path: Type; + password: Type; + }>; + alwaysPresentCertificate: Type; + }>; + apiVersion: Type; + healthCheck: ObjectType< { + delay: Type; + }>; + ignoreVersionMismatch: ConditionalType; + skipStartupConnectionCheck: ConditionalType; }>; }; logging: { @@ -770,8 +774,6 @@ export interface CountResponse { // @public export class CspConfig implements ICspConfig { - // (undocumented) - #private; // Warning: (ae-forgotten-export) The symbol "CspConfigType" needs to be exported by the entry point index.d.ts // // @internal @@ -988,7 +990,7 @@ export type ExecutionContextStart = ExecutionContextSetup; // @public export interface FakeRequest { - headers: Headers; + headers: Headers_2; } // @public (undocumented) @@ -1046,11 +1048,12 @@ export type HandlerFunction = (context: T, ...args: any[]) => export type HandlerParameters> = T extends (context: any, ...args: infer U) => any ? U : never; // @public -export type Headers = { +type Headers_2 = { [header in KnownHeaders]?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }; +export { Headers_2 as Headers } // @public (undocumented) export interface HttpAuth { @@ -1315,8 +1318,8 @@ export type KibanaExecutionContext = { // @public export class KibanaRequest { // @internal (undocumented) - protected readonly [requestSymbol]: Request; - constructor(request: Request, params: Params, query: Query, body: Body, withoutSecretHeaders: boolean); + protected readonly [requestSymbol]: Request_2; + constructor(request: Request_2, params: Params, query: Query, body: Body, withoutSecretHeaders: boolean); // (undocumented) readonly auth: { isAuthenticated: boolean; @@ -1327,21 +1330,21 @@ export class KibanaRequest(req: Request, routeSchemas?: RouteValidator | RouteValidatorFullConfig, withoutSecretHeaders?: boolean): KibanaRequest; - readonly headers: Headers; + static from(req: Request_2, routeSchemas?: RouteValidator | RouteValidatorFullConfig, withoutSecretHeaders?: boolean): KibanaRequest; + readonly headers: Headers_2; readonly id: string; readonly isSystemRequest: boolean; // (undocumented) readonly params: Params; // (undocumented) readonly query: Query; - readonly rewrittenUrl?: URL; + readonly rewrittenUrl?: URL_2; readonly route: RecursiveReadonly>; // (undocumented) readonly socket: IKibanaSocket; - readonly url: URL; + readonly url: URL_2; readonly uuid: string; - } +} // @public export interface KibanaRequestEvents { @@ -1415,7 +1418,7 @@ export interface LoggingServiceSetup { configure(config$: Observable): void; } -export { LogLevel } +export { LogLevel_2 as LogLevel } export { LogMeta } @@ -1597,7 +1600,7 @@ export interface OpsServerMetrics { export { PackageInfo } // @public -export interface Plugin { +interface Plugin_2 { // (undocumented) setup(core: CoreSetup, plugins: TPluginsSetup): TSetup; // (undocumented) @@ -1605,10 +1608,11 @@ export interface Plugin { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: Reexported declarations are not supported + // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver deprecations?: ConfigDeprecationProvider; exposeToBrowser?: { [P in keyof T]?: boolean; @@ -1621,7 +1625,7 @@ export interface PluginConfigDescriptor { export type PluginConfigSchema = Type; // @public -export type PluginInitializer = (core: PluginInitializerContext) => Plugin | PrebootPlugin | AsyncPlugin; +export type PluginInitializer = (core: PluginInitializerContext) => Plugin_2 | PrebootPlugin | AsyncPlugin; // @public export interface PluginInitializerContext { @@ -1640,7 +1644,7 @@ export interface PluginInitializerContext { instanceUuid: string; configs: readonly string[]; }; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: Reexported declarations are not supported + // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver logger: LoggerFactory; // (undocumented) opaqueId: PluginOpaqueId; @@ -1648,7 +1652,7 @@ export interface PluginInitializerContext { // @public export interface PluginManifest { - // Warning: (ae-unresolved-link) The @link reference could not be resolved: Reexported declarations are not supported + // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver readonly configPath: ConfigPath; readonly description?: string; // @deprecated @@ -2072,7 +2076,7 @@ export class SavedObjectsClient { removeReferencesTo(type: string, id: string, options?: SavedObjectsRemoveReferencesToOptions): Promise; resolve(type: string, id: string, options?: SavedObjectsBaseOptions): Promise>; update(type: string, id: string, attributes: Partial, options?: SavedObjectsUpdateOptions): Promise>; - updateObjectsSpaces(objects: SavedObjectsUpdateObjectsSpacesObject[], spacesToAdd: string[], spacesToRemove: string[], options?: SavedObjectsUpdateObjectsSpacesOptions): Promise; + updateObjectsSpaces(objects: SavedObjectsUpdateObjectsSpacesObject[], spacesToAdd: string[], spacesToRemove: string[], options?: SavedObjectsUpdateObjectsSpacesOptions): Promise; } // @public @@ -2251,17 +2255,15 @@ export interface SavedObjectsExportByTypeOptions extends SavedObjectExportBaseOp // @public (undocumented) export class SavedObjectsExporter { - // (undocumented) - #private; constructor({ savedObjectsClient, typeRegistry, exportSizeLimit, logger, }: { savedObjectsClient: SavedObjectsClientContract; typeRegistry: ISavedObjectTypeRegistry; exportSizeLimit: number; logger: Logger; }); - exportByObjects(options: SavedObjectsExportByObjectOptions): Promise; - exportByTypes(options: SavedObjectsExportByTypeOptions): Promise; - } + exportByObjects(options: SavedObjectsExportByObjectOptions): Promise; + exportByTypes(options: SavedObjectsExportByTypeOptions): Promise; +} // @public (undocumented) export class SavedObjectsExportError extends Error { @@ -2404,8 +2406,6 @@ export interface SavedObjectsImportConflictError { // @public (undocumented) export class SavedObjectsImporter { - // (undocumented) - #private; constructor({ savedObjectsClient, typeRegistry, importSizeLimit, }: { savedObjectsClient: SavedObjectsClientContract; typeRegistry: ISavedObjectTypeRegistry; @@ -2655,7 +2655,7 @@ export class SavedObjectsRepository { bulkUpdate(objects: Array>, options?: SavedObjectsBulkUpdateOptions): Promise>; checkConflicts(objects?: SavedObjectsCheckConflictsObject[], options?: SavedObjectsBaseOptions): Promise; closePointInTime(id: string, options?: SavedObjectsClosePointInTimeOptions): Promise; - collectMultiNamespaceReferences(objects: SavedObjectsCollectMultiNamespaceReferencesObject[], options?: SavedObjectsCollectMultiNamespaceReferencesOptions): Promise; + collectMultiNamespaceReferences(objects: SavedObjectsCollectMultiNamespaceReferencesObject[], options?: SavedObjectsCollectMultiNamespaceReferencesOptions): Promise; create(type: string, attributes: T, options?: SavedObjectsCreateOptions): Promise>; createPointInTimeFinder(findOptions: SavedObjectsCreatePointInTimeFinderOptions, dependencies?: SavedObjectsCreatePointInTimeFinderDependencies): ISavedObjectsPointInTimeFinder; // Warning: (ae-forgotten-export) The symbol "IKibanaMigrator" needs to be exported by the entry point index.d.ts @@ -2672,8 +2672,8 @@ export class SavedObjectsRepository { removeReferencesTo(type: string, id: string, options?: SavedObjectsRemoveReferencesToOptions): Promise; resolve(type: string, id: string, options?: SavedObjectsBaseOptions): Promise>; update(type: string, id: string, attributes: Partial, options?: SavedObjectsUpdateOptions): Promise>; - updateObjectsSpaces(objects: SavedObjectsUpdateObjectsSpacesObject[], spacesToAdd: string[], spacesToRemove: string[], options?: SavedObjectsUpdateObjectsSpacesOptions): Promise; - } + updateObjectsSpaces(objects: SavedObjectsUpdateObjectsSpacesObject[], spacesToAdd: string[], spacesToRemove: string[], options?: SavedObjectsUpdateObjectsSpacesOptions): Promise; +} // @public export interface SavedObjectsRepositoryFactory { @@ -2705,7 +2705,7 @@ export class SavedObjectsSerializer { isRawSavedObject(doc: SavedObjectsRawDoc, options?: SavedObjectsRawDocParseOptions): boolean; rawToSavedObject(doc: SavedObjectsRawDoc, options?: SavedObjectsRawDocParseOptions): SavedObjectSanitizedDoc; savedObjectToRaw(savedObj: SavedObjectSanitizedDoc): SavedObjectsRawDoc; - } +} // @public export interface SavedObjectsServiceSetup { @@ -2851,7 +2851,7 @@ export class SavedObjectTypeRegistry { isShareable(type: string): boolean; isSingleNamespace(type: string): boolean; registerType(type: SavedObjectsType): void; - } +} // @public export type SavedObjectUnsanitizedDoc = SavedObjectDoc & Partial; @@ -3053,7 +3053,6 @@ export interface UserProvidedValues { // @public export const validBodyOutput: readonly ["data", "stream"]; - // Warnings were encountered during analysis: // // src/core/server/elasticsearch/client/types.ts:93:7 - (ae-forgotten-export) The symbol "Explanation" needs to be exported by the entry point index.d.ts diff --git a/yarn.lock b/yarn.lock index a4739826997ef..7a66ff2bf4127 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4204,68 +4204,60 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== -"@microsoft/api-documenter@7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.7.2.tgz#b6897f052ad447d6bb74f806287e8846c64691da" - integrity sha512-4mWE5G3grYd4PX5D6awiKa3B3GOXumkyGspgeTwlOBxrmj0FuVFRNPVZxGU0NqYnaw/bW4cg4ftUnSDzycrW+A== - dependencies: - "@microsoft/api-extractor-model" "7.7.0" - "@microsoft/node-core-library" "3.18.0" - "@microsoft/ts-command-line" "4.3.5" - "@microsoft/tsdoc" "0.12.14" +"@microsoft/api-documenter@7.13.68": + version "7.13.68" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.13.68.tgz#c1e144764cac0684adefe78fd848d78c3f374681" + integrity sha512-cRjwK1TDyGxFGgCsRG8G0Yi3Z4akvfWgw1pWAxKFbm7ajlQQGZcHPnb+n4lKlSeQ5g/cxc7hcdw54Mvisne9Bg== + dependencies: + "@microsoft/api-extractor-model" "7.13.16" + "@microsoft/tsdoc" "0.13.2" + "@rushstack/node-core-library" "3.43.2" + "@rushstack/ts-command-line" "4.10.4" colors "~1.2.1" js-yaml "~3.13.1" - resolve "1.8.1" - -"@microsoft/api-extractor-model@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.7.0.tgz#a5e86a638fa3fea283aeebc4785d8150652f30c6" - integrity sha512-9yrSr9LpdNnx7X8bXVb/YbcQopizsr43McAG7Xno5CMNFzbSkmIr8FJL0L+WGfrSWSTms9Bngfz7d1ScP6zbWQ== - dependencies: - "@microsoft/node-core-library" "3.18.0" - "@microsoft/tsdoc" "0.12.14" - -"@microsoft/api-extractor@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.7.0.tgz#1550a5b88ca927d57e9c9698356a2f9375c5984c" - integrity sha512-1ngy95VA1s7GTE+bkS7QoYTg/TZs54CdJ46uAhl6HlyDJut4p/aH46W70g2XQs9VniIymW1Qe6fqNmcQUx5CVg== - dependencies: - "@microsoft/api-extractor-model" "7.7.0" - "@microsoft/node-core-library" "3.18.0" - "@microsoft/ts-command-line" "4.3.5" - "@microsoft/tsdoc" "0.12.14" + resolve "~1.17.0" + +"@microsoft/api-extractor-model@7.13.16": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.16.tgz#1d67541ebbcea32672c5fdd9392dc1579b2fc23a" + integrity sha512-ttdxVXsTWL5dd26W1YNLe3LgDsE0EE273aZlcLe58W0opymBybCYU1Mn+OHQM8BuErrdvdN8LdpWAAbkiOEN/Q== + dependencies: + "@microsoft/tsdoc" "0.13.2" + "@microsoft/tsdoc-config" "~0.15.2" + "@rushstack/node-core-library" "3.43.2" + +"@microsoft/api-extractor@7.18.19": + version "7.18.19" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.19.tgz#f09afc1c210aa67e2f3f34b0a68281a12f144541" + integrity sha512-aY+/XR7PtQXtnqNPFRs3/+iVRlQJpo6uLTjO2g7PqmnMywl3GBU3bCgAlV/khZtAQbIs6Le57XxmSE6rOqbcfg== + dependencies: + "@microsoft/api-extractor-model" "7.13.16" + "@microsoft/tsdoc" "0.13.2" + "@microsoft/tsdoc-config" "~0.15.2" + "@rushstack/node-core-library" "3.43.2" + "@rushstack/rig-package" "0.3.5" + "@rushstack/ts-command-line" "4.10.4" colors "~1.2.1" lodash "~4.17.15" - resolve "1.8.1" + resolve "~1.17.0" + semver "~7.3.0" source-map "~0.6.1" - typescript "~3.7.2" + typescript "~4.4.2" -"@microsoft/node-core-library@3.18.0": - version "3.18.0" - resolved "https://registry.yarnpkg.com/@microsoft/node-core-library/-/node-core-library-3.18.0.tgz#9a9123354b3e067bb8a975ba791959ffee1322ed" - integrity sha512-VzzSHtcwgHVW1xbHqpngfn+OS1trAZ1Tw3XXBlMsEKe7Wz7FF2gLr0hZa6x9Pemk5pkd4tu4+GTSOJjCKGjrgg== +"@microsoft/tsdoc-config@~0.15.2": + version "0.15.2" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz#eb353c93f3b62ab74bdc9ab6f4a82bcf80140f14" + integrity sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA== dependencies: - "@types/node" "8.10.54" - colors "~1.2.1" - fs-extra "~7.0.1" + "@microsoft/tsdoc" "0.13.2" + ajv "~6.12.6" jju "~1.4.0" - semver "~5.3.0" - timsort "~0.3.0" - z-schema "~3.18.3" + resolve "~1.19.0" -"@microsoft/ts-command-line@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@microsoft/ts-command-line/-/ts-command-line-4.3.5.tgz#78026d20244f39978d3397849ac8c40c0c2d4079" - integrity sha512-CN3j86apNOmllUmeJ0AyRfTYA2BP2xlnfgmnyp1HWLqcJmR/zLe/fk/+gohGnNt7o5/qHta3681LQhO2Yy3GFw== - dependencies: - "@types/argparse" "1.0.33" - argparse "~1.0.9" - colors "~1.2.1" - -"@microsoft/tsdoc@0.12.14": - version "0.12.14" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.14.tgz#0e0810a0a174e50e22dfe8edb30599840712f22d" - integrity sha512-518yewjSga1jLdiLrcmpMFlaba5P+50b0TWNFUpC+SL9Yzf0kMi57qw+bMl+rQ08cGqH1vLx4eg9YFUbZXgZ0Q== +"@microsoft/tsdoc@0.13.2": + version "0.13.2" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz#3b0efb6d3903bd49edb073696f60e90df08efb26" + integrity sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg== "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" @@ -4786,6 +4778,39 @@ redux-thunk "^2.3.0" reselect "^4.0.0" +"@rushstack/node-core-library@3.43.2": + version "3.43.2" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.43.2.tgz#f067371a94fd92ed8f9d9aa8201c5e9e17a19f0f" + integrity sha512-b7AEhSf6CvZgvuDcWMFDeKx2mQSn9AVnMQVyxNxFeHCtLz3gJicqCOlw2GOXM8HKh6PInLdil/NVCDcstwSrIw== + dependencies: + "@types/node" "12.20.24" + colors "~1.2.1" + fs-extra "~7.0.1" + import-lazy "~4.0.0" + jju "~1.4.0" + resolve "~1.17.0" + semver "~7.3.0" + timsort "~0.3.0" + z-schema "~3.18.3" + +"@rushstack/rig-package@0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.5.tgz#7ddab0994647837bab8fdef26f990f1774d82e78" + integrity sha512-CvqWw+E81U5lRBN/lUj7Ngr/XQa/PPb2jAS5QcLP7WL+IMUl+3+Cc2qYrsDoB4zke81kz+usWGmBQpBzGMLmAA== + dependencies: + resolve "~1.17.0" + strip-json-comments "~3.1.1" + +"@rushstack/ts-command-line@4.10.4": + version "4.10.4" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.10.4.tgz#05142b74e5cb207d3dd9b935c82f80d7fcb68042" + integrity sha512-4T5ao4UgDb6LmiRj4GumvG3VT/p6RSMgl7TN7S58ifaAGN2GeTNBajFCDdJs9QQP0d/4tA5p0SFzT7Ps5Byirg== + dependencies: + "@types/argparse" "1.0.38" + argparse "~1.0.9" + colors "~1.2.1" + string-argv "~0.3.1" + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" @@ -5846,10 +5871,10 @@ dependencies: "@types/glob" "*" -"@types/argparse@1.0.33": - version "1.0.33" - resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.33.tgz#2728669427cdd74a99e53c9f457ca2866a37c52d" - integrity sha512-VQgHxyPMTj3hIlq9SY1mctqx+Jj8kpQfoLvDlVSDNOyuYs8JYfkuY3OW/4+dO657yPmNhHpePRx0/Tje5ImNVQ== +"@types/argparse@1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== "@types/aria-query@^4.2.0": version "4.2.0" @@ -6674,7 +6699,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@16.10.2", "@types/node@8.10.54", "@types/node@>= 8", "@types/node@>=8.9.0", "@types/node@^10.1.0", "@types/node@^14.14.31": +"@types/node@*", "@types/node@12.20.24", "@types/node@16.10.2", "@types/node@>= 8", "@types/node@>=8.9.0", "@types/node@^10.1.0", "@types/node@^14.14.31": version "16.10.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.2.tgz#5764ca9aa94470adb4e1185fe2e9f19458992b2e" integrity sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ== @@ -7901,7 +7926,7 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.11.0, ajv@^6.12.5: +ajv@^6.11.0, ajv@^6.12.5, ajv@~6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -16817,7 +16842,7 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= -import-lazy@^4.0.0: +import-lazy@^4.0.0, import-lazy@~4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== @@ -17191,7 +17216,7 @@ is-color-stop@^1.0.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" -is-core-module@^2.2.0: +is-core-module@^2.1.0, is-core-module@^2.2.0: version "2.7.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3" integrity sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ== @@ -22285,7 +22310,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3" integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg== -path-parse@^1.0.5, path-parse@^1.0.6: +path-parse@^1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -25342,13 +25367,6 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - resolve@^1.1.10, resolve@^1.1.4, resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.3.2, resolve@^1.3.3, resolve@^1.4.0, resolve@^1.7.1, resolve@^1.8.1: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" @@ -25372,6 +25390,21 @@ resolve@~1.10.1: dependencies: path-parse "^1.0.6" +resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@~1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -25840,18 +25873,13 @@ semver@^7.2.1, semver@^7.3.2, semver@~7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^7.3.4, semver@^7.3.5: +semver@^7.3.4, semver@^7.3.5, semver@~7.3.0: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" -semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= - send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -26890,6 +26918,11 @@ string-argv@0.0.2: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" integrity sha1-2sMECGkMIfPDYwo/86BYd73L1zY= +string-argv@~0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + string-length@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" @@ -27116,7 +27149,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -28468,7 +28501,7 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@4.1.3, typescript@^3.3.3333, typescript@^3.5.3, typescript@^4.3.5, typescript@~3.7.2, typescript@~4.1.2: +typescript@4.1.3, typescript@^3.3.3333, typescript@^3.5.3, typescript@^4.3.5, typescript@~4.1.2, typescript@~4.4.2: version "4.1.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== From 808385b108a8891fac22655a16e4a6855ee5a8e9 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Fri, 12 Nov 2021 09:01:42 +0100 Subject: [PATCH 10/23] remove unused es client (#118426) --- src/plugins/telemetry/server/fetcher.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/plugins/telemetry/server/fetcher.ts b/src/plugins/telemetry/server/fetcher.ts index 97180f351986e..77770227a887d 100644 --- a/src/plugins/telemetry/server/fetcher.ts +++ b/src/plugins/telemetry/server/fetcher.ts @@ -16,7 +16,6 @@ import { SavedObjectsClientContract, SavedObjectsClient, CoreStart, - ICustomClusterClient, } from '../../../core/server'; import { getTelemetryChannelEndpoint, @@ -53,7 +52,6 @@ export class FetcherTask { private isSending = false; private internalRepository?: SavedObjectsClientContract; private telemetryCollectionManager?: TelemetryCollectionManagerPluginStart; - private elasticsearchClient?: ICustomClusterClient; constructor(initializerContext: PluginInitializerContext) { this.config$ = initializerContext.config.create(); @@ -67,7 +65,6 @@ export class FetcherTask { ) { this.internalRepository = new SavedObjectsClient(savedObjects.createInternalRepository()); this.telemetryCollectionManager = telemetryCollectionManager; - this.elasticsearchClient = elasticsearch.createClient('telemetry-fetcher'); this.intervalId = timer(this.initialCheckDelayMs, this.checkIntervalMs).subscribe(() => this.sendIfDue() @@ -78,9 +75,6 @@ export class FetcherTask { if (this.intervalId) { this.intervalId.unsubscribe(); } - if (this.elasticsearchClient) { - this.elasticsearchClient.close(); - } } private async areAllCollectorsReady() { From 64e0aafc834f1ba212ddce8db0b0a5c9697cd024 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Fri, 12 Nov 2021 11:07:29 +0300 Subject: [PATCH 11/23] [Lens] Auto height setting for table (#116156) * Add setting which allow user to fit row to content * Fix lint * Change icon * Fix switch behavior * Fix some nits * Fix comments * Fix lint * Fix lint Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../common/expressions/datatable/datatable.ts | 5 ++ .../components/cell_value.tsx | 9 +++- .../components/table_basic.tsx | 18 ++++++- .../components/toolbar.tsx | 54 +++++++++++++++++++ .../datatable_visualization/visualization.tsx | 13 ++++- 5 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 x-pack/plugins/lens/public/datatable_visualization/components/toolbar.tsx diff --git a/x-pack/plugins/lens/common/expressions/datatable/datatable.ts b/x-pack/plugins/lens/common/expressions/datatable/datatable.ts index d9f1f9c1196ff..7a6d68eaa6566 100644 --- a/x-pack/plugins/lens/common/expressions/datatable/datatable.ts +++ b/x-pack/plugins/lens/common/expressions/datatable/datatable.ts @@ -22,6 +22,7 @@ export interface DatatableArgs { columns: ColumnConfigArg[]; sortingColumnId: SortingState['columnId']; sortingDirection: SortingState['direction']; + fitRowToContent?: boolean; } export const getDatatable = ( @@ -57,6 +58,10 @@ export const getDatatable = ( types: ['string'], help: '', }, + fitRowToContent: { + types: ['boolean'], + help: '', + }, }, async fn(...args) { /** Build optimization: prevent adding extra code into initial bundle **/ diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx index 6d6b2e4b1013f..a609b4b2a6e5f 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx @@ -8,6 +8,7 @@ import React, { useContext, useEffect } from 'react'; import { EuiDataGridCellValueElementProps } from '@elastic/eui'; import { IUiSettingsClient } from 'kibana/public'; +import classNames from 'classnames'; import type { FormatFactory } from '../../../common'; import { getOriginalId } from '../../../common/expressions'; import type { ColumnConfig } from '../../../common/expressions'; @@ -18,7 +19,8 @@ export const createGridCell = ( formatters: Record>, columnConfig: ColumnConfig, DataContext: React.Context, - uiSettings: IUiSettingsClient + uiSettings: IUiSettingsClient, + fitRowToContent?: boolean ) => { // Changing theme requires a full reload of the page, so we can cache here const IS_DARK_THEME = uiSettings.get('theme:darkMode'); @@ -28,6 +30,9 @@ export const createGridCell = ( const content = formatters[columnId]?.convert(rowValue, 'html'); const currentAlignment = alignments && alignments[columnId]; const alignmentClassName = `lnsTableCell--${currentAlignment}`; + const className = classNames(alignmentClassName, { + lnsTableCell: !fitRowToContent, + }); const { colorMode, palette } = columnConfig.columns.find(({ columnId: id }) => id === columnId) || {}; @@ -75,7 +80,7 @@ export const createGridCell = ( */ dangerouslySetInnerHTML={{ __html: content }} // eslint-disable-line react/no-danger data-test-subj="lnsTableCellContent" - className={`lnsTableCell ${alignmentClassName}`} + className={className} /> ); }; diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx index f627a3ef8ff91..ec7a00442f950 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx @@ -262,8 +262,15 @@ export const DatatableComponent = (props: DatatableRenderProps) => { }, [firstTableRef, onRowContextMenuClick, columnConfig, hasAtLeastOneRowClickAction]); const renderCellValue = useMemo( - () => createGridCell(formatters, columnConfig, DataContext, props.uiSettings), - [formatters, columnConfig, props.uiSettings] + () => + createGridCell( + formatters, + columnConfig, + DataContext, + props.uiSettings, + props.args.fitRowToContent + ), + [formatters, columnConfig, props.uiSettings, props.args.fitRowToContent] ); const columnVisibility = useMemo( @@ -349,6 +356,13 @@ export const DatatableComponent = (props: DatatableRenderProps) => { ) { + const { state, setState } = props; + + const onChange = useCallback(() => { + const current = state.fitRowToContent ?? false; + setState({ + ...state, + fitRowToContent: !current, + }); + }, [setState, state]); + + return ( + + + + + + + + ); +} diff --git a/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx b/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx index b21b8b8e07b36..a953da4c380f0 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx @@ -24,12 +24,13 @@ import { getStopsForFixedMode } from '../shared_components'; import { LayerType, layerTypes } from '../../common'; import { getDefaultSummaryLabel } from '../../common/expressions'; import type { ColumnState, SortingState } from '../../common/expressions'; - +import { DataTableToolbar } from './components/toolbar'; export interface DatatableVisualizationState { columns: ColumnState[]; layerId: string; layerType: LayerType; sorting?: SortingState; + fitRowToContent?: boolean; } const visualizationLabel = i18n.translate('xpack.lens.datatable.label', { @@ -389,6 +390,7 @@ export const getDatatableVisualization = ({ }), sortingColumnId: [state.sorting?.columnId || ''], sortingDirection: [state.sorting?.direction || 'none'], + fitRowToContent: [state.fitRowToContent ?? false], }, }, ], @@ -399,6 +401,15 @@ export const getDatatableVisualization = ({ return undefined; }, + renderToolbar(domElement, props) { + render( + + + , + domElement + ); + }, + onEditAction(state, event) { switch (event.data.action) { case 'sort': From 2f45be98a215420de2e7d9d5398cb7612891c071 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Fri, 12 Nov 2021 11:54:10 +0100 Subject: [PATCH 12/23] retry all suggestion checks (#118310) --- test/functional/apps/visualize/_timelion.ts | 23 ++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/test/functional/apps/visualize/_timelion.ts b/test/functional/apps/visualize/_timelion.ts index afbcba7df5216..f8991e17319bd 100644 --- a/test/functional/apps/visualize/_timelion.ts +++ b/test/functional/apps/visualize/_timelion.ts @@ -265,8 +265,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await monacoEditor.typeCodeEditorValue('.es(index=', 'timelionCodeEditor'); // wait for index patterns will be loaded await common.sleep(500); - const suggestions = await timelion.getSuggestionItemsText(); - expect(suggestions[0].includes('log')).to.eql(true); + // other suggestions might be shown for a short amount of time - retry until metric suggestions show up + await retry.try(async () => { + const suggestions = await timelion.getSuggestionItemsText(); + expect(suggestions[0].includes('log')).to.eql(true); + }); }); it('should show field suggestions for timefield argument when index pattern set', async () => { @@ -275,9 +278,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { '.es(index=logstash-*, timefield=', 'timelionCodeEditor' ); - const suggestions = await timelion.getSuggestionItemsText(); - expect(suggestions.length).to.eql(4); - expect(suggestions[0].includes('@timestamp')).to.eql(true); + // other suggestions might be shown for a short amount of time - retry until metric suggestions show up + await retry.try(async () => { + const suggestions = await timelion.getSuggestionItemsText(); + expect(suggestions.length).to.eql(4); + expect(suggestions[0].includes('@timestamp')).to.eql(true); + }); }); it('should show field suggestions for split argument when index pattern set', async () => { @@ -288,9 +294,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ); // wait for split fields to load await common.sleep(300); - const suggestions = await timelion.getSuggestionItemsText(); + // other suggestions might be shown for a short amount of time - retry until metric suggestions show up + await retry.try(async () => { + const suggestions = await timelion.getSuggestionItemsText(); - expect(suggestions[0].includes('@message.raw')).to.eql(true); + expect(suggestions[0].includes('@message.raw')).to.eql(true); + }); }); it('should show field suggestions for metric argument when index pattern set', async () => { From 1d49415f3d24257b84921b1256141069bb7520aa Mon Sep 17 00:00:00 2001 From: Oliver Gupte Date: Fri, 12 Nov 2021 05:55:03 -0500 Subject: [PATCH 13/23] [Observability] Fixes incorrect link from empty data message (#118450) (#118451) --- x-pack/plugins/observability/public/utils/no_data_config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability/public/utils/no_data_config.ts b/x-pack/plugins/observability/public/utils/no_data_config.ts index c8e7daaf688bc..fdd70401e7097 100644 --- a/x-pack/plugins/observability/public/utils/no_data_config.ts +++ b/x-pack/plugins/observability/public/utils/no_data_config.ts @@ -32,7 +32,7 @@ export function getNoDataConfig({ defaultMessage: 'Use Beats and APM agents to send observability data to Elasticsearch. We make it easy with support for many popular systems, apps, and languages.', }), - href: basePath.prepend(`/app/home#/tutorial/apm`), + href: basePath.prepend(`/app/integrations/browse`), }, }, docsLink, From 0b4ede75cf03d414c4e6e219608c32e2bb1ccdc3 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Fri, 12 Nov 2021 12:33:38 +0100 Subject: [PATCH 14/23] [Exploratory view] Only show metric loading for relevant series (#118299) --- .../shared/exploratory_view/rtl_helpers.tsx | 5 +- .../report_metric_options.test.tsx | 55 +++++++++++++++++++ .../series_editor/report_metric_options.tsx | 2 +- 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx index 612cbfcc4bfdf..04d74844beb83 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx @@ -23,7 +23,7 @@ import { ObservabilityPublicPluginsStart } from '../../../plugin'; import { EuiThemeProvider } from '../../../../../../../src/plugins/kibana_react/common'; import { lensPluginMock } from '../../../../../lens/public/mocks'; import * as useAppIndexPatternHook from './hooks/use_app_index_pattern'; -import { IndexPatternContextProvider } from './hooks/use_app_index_pattern'; +import { IndexPatternContext, IndexPatternContextProvider } from './hooks/use_app_index_pattern'; import { AllSeries, SeriesContextValue, UrlStorageContext } from './hooks/use_series_storage'; import * as fetcherHook from '../../../hooks/use_fetcher'; @@ -234,7 +234,7 @@ export const mockUseHasData = () => { return { spy, onRefreshTimeRange }; }; -export const mockAppIndexPattern = () => { +export const mockAppIndexPattern = (props?: Partial) => { const loadIndexPattern = jest.fn(); const spy = jest.spyOn(useAppIndexPatternHook, 'useAppIndexPatternContext').mockReturnValue({ indexPattern: mockIndexPattern, @@ -244,6 +244,7 @@ export const mockAppIndexPattern = () => { loadIndexPattern, indexPatterns: { ux: mockIndexPattern } as unknown as Record, indexPatternErrors: {} as any, + ...(props || {}), }); return { spy, loadIndexPattern }; }; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx new file mode 100644 index 0000000000000..767b765ba1f19 --- /dev/null +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx @@ -0,0 +1,55 @@ +/* + * 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 { screen } from '@testing-library/react'; +import { mockAppIndexPattern, mockIndexPattern, mockUxSeries, render } from '../rtl_helpers'; +import { getDefaultConfigs } from '../configurations/default_configs'; +import { PERCENTILE } from '../configurations/constants'; +import { ReportMetricOptions } from './report_metric_options'; + +describe('ReportMetricOptions', function () { + const dataViewSeries = getDefaultConfigs({ + reportType: 'kpi-over-time', + indexPattern: mockIndexPattern, + dataType: 'ux', + }); + + it('should render properly', async function () { + render( + + ); + + expect(await screen.findByText('No data available')).toBeInTheDocument(); + }); + + it('should display loading if index pattern is not available and is loading', async function () { + mockAppIndexPattern({ loading: true, indexPatterns: undefined }); + const { container } = render( + + ); + + expect(container.getElementsByClassName('euiLoadingSpinner').length).toBe(1); + }); + + it('should not display loading if index pattern is already loaded', async function () { + mockAppIndexPattern({ loading: true }); + render( + + ); + + expect(await screen.findByText('Page load time')).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.tsx index 410356d0078d8..bc7c2328dcbba 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.tsx @@ -127,7 +127,7 @@ export function ReportMetricOptions({ seriesId, series, seriesConfig }: Props) { )} {series.selectedMetricField && - (indexPattern && !loading ? ( + (indexPattern ? ( Date: Fri, 12 Nov 2021 15:36:19 +0100 Subject: [PATCH 15/23] unskip lens dashboard tests (#118308) --- x-pack/test/functional/apps/lens/dashboard.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional/apps/lens/dashboard.ts b/x-pack/test/functional/apps/lens/dashboard.ts index e5ae900b4ed38..cef3650db7d04 100644 --- a/x-pack/test/functional/apps/lens/dashboard.ts +++ b/x-pack/test/functional/apps/lens/dashboard.ts @@ -34,8 +34,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.getActions().move({ x, y, origin: el._webElement }).click().perform(); } - // FLAKY: https://github.com/elastic/kibana/issues/117770 - describe.skip('lens dashboard tests', () => { + describe('lens dashboard tests', () => { before(async () => { await PageObjects.common.navigateToApp('dashboard'); await security.testUser.setRoles( @@ -70,7 +69,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await find.clickByButtonText('lnsXYvis'); await dashboardAddPanel.closeAddPanel(); await PageObjects.lens.goToTimeRange(); - await clickInChart(6, 5); // hardcoded position of bar, depends heavy on data and charts implementation + await retry.try(async () => { + await clickInChart(6, 5); // hardcoded position of bar, depends heavy on data and charts implementation + await testSubjects.existOrFail('applyFiltersPopoverButton'); + }); await retry.try(async () => { await testSubjects.click('applyFiltersPopoverButton'); From f22c57d54063ebbedea685c5d21cdbf80bc2fa99 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 12 Nov 2021 19:54:18 +0000 Subject: [PATCH 16/23] skip flaky suite (#118476) --- x-pack/test/functional/apps/uptime/ping_redirects.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/uptime/ping_redirects.ts b/x-pack/test/functional/apps/uptime/ping_redirects.ts index 03185ac9f1466..06352d37ada28 100644 --- a/x-pack/test/functional/apps/uptime/ping_redirects.ts +++ b/x-pack/test/functional/apps/uptime/ping_redirects.ts @@ -19,7 +19,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const monitor = () => uptime.monitor; - describe('Ping redirects', () => { + // FLAKY: https://github.com/elastic/kibana/issues/118476 + describe.skip('Ping redirects', () => { const start = '~ 15 minutes ago'; const end = 'now'; From bb5e183619ebe555d4e40e412aad84fba4385006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Kopyci=C5=84ski?= Date: Sat, 13 Nov 2021 16:34:00 +0100 Subject: [PATCH 17/23] [Osquery] Fix packs migration script (#118453) --- .../plugins/osquery/public/components/app.tsx | 30 ++++++- .../routes/status/create_status_route.ts | 87 ++++++++++--------- 2 files changed, 73 insertions(+), 44 deletions(-) diff --git a/x-pack/plugins/osquery/public/components/app.tsx b/x-pack/plugins/osquery/public/components/app.tsx index f4c805d375351..ef249d5b8c7aa 100644 --- a/x-pack/plugins/osquery/public/components/app.tsx +++ b/x-pack/plugins/osquery/public/components/app.tsx @@ -9,7 +9,17 @@ import React, { useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; -import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiTabs, EuiTab } from '@elastic/eui'; +import { + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiTabs, + EuiTab, + EuiLoadingElastic, + EuiPage, + EuiPageBody, + EuiPageContent, +} from '@elastic/eui'; import { useLocation } from 'react-router-dom'; import { Container, Nav, Wrapper } from './layouts'; @@ -24,6 +34,24 @@ const OsqueryAppComponent = () => { const section = useMemo(() => location.pathname.split('/')[1] ?? 'overview', [location.pathname]); const { data: osqueryIntegration, isFetched } = useOsqueryIntegrationStatus(); + if (!isFetched) { + return ( + + + + + + + + ); + } + if (isFetched && osqueryIntegration?.install_status !== 'installed') { return ; } diff --git a/x-pack/plugins/osquery/server/routes/status/create_status_route.ts b/x-pack/plugins/osquery/server/routes/status/create_status_route.ts index 630ec8b3743c8..ae79ef851bed9 100644 --- a/x-pack/plugins/osquery/server/routes/status/create_status_route.ts +++ b/x-pack/plugins/osquery/server/routes/status/create_status_route.ts @@ -107,6 +107,50 @@ export const createStatusRoute = (router: IRouter, osqueryContext: OsqueryAppCon pkgName: OSQUERY_INTEGRATION_NAME, }); + const agentPolicyIds = uniq(map(policyPackages?.items, 'policy_id')); + const agentPolicies = mapKeys( + await agentPolicyService?.getByIds(internalSavedObjectsClient, agentPolicyIds), + 'id' + ); + + await Promise.all( + map(migrationObject.packs, async (packObject) => { + await internalSavedObjectsClient.create( + packSavedObjectType, + { + // @ts-expect-error update types + name: packObject.name, + // @ts-expect-error update types + description: packObject.description, + // @ts-expect-error update types + queries: convertPackQueriesToSO(packObject.queries), + // @ts-expect-error update types + enabled: packObject.enabled, + created_at: new Date().toISOString(), + created_by: 'system', + updated_at: new Date().toISOString(), + updated_by: 'system', + }, + { + // @ts-expect-error update types + references: packObject.policy_ids.map((policyId: string) => ({ + id: policyId, + name: agentPolicies[policyId].name, + type: AGENT_POLICY_SAVED_OBJECT_TYPE, + })), + refresh: 'wait_for', + } + ); + }) + ); + + // delete unnecessary package policies + await packagePolicyService?.delete( + internalSavedObjectsClient, + esClient, + migrationObject.packagePoliciesToDelete + ); + // updatePackagePolicies await Promise.all( map(migrationObject.agentPolicyToPackage, async (value, key) => { @@ -151,49 +195,6 @@ export const createStatusRoute = (router: IRouter, osqueryContext: OsqueryAppCon } }) ); - - const agentPolicyIds = uniq(map(policyPackages?.items, 'policy_id')); - const agentPolicies = mapKeys( - await agentPolicyService?.getByIds(internalSavedObjectsClient, agentPolicyIds), - 'id' - ); - - await Promise.all( - map(migrationObject.packs, async (packObject) => { - await internalSavedObjectsClient.create( - packSavedObjectType, - { - // @ts-expect-error update types - name: packObject.name, - // @ts-expect-error update types - description: packObject.description, - // @ts-expect-error update types - queries: convertPackQueriesToSO(packObject.queries), - // @ts-expect-error update types - enabled: packObject.enabled, - created_at: new Date().toISOString(), - created_by: 'system', - updated_at: new Date().toISOString(), - updated_by: 'system', - }, - { - // @ts-expect-error update types - references: packObject.policy_ids.map((policyId: string) => ({ - id: policyId, - name: agentPolicies[policyId].name, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, - })), - refresh: 'wait_for', - } - ); - }) - ); - - await packagePolicyService?.delete( - internalSavedObjectsClient, - esClient, - migrationObject.packagePoliciesToDelete - ); // eslint-disable-next-line no-empty } catch (e) {} } From f2872d803ddbcc3f9160e1d2bc3e3af6402b48c4 Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Mon, 15 Nov 2021 08:40:42 +0000 Subject: [PATCH 18/23] [ML] Disabling create data view for data frame analytics and transforms wizards (#117690) * [ML] Disabling create data view for data frame analytics and transforms wizards * removing dfa results link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../create_analytics_advanced_editor.tsx | 56 +++++++++++++++---- .../details_step/details_step_form.tsx | 32 ++++++++++- .../index_pattern_prompt.tsx | 42 +++++++++----- .../step_details/step_details_form.tsx | 44 +++++++++++---- 4 files changed, 138 insertions(+), 36 deletions(-) diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx index 31072089b8d5c..0a83ed6db6539 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx @@ -7,10 +7,19 @@ import React, { FC, Fragment, useEffect, useMemo, useRef } from 'react'; import { debounce } from 'lodash'; -import { EuiCallOut, EuiFieldText, EuiForm, EuiFormRow, EuiSpacer, EuiSwitch } from '@elastic/eui'; +import { + EuiCallOut, + EuiFieldText, + EuiForm, + EuiFormRow, + EuiSpacer, + EuiSwitch, + EuiText, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { useMlKibana } from '../../../../../contexts/kibana'; import { CodeEditor } from '../../../../../../../../../../src/plugins/kibana_react/public'; import { useNotifications } from '../../../../../contexts/kibana'; import { ml } from '../../../../../services/ml_api_service'; @@ -36,11 +45,22 @@ export const CreateAnalyticsAdvancedEditor: FC = (prop const forceInput = useRef(null); const { toasts } = useNotifications(); + const { + services: { + application: { capabilities }, + }, + } = useMlKibana(); const onChange = (str: string) => { setAdvancedEditorRawString(str); }; + const canCreateDataView = useMemo( + () => + capabilities.savedObjectsManagement.edit === true || capabilities.indexPatterns.save === true, + [capabilities] + ); + const debouncedJobIdCheck = useMemo( () => debounce(async () => { @@ -200,18 +220,34 @@ export const CreateAnalyticsAdvancedEditor: FC = (prop {!isJobCreated && ( + {i18n.translate( + 'xpack.ml.dataframe.analytics.create.dataViewPermissionWarning', + { + defaultMessage: 'You need permission to create data views.', + } + )} + , + ] + : []), + ...(createIndexPattern && destinationIndexPatternTitleExists + ? [ + i18n.translate('xpack.ml.dataframe.analytics.create.dataViewExistsError', { + defaultMessage: 'A data view with this title already exists.', + }), + ] + : []), + ]} > = ({ setCurrentStep, }) => { const { - services: { docLinks, notifications }, + services: { + docLinks, + notifications, + application: { capabilities }, + }, } = useMlKibana(); const createIndexLink = docLinks.links.apis.createIndex; const { setFormState } = actions; @@ -71,6 +75,11 @@ export const DetailsStepForm: FC = ({ (cloneJob !== undefined && resultsField === DEFAULT_RESULTS_FIELD) ); + const canCreateDataView = useMemo( + () => + capabilities.savedObjectsManagement.edit === true || capabilities.indexPatterns.save === true, + [capabilities] + ); const forceInput = useRef(null); const isStepInvalid = @@ -149,6 +158,12 @@ export const DetailsStepForm: FC = ({ } }, [destIndexSameAsId, jobId]); + useEffect(() => { + if (canCreateDataView === false) { + setFormState({ createIndexPattern: false }); + } + }, [capabilities]); + return ( = ({ + {i18n.translate('xpack.ml.dataframe.analytics.create.dataViewPermissionWarning', { + defaultMessage: 'You need permission to create data views.', + })} + , + ] + : []), ...(createIndexPattern && destinationIndexPatternTitleExists ? [ i18n.translate('xpack.ml.dataframe.analytics.create.dataViewExistsError', { @@ -373,7 +399,7 @@ export const DetailsStepForm: FC = ({ ]} > = ({ destIndex }) => { const { services: { http: { basePath }, + application: { capabilities }, }, } = useMlKibana(); + const canCreateDataView = useMemo( + () => + capabilities.savedObjectsManagement.edit === true || capabilities.indexPatterns.save === true, + [capabilities] + ); + return ( <> - - - ), }} /> + {canCreateDataView === true ? ( + + + + ), + }} + /> + ) : null} ); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx index eda95013f60bd..ad40a65fdf2e5 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { FC, useEffect, useState } from 'react'; +import React, { FC, useEffect, useState, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -20,6 +20,7 @@ import { EuiSelect, EuiSpacer, EuiCallOut, + EuiText, } from '@elastic/eui'; import { KBN_FIELD_TYPES } from '../../../../../../../../../src/plugins/data/common'; @@ -68,6 +69,7 @@ interface StepDetailsFormProps { export const StepDetailsForm: FC = React.memo( ({ overrides = {}, onChange, searchItems, stepDefineState }) => { const deps = useAppDependencies(); + const { capabilities } = deps.application; const toastNotifications = useToastNotifications(); const { esIndicesCreateIndex } = useDocumentationLinks(); @@ -83,9 +85,18 @@ export const StepDetailsForm: FC = React.memo( const [transformIds, setTransformIds] = useState([]); const [indexNames, setIndexNames] = useState([]); + const canCreateDataView = useMemo( + () => + capabilities.savedObjectsManagement.edit === true || + capabilities.indexPatterns.save === true, + [capabilities] + ); + // Index pattern state const [indexPatternTitles, setIndexPatternTitles] = useState([]); - const [createIndexPattern, setCreateIndexPattern] = useState(defaults.createIndexPattern); + const [createIndexPattern, setCreateIndexPattern] = useState( + canCreateDataView === false ? false : defaults.createIndexPattern + ); const [indexPatternAvailableTimeFields, setIndexPatternAvailableTimeFields] = useState< string[] >([]); @@ -443,18 +454,31 @@ export const StepDetailsForm: FC = React.memo( ) : null} + {i18n.translate('xpack.transform.stepDetailsForm.dataViewPermissionWarning', { + defaultMessage: 'You need permission to create data views.', + })} + , + ] + : []), + ...(createIndexPattern && indexPatternTitleExists + ? [ + i18n.translate('xpack.transform.stepDetailsForm.dataViewTitleError', { + defaultMessage: 'A data view with this title already exists.', + }), + ] + : []), + ]} > Date: Mon, 15 Nov 2021 11:15:24 +0100 Subject: [PATCH 19/23] chore: removes cast to any of EuiDescriptionList props (#118262) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../public/pages/alerts/alerts_flyout/index.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/observability/public/pages/alerts/alerts_flyout/index.tsx b/x-pack/plugins/observability/public/pages/alerts/alerts_flyout/index.tsx index 41f107437d23b..bb746d0acc1cc 100644 --- a/x-pack/plugins/observability/public/pages/alerts/alerts_flyout/index.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/alerts_flyout/index.tsx @@ -159,16 +159,12 @@ export function AlertsFlyout({ compressed={true} type="responsiveColumn" listItems={overviewListItems} - titleProps={ - { - 'data-test-subj': 'alertsFlyoutDescriptionListTitle', - } as any // NOTE / TODO: This "any" is a temporary workaround: https://github.com/elastic/eui/issues/5148 - } - descriptionProps={ - { - 'data-test-subj': 'alertsFlyoutDescriptionListDescription', - } as any // NOTE / TODO: This "any" is a temporary workaround: https://github.com/elastic/eui/issues/5148 - } + titleProps={{ + 'data-test-subj': 'alertsFlyoutDescriptionListTitle', + }} + descriptionProps={{ + 'data-test-subj': 'alertsFlyoutDescriptionListDescription', + }} /> {alertData.link && !isInApp && ( From c870206c051095b45809627a755ac9b497c5fddc Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Mon, 15 Nov 2021 11:23:59 +0100 Subject: [PATCH 20/23] Use new Document Explorer name in Discover (#118148) * Use new Document Explorer name in Discover * Fix typo * Wording changes * Remove orphaned i18n * Address review feedback Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../top_nav/open_options_popover.scss | 4 +- .../top_nav/open_options_popover.test.tsx | 4 +- .../top_nav/open_options_popover.tsx | 56 +++++++++++-------- src/plugins/discover/server/ui_settings.ts | 10 ++-- .../translations/translations/ja-JP.json | 8 --- .../translations/translations/zh-CN.json | 8 --- 6 files changed, 43 insertions(+), 47 deletions(-) diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.scss b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.scss index f68b2bfe74a9d..28c68506aedc5 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.scss +++ b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.scss @@ -1,5 +1,5 @@ -$dscOptionsPopoverWidth: $euiSizeL * 12; +$dscOptionsPopoverWidth: $euiSizeL * 14; .dscOptionsPopover { width: $dscOptionsPopoverWidth; -} \ No newline at end of file +} diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.test.tsx index c9564a3ed029d..8363bfdc57616 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.test.tsx @@ -35,7 +35,7 @@ import { OptionsPopover } from './open_options_popover'; test('should display the correct text if datagrid is selected', () => { const element = document.createElement('div'); const component = mountWithIntl(); - expect(findTestSubject(component, 'docTableMode').text()).toBe('New table'); + expect(findTestSubject(component, 'docTableMode').text()).toBe('Document Explorer'); }); test('should display the correct text if legacy table is selected', () => { @@ -45,5 +45,5 @@ test('should display the correct text if legacy table is selected', () => { uiSettings.set('doc_table:legacy', true); const element = document.createElement('div'); const component = mountWithIntl(); - expect(findTestSubject(component, 'docTableMode').text()).toBe('Classic table'); + expect(findTestSubject(component, 'docTableMode').text()).toBe('Classic'); }); diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx index 1b567813c6f7b..a68888acb1f48 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx @@ -41,11 +41,11 @@ export function OptionsPopover(props: OptionsPopoverProps) { const isLegacy = uiSettings.get(DOC_TABLE_LEGACY); const mode = isLegacy - ? i18n.translate('discover.openOptionsPopover.legacyTableText', { - defaultMessage: 'Classic table', + ? i18n.translate('discover.openOptionsPopover.classicDiscoverText', { + defaultMessage: 'Classic', }) - : i18n.translate('discover.openOptionsPopover.dataGridText', { - defaultMessage: 'New table', + : i18n.translate('discover.openOptionsPopover.documentExplorerText', { + defaultMessage: 'Document Explorer', }); return ( @@ -60,8 +60,8 @@ export function OptionsPopover(props: OptionsPopoverProps) { viewModeLabel: ( ), @@ -72,21 +72,33 @@ export function OptionsPopover(props: OptionsPopoverProps) { - + {isLegacy ? ( + + ) : ( + + )} - - - {i18n.translate('discover.openOptionsPopover.goToAdvancedSettings', { - defaultMessage: 'Get started', - })} - + {isLegacy && ( + <> + + + {i18n.translate('discover.openOptionsPopover.tryDocumentExplorer', { + defaultMessage: 'Try Document Explorer', + })} + + + )} - {i18n.translate('discover.openOptionsPopover.gotToAllSettings', { - defaultMessage: 'All Discover options', + {i18n.translate('discover.openOptionsPopover.gotToSettings', { + defaultMessage: 'View Discover settings', })} diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index df06260d45d21..e9aa51a7384b2 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -158,14 +158,14 @@ export const getUiSettings: () => Record = () => ({ schema: schema.arrayOf(schema.string()), }, [DOC_TABLE_LEGACY]: { - name: i18n.translate('discover.advancedSettings.docTableVersionName', { - defaultMessage: 'Use classic table', + name: i18n.translate('discover.advancedSettings.disableDocumentExplorer', { + defaultMessage: 'Document Explorer or classic view', }), value: true, - description: i18n.translate('discover.advancedSettings.docTableVersionDescription', { + description: i18n.translate('discover.advancedSettings.disableDocumentExplorerDescription', { defaultMessage: - 'Discover uses a new table layout that includes better data sorting, drag-and-drop columns, and a full screen view. ' + - 'Turn on this option to use the classic table. Turn off to use the new table. ', + 'To use the new Document Explorer instead of the classic view, turn off this option. ' + + 'The Document Explorer offers better data sorting, resizable columns, and a full screen view.', }), category: ['discover'], schema: schema.boolean(), diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index f728ec13847f9..d450f679906bd 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -2300,8 +2300,6 @@ "discover.advancedSettings.discover.showMultifieldsDescription": "拡張ドキュメントビューに{multiFields}が表示されるかどうかを制御します。ほとんどの場合、マルチフィールドは元のフィールドと同じです。「searchFieldsFromSource」がオフのときにのみこのオプションを使用できます。", "discover.advancedSettings.docTableHideTimeColumnText": "Discover と、ダッシュボードのすべての保存された検索で、「時刻」列を非表示にします。", "discover.advancedSettings.docTableHideTimeColumnTitle": "「時刻」列を非表示", - "discover.advancedSettings.docTableVersionDescription": "Discover は、データの並べ替え、列のドラッグアンドドロップ、全画面表示を含む新しいテーブルレイアウトを使用します。このオプションをオンにすると、クラシックテーブルを使用します。オフにすると、新しいテーブルを使用します。", - "discover.advancedSettings.docTableVersionName": "クラシックテーブルを使用", "discover.advancedSettings.fieldsPopularLimitText": "最も頻繁に使用されるフィールドのトップNを表示します", "discover.advancedSettings.fieldsPopularLimitTitle": "頻繁に使用されるフィールドの制限", "discover.advancedSettings.maxDocFieldsDisplayedText": "ドキュメント列でレンダリングされたフィールドの最大数", @@ -2505,10 +2503,6 @@ "discover.notifications.invalidTimeRangeTitle": "無効な時間範囲", "discover.notifications.notSavedSearchTitle": "検索「{savedSearchTitle}」は保存されませんでした。", "discover.notifications.savedSearchTitle": "検索「{savedSearchTitle}」が保存されました。", - "discover.openOptionsPopover.dataGridText": "新しいテーブル", - "discover.openOptionsPopover.goToAdvancedSettings": "使ってみる", - "discover.openOptionsPopover.gotToAllSettings": "すべてのDiscoverオプション", - "discover.openOptionsPopover.legacyTableText": "クラシックテーブル", "discover.reloadSavedSearchButton": "検索をリセット", "discover.removeColumnLabel": "列を削除", "discover.rootBreadcrumb": "Discover", @@ -2527,12 +2521,10 @@ "discover.sourceViewer.errorMessageTitle": "エラーが発生しました", "discover.sourceViewer.refresh": "更新", "discover.toggleSidebarAriaLabel": "サイドバーを切り替える", - "discover.topNav.openOptionsPopover.description": "お知らせDiscoverでは、データの並べ替え、列のドラッグアンドドロップ、ドキュメントの比較を行う方法が改善されました。詳細設定で[クラシックテーブルを使用]を切り替えて、開始します。", "discover.topNav.openSearchPanel.manageSearchesButtonLabel": "検索の管理", "discover.topNav.openSearchPanel.noSearchesFoundDescription": "一致する検索が見つかりませんでした。", "discover.topNav.openSearchPanel.openSearchTitle": "検索を開く", "discover.topNav.optionsPopover.currentViewMode": "{viewModeLabel}: {currentViewMode}", - "discover.topNav.optionsPopover.currentViewModeLabel": "現在のビューモード", "discover.uninitializedRefreshButtonText": "データを更新", "discover.uninitializedText": "クエリを作成、フィルターを追加、または[更新]をクリックして、現在のクエリの結果を取得します。", "discover.uninitializedTitle": "検索開始", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 33927d4ffbb0b..8839c6bab9aca 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -2322,8 +2322,6 @@ "discover.advancedSettings.discover.showMultifieldsDescription": "控制 {multiFields} 是否显示在展开的文档视图中。多数情况下,多字段与原始字段相同。此选项仅在 `searchFieldsFromSource` 关闭时可用。", "discover.advancedSettings.docTableHideTimeColumnText": "在 Discover 中和仪表板上的所有已保存搜索中隐藏“时间”列。", "discover.advancedSettings.docTableHideTimeColumnTitle": "隐藏“时间”列", - "discover.advancedSettings.docTableVersionDescription": "Discover 使用的新表布局包含更佳的数据排序、拖放列和全屏视图。打开此选项可使用经典表。关闭可使用新表。", - "discover.advancedSettings.docTableVersionName": "使用经典表", "discover.advancedSettings.fieldsPopularLimitText": "要显示的排名前 N 最常见字段", "discover.advancedSettings.fieldsPopularLimitTitle": "常见字段限制", "discover.advancedSettings.maxDocFieldsDisplayedText": "在文档列中渲染的最大字段数目", @@ -2529,10 +2527,6 @@ "discover.notifications.invalidTimeRangeTitle": "时间范围无效", "discover.notifications.notSavedSearchTitle": "搜索“{savedSearchTitle}”未保存。", "discover.notifications.savedSearchTitle": "搜索“{savedSearchTitle}”已保存", - "discover.openOptionsPopover.dataGridText": "新表", - "discover.openOptionsPopover.goToAdvancedSettings": "开始使用", - "discover.openOptionsPopover.gotToAllSettings": "所有 Discover 选项", - "discover.openOptionsPopover.legacyTableText": "经典表", "discover.partialHits": "≥{formattedHits} 个{hits, plural, other {命中}}", "discover.reloadSavedSearchButton": "重置搜索", "discover.removeColumnLabel": "移除列", @@ -2552,12 +2546,10 @@ "discover.sourceViewer.errorMessageTitle": "发生错误", "discover.sourceViewer.refresh": "刷新", "discover.toggleSidebarAriaLabel": "切换侧边栏", - "discover.topNav.openOptionsPopover.description": "好消息!Discover 有更好的方法排序数据、拖放列和比较文档。在“高级模式”中切换“使用经典表”来开始。", "discover.topNav.openSearchPanel.manageSearchesButtonLabel": "管理搜索", "discover.topNav.openSearchPanel.noSearchesFoundDescription": "未找到匹配的搜索。", "discover.topNav.openSearchPanel.openSearchTitle": "打开搜索", "discover.topNav.optionsPopover.currentViewMode": "{viewModeLabel}:{currentViewMode}", - "discover.topNav.optionsPopover.currentViewModeLabel": "当前视图模式", "discover.uninitializedRefreshButtonText": "刷新数据", "discover.uninitializedText": "编写查询,添加一些筛选,或只需单击“刷新”来检索当前查询的结果。", "discover.uninitializedTitle": "开始搜索", From 92f23122cee92b676657d4c03b61e3b1604c8bba Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Mon, 15 Nov 2021 12:06:25 +0100 Subject: [PATCH 21/23] fix exists or fail check (#118499) --- x-pack/test/functional/apps/lens/dashboard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/lens/dashboard.ts b/x-pack/test/functional/apps/lens/dashboard.ts index cef3650db7d04..b67e2da4f4ec7 100644 --- a/x-pack/test/functional/apps/lens/dashboard.ts +++ b/x-pack/test/functional/apps/lens/dashboard.ts @@ -71,7 +71,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.goToTimeRange(); await retry.try(async () => { await clickInChart(6, 5); // hardcoded position of bar, depends heavy on data and charts implementation - await testSubjects.existOrFail('applyFiltersPopoverButton'); + await testSubjects.existOrFail('applyFiltersPopoverButton', { timeout: 2500 }); }); await retry.try(async () => { From f8e7cd4c0608570dbfc64f0c6c6b95c6073d7fd8 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Mon, 15 Nov 2021 14:19:26 +0100 Subject: [PATCH 22/23] [Reporting] Add link to Kibana app from Reporting management UI + Design update (#111412) * moved components to nested components dir * added health status indicator * download button -> download link * updated poblic Job API, remove some of the "rendering" behaviour * restructure list table contents and clean up use of i18n * set table column widths * slight update to table column widths * actually use action width :facepalm: * added view in app link component and included space id in public side Job * server side changes so that we can get the job payload containing the locator * initial round of public-side changes to make the link to Kibana app work * added tooltip to view action * remove unused import and do not show chrome * removed use of fp-ts * added type column and updated mobile look * remove unused imports * take a different approach to job query factory -> added new function called "getReport" and leave "get" as is * update i18n * code simplifications, also ensure that "PROCESSING" status is being handled by health indicator * do not hide chrome * refactor jest test: - make test more specific and remove snapshot - added use of isMounted() to not run set state when component is not mounted * surface deprecation warning in a special way * updated one functional test * updated other functional test * Several updates to bring table more in line with design * Removed "created by" column * Added app icons instead of names * Added content type indication (PDF, CSV or PNG) * Updated the "info" button to have no colors * Updated the status to have a timestamp and show "yellow" if we detect any issues and guide users to view the report info. * a lot of changes to bring this more in line with defazio designs * fix lint * -wip- [skip-ci] * some very basic house keeping [skip-ci] * get to a point where the linking behaviour is working as expected * further house-keeping, remove unecessary components * clean up imports * move hasIssues check into status indicator * refactored report status indicator * hide open kibana app button when not available * remove unused import * fix jest tests * created a new redirect plugin to avoid page flicker * remove unused report info button * removed unused translations * fix jest tests after changing the redirect app path * added reportingRedirect to applicationUsageSchema * added column width for type * update test for extracting first row title * update functional test snapshot * updated plugins schema * removed the interstitial page so that we do not conflict with future work planned for the share service * remove unused i18n * small, but center-ish type icons * elastic@ email address * add i18n, update import with forward slash and added missing ":" to TODO * move non-type export to own import line and "type" to only-type imports * remove unecessary export * refactor payload endpoint to locatorParams endpoint and document query function * finish refactoring client side to work with new locatorParams endpoint * remove unused import * use info endpoint because it contains payload! * added functional test to ensure that we can navigate back to report * added jest test for checking that link navigated to is spaces aware * fix type issue and remove unused import Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../collectors/application_usage/schema.ts | 1 + src/plugins/telemetry/schema/oss_plugins.json | 131 + x-pack/plugins/reporting/common/constants.ts | 2 +- x-pack/plugins/reporting/common/job_utils.ts | 25 + x-pack/plugins/reporting/common/types/base.ts | 11 + .../plugins/reporting/common/types/index.ts | 4 +- x-pack/plugins/reporting/common/types/url.ts | 4 +- x-pack/plugins/reporting/public/constants.ts | 8 - x-pack/plugins/reporting/public/lib/job.tsx | 48 +- .../reporting_api_client.ts | 15 + .../report_info_button.test.tsx.snap | 256 - .../report_listing.test.tsx.snap | 10738 ---------------- .../{ => components}/ilm_policy_link.tsx | 4 +- .../public/management/components/index.ts | 13 + .../ilm_policy_migration_needed_callout.tsx | 8 +- .../migrate_ilm_policy_callout/index.tsx | 2 +- .../{ => components}/report_delete_button.tsx | 51 +- .../{ => components}/report_diagnostic.tsx | 2 +- .../components/report_info_button.tsx | 52 + .../components/report_info_flyout.tsx | 93 + .../components/report_info_flyout_content.tsx | 193 + .../components/report_status_indicator.tsx | 101 + .../reporting/public/management/index.ts | 2 - .../management/report_download_button.tsx | 65 - .../management/report_info_button.test.tsx | 81 - .../public/management/report_info_button.tsx | 377 - .../public/management/report_listing.scss | 7 + .../public/management/report_listing.test.tsx | 58 +- .../public/management/report_listing.tsx | 249 +- .../reporting/public/management/utils.ts | 38 + x-pack/plugins/reporting/public/plugin.ts | 24 +- .../public/redirect/mount_redirect_app.tsx | 5 +- .../public/redirect/redirect_app.scss | 8 + .../public/redirect/redirect_app.tsx | 73 +- .../reporting/public/shared_imports.ts | 2 + x-pack/plugins/reporting/public/utils.ts | 12 - .../v2/get_full_redirect_app_url.test.ts | 4 +- .../export_types/png_v2/execute_job.test.ts | 2 +- .../translations/translations/ja-JP.json | 4 - .../translations/translations/zh-CN.json | 4 - .../reporting_management/report_listing.ts | 60 +- .../reporting_and_security/management.ts | 24 +- .../reporting_without_security/management.ts | 7 +- 43 files changed, 1114 insertions(+), 11754 deletions(-) delete mode 100644 x-pack/plugins/reporting/public/constants.ts delete mode 100644 x-pack/plugins/reporting/public/management/__snapshots__/report_info_button.test.tsx.snap delete mode 100644 x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap rename x-pack/plugins/reporting/public/management/{ => components}/ilm_policy_link.tsx (90%) create mode 100644 x-pack/plugins/reporting/public/management/components/index.ts rename x-pack/plugins/reporting/public/management/{ => components}/migrate_ilm_policy_callout/ilm_policy_migration_needed_callout.tsx (90%) rename x-pack/plugins/reporting/public/management/{ => components}/migrate_ilm_policy_callout/index.tsx (92%) rename x-pack/plugins/reporting/public/management/{ => components}/report_delete_button.tsx (59%) rename x-pack/plugins/reporting/public/management/{ => components}/report_diagnostic.tsx (98%) create mode 100644 x-pack/plugins/reporting/public/management/components/report_info_button.tsx create mode 100644 x-pack/plugins/reporting/public/management/components/report_info_flyout.tsx create mode 100644 x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx create mode 100644 x-pack/plugins/reporting/public/management/components/report_status_indicator.tsx delete mode 100644 x-pack/plugins/reporting/public/management/report_download_button.tsx delete mode 100644 x-pack/plugins/reporting/public/management/report_info_button.test.tsx delete mode 100644 x-pack/plugins/reporting/public/management/report_info_button.tsx create mode 100644 x-pack/plugins/reporting/public/management/report_listing.scss create mode 100644 x-pack/plugins/reporting/public/management/utils.ts create mode 100644 x-pack/plugins/reporting/public/redirect/redirect_app.scss delete mode 100644 x-pack/plugins/reporting/public/utils.ts diff --git a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts index 7c112083875d1..adfe8da335a14 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts @@ -150,6 +150,7 @@ export const applicationUsageSchema = { 'observability-overview': commonSchema, osquery: commonSchema, security_account: commonSchema, + reportingRedirect: commonSchema, security_access_agreement: commonSchema, security_capture_url: commonSchema, // It's a forward app so we'll likely never report it security_logged_out: commonSchema, diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 21273482dd2b8..60c5bbd4346ec 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -4232,6 +4232,137 @@ } } }, + "reportingRedirect": { + "properties": { + "appId": { + "type": "keyword", + "_meta": { + "description": "The application being tracked" + } + }, + "viewId": { + "type": "keyword", + "_meta": { + "description": "Always `main`" + } + }, + "clicks_total": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application since we started counting them" + } + }, + "clicks_7_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 7 days" + } + }, + "clicks_30_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 30 days" + } + }, + "clicks_90_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 90 days" + } + }, + "minutes_on_screen_total": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen since we started counting them." + } + }, + "minutes_on_screen_7_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 7 days" + } + }, + "minutes_on_screen_30_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 30 days" + } + }, + "minutes_on_screen_90_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 90 days" + } + }, + "views": { + "type": "array", + "items": { + "properties": { + "appId": { + "type": "keyword", + "_meta": { + "description": "The application being tracked" + } + }, + "viewId": { + "type": "keyword", + "_meta": { + "description": "The application view being tracked" + } + }, + "clicks_total": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application sub view since we started counting them" + } + }, + "clicks_7_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 7 days" + } + }, + "clicks_30_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 30 days" + } + }, + "clicks_90_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 90 days" + } + }, + "minutes_on_screen_total": { + "type": "float", + "_meta": { + "description": "Minutes the application sub view is active and on-screen since we started counting them." + } + }, + "minutes_on_screen_7_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 7 days" + } + }, + "minutes_on_screen_30_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 30 days" + } + }, + "minutes_on_screen_90_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 90 days" + } + } + } + } + } + } + }, "security_access_agreement": { "properties": { "appId": { diff --git a/x-pack/plugins/reporting/common/constants.ts b/x-pack/plugins/reporting/common/constants.ts index cafab65677ee4..1eef032945e69 100644 --- a/x-pack/plugins/reporting/common/constants.ts +++ b/x-pack/plugins/reporting/common/constants.ts @@ -121,7 +121,7 @@ export const REPORTING_REDIRECT_LOCATOR_STORE_KEY = '__REPORTING_REDIRECT_LOCATO * be injected to the page */ export const getRedirectAppPath = () => { - return '/app/management/insightsAndAlerting/reporting/r'; + return '/app/reportingRedirect'; }; // Statuses diff --git a/x-pack/plugins/reporting/common/job_utils.ts b/x-pack/plugins/reporting/common/job_utils.ts index d8b4503cfefba..c1fd2eb5eb8c4 100644 --- a/x-pack/plugins/reporting/common/job_utils.ts +++ b/x-pack/plugins/reporting/common/job_utils.ts @@ -5,7 +5,32 @@ * 2.0. */ +import { + CSV_JOB_TYPE, + PDF_JOB_TYPE, + PNG_JOB_TYPE, + PDF_JOB_TYPE_V2, + PNG_JOB_TYPE_V2, + CSV_JOB_TYPE_DEPRECATED, +} from './constants'; + // TODO: Remove this code once everyone is using the new PDF format, then we can also remove the legacy // export type entirely export const isJobV2Params = ({ sharingData }: { sharingData: Record }): boolean => sharingData.locatorParams != null; + +export const prettyPrintJobType = (type: string) => { + switch (type) { + case PDF_JOB_TYPE: + case PDF_JOB_TYPE_V2: + return 'PDF'; + case CSV_JOB_TYPE: + case CSV_JOB_TYPE_DEPRECATED: + return 'CSV'; + case PNG_JOB_TYPE: + case PNG_JOB_TYPE_V2: + return 'PNG'; + default: + return type; + } +}; diff --git a/x-pack/plugins/reporting/common/types/base.ts b/x-pack/plugins/reporting/common/types/base.ts index 44960c57f61c1..a44378979ac3c 100644 --- a/x-pack/plugins/reporting/common/types/base.ts +++ b/x-pack/plugins/reporting/common/types/base.ts @@ -7,6 +7,7 @@ import type { Ensure, SerializableRecord } from '@kbn/utility-types'; import type { LayoutParams } from './layout'; +import { LocatorParams } from './url'; export type JobId = string; @@ -21,9 +22,19 @@ export type BaseParams = Ensure< SerializableRecord >; +export type BaseParamsV2 = BaseParams & { + locatorParams: LocatorParams[]; +}; + // base params decorated with encrypted headers that come into runJob functions export interface BasePayload extends BaseParams { headers: string; spaceId?: string; isDeprecated?: boolean; } + +export interface BasePayloadV2 extends BaseParamsV2 { + headers: string; + spaceId?: string; + isDeprecated?: boolean; +} diff --git a/x-pack/plugins/reporting/common/types/index.ts b/x-pack/plugins/reporting/common/types/index.ts index 75e8cb0af9698..8612400e8b390 100644 --- a/x-pack/plugins/reporting/common/types/index.ts +++ b/x-pack/plugins/reporting/common/types/index.ts @@ -6,9 +6,9 @@ */ import type { Size, LayoutParams } from './layout'; -import type { JobId, BaseParams, BasePayload } from './base'; +import type { JobId, BaseParams, BaseParamsV2, BasePayload, BasePayloadV2 } from './base'; -export type { JobId, BaseParams, BasePayload }; +export type { JobId, BaseParams, BaseParamsV2, BasePayload, BasePayloadV2 }; export type { Size, LayoutParams }; export type { DownloadReportFn, diff --git a/x-pack/plugins/reporting/common/types/url.ts b/x-pack/plugins/reporting/common/types/url.ts index dfb8ee9f908e3..28e935713c45e 100644 --- a/x-pack/plugins/reporting/common/types/url.ts +++ b/x-pack/plugins/reporting/common/types/url.ts @@ -14,9 +14,7 @@ export type DownloadReportFn = (jobId: JobId) => DownloadLink; type ManagementLink = string; export type ManagementLinkFn = () => ManagementLink; -export interface LocatorParams< - P extends SerializableRecord = SerializableRecord & { forceNow?: string } -> { +export interface LocatorParams

{ id: string; version: string; params: P; diff --git a/x-pack/plugins/reporting/public/constants.ts b/x-pack/plugins/reporting/public/constants.ts deleted file mode 100644 index c7e77fd44a780..0000000000000 --- a/x-pack/plugins/reporting/public/constants.ts +++ /dev/null @@ -1,8 +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 REACT_ROUTER_REDIRECT_APP_PATH = '/r'; diff --git a/x-pack/plugins/reporting/public/lib/job.tsx b/x-pack/plugins/reporting/public/lib/job.tsx index d5d0695aaefb9..d5d77ac18aa5c 100644 --- a/x-pack/plugins/reporting/public/lib/job.tsx +++ b/x-pack/plugins/reporting/public/lib/job.tsx @@ -12,6 +12,7 @@ import moment from 'moment'; import React from 'react'; import { JOB_STATUSES } from '../../common/constants'; import { + BaseParamsV2, JobId, ReportApiJSON, ReportOutput, @@ -34,6 +35,7 @@ export class Job { public objectType: ReportPayload['objectType']; public title: ReportPayload['title']; public isDeprecated: ReportPayload['isDeprecated']; + public spaceId: ReportPayload['spaceId']; public browserTimezone?: ReportPayload['browserTimezone']; public layout: ReportPayload['layout']; @@ -57,6 +59,8 @@ export class Job { public max_size_reached?: TaskRunResult['max_size_reached']; public warnings?: TaskRunResult['warnings']; + public locatorParams?: BaseParamsV2['locatorParams']; + constructor(report: ReportApiJSON) { this.id = report.id; this.index = report.index; @@ -82,9 +86,11 @@ export class Job { this.content_type = report.output?.content_type; this.isDeprecated = report.payload.isDeprecated || false; + this.spaceId = report.payload.spaceId; this.csv_contains_formulas = report.output?.csv_contains_formulas; this.max_size_reached = report.output?.max_size_reached; this.warnings = report.output?.warnings; + this.locatorParams = (report.payload as BaseParamsV2).locatorParams; } getStatusMessage() { @@ -167,6 +173,25 @@ export class Job { ); } + /** + * Returns a user friendly version of the report job creation date + */ + getCreatedAtDate(): string { + return this.formatDate(this.created_at); + } + + /** + * Returns a user friendly version of the user that created the report job + */ + getCreatedBy(): string { + return ( + this.created_by || + i18n.translate('xpack.reporting.jobCreatedBy.unknownUserPlaceholderText', { + defaultMessage: 'Unknown', + }) + ); + } + getCreatedAtLabel() { if (this.created_by) { return ( @@ -191,15 +216,20 @@ export class Job { } } + getDeprecatedMessage(): undefined | string { + if (this.isDeprecated) { + return i18n.translate('xpack.reporting.jobWarning.exportTypeDeprecated', { + defaultMessage: + 'This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.', + }); + } + } + getWarnings() { const warnings: string[] = []; - if (this.isDeprecated) { - warnings.push( - i18n.translate('xpack.reporting.jobWarning.exportTypeDeprecated', { - defaultMessage: - 'This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.', - }) - ); + const deprecatedMessage = this.getDeprecatedMessage(); + if (deprecatedMessage) { + warnings.push(deprecatedMessage); } if (this.csv_contains_formulas) { @@ -234,6 +264,10 @@ export class Job { } } + getPrettyStatusTimestamp() { + return this.formatDate(this.getStatusTimestamp()); + } + private formatDate(timestamp: string) { try { return moment(timestamp).format('YYYY-MM-DD @ hh:mm A'); diff --git a/x-pack/plugins/reporting/public/lib/reporting_api_client/reporting_api_client.ts b/x-pack/plugins/reporting/public/lib/reporting_api_client/reporting_api_client.ts index b27c2a65be963..c44427f3ca9e1 100644 --- a/x-pack/plugins/reporting/public/lib/reporting_api_client/reporting_api_client.ts +++ b/x-pack/plugins/reporting/public/lib/reporting_api_client/reporting_api_client.ts @@ -10,12 +10,14 @@ import { stringify } from 'query-string'; import rison from 'rison-node'; import type { HttpFetchQuery } from 'src/core/public'; import { HttpSetup, IUiSettingsClient } from 'src/core/public'; +import { buildKibanaPath } from '../../../common/build_kibana_path'; import { API_BASE_GENERATE, API_BASE_URL, API_GENERATE_IMMEDIATE, API_LIST_URL, API_MIGRATE_ILM_POLICY_URL, + getRedirectAppPath, REPORTING_MANAGEMENT_HOME, } from '../../../common/constants'; import { @@ -73,6 +75,19 @@ export class ReportingAPIClient implements IReportingAPI { private kibanaVersion: string ) {} + public getKibanaAppHref(job: Job): string { + const searchParams = stringify({ jobId: job.id }); + + const path = buildKibanaPath({ + basePath: this.http.basePath.serverBasePath, + spaceId: job.spaceId, + appPath: getRedirectAppPath(), + }); + + const href = `${path}?${searchParams}`; + return href; + } + public getReportURL(jobId: string) { const apiBaseUrl = this.http.basePath.prepend(API_LIST_URL); const downloadLink = `${apiBaseUrl}/download/${jobId}`; diff --git a/x-pack/plugins/reporting/public/management/__snapshots__/report_info_button.test.tsx.snap b/x-pack/plugins/reporting/public/management/__snapshots__/report_info_button.test.tsx.snap deleted file mode 100644 index e8b9362db7525..0000000000000 --- a/x-pack/plugins/reporting/public/management/__snapshots__/report_info_button.test.tsx.snap +++ /dev/null @@ -1,256 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ReportInfoButton handles button click flyout on click 1`] = ` - -`; - -exports[`ReportInfoButton opens flyout with fetch error info 1`] = ` -Array [ - -

-
- , -
-
, -] -`; - -exports[`ReportInfoButton opens flyout with info 1`] = ` -Array [ - -
- - - - - - - - - - - - - - - - -
- -
- - -
- - - -`; diff --git a/x-pack/plugins/reporting/public/management/ilm_policy_link.tsx b/x-pack/plugins/reporting/public/management/components/ilm_policy_link.tsx similarity index 90% rename from x-pack/plugins/reporting/public/management/ilm_policy_link.tsx rename to x-pack/plugins/reporting/public/management/components/ilm_policy_link.tsx index 1dccb11dbbbc5..dfb884c24e917 100644 --- a/x-pack/plugins/reporting/public/management/ilm_policy_link.tsx +++ b/x-pack/plugins/reporting/public/management/components/ilm_policy_link.tsx @@ -11,8 +11,8 @@ import { i18n } from '@kbn/i18n'; import { EuiButtonEmpty } from '@elastic/eui'; import type { ApplicationStart } from 'src/core/public'; -import { ILM_POLICY_NAME } from '../../common/constants'; -import { LocatorPublic, SerializableRecord } from '../shared_imports'; +import { ILM_POLICY_NAME } from '../../../common/constants'; +import { LocatorPublic, SerializableRecord } from '../../shared_imports'; interface Props { navigateToUrl: ApplicationStart['navigateToUrl']; diff --git a/x-pack/plugins/reporting/public/management/components/index.ts b/x-pack/plugins/reporting/public/management/components/index.ts new file mode 100644 index 0000000000000..10c34ed628a15 --- /dev/null +++ b/x-pack/plugins/reporting/public/management/components/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { MigrateIlmPolicyCallOut } from './migrate_ilm_policy_callout'; +export { IlmPolicyLink } from './ilm_policy_link'; +export { ReportDeleteButton } from './report_delete_button'; +export { ReportDiagnostic } from './report_diagnostic'; +export { ReportStatusIndicator } from './report_status_indicator'; +export { ReportInfoFlyout } from './report_info_flyout'; diff --git a/x-pack/plugins/reporting/public/management/migrate_ilm_policy_callout/ilm_policy_migration_needed_callout.tsx b/x-pack/plugins/reporting/public/management/components/migrate_ilm_policy_callout/ilm_policy_migration_needed_callout.tsx similarity index 90% rename from x-pack/plugins/reporting/public/management/migrate_ilm_policy_callout/ilm_policy_migration_needed_callout.tsx rename to x-pack/plugins/reporting/public/management/components/migrate_ilm_policy_callout/ilm_policy_migration_needed_callout.tsx index e96cb842d55cf..7eb54049a15a9 100644 --- a/x-pack/plugins/reporting/public/management/migrate_ilm_policy_callout/ilm_policy_migration_needed_callout.tsx +++ b/x-pack/plugins/reporting/public/management/components/migrate_ilm_policy_callout/ilm_policy_migration_needed_callout.tsx @@ -9,13 +9,14 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import type { FunctionComponent } from 'react'; import React, { useState } from 'react'; +import useMountedState from 'react-use/lib/useMountedState'; import { EuiCallOut, EuiButton, EuiCode } from '@elastic/eui'; import type { NotificationsSetup } from 'src/core/public'; -import { ILM_POLICY_NAME } from '../../../common/constants'; +import { ILM_POLICY_NAME } from '../../../../common/constants'; -import { useInternalApiClient } from '../../lib/reporting_api_client'; +import { useInternalApiClient } from '../../../lib/reporting_api_client'; const i18nTexts = { title: i18n.translate('xpack.reporting.listing.ilmPolicyCallout.migrationNeededTitle', { @@ -63,6 +64,7 @@ export const IlmPolicyMigrationNeededCallOut: FunctionComponent = ({ onMigrationDone, }) => { const [isMigratingIndices, setIsMigratingIndices] = useState(false); + const isMounted = useMountedState(); const { apiClient } = useInternalApiClient(); @@ -78,7 +80,7 @@ export const IlmPolicyMigrationNeededCallOut: FunctionComponent = ({ toastMessage: e.body?.message, }); } finally { - setIsMigratingIndices(false); + if (isMounted()) setIsMigratingIndices(false); } }; diff --git a/x-pack/plugins/reporting/public/management/migrate_ilm_policy_callout/index.tsx b/x-pack/plugins/reporting/public/management/components/migrate_ilm_policy_callout/index.tsx similarity index 92% rename from x-pack/plugins/reporting/public/management/migrate_ilm_policy_callout/index.tsx rename to x-pack/plugins/reporting/public/management/components/migrate_ilm_policy_callout/index.tsx index 892cbcdde5ede..0c2359acdb679 100644 --- a/x-pack/plugins/reporting/public/management/migrate_ilm_policy_callout/index.tsx +++ b/x-pack/plugins/reporting/public/management/components/migrate_ilm_policy_callout/index.tsx @@ -11,7 +11,7 @@ import { EuiSpacer, EuiFlexItem } from '@elastic/eui'; import { NotificationsSetup } from 'src/core/public'; -import { useIlmPolicyStatus } from '../../lib/ilm_policy_status_context'; +import { useIlmPolicyStatus } from '../../../lib/ilm_policy_status_context'; import { IlmPolicyMigrationNeededCallOut } from './ilm_policy_migration_needed_callout'; diff --git a/x-pack/plugins/reporting/public/management/report_delete_button.tsx b/x-pack/plugins/reporting/public/management/components/report_delete_button.tsx similarity index 59% rename from x-pack/plugins/reporting/public/management/report_delete_button.tsx rename to x-pack/plugins/reporting/public/management/components/report_delete_button.tsx index da1ce9dd9e1cb..d91560ddd86f5 100644 --- a/x-pack/plugins/reporting/public/management/report_delete_button.tsx +++ b/x-pack/plugins/reporting/public/management/components/report_delete_button.tsx @@ -6,9 +6,10 @@ */ import { EuiButton, EuiConfirmModal } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import React, { Fragment, PureComponent } from 'react'; -import { Job } from '../lib/job'; -import { ListingProps } from './'; +import { Job } from '../../lib/job'; +import { ListingProps } from '../'; type DeleteFn = () => Promise; type Props = { jobsToDelete: Job[]; performDelete: DeleteFn } & ListingProps; @@ -31,34 +32,25 @@ export class ReportDeleteButton extends PureComponent { } private renderConfirm() { - const { intl, jobsToDelete } = this.props; + const { jobsToDelete } = this.props; const title = jobsToDelete.length > 1 - ? intl.formatMessage( - { - id: 'xpack.reporting.listing.table.deleteNumConfirmTitle', - defaultMessage: `Delete {num} reports?`, - }, - { num: jobsToDelete.length } - ) - : intl.formatMessage( - { - id: 'xpack.reporting.listing.table.deleteConfirmTitle', - defaultMessage: `Delete the "{name}" report?`, - }, - { name: jobsToDelete[0].title } - ); - const message = intl.formatMessage({ - id: 'xpack.reporting.listing.table.deleteConfirmMessage', + ? i18n.translate('xpack.reporting.listing.table.deleteNumConfirmTitle', { + defaultMessage: `Delete {num} reports?`, + values: { num: jobsToDelete.length }, + }) + : i18n.translate('xpack.reporting.listing.table.deleteConfirmTitle', { + defaultMessage: `Delete the "{name}" report?`, + values: { name: jobsToDelete[0].title }, + }); + const message = i18n.translate('xpack.reporting.listing.table.deleteConfirmMessage', { defaultMessage: `You can't recover deleted reports.`, }); - const confirmButtonText = intl.formatMessage({ - id: 'xpack.reporting.listing.table.deleteConfirmButton', + const confirmButtonText = i18n.translate('xpack.reporting.listing.table.deleteConfirmButton', { defaultMessage: `Delete`, }); - const cancelButtonText = intl.formatMessage({ - id: 'xpack.reporting.listing.table.deleteCancelButton', + const cancelButtonText = i18n.translate('xpack.reporting.listing.table.deleteCancelButton', { defaultMessage: `Cancel`, }); @@ -78,7 +70,7 @@ export class ReportDeleteButton extends PureComponent { } public render() { - const { jobsToDelete, intl } = this.props; + const { jobsToDelete } = this.props; if (jobsToDelete.length === 0) return null; return ( @@ -89,13 +81,10 @@ export class ReportDeleteButton extends PureComponent { color={'danger'} data-test-subj="deleteReportButton" > - {intl.formatMessage( - { - id: 'xpack.reporting.listing.table.deleteReportButton', - defaultMessage: `Delete {num, plural, one {report} other {reports} }`, - }, - { num: jobsToDelete.length } - )} + {i18n.translate('xpack.reporting.listing.table.deleteReportButton', { + defaultMessage: `Delete {num, plural, one {report} other {reports} }`, + values: { num: jobsToDelete.length }, + })} {this.state.showConfirm ? this.renderConfirm() : null} diff --git a/x-pack/plugins/reporting/public/management/report_diagnostic.tsx b/x-pack/plugins/reporting/public/management/components/report_diagnostic.tsx similarity index 98% rename from x-pack/plugins/reporting/public/management/report_diagnostic.tsx rename to x-pack/plugins/reporting/public/management/components/report_diagnostic.tsx index ce585fe427e6c..124ce9af891a3 100644 --- a/x-pack/plugins/reporting/public/management/report_diagnostic.tsx +++ b/x-pack/plugins/reporting/public/management/components/report_diagnostic.tsx @@ -21,7 +21,7 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; -import { ReportingAPIClient, DiagnoseResponse } from '../lib/reporting_api_client'; +import { ReportingAPIClient, DiagnoseResponse } from '../../lib/reporting_api_client'; interface Props { apiClient: ReportingAPIClient; diff --git a/x-pack/plugins/reporting/public/management/components/report_info_button.tsx b/x-pack/plugins/reporting/public/management/components/report_info_button.tsx new file mode 100644 index 0000000000000..26e495e5908dc --- /dev/null +++ b/x-pack/plugins/reporting/public/management/components/report_info_button.tsx @@ -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. + */ + +import { EuiButtonEmpty, EuiToolTip } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { FunctionComponent } from 'react'; +import { Job } from '../../lib/job'; + +interface Props { + job: Job; + onClick: () => void; +} + +export const ReportInfoButton: FunctionComponent = ({ job, onClick }) => { + let message = i18n.translate('xpack.reporting.listing.table.reportInfoButtonTooltip', { + defaultMessage: 'See report info.', + }); + if (job.getError()) { + message = i18n.translate('xpack.reporting.listing.table.reportInfoAndErrorButtonTooltip', { + defaultMessage: 'See report info and error message.', + }); + } else if (job.getWarnings()) { + message = i18n.translate('xpack.reporting.listing.table.reportInfoAndWarningsButtonTooltip', { + defaultMessage: 'See report info and warnings.', + }); + } + + const showReportInfoCopy = i18n.translate( + 'xpack.reporting.listing.table.showReportInfoAriaLabel', + { + defaultMessage: 'Show report info', + } + ); + + return ( + + + {showReportInfoCopy} + + + ); +}; diff --git a/x-pack/plugins/reporting/public/management/components/report_info_flyout.tsx b/x-pack/plugins/reporting/public/management/components/report_info_flyout.tsx new file mode 100644 index 0000000000000..2a7d52cf9403b --- /dev/null +++ b/x-pack/plugins/reporting/public/management/components/report_info_flyout.tsx @@ -0,0 +1,93 @@ +/* + * 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, { FunctionComponent, useState, useEffect } from 'react'; +import useMountedState from 'react-use/lib/useMountedState'; +import { + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutHeader, + EuiPortal, + EuiText, + EuiTitle, + EuiLoadingSpinner, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { Job } from '../../lib/job'; +import { useInternalApiClient } from '../../lib/reporting_api_client'; + +import { ReportInfoFlyoutContent } from './report_info_flyout_content'; + +interface Props { + onClose: () => void; + job: Job; +} + +export const ReportInfoFlyout: FunctionComponent = ({ onClose, job }) => { + const [isLoading, setIsLoading] = useState(true); + const [loadingError, setLoadingError] = useState(); + const [info, setInfo] = useState(); + const isMounted = useMountedState(); + const { apiClient } = useInternalApiClient(); + + useEffect(() => { + (async function loadInfo() { + if (isLoading) { + try { + const infoResponse = await apiClient.getInfo(job.id); + if (isMounted()) { + setInfo(infoResponse); + } + } catch (err) { + if (isMounted()) { + setLoadingError(err); + } + } finally { + if (isMounted()) { + setIsLoading(false); + } + } + } + })(); + }, [isLoading, apiClient, job.id, isMounted]); + + return ( + + + + +

+ {loadingError + ? i18n.translate('xpack.reporting.listing.table.reportInfoUnableToFetch', { + defaultMessage: 'Unable to fetch report info.', + }) + : i18n.translate('xpack.reporting.listing.table.reportCalloutTitle', { + defaultMessage: 'Report info', + })} +

+
+
+ + {isLoading ? ( + + ) : loadingError ? undefined : !!info ? ( + + + + ) : undefined} + +
+
+ ); +}; diff --git a/x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx b/x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx new file mode 100644 index 0000000000000..25199c4abaa68 --- /dev/null +++ b/x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx @@ -0,0 +1,193 @@ +/* + * 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, { FunctionComponent } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiDescriptionList, EuiSpacer, EuiText } from '@elastic/eui'; + +import type { Job } from '../../lib/job'; +import { USES_HEADLESS_JOB_TYPES } from '../../../common/constants'; + +const NA = i18n.translate('xpack.reporting.listing.infoPanel.notApplicableLabel', { + defaultMessage: 'N/A', +}); + +const UNKNOWN = i18n.translate('xpack.reporting.listing.infoPanel.unknownLabel', { + defaultMessage: 'unknown', +}); + +const getDimensions = (info: Job): string => { + const defaultDimensions = { width: null, height: null }; + const { width, height } = info.layout?.dimensions || defaultDimensions; + if (width && height) { + return `Width: ${width} x Height: ${height}`; + } + return UNKNOWN; +}; + +interface Props { + info: Job; +} + +export const ReportInfoFlyoutContent: FunctionComponent = ({ info }) => { + const timeout = info.timeout ? info.timeout.toString() : NA; + + const jobInfo = [ + { + title: i18n.translate('xpack.reporting.listing.infoPanel.titleInfo', { + defaultMessage: 'Title', + }), + description: info.title || NA, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.createdAtInfo', { + defaultMessage: 'Created at', + }), + description: info.getCreatedAtLabel(), + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.statusInfo', { + defaultMessage: 'Status', + }), + description: info.getStatus(), + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.tzInfo', { + defaultMessage: 'Time zone', + }), + description: info.browserTimezone || NA, + }, + ]; + + const processingInfo = [ + { + title: i18n.translate('xpack.reporting.listing.infoPanel.startedAtInfo', { + defaultMessage: 'Started at', + }), + description: info.started_at || NA, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.completedAtInfo', { + defaultMessage: 'Completed at', + }), + description: info.completed_at || NA, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.processedByInfo', { + defaultMessage: 'Processed by', + }), + description: + info.kibana_name && info.kibana_id ? `${info.kibana_name} (${info.kibana_id})` : NA, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.contentTypeInfo', { + defaultMessage: 'Content type', + }), + description: info.content_type || NA, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.sizeInfo', { + defaultMessage: 'Size in bytes', + }), + description: info.size?.toString() || NA, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.attemptsInfo', { + defaultMessage: 'Attempts', + }), + description: info.attempts.toString(), + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.maxAttemptsInfo', { + defaultMessage: 'Max attempts', + }), + description: info.max_attempts?.toString() || NA, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.timeoutInfo', { + defaultMessage: 'Timeout', + }), + description: timeout, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.exportTypeInfo', { + defaultMessage: 'Export type', + }), + description: info.isDeprecated + ? i18n.translate('xpack.reporting.listing.table.reportCalloutExportTypeDeprecated', { + defaultMessage: '{jobtype} (DEPRECATED)', + values: { jobtype: info.jobtype }, + }) + : info.jobtype, + }, + + // TODO: when https://github.com/elastic/kibana/pull/106137 is merged, add kibana version field + ]; + + const jobScreenshot = [ + { + title: i18n.translate('xpack.reporting.listing.infoPanel.dimensionsInfo', { + defaultMessage: 'Dimensions', + }), + description: getDimensions(info), + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.layoutInfo', { + defaultMessage: 'Layout', + }), + description: info.layout?.id || UNKNOWN, + }, + { + title: i18n.translate('xpack.reporting.listing.infoPanel.browserTypeInfo', { + defaultMessage: 'Browser type', + }), + description: info.browser_type || NA, + }, + ]; + + const warnings = info.getWarnings(); + const warningsInfo = warnings && [ + { + title: Warnings, + description: {warnings}, + }, + ]; + + const errored = info.getError(); + const errorInfo = errored && [ + { + title: Error, + description: {errored}, + }, + ]; + + return ( + <> + + + + {USES_HEADLESS_JOB_TYPES.includes(info.jobtype) ? ( + <> + + + + ) : null} + {warningsInfo ? ( + <> + + + + ) : null} + {errorInfo ? ( + <> + + + + ) : null} + + ); +}; diff --git a/x-pack/plugins/reporting/public/management/components/report_status_indicator.tsx b/x-pack/plugins/reporting/public/management/components/report_status_indicator.tsx new file mode 100644 index 0000000000000..21fd0fc76745c --- /dev/null +++ b/x-pack/plugins/reporting/public/management/components/report_status_indicator.tsx @@ -0,0 +1,101 @@ +/* + * 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, { FC, useMemo } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingSpinner, EuiToolTip } from '@elastic/eui'; + +import type { Job } from '../../lib/job'; +import { JOB_STATUSES } from '../../../common/constants'; +import { jobHasIssues } from '../utils'; + +interface Props { + job: Job; +} + +const i18nTexts = { + completed: i18n.translate('xpack.reporting.statusIndicator.completedLabel', { + defaultMessage: 'Done', + }), + completedWithWarnings: i18n.translate( + 'xpack.reporting.statusIndicator.completedWithWarningsLabel', + { + defaultMessage: 'Done, warnings detected', + } + ), + pending: i18n.translate('xpack.reporting.statusIndicator.pendingLabel', { + defaultMessage: 'Pending', + }), + processing: ({ attempt, of }: { attempt: number; of?: number }) => + of !== undefined + ? i18n.translate('xpack.reporting.statusIndicator.processingMaxAttemptsLabel', { + defaultMessage: `Processing, attempt {attempt} of {of}`, + values: { attempt, of }, + }) + : i18n.translate('xpack.reporting.statusIndicator.processingLabel', { + defaultMessage: `Processing, attempt {attempt}`, + values: { attempt }, + }), + failed: i18n.translate('xpack.reporting.statusIndicator.failedLabel', { + defaultMessage: 'Failed', + }), + unknown: i18n.translate('xpack.reporting.statusIndicator.unknownLabel', { + defaultMessage: 'Unknown', + }), + lastStatusUpdate: ({ date }: { date: string }) => + i18n.translate('xpack.reporting.statusIndicator.lastStatusUpdateLabel', { + defaultMessage: 'Updated at {date}', + values: { date }, + }), +}; + +export const ReportStatusIndicator: FC = ({ job }) => { + const hasIssues = useMemo(() => jobHasIssues(job), [job]); + + let icon: JSX.Element; + let statusText: string; + + switch (job.status) { + case JOB_STATUSES.COMPLETED: + if (hasIssues) { + icon = ; + statusText = i18nTexts.completedWithWarnings; + break; + } + icon = ; + statusText = i18nTexts.completed; + break; + case JOB_STATUSES.WARNINGS: + icon = ; + statusText = i18nTexts.completedWithWarnings; + break; + case JOB_STATUSES.PENDING: + icon = ; + statusText = i18nTexts.pending; + break; + case JOB_STATUSES.PROCESSING: + icon = ; + statusText = i18nTexts.processing({ attempt: job.attempts, of: job.max_attempts }); + break; + case JOB_STATUSES.FAILED: + icon = ; + statusText = i18nTexts.failed; + break; + default: + icon = ; + statusText = i18nTexts.unknown; + } + + return ( + + + {icon} + {statusText} + + + ); +}; diff --git a/x-pack/plugins/reporting/public/management/index.ts b/x-pack/plugins/reporting/public/management/index.ts index 4d324135288db..7bd7845051d2c 100644 --- a/x-pack/plugins/reporting/public/management/index.ts +++ b/x-pack/plugins/reporting/public/management/index.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { InjectedIntl } from '@kbn/i18n/react'; import { ApplicationStart, ToastsSetup } from 'src/core/public'; import { LicensingPluginSetup } from '../../../licensing/public'; import { UseIlmPolicyStatusReturn } from '../lib/ilm_policy_status_context'; @@ -14,7 +13,6 @@ import { ClientConfigType } from '../plugin'; import type { SharePluginSetup } from '../shared_imports'; export interface ListingProps { - intl: InjectedIntl; apiClient: ReportingAPIClient; capabilities: ApplicationStart['capabilities']; license$: LicensingPluginSetup['license$']; // FIXME: license$ is deprecated diff --git a/x-pack/plugins/reporting/public/management/report_download_button.tsx b/x-pack/plugins/reporting/public/management/report_download_button.tsx deleted file mode 100644 index f21c83fbf42da..0000000000000 --- a/x-pack/plugins/reporting/public/management/report_download_button.tsx +++ /dev/null @@ -1,65 +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 { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; -import { InjectedIntl } from '@kbn/i18n/react'; -import React, { FunctionComponent } from 'react'; -import { JOB_STATUSES } from '../../common/constants'; -import { Job as ListingJob } from '../lib/job'; -import { ReportingAPIClient } from '../lib/reporting_api_client'; - -interface Props { - intl: InjectedIntl; - apiClient: ReportingAPIClient; - job: ListingJob; -} - -export const ReportDownloadButton: FunctionComponent = (props: Props) => { - const { job, apiClient, intl } = props; - - if (job.status !== JOB_STATUSES.COMPLETED && job.status !== JOB_STATUSES.WARNINGS) { - return null; - } - - const button = ( - apiClient.downloadReport(job.id)} - iconType="importAction" - aria-label={intl.formatMessage({ - id: 'xpack.reporting.listing.table.downloadReportAriaLabel', - defaultMessage: 'Download report', - })} - /> - ); - - const warnings = job.getWarnings(); - if (warnings) { - return ( - - {button} - - ); - } - - return ( - - {button} - - ); -}; diff --git a/x-pack/plugins/reporting/public/management/report_info_button.test.tsx b/x-pack/plugins/reporting/public/management/report_info_button.test.tsx deleted file mode 100644 index c52027355ac5e..0000000000000 --- a/x-pack/plugins/reporting/public/management/report_info_button.test.tsx +++ /dev/null @@ -1,81 +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 React from 'react'; -import { mountWithIntl } from '@kbn/test/jest'; -import { coreMock } from '../../../../../src/core/public/mocks'; -import { Job } from '../lib/job'; -import { ReportInfoButton } from './report_info_button'; - -jest.mock('../lib/reporting_api_client'); - -import { ReportingAPIClient } from '../lib/reporting_api_client'; - -const coreSetup = coreMock.createSetup(); -const apiClient = new ReportingAPIClient(coreSetup.http, coreSetup.uiSettings, '7.15.0'); - -const job = new Job({ - id: 'abc-123', - index: '.reporting-2020.04.12', - migration_version: '7.15.0', - attempts: 0, - browser_type: 'chromium', - created_at: '2020-04-14T21:01:13.064Z', - created_by: 'elastic', - jobtype: 'printable_pdf', - max_attempts: 1, - meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, - payload: { - browserTimezone: 'America/Phoenix', - version: '7.15.0-test', - layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, - objectType: 'canvas workpad', - title: 'My Canvas Workpad', - }, - process_expiration: '1970-01-01T00:00:00.000Z', - status: 'pending', - timeout: 300000, -}); - -describe('ReportInfoButton', () => { - it('handles button click flyout on click', () => { - const wrapper = mountWithIntl(); - const input = wrapper.find('[data-test-subj="reportInfoButton"]').hostNodes(); - expect(input).toMatchSnapshot(); - }); - - it('opens flyout with info', async () => { - const wrapper = mountWithIntl(); - const input = wrapper.find('[data-test-subj="reportInfoButton"]').hostNodes(); - - input.simulate('click'); - - const flyout = wrapper.find('[data-test-subj="reportInfoFlyout"]'); - expect(flyout).toMatchSnapshot(); - - expect(apiClient.getInfo).toHaveBeenCalledTimes(1); - expect(apiClient.getInfo).toHaveBeenCalledWith('abc-123'); - }); - - it('opens flyout with fetch error info', () => { - // simulate fetch failure - apiClient.getInfo = jest.fn(() => { - throw new Error('Could not fetch the job info'); - }); - - const wrapper = mountWithIntl(); - const input = wrapper.find('[data-test-subj="reportInfoButton"]').hostNodes(); - - input.simulate('click'); - - const flyout = wrapper.find('[data-test-subj="reportInfoFlyout"]'); - expect(flyout).toMatchSnapshot(); - - expect(apiClient.getInfo).toHaveBeenCalledTimes(1); - expect(apiClient.getInfo).toHaveBeenCalledWith('abc-123'); - }); -}); diff --git a/x-pack/plugins/reporting/public/management/report_info_button.tsx b/x-pack/plugins/reporting/public/management/report_info_button.tsx deleted file mode 100644 index 7a70286785e4f..0000000000000 --- a/x-pack/plugins/reporting/public/management/report_info_button.tsx +++ /dev/null @@ -1,377 +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 { - EuiButtonIcon, - EuiDescriptionList, - EuiFlyout, - EuiFlyoutBody, - EuiFlyoutHeader, - EuiPortal, - EuiSpacer, - EuiText, - EuiTitle, - EuiToolTip, -} from '@elastic/eui'; -import { injectI18n } from '@kbn/i18n/react'; -import React, { Component } from 'react'; -import { USES_HEADLESS_JOB_TYPES } from '../../common/constants'; -import { Job } from '../lib/job'; -import { ReportingAPIClient } from '../lib/reporting_api_client'; -import { ListingProps } from '.'; - -interface Props extends Pick { - apiClient: ReportingAPIClient; - job: Job; -} - -interface State { - isLoading: boolean; - isFlyoutVisible: boolean; - calloutTitle: string; - info: Job | null; - error: Error | null; -} - -const NA = 'n/a'; -const UNKNOWN = 'unknown'; - -const getDimensions = (info: Job): string => { - const defaultDimensions = { width: null, height: null }; - const { width, height } = info.layout?.dimensions || defaultDimensions; - if (width && height) { - return `Width: ${width} x Height: ${height}`; - } - return UNKNOWN; -}; - -class ReportInfoButtonUi extends Component { - private mounted?: boolean; - - constructor(props: Props) { - super(props); - - this.state = { - isLoading: false, - isFlyoutVisible: false, - calloutTitle: props.intl.formatMessage({ - id: 'xpack.reporting.listing.table.reportCalloutTitle', - defaultMessage: 'Report info', - }), - info: null, - error: null, - }; - - this.closeFlyout = this.closeFlyout.bind(this); - this.showFlyout = this.showFlyout.bind(this); - } - - public renderInfo() { - const { info, error: err } = this.state; - if (err) { - return err.message; - } - if (!info) { - return null; - } - - const timeout = info.timeout ? info.timeout.toString() : NA; - - const jobInfo = [ - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.titleInfo', - defaultMessage: 'Title', - }), - description: info.title || NA, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.createdAtInfo', - defaultMessage: 'Created at', - }), - description: info.getCreatedAtLabel(), - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.statusInfo', - defaultMessage: 'Status', - }), - description: info.getStatus(), - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.tzInfo', - defaultMessage: 'Time zone', - }), - description: info.browserTimezone || NA, - }, - ]; - - const processingInfo = [ - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.startedAtInfo', - defaultMessage: 'Started at', - }), - description: info.started_at || NA, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.completedAtInfo', - defaultMessage: 'Completed at', - }), - description: info.completed_at || NA, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.processedByInfo', - defaultMessage: 'Processed by', - }), - description: - info.kibana_name && info.kibana_id ? `${info.kibana_name} (${info.kibana_id})` : NA, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.contentTypeInfo', - defaultMessage: 'Content type', - }), - description: info.content_type || NA, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.sizeInfo', - defaultMessage: 'Size in bytes', - }), - description: info.size?.toString() || NA, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.attemptsInfo', - defaultMessage: 'Attempts', - }), - description: info.attempts.toString(), - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.maxAttemptsInfo', - defaultMessage: 'Max attempts', - }), - description: info.max_attempts?.toString() || NA, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.timeoutInfo', - defaultMessage: 'Timeout', - }), - description: timeout, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.exportTypeInfo', - defaultMessage: 'Export type', - }), - description: info.isDeprecated - ? this.props.intl.formatMessage( - { - id: 'xpack.reporting.listing.table.reportCalloutExportTypeDeprecated', - defaultMessage: '{jobtype} (DEPRECATED)', - }, - { jobtype: info.jobtype } - ) - : info.jobtype, - }, - - // TODO when https://github.com/elastic/kibana/pull/106137 is merged, add kibana version field - ]; - - const jobScreenshot = [ - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.dimensionsInfo', - defaultMessage: 'Dimensions', - }), - description: getDimensions(info), - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.layoutInfo', - defaultMessage: 'Layout', - }), - description: info.layout?.id || UNKNOWN, - }, - { - title: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.infoPanel.browserTypeInfo', - defaultMessage: 'Browser type', - }), - description: info.browser_type || NA, - }, - ]; - - const warnings = info.getWarnings(); - const warningsInfo = warnings && [ - { - title: Warnings, - description: {warnings}, - }, - ]; - - const errored = info.getError(); - const errorInfo = errored && [ - { - title: Error, - description: {errored}, - }, - ]; - - return ( - <> - - - - {USES_HEADLESS_JOB_TYPES.includes(info.jobtype) ? ( - <> - - - - ) : null} - {warningsInfo ? ( - <> - - - - ) : null} - {errorInfo ? ( - <> - - - - ) : null} - - ); - } - - public componentWillUnmount() { - this.mounted = false; - } - - public componentDidMount() { - this.mounted = true; - } - - public render() { - const job = this.props.job; - let flyout; - - if (this.state.isFlyoutVisible) { - flyout = ( - - - - -

{this.state.calloutTitle}

-
-
- - {this.renderInfo()} - -
-
- ); - } - - let message = this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.table.reportInfoButtonTooltip', - defaultMessage: 'See report info.', - }); - if (job.getError()) { - message = this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.table.reportInfoAndErrorButtonTooltip', - defaultMessage: 'See report info and error message.', - }); - } else if (job.getWarnings()) { - message = this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.table.reportInfoAndWarningsButtonTooltip', - defaultMessage: 'See report info and warnings.', - }); - } - - let buttonIconType = 'iInCircle'; - let buttonColor: 'primary' | 'danger' | 'warning' = 'primary'; - if (job.getWarnings() || job.getError()) { - buttonIconType = 'alert'; - buttonColor = 'danger'; - } - if (job.getWarnings()) { - buttonColor = 'warning'; - } - - return ( - <> - - - - {flyout} - - ); - } - - private loadInfo = async () => { - this.setState({ isLoading: true }); - try { - const info = await this.props.apiClient.getInfo(this.props.job.id); - if (this.mounted) { - this.setState({ isLoading: false, info }); - } - } catch (err) { - if (this.mounted) { - this.setState({ - isLoading: false, - calloutTitle: this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.table.reportInfoUnableToFetch', - defaultMessage: 'Unable to fetch report info.', - }), - info: null, - error: err, - }); - } - } - }; - - private closeFlyout = () => { - this.setState({ - isFlyoutVisible: false, - info: null, // force re-read for next click - }); - }; - - private showFlyout = () => { - this.setState({ isFlyoutVisible: true }); - - if (!this.state.info) { - this.loadInfo(); - } - }; -} - -export const ReportInfoButton = injectI18n(ReportInfoButtonUi); diff --git a/x-pack/plugins/reporting/public/management/report_listing.scss b/x-pack/plugins/reporting/public/management/report_listing.scss new file mode 100644 index 0000000000000..7e85838ba09cd --- /dev/null +++ b/x-pack/plugins/reporting/public/management/report_listing.scss @@ -0,0 +1,7 @@ +.kbnReporting { + &__reportListing { + &__typeIcon { + padding-left: $euiSizeS; + } + } +} diff --git a/x-pack/plugins/reporting/public/management/report_listing.test.tsx b/x-pack/plugins/reporting/public/management/report_listing.test.tsx index 5e80c2d666c23..577d64be38a54 100644 --- a/x-pack/plugins/reporting/public/management/report_listing.test.tsx +++ b/x-pack/plugins/reporting/public/management/report_listing.test.tsx @@ -7,16 +7,17 @@ import { registerTestBed } from '@kbn/test/jest'; import type { SerializableRecord, UnwrapPromise } from '@kbn/utility-types'; -import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import React from 'react'; import { act } from 'react-dom/test-utils'; import type { Observable } from 'rxjs'; +import type { IUiSettingsClient } from 'src/core/public'; import { ListingProps as Props, ReportListing } from '.'; import type { NotificationsSetup } from '../../../../../src/core/public'; import { applicationServiceMock, httpServiceMock, notificationServiceMock, + coreMock, } from '../../../../../src/core/public/mocks'; import type { LocatorPublic, SharePluginSetup } from '../../../../../src/plugins/share/public'; import type { ILicense } from '../../../licensing/public'; @@ -65,12 +66,18 @@ const mockJobs: ReportApiJSON[] = [ id: 'k90e51pk1ieucbae0c3t8wo2', attempts: 0, created_at: '2020-04-14T21:01:13.064Z', - jobtype: 'printable_pdf', + jobtype: 'printable_pdf_v2', meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, payload: { + spaceId: 'my-space', objectType: 'canvas workpad', title: 'My Canvas Workpad', - }, + locatorParams: [ + { + id: 'MY_APP', + }, + ], + } as any, status: 'pending', }), buildMockReport({ @@ -201,12 +208,6 @@ const mockJobs: ReportApiJSON[] = [ }), ]; -const reportingAPIClient = { - list: jest.fn(() => Promise.resolve(mockJobs.map((j) => new Job(j)))), - total: jest.fn(() => Promise.resolve(18)), - migrateReportingIndicesIlmPolicy: jest.fn(), -} as unknown as DeeplyMockedKeys; - const validCheck = { check: () => ({ state: 'VALID', @@ -233,11 +234,13 @@ const mockPollConfig = { describe('ReportListing', () => { let httpService: ReturnType; + let uiSettingsClient: IUiSettingsClient; let applicationService: ReturnType; let ilmLocator: undefined | LocatorPublic; let urlService: SharePluginSetup['url']; let testBed: UnwrapPromise>; let toasts: NotificationsSetup['toasts']; + let reportingAPIClient: ReportingAPIClient; const createTestBed = registerTestBed( (props?: Partial) => ( @@ -290,6 +293,7 @@ describe('ReportListing', () => { beforeEach(async () => { toasts = notificationServiceMock.createSetupContract().toasts; httpService = httpServiceMock.createSetupContract(); + uiSettingsClient = coreMock.createSetup().uiSettings; applicationService = applicationServiceMock.createStartContract(); applicationService.capabilities = { catalogue: {}, @@ -300,6 +304,16 @@ describe('ReportListing', () => { getUrl: jest.fn(), } as unknown as LocatorPublic; + reportingAPIClient = new ReportingAPIClient(httpService, uiSettingsClient, 'x.x.x'); + + jest + .spyOn(reportingAPIClient, 'list') + .mockImplementation(() => Promise.resolve(mockJobs.map((j) => new Job(j)))); + jest.spyOn(reportingAPIClient, 'total').mockImplementation(() => Promise.resolve(18)); + jest + .spyOn(reportingAPIClient, 'migrateReportingIndicesIlmPolicy') + .mockImplementation(jest.fn()); + urlService = { locators: { get: () => ilmLocator, @@ -312,10 +326,9 @@ describe('ReportListing', () => { jest.clearAllMocks(); }); - it('Report job listing with some items', () => { - const { actions } = testBed; - const table = actions.findListTable(); - expect(table).toMatchSnapshot(); + it('renders a listing with some items', () => { + const { find } = testBed; + expect(find('reportDownloadLink').length).toBe(mockJobs.length); }); it('subscribes to license changes, and unsubscribes on dismount', async () => { @@ -334,6 +347,21 @@ describe('ReportListing', () => { expect(unsubscribeMock).toHaveBeenCalled(); }); + it('navigates to a Kibana App in a new tab and is spaces aware', () => { + const { find } = testBed; + + jest.spyOn(window, 'open').mockImplementation(jest.fn()); + jest.spyOn(window, 'focus').mockImplementation(jest.fn()); + + find('euiCollapsedItemActionsButton').first().simulate('click'); + find('reportOpenInKibanaApp').first().simulate('click'); + + expect(window.open).toHaveBeenCalledWith( + '/s/my-space/app/reportingRedirect?jobId=k90e51pk1ieucbae0c3t8wo2', + '_blank' + ); + }); + describe('ILM policy', () => { beforeEach(async () => { httpService = httpServiceMock.createSetupContract(); @@ -414,7 +442,9 @@ describe('ReportListing', () => { it('informs users when migrations failed', async () => { const status: IlmPolicyMigrationStatus = 'indices-not-managed-by-policy'; httpService.get.mockResolvedValueOnce({ status }); - reportingAPIClient.migrateReportingIndicesIlmPolicy.mockRejectedValueOnce(new Error('oops!')); + (reportingAPIClient.migrateReportingIndicesIlmPolicy as jest.Mock).mockRejectedValueOnce( + new Error('oops!') + ); await runSetup(); const { actions } = testBed; diff --git a/x-pack/plugins/reporting/public/management/report_listing.tsx b/x-pack/plugins/reporting/public/management/report_listing.tsx index 6b46778011250..46c375cd8880f 100644 --- a/x-pack/plugins/reporting/public/management/report_listing.tsx +++ b/x-pack/plugins/reporting/public/management/report_listing.tsx @@ -12,15 +12,17 @@ import { EuiLoadingSpinner, EuiPageHeader, EuiSpacer, - EuiText, - EuiTextColor, + EuiBasicTableColumn, + EuiIconTip, + EuiLink, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { FormattedMessage, injectI18n } from '@kbn/i18n/react'; +import { FormattedMessage } from '@kbn/i18n/react'; import { Component, default as React, Fragment } from 'react'; import { Subscription } from 'rxjs'; import { ILicense } from '../../../licensing/public'; -import { REPORT_TABLE_ID, REPORT_TABLE_ROW_ID } from '../../common/constants'; +import { REPORT_TABLE_ID, REPORT_TABLE_ROW_ID, JOB_STATUSES } from '../../common/constants'; +import { prettyPrintJobType } from '../../common/job_utils'; import { Poller } from '../../common/poller'; import { durationToNumber } from '../../common/schema_utils'; import { useIlmPolicyStatus } from '../lib/ilm_policy_status_context'; @@ -28,13 +30,20 @@ import { Job } from '../lib/job'; import { checkLicense } from '../lib/license_check'; import { useInternalApiClient } from '../lib/reporting_api_client'; import { useKibana } from '../shared_imports'; -import { IlmPolicyLink } from './ilm_policy_link'; -import { MigrateIlmPolicyCallOut } from './migrate_ilm_policy_callout'; -import { ReportDeleteButton } from './report_delete_button'; -import { ReportDiagnostic } from './report_diagnostic'; -import { ReportDownloadButton } from './report_download_button'; -import { ReportInfoButton } from './report_info_button'; import { ListingProps as Props } from './'; +import { PDF_JOB_TYPE_V2, PNG_JOB_TYPE_V2 } from '../../common/constants'; +import { + IlmPolicyLink, + MigrateIlmPolicyCallOut, + ReportDeleteButton, + ReportDiagnostic, + ReportStatusIndicator, + ReportInfoFlyout, +} from './components'; +import { guessAppIconTypeFromObjectType } from './utils'; +import './report_listing.scss'; + +type TableColumn = EuiBasicTableColumn; interface State { page: number; @@ -45,6 +54,7 @@ interface State { showLinks: boolean; enableLinks: boolean; badLicenseMessage: string; + selectedJob: undefined | Job; } class ReportListingUi extends Component { @@ -65,6 +75,7 @@ class ReportListingUi extends Component { showLinks: false, enableLinks: false, badLicenseMessage: '', + selectedJob: undefined, }; this.isInitialJobsFetch = true; @@ -177,23 +188,19 @@ class ReportListingUi extends Component { await this.props.apiClient.deleteReport(job.id); this.removeJob(job); this.props.toasts.addSuccess( - this.props.intl.formatMessage( - { - id: 'xpack.reporting.listing.table.deleteConfim', - defaultMessage: `The {reportTitle} report was deleted`, + i18n.translate('xpack.reporting.listing.table.deleteConfim', { + defaultMessage: `The {reportTitle} report was deleted`, + values: { + reportTitle: job.title, }, - { reportTitle: job.title } - ) + }) ); } catch (error) { this.props.toasts.addDanger( - this.props.intl.formatMessage( - { - id: 'xpack.reporting.listing.table.deleteFailedErrorMessage', - defaultMessage: `The report was not deleted: {error}`, - }, - { error } - ) + i18n.translate('xpack.reporting.listing.table.deleteFailedErrorMessage', { + defaultMessage: `The report was not deleted: {error}`, + values: { error }, + }) ); throw error; } @@ -240,8 +247,7 @@ class ReportListingUi extends Component { if (fetchError.message === 'Failed to fetch') { this.props.toasts.addDanger( fetchError.message || - this.props.intl.formatMessage({ - id: 'xpack.reporting.listing.table.requestFailedErrorMessage', + i18n.translate('xpack.reporting.listing.table.requestFailedErrorMessage', { defaultMessage: 'Request failed', }) ); @@ -265,61 +271,176 @@ class ReportListingUi extends Component { return this.state.showLinks && this.state.enableLinks; }; - private renderTable() { - const { intl } = this.props; + /** + * Widths like this are not the best, but the auto-layout does not play well with text in links. We can update + * this with something that works better on all screen sizes. This works for desktop, mobile fallback is provided on a + * per column basis. + */ + private readonly tableColumnWidths = { + type: '5%', + title: '30%', + status: '20%', + createdAt: '25%', + content: '10%', + actions: '10%', + }; - const tableColumns = [ + private renderTable() { + const { tableColumnWidths } = this; + const tableColumns: TableColumn[] = [ + { + field: 'type', + width: tableColumnWidths.type, + name: i18n.translate('xpack.reporting.listing.tableColumns.typeTitle', { + defaultMessage: 'Type', + }), + render: (_type: string, job) => { + return ( +
+ +
+ ); + }, + mobileOptions: { + show: true, + render: (job) => { + return
{job.objectType}
; + }, + }, + }, { field: 'title', - name: intl.formatMessage({ - id: 'xpack.reporting.listing.tableColumns.reportTitle', - defaultMessage: 'Report', + name: i18n.translate('xpack.reporting.listing.tableColumns.reportTitle', { + defaultMessage: 'Title', }), - render: (objectTitle: string, job: Job) => { + width: tableColumnWidths.title, + render: (objectTitle: string, job) => { return (
-
{objectTitle}
- - {job.objectType} - + this.setState({ selectedJob: job })}> + {objectTitle || + i18n.translate('xpack.reporting.listing.table.noTitleLabel', { + defaultMessage: 'Untitled', + })} +
); }, + mobileOptions: { + header: false, + width: '100%', // This is not recognized by EUI types but has an effect, leaving for now + } as unknown as { header: boolean }, + }, + { + field: 'status', + width: tableColumnWidths.status, + name: i18n.translate('xpack.reporting.listing.tableColumns.statusTitle', { + defaultMessage: 'Status', + }), + render: (_status: string, job) => { + return ( + + + + ); + }, + mobileOptions: { + show: false, + }, }, { field: 'created_at', - name: intl.formatMessage({ - id: 'xpack.reporting.listing.tableColumns.createdAtTitle', + width: tableColumnWidths.createdAt, + name: i18n.translate('xpack.reporting.listing.tableColumns.createdAtTitle', { defaultMessage: 'Created at', }), - render: (_createdAt: string, job: Job) => ( -
{job.getCreatedAtLabel()}
+ render: (_createdAt: string, job) => ( +
{job.getCreatedAtDate()}
), + mobileOptions: { + show: false, + }, }, { - field: 'status', - name: intl.formatMessage({ - id: 'xpack.reporting.listing.tableColumns.statusTitle', - defaultMessage: 'Status', + field: 'content', + width: tableColumnWidths.content, + name: i18n.translate('xpack.reporting.listing.tableColumns.content', { + defaultMessage: 'Content', }), - render: (_status: string, job: Job) => ( -
{job.getStatusLabel()}
- ), + render: (_status: string, job) => prettyPrintJobType(job.jobtype), + mobileOptions: { + show: false, + }, }, { - name: intl.formatMessage({ - id: 'xpack.reporting.listing.tableColumns.actionsTitle', + name: i18n.translate('xpack.reporting.listing.tableColumns.actionsTitle', { defaultMessage: 'Actions', }), + width: tableColumnWidths.actions, actions: [ { - render: (job: Job) => { - return ( -
- - -
- ); + isPrimary: true, + 'data-test-subj': 'reportDownloadLink', + type: 'icon', + icon: 'download', + name: i18n.translate('xpack.reporting.listing.table.downloadReportButtonLabel', { + defaultMessage: 'Download report', + }), + description: i18n.translate('xpack.reporting.listing.table.downloadReportDescription', { + defaultMessage: 'Download this report in a new tab.', + }), + onClick: (job) => this.props.apiClient.downloadReport(job.id), + enabled: (job) => + job.status === JOB_STATUSES.COMPLETED || job.status === JOB_STATUSES.WARNINGS, + }, + { + name: i18n.translate( + 'xpack.reporting.listing.table.viewReportingInfoActionButtonLabel', + { + defaultMessage: 'View report info', + } + ), + description: i18n.translate( + 'xpack.reporting.listing.table.viewReportingInfoActionButtonDescription', + { + defaultMessage: 'View additional information about this report.', + } + ), + type: 'icon', + icon: 'iInCircle', + onClick: (job) => this.setState({ selectedJob: job }), + }, + { + name: i18n.translate('xpack.reporting.listing.table.openInKibanaAppLabel', { + defaultMessage: 'Open in Kibana App', + }), + 'data-test-subj': 'reportOpenInKibanaApp', + description: i18n.translate( + 'xpack.reporting.listing.table.openInKibanaAppDescription', + { + defaultMessage: 'Open the Kibana App where this report was generated.', + } + ), + available: (job) => + [PDF_JOB_TYPE_V2, PNG_JOB_TYPE_V2].some( + (linkableJobType) => linkableJobType === job.jobtype + ), + type: 'icon', + icon: 'popout', + onClick: (job) => { + const href = this.props.apiClient.getKibanaAppHref(job); + window.open(href, '_blank'); + window.focus(); }, }, ], @@ -358,12 +479,10 @@ class ReportListingUi extends Component { columns={tableColumns} noItemsMessage={ this.state.isLoading - ? intl.formatMessage({ - id: 'xpack.reporting.listing.table.loadingReportsDescription', + ? i18n.translate('xpack.reporting.listing.table.loadingReportsDescription', { defaultMessage: 'Loading reports', }) - : intl.formatMessage({ - id: 'xpack.reporting.listing.table.noCreatedReportsDescription', + : i18n.translate('xpack.reporting.listing.table.noCreatedReportsDescription', { defaultMessage: 'No reports have been created', }) } @@ -374,13 +493,17 @@ class ReportListingUi extends Component { data-test-subj={REPORT_TABLE_ID} rowProps={() => ({ 'data-test-subj': REPORT_TABLE_ROW_ID })} /> + {!!this.state.selectedJob && ( + this.setState({ selectedJob: undefined })} + job={this.state.selectedJob} + /> + )} ); } } -const PrivateReportListing = injectI18n(ReportListingUi); - export const ReportListing = ( props: Omit ) => { @@ -392,7 +515,7 @@ export const ReportListing = ( }, } = useKibana(); return ( - { + switch (type) { + case 'search': + return 'discoverApp'; + case 'dashboard': + return 'dashboardApp'; + case 'visualization': + return 'visualizeApp'; + case 'canvas workpad': + return 'canvasApp'; + default: + return 'apps'; + } +}; + +export const jobHasIssues = (job: Job): boolean => { + return ( + Boolean(job.getWarnings()) || + [JOB_STATUSES.WARNINGS, JOB_STATUSES.FAILED].some((status) => job.status === status) + ); +}; diff --git a/x-pack/plugins/reporting/public/plugin.ts b/x-pack/plugins/reporting/public/plugin.ts index 7fd6047470a0e..fe80ed679c8ed 100644 --- a/x-pack/plugins/reporting/public/plugin.ts +++ b/x-pack/plugins/reporting/public/plugin.ts @@ -41,9 +41,9 @@ import type { UiActionsSetup, UiActionsStart, } from './shared_imports'; +import { AppNavLinkStatus } from './shared_imports'; import { ReportingCsvShareProvider } from './share_context_menu/register_csv_reporting'; import { reportingScreenshotShareProvider } from './share_context_menu/register_pdf_png_reporting'; -import { isRedirectAppPath } from './utils'; export interface ClientConfigType { poll: { jobsRefresh: { interval: number; intervalErrorMultiplier: number } }; @@ -173,15 +173,6 @@ export class ReportingPublicPlugin title: this.title, order: 1, mount: async (params) => { - // The redirect app will be mounted if reporting is opened on a specific path. The redirect app expects a - // specific environment to be present so that it can navigate to a specific application. This is used by - // report generation to navigate to the correct place with full app state. - if (isRedirectAppPath(params.history.location.pathname)) { - const { mountRedirectApp } = await import('./redirect'); - return mountRedirectApp({ ...params, share, apiClient }); - } - - // Otherwise load the reporting management UI. params.setBreadcrumbs([{ text: this.breadcrumbText }]); const [[start], { mountManagementSection }] = await Promise.all([ getStartServices(), @@ -208,6 +199,19 @@ export class ReportingPublicPlugin }, }); + core.application.register({ + id: 'reportingRedirect', + mount: async (params) => { + const { mountRedirectApp } = await import('./redirect'); + return mountRedirectApp({ ...params, share, apiClient }); + }, + title: 'Reporting redirect app', + searchable: false, + chromeless: true, + exactRoute: true, + navLinkStatus: AppNavLinkStatus.hidden, + }); + uiActions.addTriggerAction( CONTEXT_MENU_TRIGGER, new ReportingCsvPanelAction({ core, apiClient, startServices$, license$, usesUiCapabilities }) diff --git a/x-pack/plugins/reporting/public/redirect/mount_redirect_app.tsx b/x-pack/plugins/reporting/public/redirect/mount_redirect_app.tsx index 4bf6d40acb170..eb34fc71cbf4e 100644 --- a/x-pack/plugins/reporting/public/redirect/mount_redirect_app.tsx +++ b/x-pack/plugins/reporting/public/redirect/mount_redirect_app.tsx @@ -9,12 +9,13 @@ import { render, unmountComponentAtNode } from 'react-dom'; import React from 'react'; import { EuiErrorBoundary } from '@elastic/eui'; -import type { ManagementAppMountParams, SharePluginSetup } from '../shared_imports'; +import type { AppMountParameters } from 'kibana/public'; +import type { SharePluginSetup } from '../shared_imports'; import type { ReportingAPIClient } from '../lib/reporting_api_client'; import { RedirectApp } from './redirect_app'; -interface MountParams extends ManagementAppMountParams { +interface MountParams extends AppMountParameters { apiClient: ReportingAPIClient; share: SharePluginSetup; } diff --git a/x-pack/plugins/reporting/public/redirect/redirect_app.scss b/x-pack/plugins/reporting/public/redirect/redirect_app.scss new file mode 100644 index 0000000000000..7e6b40e8231e8 --- /dev/null +++ b/x-pack/plugins/reporting/public/redirect/redirect_app.scss @@ -0,0 +1,8 @@ +.reportingRedirectApp { + &__interstitialPage { + /* + Create some padding above and below the page so that the errors (if any) display nicely. + */ + margin: $euiSizeXXL auto; + } +} diff --git a/x-pack/plugins/reporting/public/redirect/redirect_app.tsx b/x-pack/plugins/reporting/public/redirect/redirect_app.tsx index cf027e2a46196..4b271b17c5e85 100644 --- a/x-pack/plugins/reporting/public/redirect/redirect_app.tsx +++ b/x-pack/plugins/reporting/public/redirect/redirect_app.tsx @@ -7,8 +7,9 @@ import React, { useEffect, useState } from 'react'; import type { FunctionComponent } from 'react'; +import { parse } from 'query-string'; import { i18n } from '@kbn/i18n'; -import { EuiTitle, EuiCallOut, EuiCodeBlock } from '@elastic/eui'; +import { EuiCallOut, EuiCodeBlock } from '@elastic/eui'; import type { ScopedHistory } from 'src/core/public'; @@ -18,6 +19,8 @@ import { LocatorParams } from '../../common/types'; import { ReportingAPIClient } from '../lib/reporting_api_client'; import type { SharePluginSetup } from '../shared_imports'; +import './redirect_app.scss'; + interface Props { apiClient: ReportingAPIClient; history: ScopedHistory; @@ -28,9 +31,6 @@ const i18nTexts = { errorTitle: i18n.translate('xpack.reporting.redirectApp.errorTitle', { defaultMessage: 'Redirect error', }), - redirectingTitle: i18n.translate('xpack.reporting.redirectApp.redirectingMessage', { - defaultMessage: 'Redirecting...', - }), consoleMessagePrefix: i18n.translate( 'xpack.reporting.redirectApp.redirectConsoleErrorPrefixLabel', { @@ -39,36 +39,51 @@ const i18nTexts = { ), }; -export const RedirectApp: FunctionComponent = ({ share }) => { +export const RedirectApp: FunctionComponent = ({ share, apiClient }) => { const [error, setError] = useState(); useEffect(() => { - try { - const locatorParams = (window as unknown as Record)[ - REPORTING_REDIRECT_LOCATOR_STORE_KEY - ]; + (async () => { + try { + let locatorParams: undefined | LocatorParams; - if (!locatorParams) { - throw new Error('Could not find locator params for report'); - } + const { jobId } = parse(window.location.search); - share.navigate(locatorParams); - } catch (e) { - setError(e); - // eslint-disable-next-line no-console - console.error(i18nTexts.consoleMessagePrefix, e.message); - throw e; - } - }, [share]); + if (jobId) { + const result = await apiClient.getInfo(jobId as string); + locatorParams = result?.locatorParams?.[0]; + } else { + locatorParams = (window as unknown as Record)[ + REPORTING_REDIRECT_LOCATOR_STORE_KEY + ]; + } + + if (!locatorParams) { + throw new Error('Could not find locator params for report'); + } + + share.navigate(locatorParams); + } catch (e) { + setError(e); + // eslint-disable-next-line no-console + console.error(i18nTexts.consoleMessagePrefix, e.message); + throw e; + } + })(); + }, [share, apiClient]); - return error ? ( - -

{error.message}

- {error.stack && {error.stack}} -
- ) : ( - -

{i18nTexts.redirectingTitle}

-
+ return ( +
+ {error ? ( + +

{error.message}

+ {error.stack && {error.stack}} +
+ ) : ( + // We don't show anything on this page, the share service will handle showing any issues with + // using the locator +
+ )} +
); }; diff --git a/x-pack/plugins/reporting/public/shared_imports.ts b/x-pack/plugins/reporting/public/shared_imports.ts index 30e6cd12e3ed9..037dc5e374d25 100644 --- a/x-pack/plugins/reporting/public/shared_imports.ts +++ b/x-pack/plugins/reporting/public/shared_imports.ts @@ -7,6 +7,8 @@ export type { SharePluginSetup, SharePluginStart, LocatorPublic } from 'src/plugins/share/public'; +export { AppNavLinkStatus } from '../../../../src/core/public'; + export type { UseRequestResponse } from '../../../../src/plugins/es_ui_shared/public'; export { useRequest } from '../../../../src/plugins/es_ui_shared/public'; diff --git a/x-pack/plugins/reporting/public/utils.ts b/x-pack/plugins/reporting/public/utils.ts deleted file mode 100644 index f39c7ef2174ef..0000000000000 --- a/x-pack/plugins/reporting/public/utils.ts +++ /dev/null @@ -1,12 +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 { REACT_ROUTER_REDIRECT_APP_PATH } from './constants'; - -export const isRedirectAppPath = (pathname: string) => { - return pathname.startsWith(REACT_ROUTER_REDIRECT_APP_PATH); -}; diff --git a/x-pack/plugins/reporting/server/export_types/common/v2/get_full_redirect_app_url.test.ts b/x-pack/plugins/reporting/server/export_types/common/v2/get_full_redirect_app_url.test.ts index 7a2ec5b83e7f4..69baf143156fd 100644 --- a/x-pack/plugins/reporting/server/export_types/common/v2/get_full_redirect_app_url.test.ts +++ b/x-pack/plugins/reporting/server/export_types/common/v2/get_full_redirect_app_url.test.ts @@ -33,13 +33,13 @@ describe('getFullRedirectAppUrl', () => { test('smoke test', () => { expect(getFullRedirectAppUrl(config, 'test', undefined)).toBe( - 'http://localhost:1234/test/s/test/app/management/insightsAndAlerting/reporting/r' + 'http://localhost:1234/test/s/test/app/reportingRedirect' ); }); test('adding forceNow', () => { expect(getFullRedirectAppUrl(config, 'test', 'TEST with a space')).toBe( - 'http://localhost:1234/test/s/test/app/management/insightsAndAlerting/reporting/r?forceNow=TEST%20with%20a%20space' + 'http://localhost:1234/test/s/test/app/reportingRedirect?forceNow=TEST%20with%20a%20space' ); }); }); diff --git a/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.test.ts b/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.test.ts index 3cf3c057e7b9c..ba076f98996b1 100644 --- a/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.test.ts +++ b/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.test.ts @@ -102,7 +102,7 @@ test(`passes browserTimezone to generatePng`, async () => { "warning": [Function], }, Array [ - "localhost:80undefined/app/management/insightsAndAlerting/reporting/r?forceNow=test", + "localhost:80undefined/app/reportingRedirect?forceNow=test", Object { "id": "test", "params": Object {}, diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index d450f679906bd..8022cdcacfff7 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -19141,9 +19141,6 @@ "xpack.reporting.listing.table.deleteConfirmTitle": "「{name}」レポートを削除しますか?", "xpack.reporting.listing.table.deleteFailedErrorMessage": "レポートは削除されませんでした:{error}", "xpack.reporting.listing.table.deleteNumConfirmTitle": "{num} 件のレポートを削除しますか?", - "xpack.reporting.listing.table.downloadReport": "レポートをダウンロード", - "xpack.reporting.listing.table.downloadReportAriaLabel": "レポートをダウンロード", - "xpack.reporting.listing.table.downloadReportWithWarnings": "警告があるレポートをダウンロード", "xpack.reporting.listing.table.loadingReportsDescription": "レポートを読み込み中です", "xpack.reporting.listing.table.noCreatedReportsDescription": "レポートが作成されていません", "xpack.reporting.listing.table.reportCalloutExportTypeDeprecated": "{jobtype}(廃止予定)", @@ -19187,7 +19184,6 @@ "xpack.reporting.publicNotifier.successfullyCreatedReportNotificationTitle": "{reportObjectType}「{reportObjectTitle}」のレポートが作成されました", "xpack.reporting.redirectApp.errorTitle": "リダイレクトエラー", "xpack.reporting.redirectApp.redirectConsoleErrorPrefixLabel": "リダイレクトページエラー:", - "xpack.reporting.redirectApp.redirectingMessage": "リダイレクト中...", "xpack.reporting.registerFeature.reportingDescription": "Discover、可視化、ダッシュボードから生成されたレポートを管理します。", "xpack.reporting.registerFeature.reportingTitle": "レポート", "xpack.reporting.screencapture.browserWasClosed": "ブラウザーは予期せず終了しました。詳細については、サーバーログを確認してください。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 8839c6bab9aca..e753eda0399ae 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -19418,9 +19418,6 @@ "xpack.reporting.listing.table.deleteFailedErrorMessage": "报告未删除:{error}", "xpack.reporting.listing.table.deleteNumConfirmTitle": "删除 {num} 个报告?", "xpack.reporting.listing.table.deleteReportButton": "删除{num, plural, other {报告} }", - "xpack.reporting.listing.table.downloadReport": "下载报告", - "xpack.reporting.listing.table.downloadReportAriaLabel": "下载报告", - "xpack.reporting.listing.table.downloadReportWithWarnings": "下载包含警告的报告", "xpack.reporting.listing.table.loadingReportsDescription": "正在载入报告", "xpack.reporting.listing.table.noCreatedReportsDescription": "未创建任何报告", "xpack.reporting.listing.table.reportCalloutExportTypeDeprecated": "{jobtype}(已弃用)", @@ -19464,7 +19461,6 @@ "xpack.reporting.publicNotifier.successfullyCreatedReportNotificationTitle": "已为 {reportObjectType}“{reportObjectTitle}”创建报告", "xpack.reporting.redirectApp.errorTitle": "重定向错误", "xpack.reporting.redirectApp.redirectConsoleErrorPrefixLabel": "重定向页面错误:", - "xpack.reporting.redirectApp.redirectingMessage": "正在重定向......", "xpack.reporting.registerFeature.reportingDescription": "管理您从 Discover、Visualize 和 Dashboard 生成的报告。", "xpack.reporting.registerFeature.reportingTitle": "Reporting", "xpack.reporting.screencapture.browserWasClosed": "浏览器已意外关闭!有关更多信息,请查看服务器日志。", diff --git a/x-pack/test/functional/apps/reporting_management/report_listing.ts b/x-pack/test/functional/apps/reporting_management/report_listing.ts index 1291fb686d8b1..54320e431d33b 100644 --- a/x-pack/test/functional/apps/reporting_management/report_listing.ts +++ b/x-pack/test/functional/apps/reporting_management/report_listing.ts @@ -83,63 +83,63 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { Array [ Object { "actions": "", - "createdAt": "2021-07-19 @ 10:29 PMtest_user", - "report": "Automated reportsearch", - "status": "Completed at 2021-07-19 @ 10:29 PM See report info for warnings. This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.", + "createdAt": "2021-07-19 @ 10:29 PM", + "report": "Automated report", + "status": "Done, warnings detected", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:47 PMtest_user", - "report": "Discover search [2021-07-19T11:47:35.995-07:00]search", - "status": "Completed at 2021-07-19 @ 06:47 PM", + "createdAt": "2021-07-19 @ 06:47 PM", + "report": "Discover search [2021-07-19T11:47:35.995-07:00]", + "status": "Done", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:46 PMtest_user", - "report": "Discover search [2021-07-19T11:46:00.132-07:00]search", - "status": "Completed at 2021-07-19 @ 06:46 PM See report info for warnings.", + "createdAt": "2021-07-19 @ 06:46 PM", + "report": "Discover search [2021-07-19T11:46:00.132-07:00]", + "status": "Done, warnings detected", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:44 PMtest_user", - "report": "Discover search [2021-07-19T11:44:48.670-07:00]search", - "status": "Completed at 2021-07-19 @ 06:44 PM See report info for warnings.", + "createdAt": "2021-07-19 @ 06:44 PM", + "report": "Discover search [2021-07-19T11:44:48.670-07:00]", + "status": "Done, warnings detected", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:41 PMtest_user", - "report": "[Flights] Global Flight Dashboarddashboard", - "status": "Pending at 2021-07-19 @ 06:41 PM Waiting for job to process.", + "createdAt": "2021-07-19 @ 06:41 PM", + "report": "[Flights] Global Flight Dashboard", + "status": "Pending", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:41 PMtest_user", - "report": "[Flights] Global Flight Dashboarddashboard", - "status": "Failed at 2021-07-19 @ 06:43 PM See report info for error details.", + "createdAt": "2021-07-19 @ 06:41 PM", + "report": "[Flights] Global Flight Dashboard", + "status": "Failed", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:41 PMtest_user", - "report": "[Flights] Global Flight Dashboarddashboard", - "status": "Completed at 2021-07-19 @ 06:41 PM See report info for warnings.", + "createdAt": "2021-07-19 @ 06:41 PM", + "report": "[Flights] Global Flight Dashboard", + "status": "Done, warnings detected", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:38 PMtest_user", - "report": "[Flights] Global Flight Dashboarddashboard", - "status": "Completed at 2021-07-19 @ 06:39 PM See report info for warnings.", + "createdAt": "2021-07-19 @ 06:38 PM", + "report": "[Flights] Global Flight Dashboard", + "status": "Done, warnings detected", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:38 PMtest_user", - "report": "[Flights] Global Flight Dashboarddashboard", - "status": "Completed at 2021-07-19 @ 06:39 PM", + "createdAt": "2021-07-19 @ 06:38 PM", + "report": "[Flights] Global Flight Dashboard", + "status": "Done", }, Object { "actions": "", - "createdAt": "2021-07-19 @ 06:38 PMtest_user", - "report": "[Flights] Global Flight Dashboarddashboard", - "status": "Completed at 2021-07-19 @ 06:38 PM", + "createdAt": "2021-07-19 @ 06:38 PM", + "report": "[Flights] Global Flight Dashboard", + "status": "Done", }, ] `); diff --git a/x-pack/test/reporting_functional/reporting_and_security/management.ts b/x-pack/test/reporting_functional/reporting_and_security/management.ts index 304c175f0cb5d..4af6dbdac1a65 100644 --- a/x-pack/test/reporting_functional/reporting_and_security/management.ts +++ b/x-pack/test/reporting_functional/reporting_and_security/management.ts @@ -9,8 +9,9 @@ import { FtrProviderContext } from '../ftr_provider_context'; // eslint-disable-next-line import/no-default-export export default ({ getService, getPageObjects }: FtrProviderContext) => { - const PageObjects = getPageObjects(['common']); + const PageObjects = getPageObjects(['common', 'reporting', 'dashboard']); const testSubjects = getService('testSubjects'); + const browser = getService('browser'); const reportingFunctional = getService('reportingFunctional'); describe('Access to Management > Reporting', () => { @@ -32,5 +33,26 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await PageObjects.common.navigateToApp('reporting'); await testSubjects.existOrFail('reportJobListing'); }); + + it('Allows users to navigate back to where a report was generated', async () => { + const dashboardTitle = 'Ecom Dashboard'; + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.loadSavedDashboard(dashboardTitle); + + await PageObjects.reporting.openPdfReportingPanel(); + await PageObjects.reporting.clickGenerateReportButton(); + + await PageObjects.common.navigateToApp('reporting'); + await PageObjects.common.sleep(3000); // Wait an amount of time for auto-polling to refresh the jobs + + // We do not need to wait for the report to finish generating + await (await testSubjects.find('euiCollapsedItemActionsButton')).click(); + await (await testSubjects.find('reportOpenInKibanaApp')).click(); + + const [, dashboardWindowHandle] = await browser.getAllWindowHandles(); + await browser.switchToWindow(dashboardWindowHandle); + + await PageObjects.dashboard.expectOnDashboard(dashboardTitle); + }); }); }; diff --git a/x-pack/test/reporting_functional/reporting_without_security/management.ts b/x-pack/test/reporting_functional/reporting_without_security/management.ts index a97cb211b7c0e..b0088ccb9a905 100644 --- a/x-pack/test/reporting_functional/reporting_without_security/management.ts +++ b/x-pack/test/reporting_functional/reporting_without_security/management.ts @@ -53,10 +53,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await PageObjects.common.sleep(3000); // Wait an amount of time for auto-polling to refresh the jobs - const tableElem = await testSubjects.find('reportJobListing'); - const tableRow = await tableElem.findByCssSelector('tbody tr td+td'); // find the title cell of the first row - const tableCellText = await tableRow.getVisibleText(); - expect(tableCellText).to.be(`Tiểu thuyết\nvisualization`); + const [firstTitleElem] = await testSubjects.findAll('reportingListItemObjectTitle'); + const tableCellText = await firstTitleElem.getVisibleText(); + expect(tableCellText).to.be(`Tiểu thuyết`); }); }); }; From 75a55c5a78717a2793f44ecbd5fdb52d99329eb6 Mon Sep 17 00:00:00 2001 From: Ashokaditya <1849116+ashokaditya@users.noreply.github.com> Date: Mon, 15 Nov 2021 14:32:50 +0100 Subject: [PATCH 23/23] Fix/olm disable scrolling when no activity data 116594 (#118406) * commit using ashokaditya@elastic.co * Disable scroll to fetch trigger when no data fixes elastic/kibana/issues/116594 Co-Authored-By: Ashokaditya <1849116+ashokaditya@users.noreply.github.com> * add a test for the fix fixes elastic/kibana/issues/116594 Co-Authored-By: Ashokaditya <1849116+ashokaditya@users.noreply.github.com> * use userEvent instead Co-Authored-By: Ashokaditya <1849116+ashokaditya@users.noreply.github.com> * use getEndpointDetailsPath instead of hardcoded paths review suggestion * scroll to bottom before looking for trigger element * use WaitFor review changes * simplify review changes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../view/details/endpoint_activity_log.tsx | 14 +++- .../pages/endpoint_hosts/view/index.test.tsx | 84 ++++++++++++++----- 2 files changed, 75 insertions(+), 23 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_activity_log.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_activity_log.tsx index aa8df6ecf5613..9b22afc300466 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_activity_log.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_activity_log.tsx @@ -71,6 +71,11 @@ export const EndpointActivityLog = memo( [hasActiveDateRange, isPagingDisabled, activityLogLoading, activityLogSize] ); + const showCallout = useMemo( + () => !isPagingDisabled && activityLogLoaded && !activityLogData.length, + [isPagingDisabled, activityLogLoaded, activityLogData] + ); + const loadMoreTrigger = useRef(null); const getActivityLog = useCallback( (entries: IntersectionObserverEntry[]) => { @@ -120,7 +125,7 @@ export const EndpointActivityLog = memo( <> - {!isPagingDisabled && activityLogLoaded && !activityLogData.length && ( + {showCallout && ( <> {activityLogLoading && } - {(!activityLogLoading || !isPagingDisabled) && ( - + {(!activityLogLoading || !isPagingDisabled) && !showCallout && ( + )} {isPagingDisabled && !activityLogLoading && ( diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 5db501f5e09ac..a71acd66650dc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -7,6 +7,7 @@ import React from 'react'; import * as reactTestingLibrary from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; import { EndpointList } from './index'; import '../../../../common/mock/match_media'; @@ -133,7 +134,7 @@ jest.mock('../../../../common/hooks/use_license'); describe('when on the endpoint list page', () => { const docGenerator = new EndpointDocGenerator(); - const { act, screen, fireEvent } = reactTestingLibrary; + const { act, screen, fireEvent, waitFor } = reactTestingLibrary; let render: () => ReturnType; let history: AppContextTestRender['history']; @@ -885,16 +886,14 @@ describe('when on the endpoint list page', () => { await middlewareSpy.waitForAction('serverReturnedEndpointList'); }); const hostNameLinks = renderResult.getAllByTestId('hostnameCellLink'); - reactTestingLibrary.fireEvent.click(hostNameLinks[0]); + userEvent.click(hostNameLinks[0]); }); afterEach(reactTestingLibrary.cleanup); it('should show the endpoint details flyout', async () => { const activityLogTab = await renderResult.findByTestId('activity_log'); - reactTestingLibrary.act(() => { - reactTestingLibrary.fireEvent.click(activityLogTab); - }); + userEvent.click(activityLogTab); await middlewareSpy.waitForAction('endpointDetailsActivityLogChanged'); reactTestingLibrary.act(() => { dispatchEndpointDetailsActivityLogChanged('success', getMockData()); @@ -905,9 +904,7 @@ describe('when on the endpoint list page', () => { it('should display log accurately', async () => { const activityLogTab = await renderResult.findByTestId('activity_log'); - reactTestingLibrary.act(() => { - reactTestingLibrary.fireEvent.click(activityLogTab); - }); + userEvent.click(activityLogTab); await middlewareSpy.waitForAction('endpointDetailsActivityLogChanged'); reactTestingLibrary.act(() => { dispatchEndpointDetailsActivityLogChanged('success', getMockData()); @@ -920,9 +917,7 @@ describe('when on the endpoint list page', () => { it('should display log accurately with endpoint responses', async () => { const activityLogTab = await renderResult.findByTestId('activity_log'); - reactTestingLibrary.act(() => { - reactTestingLibrary.fireEvent.click(activityLogTab); - }); + userEvent.click(activityLogTab); await middlewareSpy.waitForAction('endpointDetailsActivityLogChanged'); reactTestingLibrary.act(() => { dispatchEndpointDetailsActivityLogChanged( @@ -939,9 +934,7 @@ describe('when on the endpoint list page', () => { it('should display empty state when API call has failed', async () => { const activityLogTab = await renderResult.findByTestId('activity_log'); - reactTestingLibrary.act(() => { - reactTestingLibrary.fireEvent.click(activityLogTab); - }); + userEvent.click(activityLogTab); await middlewareSpy.waitForAction('endpointDetailsActivityLogChanged'); reactTestingLibrary.act(() => { dispatchEndpointDetailsActivityLogChanged('failed', getMockData()); @@ -952,9 +945,7 @@ describe('when on the endpoint list page', () => { it('should not display empty state when no log data', async () => { const activityLogTab = await renderResult.findByTestId('activity_log'); - reactTestingLibrary.act(() => { - reactTestingLibrary.fireEvent.click(activityLogTab); - }); + userEvent.click(activityLogTab); await middlewareSpy.waitForAction('endpointDetailsActivityLogChanged'); reactTestingLibrary.act(() => { dispatchEndpointDetailsActivityLogChanged('success', { @@ -977,7 +968,12 @@ describe('when on the endpoint list page', () => { const userChangedUrlChecker = middlewareSpy.waitForAction('userChangedUrl'); reactTestingLibrary.act(() => { history.push( - `${MANAGEMENT_PATH}/endpoints?page_index=0&page_size=10&selected_endpoint=1&show=activity_log` + getEndpointDetailsPath({ + page_index: '0', + page_size: '10', + name: 'endpointActivityLog', + selected_endpoint: '1', + }) ); }); const changedUrlAction = await userChangedUrlChecker; @@ -996,7 +992,43 @@ describe('when on the endpoint list page', () => { const userChangedUrlChecker = middlewareSpy.waitForAction('userChangedUrl'); reactTestingLibrary.act(() => { history.push( - `${MANAGEMENT_PATH}/endpoints?page_index=0&page_size=10&selected_endpoint=1&show=activity_log` + getEndpointDetailsPath({ + page_index: '0', + page_size: '10', + name: 'endpointActivityLog', + selected_endpoint: '1', + }) + ); + }); + const changedUrlAction = await userChangedUrlChecker; + expect(changedUrlAction.payload.search).toEqual( + '?page_index=0&page_size=10&selected_endpoint=1&show=activity_log' + ); + await middlewareSpy.waitForAction('endpointDetailsActivityLogChanged'); + reactTestingLibrary.act(() => { + dispatchEndpointDetailsActivityLogChanged('success', { + page: 1, + pageSize: 50, + startDate: 'now-1d', + endDate: 'now', + data: [], + }); + }); + + const activityLogCallout = await renderResult.findByTestId('activityLogNoDataCallout'); + expect(activityLogCallout).not.toBeNull(); + }); + + it('should not display scroll trigger when showing callout message', async () => { + const userChangedUrlChecker = middlewareSpy.waitForAction('userChangedUrl'); + reactTestingLibrary.act(() => { + history.push( + getEndpointDetailsPath({ + page_index: '0', + page_size: '10', + name: 'endpointActivityLog', + selected_endpoint: '1', + }) ); }); const changedUrlAction = await userChangedUrlChecker; @@ -1016,13 +1048,25 @@ describe('when on the endpoint list page', () => { const activityLogCallout = await renderResult.findByTestId('activityLogNoDataCallout'); expect(activityLogCallout).not.toBeNull(); + // scroll to the bottom by pressing down arrow key + // and keep it pressed + userEvent.keyboard('ArrowDown>'); + // end scrolling after 1s + await waitFor(() => {}); + userEvent.keyboard('/ArrowDown'); + expect(await renderResult.queryByTestId('activityLogLoadMoreTrigger')).toBeNull(); }); it('should correctly display non-empty comments only for actions', async () => { const userChangedUrlChecker = middlewareSpy.waitForAction('userChangedUrl'); reactTestingLibrary.act(() => { history.push( - `${MANAGEMENT_PATH}/endpoints?page_index=0&page_size=10&selected_endpoint=1&show=activity_log` + getEndpointDetailsPath({ + page_index: '0', + page_size: '10', + name: 'endpointActivityLog', + selected_endpoint: '1', + }) ); }); const changedUrlAction = await userChangedUrlChecker;