diff --git a/.buildkite/scripts/lifecycle/pre_command.sh b/.buildkite/scripts/lifecycle/pre_command.sh index 700abf84fb7d5..b957203fc7912 100755 --- a/.buildkite/scripts/lifecycle/pre_command.sh +++ b/.buildkite/scripts/lifecycle/pre_command.sh @@ -107,7 +107,7 @@ export SYNTHETICS_REMOTE_KIBANA_USERNAME SYNTHETICS_REMOTE_KIBANA_PASSWORD="$(retry 5 5 vault read -field=password secret/kibana-issues/dev/kibana-ci-synthetics-remote-credentials)" export SYNTHETICS_REMOTE_KIBANA_PASSWORD -SYNTHETICS_REMOTE_KIBANA_URL="$(retry 5 5 vault read -field=url secret/kibana-issues/dev/kibana-ci-synthetics-remote-credentials)" +SYNTHETICS_REMOTE_KIBANA_URL=${SYNTHETICS_REMOTE_KIBANA_URL-"$(retry 5 5 vault read -field=url secret/kibana-issues/dev/kibana-ci-synthetics-remote-credentials)"} export SYNTHETICS_REMOTE_KIBANA_URL # Setup Failed Test Reporter Elasticsearch credentials diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dd39abe62d9fa..f7709dbcfa8a9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -141,10 +141,11 @@ /x-pack/test/functional/es_archives/uptime @elastic/uptime /x-pack/test/functional/services/uptime @elastic/uptime /x-pack/test/api_integration/apis/uptime @elastic/uptime +/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime # Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime) /x-pack/plugins/apm/public/application/uxApp.tsx @elastic/uptime -/x-pack/plugins/apm/public/components/app/RumDashboard @elastic/uptime +/x-pack/plugins/apm/public/components/app/rum_dashboard @elastic/uptime /x-pack/plugins/apm/server/lib/rum_client @elastic/uptime /x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime /x-pack/plugins/apm/server/projections/rum_page_load_transactions.ts @elastic/uptime diff --git a/.gitignore b/.gitignore index 7cf2e31ac0a01..18302cebd1641 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,5 @@ elastic-agent-* fleet-server-* elastic-agent.yml fleet-server.yml + +/x-pack/plugins/fleet/server/bundled_packages diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index ed580cc9e0baf..c89d6199bb389 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github summary: API docs for the actions plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 8690fd287cd3b..6e94e7be3b4f2 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github summary: API docs for the advancedSettings plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 871a2886848a5..aab483370e833 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -3435,6 +3435,19 @@ "path": "x-pack/plugins/alerting/common/alert.ts", "deprecated": false }, + { + "parentPluginId": "alerting", + "id": "def-common.AlertExecutionStatus.numberOfTriggeredActions", + "type": "number", + "tags": [], + "label": "numberOfTriggeredActions", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/alerting/common/alert.ts", + "deprecated": false + }, { "parentPluginId": "alerting", "id": "def-common.AlertExecutionStatus.lastExecutionDate", @@ -4034,7 +4047,72 @@ "label": "execution", "description": [], "signature": [ - "{ history: { success: boolean; timestamp: number; }[]; calculated_metrics: { success_ratio: number; }; }" + "{ history: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleMonitoringHistory", + "text": "RuleMonitoringHistory" + }, + "[]; calculated_metrics: { p50?: number | undefined; p95?: number | undefined; p99?: number | undefined; success_ratio: number; }; }" + ], + "path": "x-pack/plugins/alerting/common/alert.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.RuleMonitoringHistory", + "type": "Interface", + "tags": [], + "label": "RuleMonitoringHistory", + "description": [], + "signature": [ + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleMonitoringHistory", + "text": "RuleMonitoringHistory" + }, + " extends ", + "SavedObjectAttributes" + ], + "path": "x-pack/plugins/alerting/common/alert.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-common.RuleMonitoringHistory.success", + "type": "boolean", + "tags": [], + "label": "success", + "description": [], + "path": "x-pack/plugins/alerting/common/alert.ts", + "deprecated": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.RuleMonitoringHistory.timestamp", + "type": "number", + "tags": [], + "label": "timestamp", + "description": [], + "path": "x-pack/plugins/alerting/common/alert.ts", + "deprecated": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.RuleMonitoringHistory.duration", + "type": "number", + "tags": [], + "label": "duration", + "description": [], + "signature": [ + "number | undefined" ], "path": "x-pack/plugins/alerting/common/alert.ts", "deprecated": false @@ -4543,6 +4621,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "alerting", + "id": "def-common.MONITORING_HISTORY_LIMIT", + "type": "number", + "tags": [], + "label": "MONITORING_HISTORY_LIMIT", + "description": [], + "signature": [ + "200" + ], + "path": "x-pack/plugins/alerting/common/index.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-common.RawAlertInstance", @@ -4656,6 +4748,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "alerting", + "id": "def-common.RuleTaskStateWithActions", + "type": "Type", + "tags": [], + "label": "RuleTaskStateWithActions", + "description": [], + "signature": [ + "{ alertTypeState?: { [x: string]: unknown; } | undefined; alertInstances?: { [x: string]: { state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; }) | undefined; } | undefined; }; } | undefined; previousStartedAt?: Date | null | undefined; } & { triggeredActions: { group?: string | undefined; id?: string | undefined; actionTypeId?: string | undefined; params?: { [x: string]: unknown; } | undefined; }[]; }" + ], + "path": "x-pack/plugins/alerting/common/rule_task_instance.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-common.SanitizedAlert", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 9171a8236c5ab..0158e7f459ee3 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github summary: API docs for the alerting plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 283 | 0 | 275 | 19 | +| 290 | 0 | 282 | 19 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index cf2654aee72eb..1a97a3448d51d 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github summary: API docs for the apm plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 302bdbdcf2469..eac3ca543a25a 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github summary: API docs for the banners plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index ac765b5b3abe4..05a6890f0467e 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github summary: API docs for the bfetch plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index a9f2bb6a208cb..526cabdc930f8 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github summary: API docs for the canvas plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cases.devdocs.json b/api_docs/cases.devdocs.json index 3022c110c6254..4e2bd2131268a 100644 --- a/api_docs/cases.devdocs.json +++ b/api_docs/cases.devdocs.json @@ -914,21 +914,6 @@ "path": "x-pack/plugins/cases/server/client/client.ts", "deprecated": false }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.subCases", - "type": "Object", - "tags": [], - "label": "subCases", - "description": [ - "\nRetrieves an interface for interacting with the case as a connector entities.\n\nCurrently this functionality is disabled and will throw an error if this function is called." - ], - "signature": [ - "SubCasesClient" - ], - "path": "x-pack/plugins/cases/server/client/client.ts", - "deprecated": false - }, { "parentPluginId": "cases", "id": "def-server.CasesClient.configure", @@ -1236,39 +1221,6 @@ "path": "x-pack/plugins/cases/common/ui/types.ts", "deprecated": false }, - { - "parentPluginId": "cases", - "id": "def-common.Case.subCases", - "type": "CompoundType", - "tags": [], - "label": "subCases", - "description": [], - "signature": [ - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.SubCase", - "text": "SubCase" - }, - "[] | null | undefined" - ], - "path": "x-pack/plugins/cases/common/ui/types.ts", - "deprecated": false - }, - { - "parentPluginId": "cases", - "id": "def-common.Case.subCaseIds", - "type": "Array", - "tags": [], - "label": "subCaseIds", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/cases/common/ui/types.ts", - "deprecated": false - }, { "parentPluginId": "cases", "id": "def-common.Case.settings", @@ -1294,19 +1246,6 @@ ], "path": "x-pack/plugins/cases/common/ui/types.ts", "deprecated": false - }, - { - "parentPluginId": "cases", - "id": "def-common.Case.type", - "type": "Enum", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "CaseType" - ], - "path": "x-pack/plugins/cases/common/ui/types.ts", - "deprecated": false } ], "initialIsOpen": false @@ -1375,52 +1314,6 @@ } ], "initialIsOpen": false - }, - { - "parentPluginId": "cases", - "id": "def-common.SubCase", - "type": "Interface", - "tags": [], - "label": "SubCase", - "description": [], - "signature": [ - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.SubCase", - "text": "SubCase" - }, - " extends BasicCase" - ], - "path": "x-pack/plugins/cases/common/ui/types.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-common.SubCase.associationType", - "type": "Enum", - "tags": [], - "label": "associationType", - "description": [], - "signature": [ - "AssociationType" - ], - "path": "x-pack/plugins/cases/common/ui/types.ts", - "deprecated": false - }, - { - "parentPluginId": "cases", - "id": "def-common.SubCase.caseParentId", - "type": "string", - "tags": [], - "label": "caseParentId", - "description": [], - "path": "x-pack/plugins/cases/common/ui/types.ts", - "deprecated": false - } - ], - "initialIsOpen": false } ], "enums": [ @@ -1496,22 +1389,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "cases", - "id": "def-common.ENABLE_CASE_CONNECTOR", - "type": "boolean", - "tags": [], - "label": "ENABLE_CASE_CONNECTOR", - "description": [ - "\nThis flag governs enabling the case as a connector feature. It is disabled by default as the feature is not complete." - ], - "signature": [ - "false" - ], - "path": "x-pack/plugins/cases/common/constants.ts", - "deprecated": false, - "initialIsOpen": false - }, { "parentPluginId": "cases", "id": "def-common.SECURITY_SOLUTION_OWNER", diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index b628d2c3e2d40..9e0cd20b283ad 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github summary: API docs for the cases plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) for qu | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 83 | 0 | 57 | 23 | +| 75 | 0 | 51 | 20 | ## Client diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 234cf7139c57a..1f3fc0cc92bbe 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github summary: API docs for the charts plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 85ce8e619da05..ddf99bae6ec80 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the cloud plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/console.mdx b/api_docs/console.mdx index f072b0c10def1..de5ff3fdce3be 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github summary: API docs for the console plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index f95d2dc96d247..09e3bca96af98 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github summary: API docs for the controls plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index c8f9a3a1953af..e7dde836fb172 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -1671,7 +1671,7 @@ "label": "links", "description": [], "signature": [ - "{ 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 cloud: { readonly indexManagement: string; }; readonly console: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record; 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 appSearch: { readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }; readonly enterpriseSearch: { readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }; readonly workplaceSearch: { readonly apiKeys: string; readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly synch: string; readonly zendesk: 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 rare_terms: 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: { readonly guide: string; readonly autocompleteSuggestions: string; readonly xpackSecurity: string; }; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record; 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 eventFilters: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuery: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record; readonly ml: Record; readonly transforms: Record; readonly visualize: Record; 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; multiSearch: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; searchPreference: string; simulatePipeline: string; timeUnits: string; unfreezeIndex: 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; readonly maps: Readonly<{ guide: string; importGeospatialPrivileges: string; gdalTutorial: string; }>; readonly monitoring: Record; 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; readonly ccs: Record; readonly plugins: { azureRepo: string; gcsRepo: string; hdfsRepo: string; s3Repo: string; snapshotRestoreRepos: string; mapperSize: string; }; readonly snapshotRestore: Record; readonly ingest: Record; readonly fleet: Readonly<{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; installElasticAgentStandalone: 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; }; }" + "DocLinks" ], "path": "src/core/public/doc_links/doc_links_service.ts", "deprecated": false @@ -7536,6 +7536,18 @@ "path": "src/core/server/elasticsearch/elasticsearch_config.ts", "deprecated": false }, + { + "parentPluginId": "core", + "id": "def-server.ElasticsearchConfig.compression", + "type": "boolean", + "tags": [], + "label": "compression", + "description": [ + "\nWhether to use compression for communications with elasticsearch." + ], + "path": "src/core/server/elasticsearch/elasticsearch_config.ts", + "deprecated": false + }, { "parentPluginId": "core", "id": "def-server.ElasticsearchConfig.hosts", @@ -7746,7 +7758,7 @@ "label": "rawConfig", "description": [], "signature": [ - "Readonly<{ username?: string | undefined; password?: string | undefined; serviceAccountToken?: string | undefined; } & { ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; hosts: string | string[]; sniffOnStart: boolean; sniffInterval: false | moment.Duration; sniffOnConnectionFault: boolean; requestHeadersWhitelist: string | string[]; customHeaders: Record; shardTimeout: moment.Duration; requestTimeout: moment.Duration; pingTimeout: moment.Duration; logQueries: boolean; apiVersion: string; healthCheck: Readonly<{} & { delay: moment.Duration; }>; ignoreVersionMismatch: boolean; skipStartupConnectionCheck: boolean; }>" + "Readonly<{ username?: string | undefined; password?: string | undefined; serviceAccountToken?: string | undefined; } & { ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; hosts: string | string[]; sniffOnStart: boolean; sniffInterval: false | moment.Duration; sniffOnConnectionFault: boolean; compression: boolean; requestHeadersWhitelist: string | string[]; customHeaders: Record; shardTimeout: moment.Duration; requestTimeout: moment.Duration; pingTimeout: moment.Duration; logQueries: boolean; apiVersion: string; healthCheck: Readonly<{} & { delay: moment.Duration; }>; ignoreVersionMismatch: boolean; skipStartupConnectionCheck: boolean; }>" ], "path": "src/core/server/elasticsearch/elasticsearch_config.ts", "deprecated": false, @@ -9181,6 +9193,27 @@ "path": "src/core/server/index.ts", "deprecated": false }, + { + "parentPluginId": "core", + "id": "def-server.CoreSetup.docLinks", + "type": "Object", + "tags": [], + "label": "docLinks", + "description": [ + "{@link DocLinksServiceSetup}" + ], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.DocLinksServiceSetup", + "text": "DocLinksServiceSetup" + } + ], + "path": "src/core/server/index.ts", + "deprecated": false + }, { "parentPluginId": "core", "id": "def-server.CoreSetup.elasticsearch", @@ -9461,6 +9494,27 @@ "path": "src/core/server/index.ts", "deprecated": false }, + { + "parentPluginId": "core", + "id": "def-server.CoreStart.docLinks", + "type": "Object", + "tags": [], + "label": "docLinks", + "description": [ + "{@link DocLinksServiceStart}" + ], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.DocLinksServiceSetup", + "text": "DocLinksServiceSetup" + } + ], + "path": "src/core/server/index.ts", + "deprecated": false + }, { "parentPluginId": "core", "id": "def-server.CoreStart.elasticsearch", @@ -10030,6 +10084,58 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-server.DocLinksServiceSetup", + "type": "Interface", + "tags": [], + "label": "DocLinksServiceSetup", + "description": [], + "path": "src/core/server/doc_links/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-server.DocLinksServiceSetup.version", + "type": "string", + "tags": [], + "label": "version", + "description": [ + "The branch/version the docLinks are pointing to" + ], + "path": "src/core/server/doc_links/types.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-server.DocLinksServiceSetup.elasticWebsiteUrl", + "type": "string", + "tags": [], + "label": "elasticWebsiteUrl", + "description": [ + "The base url for the elastic website" + ], + "path": "src/core/server/doc_links/types.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-server.DocLinksServiceSetup.links", + "type": "Object", + "tags": [], + "label": "links", + "description": [ + "A record of all registered doc links" + ], + "signature": [ + "DocLinks" + ], + "path": "src/core/server/doc_links/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-server.ElasticsearchConfigPreboot", @@ -17241,6 +17347,26 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-server.DocLinksServiceStart", + "type": "Type", + "tags": [], + "label": "DocLinksServiceStart", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.DocLinksServiceSetup", + "text": "DocLinksServiceSetup" + } + ], + "path": "src/core/server/doc_links/types.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-server.Ecs", @@ -17426,7 +17552,7 @@ "section": "def-server.ElasticsearchConfig", "text": "ElasticsearchConfig" }, - ", \"username\" | \"hosts\" | \"password\" | \"sniffOnStart\" | \"sniffInterval\" | \"sniffOnConnectionFault\" | \"serviceAccountToken\" | \"requestHeadersWhitelist\" | \"customHeaders\"> & { pingTimeout?: number | moment.Duration | undefined; requestTimeout?: number | moment.Duration | undefined; ssl?: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>, \"key\" | \"verificationMode\" | \"certificate\" | \"keyPassphrase\" | \"alwaysPresentCertificate\"> & { certificateAuthorities?: string[] | undefined; }> | undefined; keepAlive?: boolean | undefined; caFingerprint?: string | undefined; }" + ", \"username\" | \"hosts\" | \"password\" | \"sniffOnStart\" | \"sniffInterval\" | \"sniffOnConnectionFault\" | \"compression\" | \"serviceAccountToken\" | \"requestHeadersWhitelist\" | \"customHeaders\"> & { pingTimeout?: number | moment.Duration | undefined; requestTimeout?: number | moment.Duration | undefined; ssl?: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>, \"key\" | \"verificationMode\" | \"certificate\" | \"keyPassphrase\" | \"alwaysPresentCertificate\"> & { certificateAuthorities?: string[] | undefined; }> | undefined; keepAlive?: boolean | undefined; caFingerprint?: string | undefined; }" ], "path": "src/core/server/elasticsearch/client/client_config.ts", "deprecated": false, diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 96fb591d5e9ec..583fe04244fec 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github summary: API docs for the core plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2353 | 15 | 968 | 32 | +| 2364 | 15 | 972 | 32 | ## Client diff --git a/api_docs/core_application.mdx b/api_docs/core_application.mdx index 61b7413a8f42b..a51a10a02a53a 100644 --- a/api_docs/core_application.mdx +++ b/api_docs/core_application.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-application title: "core.application" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.application plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.application'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2353 | 15 | 968 | 32 | +| 2364 | 15 | 972 | 32 | ## Client diff --git a/api_docs/core_chrome.mdx b/api_docs/core_chrome.mdx index df7ba093c62c2..6d8fccb1e5500 100644 --- a/api_docs/core_chrome.mdx +++ b/api_docs/core_chrome.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-chrome title: "core.chrome" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.chrome plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.chrome'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2353 | 15 | 968 | 32 | +| 2364 | 15 | 972 | 32 | ## Client diff --git a/api_docs/core_http.mdx b/api_docs/core_http.mdx index 3158e24a5e029..e1b446f780217 100644 --- a/api_docs/core_http.mdx +++ b/api_docs/core_http.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-http title: "core.http" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.http plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.http'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2353 | 15 | 968 | 32 | +| 2364 | 15 | 972 | 32 | ## Client diff --git a/api_docs/core_saved_objects.devdocs.json b/api_docs/core_saved_objects.devdocs.json index 601006c68ddc9..66ded7c0d1c79 100644 --- a/api_docs/core_saved_objects.devdocs.json +++ b/api_docs/core_saved_objects.devdocs.json @@ -9487,7 +9487,90 @@ "initialIsOpen": false } ], - "functions": [], + "functions": [ + { + "parentPluginId": "core", + "id": "def-server.mergeSavedObjectMigrationMaps", + "type": "Function", + "tags": [], + "label": "mergeSavedObjectMigrationMaps", + "description": [ + "\nMerges two saved object migration maps.\n\nIf there is a migration for a given version on only one of the maps,\nthat migration function will be used:\n\nmergeSavedObjectMigrationMaps({ '1.2.3': f }, { '4.5.6': g }) -> { '1.2.3': f, '4.5.6': g }\n\nIf there is a migration for a given version on both maps, the migrations will be composed:\n\nmergeSavedObjectMigrationMaps({ '1.2.3': f }, { '1.2.3': g }) -> { '1.2.3': (doc, context) => f(g(doc, context), context) }\n" + ], + "signature": [ + "(map1: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectMigrationMap", + "text": "SavedObjectMigrationMap" + }, + ", map2: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectMigrationMap", + "text": "SavedObjectMigrationMap" + }, + ") => ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectMigrationMap", + "text": "SavedObjectMigrationMap" + } + ], + "path": "src/core/server/saved_objects/migrations/utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-server.mergeSavedObjectMigrationMaps.$1", + "type": "Object", + "tags": [], + "label": "map1", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectMigrationMap", + "text": "SavedObjectMigrationMap" + } + ], + "path": "src/core/server/saved_objects/migrations/utils.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "core", + "id": "def-server.mergeSavedObjectMigrationMaps.$2", + "type": "Object", + "tags": [], + "label": "map2", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectMigrationMap", + "text": "SavedObjectMigrationMap" + } + ], + "path": "src/core/server/saved_objects/migrations/utils.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [ { "parentPluginId": "core", diff --git a/api_docs/core_saved_objects.mdx b/api_docs/core_saved_objects.mdx index 5baefc5ef46b1..21afde940db79 100644 --- a/api_docs/core_saved_objects.mdx +++ b/api_docs/core_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-savedObjects title: "core.savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.savedObjects plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2353 | 15 | 968 | 32 | +| 2364 | 15 | 972 | 32 | ## Client @@ -33,6 +33,9 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que ## Server +### Functions + + ### Classes diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 9051e146ac464..efc6f0db5c805 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github summary: API docs for the customIntegrations plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard.devdocs.json b/api_docs/dashboard.devdocs.json index 1d7e09bd36c08..bb3b76e516022 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -2567,10 +2567,6 @@ { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_links.tsx" } ] }, diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 0452af3f41587..7572edad88166 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboard plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index f5b4263686c41..4fdb45e82a8a0 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboardEnhanced plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 81d0a204d9d04..44a2ae1d43c4d 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -2803,10 +2803,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" }, - { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.ts" @@ -3087,6 +3083,18 @@ "plugin": "dataViewFieldEditor", "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, { "plugin": "visualizations", "path": "src/plugins/visualizations/public/vis.ts" @@ -3819,18 +3827,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/filter_manager.ts" @@ -3899,14 +3895,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/components/editor/controls_tab.tsx" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, { "plugin": "visDefaultEditor", "path": "src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts" @@ -4284,6 +4272,18 @@ "plugin": "dataViews", "path": "src/plugins/data_views/public/index.ts" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/components/single_field_select.tsx" @@ -4816,18 +4816,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/join_editor/resources/metrics_expression.d.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" @@ -6267,47 +6255,6 @@ } ], "functions": [ - { - "parentPluginId": "data", - "id": "def-public.castEsToKbnFieldTypeName", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "castEsToKbnFieldTypeName", - "description": [], - "signature": [ - "(esType: string) => ", - "KBN_FIELD_TYPES" - ], - "path": "src/plugins/data/common/kbn_field_types/index.ts", - "deprecated": true, - "removeBy": "8.1", - "references": [ - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" - }, - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" - } - ], - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-public.castEsToKbnFieldTypeName.$1", - "type": "string", - "tags": [], - "label": "esType", - "description": [], - "path": "node_modules/@types/kbn__field-types/index.d.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-public.extractReferences", @@ -9483,7 +9430,7 @@ ], "path": "src/plugins/data_views/common/fields/types.ts", "deprecated": true, - "removeBy": "8.1", + "removeBy": "8.2", "references": [ { "plugin": "dataViews", @@ -11272,25 +11219,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-public.IndexPatternType", - "type": "Enum", - "tags": [ - "deprecated" - ], - "label": "IndexPatternType", - "description": [], - "path": "src/plugins/data_views/common/types.ts", - "deprecated": true, - "references": [ - { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/index.ts" - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-public.KBN_FIELD_TYPES", @@ -12852,62 +12780,6 @@ { "plugin": "discover", "path": "src/plugins/discover/public/application/main/discover_main_route.tsx" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/deprecations/scripted_fields.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/deprecations/scripted_fields.ts" - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-public.IndexPatternListItem", - "type": "Type", - "tags": [ - "deprecated" - ], - "label": "IndexPatternListItem", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewListItem", - "text": "DataViewListItem" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": true, - "references": [ - { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_views.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/index.ts" } ], "initialIsOpen": false @@ -13182,34 +13054,6 @@ "plugin": "dataViews", "path": "src/plugins/data_views/public/index.ts" }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts" @@ -13342,14 +13186,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts" }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, { "plugin": "stackAlerts", "path": "x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts" @@ -13374,22 +13210,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.ts" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, { "plugin": "visTypeTimelion", "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" @@ -13473,30 +13293,6 @@ { "plugin": "dataViews", "path": "src/plugins/data_views/common/index.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx" } ], "initialIsOpen": false @@ -18499,18 +18295,6 @@ "path": "src/plugins/data/public/types.ts", "deprecated": true, "references": [ - { - "plugin": "home", - "path": "src/plugins/home/public/plugin.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/plugin.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/roles_management_app.tsx" - }, { "plugin": "discover", "path": "src/plugins/discover/public/build_services.ts" @@ -18763,14 +18547,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/components/editor/controls_tab.tsx" }, - { - "plugin": "kibanaOverview", - "path": "src/plugins/kibana_overview/public/components/overview/overview.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/saved_objects_table_page.tsx" - }, { "plugin": "visTypeTimelion", "path": "src/plugins/vis_types/timelion/public/plugin.ts" @@ -21010,10 +20786,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" }, - { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.ts" @@ -21294,6 +21066,18 @@ "plugin": "dataViewFieldEditor", "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, { "plugin": "visualizations", "path": "src/plugins/visualizations/public/vis.ts" @@ -22026,18 +21810,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/filter_manager.ts" @@ -22106,14 +21878,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/components/editor/controls_tab.tsx" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, { "plugin": "visDefaultEditor", "path": "src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts" @@ -22491,6 +22255,18 @@ "plugin": "dataViews", "path": "src/plugins/data_views/public/index.ts" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/components/single_field_select.tsx" @@ -23023,18 +22799,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/join_editor/resources/metrics_expression.d.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" @@ -23907,47 +23671,6 @@ } ], "functions": [ - { - "parentPluginId": "data", - "id": "def-server.castEsToKbnFieldTypeName", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "castEsToKbnFieldTypeName", - "description": [], - "signature": [ - "(esType: string) => ", - "KBN_FIELD_TYPES" - ], - "path": "src/plugins/data/common/kbn_field_types/index.ts", - "deprecated": true, - "removeBy": "8.1", - "references": [ - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" - }, - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" - } - ], - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-server.castEsToKbnFieldTypeName.$1", - "type": "string", - "tags": [], - "label": "esType", - "description": [], - "path": "node_modules/@types/kbn__field-types/index.d.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-server.getCapabilitiesForRollupIndices", @@ -24381,7 +24104,7 @@ ], "path": "src/plugins/data_views/common/fields/types.ts", "deprecated": true, - "removeBy": "8.1", + "removeBy": "8.2", "references": [ { "plugin": "dataViews", @@ -25729,30 +25452,6 @@ { "plugin": "discover", "path": "src/plugins/discover/public/application/main/discover_main_route.tsx" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/deprecations/scripted_fields.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/deprecations/scripted_fields.ts" } ], "initialIsOpen": false @@ -30722,10 +30421,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" }, - { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.ts" @@ -31006,6 +30701,18 @@ "plugin": "dataViewFieldEditor", "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, { "plugin": "visualizations", "path": "src/plugins/visualizations/public/vis.ts" @@ -31738,18 +31445,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/filter_manager.ts" @@ -31818,14 +31513,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/components/editor/controls_tab.tsx" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, { "plugin": "visDefaultEditor", "path": "src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts" @@ -32203,6 +31890,18 @@ "plugin": "dataViews", "path": "src/plugins/data_views/public/index.ts" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/components/single_field_select.tsx" @@ -32735,18 +32434,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/join_editor/resources/metrics_expression.d.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" @@ -34019,47 +33706,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.castEsToKbnFieldTypeName", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "castEsToKbnFieldTypeName", - "description": [], - "signature": [ - "(esType: string) => ", - "KBN_FIELD_TYPES" - ], - "path": "src/plugins/data/common/kbn_field_types/index.ts", - "deprecated": true, - "removeBy": "8.1", - "references": [ - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" - }, - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" - } - ], - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.castEsToKbnFieldTypeName.$1", - "type": "string", - "tags": [], - "label": "esType", - "description": [], - "path": "node_modules/@types/kbn__field-types/index.d.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.cellHasFormulas", @@ -34174,7 +33820,9 @@ "type": "Function", "tags": [], "label": "createEscapeValue", - "description": [], + "description": [ + "\nCreate a function that will escape CSV values like \"=\", \"@\" and \"+\" with a\n\"'\". This will also place CSV values in \"\" if contain non-alphanumeric chars.\n\nFor example:\n\nGiven: =1+1\nReturns: \"'=1+1\"\n\nSee OWASP: https://www.owasp.org/index.php/CSV_Injection." + ], "signature": [ "(quoteValues: boolean, escapeFormulas: boolean) => (val: RawValue) => string" ], @@ -37112,7 +36760,7 @@ ], "path": "src/plugins/data_views/common/fields/types.ts", "deprecated": true, - "removeBy": "8.1", + "removeBy": "8.2", "references": [ { "plugin": "dataViews", @@ -39267,25 +38915,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.IndexPatternType", - "type": "Enum", - "tags": [ - "deprecated" - ], - "label": "IndexPatternType", - "description": [], - "path": "src/plugins/data_views/common/types.ts", - "deprecated": true, - "references": [ - { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/index.ts" - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.KBN_FIELD_TYPES", @@ -40496,30 +40125,6 @@ { "plugin": "discover", "path": "src/plugins/discover/public/application/main/discover_main_route.tsx" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/utils.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/deprecations/scripted_fields.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/deprecations/scripted_fields.ts" } ], "initialIsOpen": false @@ -40554,38 +40159,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.IndexPatternListItem", - "type": "Type", - "tags": [ - "deprecated" - ], - "label": "IndexPatternListItem", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewListItem", - "text": "DataViewListItem" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": true, - "references": [ - { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_views.ts" - }, - { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/index.ts" - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.IndexPatternLoadExpressionFunctionDefinition", @@ -40856,34 +40429,6 @@ "plugin": "dataViews", "path": "src/plugins/data_views/public/index.ts" }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts" @@ -41016,14 +40561,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts" }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, { "plugin": "stackAlerts", "path": "x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts" @@ -41048,22 +40585,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.ts" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, { "plugin": "visTypeTimelion", "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" @@ -41147,30 +40668,6 @@ { "plugin": "dataViews", "path": "src/plugins/data_views/common/index.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx" } ], "initialIsOpen": false diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 5ad82aeb15901..4e4aa7f1e7a51 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github summary: API docs for the data plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3368 | 39 | 2771 | 26 | +| 3390 | 40 | 2795 | 26 | ## Client diff --git a/api_docs/data_autocomplete.mdx b/api_docs/data_autocomplete.mdx index 9ad02e0de09ed..b7cacb27a9908 100644 --- a/api_docs/data_autocomplete.mdx +++ b/api_docs/data_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-autocomplete title: "data.autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.autocomplete plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3368 | 39 | 2771 | 26 | +| 3390 | 40 | 2795 | 26 | ## Client diff --git a/api_docs/data_enhanced.mdx b/api_docs/data_enhanced.mdx index 804e780be87c3..0197bc82e3de8 100644 --- a/api_docs/data_enhanced.mdx +++ b/api_docs/data_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataEnhanced title: "dataEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataEnhanced plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 2dbefcbd0612e..f2ecd8fcfaf7d 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.query plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3368 | 39 | 2771 | 26 | +| 3390 | 40 | 2795 | 26 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 241a628fdd922..3b091aac8e423 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -8799,7 +8799,15 @@ "label": "setup", "description": [], "signature": [ - "() => void" + "() => { getAllMigrations: () => ", + { + "pluginId": "kibanaUtils", + "scope": "common", + "docId": "kibKibanaUtilsPluginApi", + "section": "def-common.MigrateFunctionsObject", + "text": "MigrateFunctionsObject" + }, + "; }" ], "path": "src/plugins/data/common/search/search_source/search_source_service.ts", "deprecated": false, @@ -8890,15 +8898,7 @@ "section": "def-common.SerializedSearchSourceFields", "text": "SerializedSearchSourceFields" }, - "; getAllMigrations: () => { [x: string]: ", - { - "pluginId": "kibanaUtils", - "scope": "common", - "docId": "kibKibanaUtilsPluginApi", - "section": "def-common.MigrateFunction", - "text": "MigrateFunction" - }, - "; } & ", + "; getAllMigrations: () => ", { "pluginId": "kibanaUtils", "scope": "common", @@ -11165,6 +11165,72 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.getEqlFn", + "type": "Function", + "tags": [], + "label": "getEqlFn", + "description": [], + "signature": [ + "({ getStartDependencies, }: { getStartDependencies: (getKibanaRequest: any) => Promise; }) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlExpressionFunctionDefinition", + "text": "EqlExpressionFunctionDefinition" + } + ], + "path": "src/plugins/data/common/search/expressions/eql.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.getEqlFn.$1", + "type": "Object", + "tags": [], + "label": "{\n getStartDependencies,\n}", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.getEqlFn.$1.getStartDependencies", + "type": "Function", + "tags": [], + "label": "getStartDependencies", + "description": [], + "signature": [ + "(getKibanaRequest: any) => Promise" + ], + "path": "src/plugins/data/common/search/expressions/eql.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.getEqlFn.$1.getStartDependencies.$1", + "type": "Any", + "tags": [], + "label": "getKibanaRequest", + "description": [], + "signature": [ + "any" + ], + "path": "src/plugins/data/common/search/expressions/eql.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.getEsdslFn", @@ -20018,6 +20084,83 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.BaseHit", + "type": "Interface", + "tags": [], + "label": "BaseHit", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.BaseHit", + "text": "BaseHit" + }, + "" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.BaseHit._index", + "type": "string", + "tags": [], + "label": "_index", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.BaseHit._id", + "type": "string", + "tags": [], + "label": "_id", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.BaseHit._source", + "type": "Uncategorized", + "tags": [], + "label": "_source", + "description": [], + "signature": [ + "T" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.BaseHit.fields", + "type": "Object", + "tags": [], + "label": "fields", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.BucketAggParam", @@ -20375,6 +20518,145 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.EqlRawResponse", + "type": "Interface", + "tags": [], + "label": "EqlRawResponse", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.EqlRawResponse.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"eql_raw_response\"" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlRawResponse.body", + "type": "Unknown", + "tags": [], + "label": "body", + "description": [], + "signature": [ + "unknown" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlSearchResponse", + "type": "Interface", + "tags": [], + "label": "EqlSearchResponse", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlSearchResponse", + "text": "EqlSearchResponse" + }, + "" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.EqlSearchResponse.is_partial", + "type": "boolean", + "tags": [], + "label": "is_partial", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlSearchResponse.is_running", + "type": "boolean", + "tags": [], + "label": "is_running", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlSearchResponse.took", + "type": "number", + "tags": [], + "label": "took", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlSearchResponse.timed_out", + "type": "boolean", + "tags": [], + "label": "timed_out", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlSearchResponse.hits", + "type": "Object", + "tags": [], + "label": "hits", + "description": [], + "signature": [ + "{ total: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.TotalValue", + "text": "TotalValue" + }, + "; sequences?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlSequence", + "text": "EqlSequence" + }, + "[] | undefined; events?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.BaseHit", + "text": "BaseHit" + }, + "[] | undefined; }" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.EqlSearchStrategyRequest", @@ -20422,6 +20704,69 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.EqlSequence", + "type": "Interface", + "tags": [], + "label": "EqlSequence", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlSequence", + "text": "EqlSequence" + }, + "" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.EqlSequence.join_keys", + "type": "Array", + "tags": [], + "label": "join_keys", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchTypes", + "text": "SearchTypes" + }, + "[]" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlSequence.events", + "type": "Array", + "tags": [], + "label": "events", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.BaseHit", + "text": "BaseHit" + }, + "[]" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.EsRawResponse", @@ -23647,6 +23992,39 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-common.TotalValue", + "type": "Interface", + "tags": [], + "label": "TotalValue", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.TotalValue.value", + "type": "number", + "tags": [], + "label": "value", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.TotalValue.relation", + "type": "string", + "tags": [], + "label": "relation", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + } + ], + "initialIsOpen": false } ], "enums": [ @@ -24614,6 +24992,82 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.EqlExpressionFunctionDefinition", + "type": "Type", + "tags": [], + "label": "EqlExpressionFunctionDefinition", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionFunctionDefinition", + "text": "ExpressionFunctionDefinition" + }, + "<\"eql\", Input, Arguments, Output, ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExecutionContext", + "text": "ExecutionContext" + }, + "<", + { + "pluginId": "inspector", + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.Adapters", + "text": "Adapters" + }, + ", ", + "SerializableRecord", + ">>" + ], + "path": "src/plugins/data/common/search/expressions/eql.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-common.EqlRawResponseExpressionTypeDefinition", + "type": "Type", + "tags": [], + "label": "EqlRawResponseExpressionTypeDefinition", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionTypeDefinition", + "text": "ExpressionTypeDefinition" + }, + "<\"eql_raw_response\", ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlRawResponse", + "text": "EqlRawResponse" + }, + ", ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlRawResponse", + "text": "EqlRawResponse" + }, + ">" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.EqlRequestParams", @@ -27094,6 +27548,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.SearchTypes", + "type": "Type", + "tags": [], + "label": "SearchTypes", + "description": [], + "signature": [ + "string | number | boolean | object | string[] | number[] | boolean[] | object[] | undefined" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.SerializedSearchSourceFields", @@ -27662,6 +28130,88 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.eqlRawResponse", + "type": "Object", + "tags": [], + "label": "eqlRawResponse", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.eqlRawResponse.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "\"eql_raw_response\"" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.eqlRawResponse.to", + "type": "Object", + "tags": [], + "label": "to", + "description": [], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.eqlRawResponse.to.datatable", + "type": "Function", + "tags": [], + "label": "datatable", + "description": [], + "signature": [ + "(context: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlRawResponse", + "text": "EqlRawResponse" + }, + ") => { type: string; meta: { type: string; source: string; }; columns: { id: string; name: string; meta: { type: \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\"; field: string; params: {}; }; }[]; rows: any[]; }" + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.eqlRawResponse.to.datatable.$1", + "type": "Object", + "tags": [], + "label": "context", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EqlRawResponse", + "text": "EqlRawResponse" + } + ], + "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.esRawResponse", diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 3532f05ab635d..f14ebb080e7bc 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.search plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3368 | 39 | 2771 | 26 | +| 3390 | 40 | 2795 | 26 | ## Client diff --git a/api_docs/data_ui.mdx b/api_docs/data_ui.mdx index ab63f0cd60b36..23f5146cead77 100644 --- a/api_docs/data_ui.mdx +++ b/api_docs/data_ui.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-ui title: "data.ui" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.ui plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.ui'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3368 | 39 | 2771 | 26 | +| 3390 | 40 | 2795 | 26 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index c1f8afb3e3c3b..9b8c092e70d81 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewEditor plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index c7fe66ad85520..a48950bcdeefe 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewFieldEditor plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 99b866ff9954a..ea7aa8b5fa958 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewManagement plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index 3d06d95d4d169..f35dd54c38832 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -3800,10 +3800,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" }, - { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.ts" @@ -4348,6 +4344,18 @@ "plugin": "dataViewFieldEditor", "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, { "plugin": "visualizations", "path": "src/plugins/visualizations/public/vis.ts" @@ -5080,18 +5088,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/filter_manager.ts" @@ -5160,14 +5156,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/components/editor/controls_tab.tsx" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, { "plugin": "visDefaultEditor", "path": "src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts" @@ -5625,6 +5613,18 @@ "plugin": "data", "path": "src/plugins/data/public/index.ts" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/components/single_field_select.tsx" @@ -6157,18 +6157,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/join_editor/resources/metrics_expression.d.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" @@ -7283,6 +7271,233 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec", + "type": "Interface", + "tags": [], + "label": "DataViewSpec", + "description": [ + "\nStatic index pattern format\nSerialized data object, representing index pattern attributes and state" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.id", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "\nsaved object id" + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.version", + "type": "string", + "tags": [], + "label": "version", + "description": [ + "\nsaved object version string" + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.timeFieldName", + "type": "string", + "tags": [], + "label": "timeFieldName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.sourceFilters", + "type": "Array", + "tags": [], + "label": "sourceFilters", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.SourceFilter", + "text": "SourceFilter" + }, + "[] | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.fields", + "type": "Object", + "tags": [], + "label": "fields", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewFieldMap", + "text": "DataViewFieldMap" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.typeMeta", + "type": "Object", + "tags": [], + "label": "typeMeta", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.TypeMeta", + "text": "TypeMeta" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.fieldFormats", + "type": "Object", + "tags": [], + "label": "fieldFormats", + "description": [], + "signature": [ + "Record> | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.runtimeFieldMap", + "type": "Object", + "tags": [], + "label": "runtimeFieldMap", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.fieldAttrs", + "type": "Object", + "tags": [], + "label": "fieldAttrs", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrs", + "text": "FieldAttrs" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewSpec.allowNoIndex", + "type": "CompoundType", + "tags": [], + "label": "allowNoIndex", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data_views/common/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "dataViews", "id": "def-public.IIndexPatternFieldList", @@ -8396,34 +8611,6 @@ "plugin": "data", "path": "src/plugins/data/public/search/search_service.ts" }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts" @@ -8556,14 +8743,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts" }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, { "plugin": "stackAlerts", "path": "x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts" @@ -8588,22 +8767,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.ts" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, { "plugin": "visTypeTimelion", "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" @@ -14893,10 +15056,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" }, - { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.ts" @@ -15441,6 +15600,18 @@ "plugin": "dataViewFieldEditor", "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/open_editor.tsx" + }, { "plugin": "visualizations", "path": "src/plugins/visualizations/public/vis.ts" @@ -16173,18 +16344,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/open_editor.tsx" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/filter_manager.ts" @@ -16253,14 +16412,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/components/editor/controls_tab.tsx" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, { "plugin": "visDefaultEditor", "path": "src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts" @@ -16718,6 +16869,18 @@ "plugin": "data", "path": "src/plugins/data/public/index.ts" }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/shared_imports.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" + }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/components/single_field_select.tsx" @@ -17250,18 +17413,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/join_editor/resources/metrics_expression.d.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/lib/extract_time_fields.ts" - }, { "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" @@ -19119,7 +19270,7 @@ ], "path": "src/plugins/data_views/common/fields/types.ts", "deprecated": true, - "removeBy": "8.1", + "removeBy": "8.2", "references": [ { "plugin": "data", @@ -21660,29 +21811,6 @@ "path": "src/plugins/data_views/common/types.ts", "deprecated": false, "initialIsOpen": false - }, - { - "parentPluginId": "dataViews", - "id": "def-common.IndexPatternType", - "type": "Enum", - "tags": [ - "deprecated" - ], - "label": "IndexPatternType", - "description": [], - "path": "src/plugins/data_views/common/types.ts", - "deprecated": true, - "references": [ - { - "plugin": "data", - "path": "src/plugins/data/common/index.ts" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/index.ts" - } - ], - "initialIsOpen": false } ], "misc": [ @@ -22214,38 +22342,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "dataViews", - "id": "def-common.IndexPatternListItem", - "type": "Type", - "tags": [ - "deprecated" - ], - "label": "IndexPatternListItem", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewListItem", - "text": "DataViewListItem" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": true, - "references": [ - { - "plugin": "data", - "path": "src/plugins/data/common/index.ts" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/index.ts" - } - ], - "initialIsOpen": false - }, { "parentPluginId": "dataViews", "id": "def-common.IndexPatternLoadExpressionFunctionDefinition", @@ -22632,34 +22728,6 @@ "plugin": "data", "path": "src/plugins/data/public/search/search_service.ts" }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/types.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "savedObjects", - "path": "src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx" - }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts" @@ -22792,14 +22860,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts" }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, - { - "plugin": "security", - "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" - }, { "plugin": "stackAlerts", "path": "x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts" @@ -22824,22 +22884,6 @@ "plugin": "inputControlVis", "path": "src/plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.ts" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, { "plugin": "visTypeTimelion", "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" @@ -22959,30 +23003,6 @@ { "plugin": "data", "path": "src/plugins/data/public/index.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx" - }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx" } ], "initialIsOpen": false diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index ed6084dbf9995..70a784e4b214a 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViews plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 734 | 3 | 592 | 7 | +| 745 | 3 | 600 | 7 | ## Client diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index aaa635baf44da..c235b26a8d037 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataVisualizer plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 3037d083e3fcd..570be545e36aa 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -14,41 +14,37 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Referencing plugin(s) | Remove By | | ---------------|-----------|-----------| | | securitySolution | - | -| | home, savedObjects, security, discover, visualizations, dashboard, lens, observability, maps, fileUpload, dataVisualizer, infra, graph, monitoring, securitySolution, stackAlerts, transform, uptime, inputControlVis, kibanaOverview, savedObjectsManagement, visTypeTimelion, visTypeTimeseries, visTypeVega, dataViewManagement | - | +| | discover, visualizations, dashboard, lens, observability, maps, fileUpload, dataVisualizer, infra, graph, monitoring, securitySolution, stackAlerts, transform, uptime, inputControlVis, visTypeTimelion, visTypeTimeseries, visTypeVega, dataViewManagement, savedObjects | - | | | apm, security, securitySolution | - | | | apm, security, securitySolution | - | | | encryptedSavedObjects, actions, cloud, ml, dataEnhanced, logstash, securitySolution | - | | | visualizations, dashboard, lens, maps, ml, securitySolution, security | - | | | securitySolution | - | | | dataViews, visTypeTimeseries, maps, data | - | -| | dataViews, observability, savedObjects, security, dashboard, lens, maps, graph, stackAlerts, transform, inputControlVis, savedObjectsManagement, visTypeTimelion, data | - | -| | dataViews, upgradeAssistant, dashboard, visualizations, discover, visTypeTimeseries, observability, maps, dataVisualizer, apm, transform, lens, savedObjects, dataViewFieldEditor, graph, stackAlerts, uptime, dataViewEditor, inputControlVis, savedObjectsManagement, visDefaultEditor, visTypeVega, data | - | +| | dataViews, observability, dashboard, lens, maps, graph, stackAlerts, transform, inputControlVis, visTypeTimelion, data | - | +| | dataViews, upgradeAssistant, dashboard, visualizations, discover, visTypeTimeseries, observability, maps, dataVisualizer, apm, transform, lens, savedObjects, dataViewFieldEditor, dataViewEditor, graph, stackAlerts, uptime, inputControlVis, visDefaultEditor, visTypeVega, data | - | | | dataViews, maps, dataVisualizer, lens, dataViewEditor, inputControlVis, visDefaultEditor, visTypeTimeseries, discover, data | - | | | dataViews, monitoring, stackAlerts, transform | - | | | dataViews, transform, canvas, discover | - | -| | dataViews, dataViewEditor | - | -| | dataViews | - | -| | dataViews | - | +| | dataViews | - | | | dataViews, monitoring, stackAlerts, transform, data | - | | | dataViews, transform, canvas, discover, data | - | | | dataViews, data | - | | | dataViews, data | - | -| | dataViews, dataViewEditor, data | - | -| | dataViews, observability, savedObjects, security, dashboard, lens, maps, graph, stackAlerts, transform, inputControlVis, savedObjectsManagement, visTypeTimelion, data | - | -| | dataViews, data | - | +| | dataViews, data | - | +| | dataViews, observability, dashboard, lens, maps, graph, stackAlerts, transform, inputControlVis, visTypeTimelion, data | - | | | dataViews, visualizations, dashboard, data | - | | | dataViews, maps, dataVisualizer, lens, dataViewEditor, inputControlVis, visDefaultEditor, visTypeTimeseries, discover, data | - | -| | dataViews, data | - | | | dataViews, visTypeTimeseries, maps, data | - | | | dataViews, visualizations, dashboard, lens | - | -| | dataViews, upgradeAssistant, dashboard, visualizations, discover, visTypeTimeseries, observability, maps, dataVisualizer, apm, transform, lens, savedObjects, dataViewFieldEditor, graph, stackAlerts, uptime, dataViewEditor, inputControlVis, savedObjectsManagement, visDefaultEditor, visTypeVega, data | - | +| | dataViews, upgradeAssistant, dashboard, visualizations, discover, visTypeTimeseries, observability, maps, dataVisualizer, apm, transform, lens, savedObjects, dataViewFieldEditor, dataViewEditor, graph, stackAlerts, uptime, inputControlVis, visDefaultEditor, visTypeVega, data | - | | | dataViews, maps | - | | | dataViewManagement, dataViews | - | | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | | | dataViews, dataViewManagement | - | | | dataViews, transform, canvas, discover | - | | | dataViews, maps, dataVisualizer, lens, dataViewEditor, inputControlVis, visDefaultEditor, visTypeTimeseries, discover | - | -| | dataViews, upgradeAssistant, dashboard, visualizations, discover, visTypeTimeseries, observability, maps, dataVisualizer, apm, transform, lens, savedObjects, dataViewFieldEditor, graph, stackAlerts, uptime, dataViewEditor, inputControlVis, savedObjectsManagement, visDefaultEditor, visTypeVega | - | +| | dataViews, upgradeAssistant, dashboard, visualizations, discover, visTypeTimeseries, observability, maps, dataVisualizer, apm, transform, lens, savedObjects, dataViewFieldEditor, dataViewEditor, graph, stackAlerts, uptime, inputControlVis, visDefaultEditor, visTypeVega | - | | | dataViews, visTypeTimeseries, maps | - | | | dataViews, maps | - | | | dataViewManagement, dataViews | - | @@ -61,14 +57,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | maps | - | | | visualizations, dashboard, maps, graph | - | | | observability, osquery | - | -| | security | - | -| | security | - | -| | security | - | -| | security | - | -| | security | - | -| | security, licenseManagement, ml, fleet, apm, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher | - | -| | spaces, security, actions, alerting, ml, fleet, remoteClusters, graph, indexLifecycleManagement, mapsEms, painlessLab, rollup, searchprofiler, snapshotRestore, transform, upgradeAssistant | - | -| | management, fleet, security, kibanaOverview | - | | | visualizations, dashboard, lens | - | | | embeddable, presentationUtil, discover, dashboard, graph | - | | | dashboard | - | @@ -76,16 +64,18 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | dashboard | - | | | screenshotting, dashboard | - | | | lens, dashboard | - | -| | spaces, savedObjectsManagement | - | -| | spaces, savedObjectsManagement | - | -| | ml, infra, ingestPipelines, upgradeAssistant | - | -| | ml, infra, ingestPipelines, upgradeAssistant | - | +| | spaces, security, actions, alerting, ml, fleet, remoteClusters, graph, indexLifecycleManagement, mapsEms, painlessLab, rollup, searchprofiler, snapshotRestore, transform, upgradeAssistant | - | +| | ml, infra, ingestPipelines, transform, upgradeAssistant | - | +| | ml, infra, ingestPipelines, transform, upgradeAssistant | - | | | discover | - | | | discover | - | | | data, discover, embeddable | - | | | advancedSettings, discover | - | | | advancedSettings, discover | - | +| | dataVisualizer | - | +| | dataVisualizer | - | | | cloud, apm | - | +| | security, licenseManagement, ml, fleet, apm, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher | - | | | visTypeVega | - | | | monitoring, visTypeVega | - | | | monitoring, kibanaUsageCollection | - | @@ -103,16 +93,21 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | reporting | - | | | dataViewManagement | - | | | dataViewManagement | - | +| | security, fleet | - | +| | security, fleet | - | +| | security, fleet | - | +| | management, fleet, security, kibanaOverview | - | | | fleet | - | +| | actions, alerting | - | | | actions, ml, enterpriseSearch, savedObjectsTagging | - | -| | actions | - | | | screenshotting | - | | | ml | - | +| | security | - | +| | security | - | +| | spaces, savedObjectsManagement | - | +| | spaces, savedObjectsManagement | - | | | mapsEms | - | | | console | - | -| | dataViews, monitoring, stackAlerts | 8.1 | -| | dataViews, monitoring, stackAlerts, data | 8.1 | -| | dataViews, monitoring, stackAlerts | 8.1 | | | discover, maps, inputControlVis | 8.1 | | | discover, dashboard, maps, dashboardEnhanced, discoverEnhanced | 8.1 | | | discover, dashboard, dashboardEnhanced, discoverEnhanced, urlDrilldown, inputControlVis, maps | 8.1 | @@ -121,9 +116,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | discover, dashboard, dashboardEnhanced, discoverEnhanced, urlDrilldown, inputControlVis, maps | 8.1 | | | apm, graph, monitoring, stackAlerts | 8.1 | | | stackAlerts | 8.1 | -| | dataViewFieldEditor | 8.1 | -| | dataViewFieldEditor | 8.1 | -| | dataViewFieldEditor | 8.1 | | | dashboardEnhanced | 8.1 | | | dashboardEnhanced | 8.1 | | | discoverEnhanced | 8.1 | @@ -132,6 +124,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | alerting, dataEnhanced | 8.1 | | | actions, alerting, dataEnhanced | 8.1 | | | alerting, dataEnhanced | 8.1 | +| | dataViews, monitoring, stackAlerts | 8.2 | +| | dataViews, monitoring, stackAlerts, data | 8.2 | +| | dataViews, monitoring, stackAlerts | 8.2 | ## Unreferenced deprecated APIs diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 21a2e9f0bd4a8..af046944b2c56 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -39,6 +39,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder) | 8.1 | | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24) | - | +| | [task.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/usage/task.ts#:~:text=index) | - | @@ -153,17 +154,15 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternsService) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern)+ 94 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IFieldType), [date_histogram.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/buckets/date_histogram.ts#:~:text=IFieldType), [date_histogram.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/buckets/date_histogram.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType)+ 43 more | 8.1 | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IFieldType), [date_histogram.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/buckets/date_histogram.ts#:~:text=IFieldType), [date_histogram.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/buckets/date_histogram.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType)+ 43 more | 8.2 | | | [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternField), [kibana_context_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/kibana_context_type.ts#:~:text=IndexPatternField), [kibana_context_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/kibana_context_type.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField)+ 16 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [normalize_sort_request.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/normalize_sort_request.ts#:~:text=IIndexPattern), [normalize_sort_request.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/normalize_sort_request.ts#:~:text=IIndexPattern), [normalize_sort_request.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/normalize_sort_request.ts#:~:text=IIndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IIndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IIndexPattern)+ 64 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternAttributes), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternAttributes), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternAttributes) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IIndexPatternsApiClient) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternFieldMap) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternSpec), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternSpec) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternType), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternType) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [create_search_source.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.test.ts#:~:text=IndexPatternsContract)+ 29 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternsService) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternListItem), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternListItem) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern)+ 94 more | - | | | [aggs_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/search/aggs/aggs_service.ts#:~:text=indexPatternsServiceFactory), [esaggs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/search/expressions/esaggs.ts#:~:text=indexPatternsServiceFactory), [search_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/search/search_service.ts#:~:text=indexPatternsServiceFactory) | - | | | [data_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions), [data_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions) | - | @@ -188,8 +187,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern), [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern) | - | | | [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField)+ 2 more | - | -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_flyout_content_container.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx#:~:text=IndexPatternSpec), [data_view_flyout_content_container.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx#:~:text=IndexPatternSpec) | - | -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_flyout_content_container.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx#:~:text=IndexPatternSpec), [data_view_flyout_content_container.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx#:~:text=IndexPatternSpec), [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=IndexPatternSpec)+ 2 more | - | | | [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField)+ 2 more | - | | | [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern), [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern), [open_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/open_editor.tsx#:~:text=IndexPattern) | - | | | [shared_imports.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField), [extract_time_fields.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_editor/public/lib/extract_time_fields.test.ts#:~:text=IndexPatternField) | - | @@ -202,12 +199,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern) | - | -| | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName) | 8.1 | | | [field_editor_context.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_editor_context.tsx#:~:text=fieldFormats), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=fieldFormats), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=fieldFormats), [field_editor_flyout_content_container.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_editor_flyout_content_container.tsx#:~:text=fieldFormats), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=fieldFormats) | - | | | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern) | - | -| | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName) | 8.1 | | | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern), [field_format_editor.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/target/types/public/components/field_format_editor/field_format_editor.d.ts#:~:text=IndexPattern) | - | -| | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName) | 8.1 | @@ -237,22 +231,18 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternField), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPatternField), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPatternField)+ 2 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IIndexPattern), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=IIndexPattern), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=IIndexPattern) | - | -| | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.1 | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [scripted_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/deprecations/scripted_fields.ts#:~:text=IndexPatternAttributes), [scripted_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/deprecations/scripted_fields.ts#:~:text=IndexPatternAttributes) | - | +| | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.2 | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternAttributes) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternSpec) | - | -| | [data_views.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_views.ts#:~:text=IndexPatternListItem), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternListItem) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternType) | - | -| | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.1 | +| | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.2 | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IIndexPattern), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=IIndexPattern), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=IIndexPattern) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [scripted_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/deprecations/scripted_fields.ts#:~:text=IndexPatternAttributes), [scripted_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/deprecations/scripted_fields.ts#:~:text=IndexPatternAttributes) | - | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternAttributes) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IIndexPatternsApiClient), [index_patterns_api_client.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/index_patterns_api_client.ts#:~:text=IIndexPatternsApiClient), [index_patterns_api_client.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/index_patterns_api_client.ts#:~:text=IIndexPatternsApiClient) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternFieldMap) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternSpec) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternsContract) | - | -| | [data_views.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_views.ts#:~:text=IndexPatternListItem), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternListItem) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternField), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPatternField), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPatternField)+ 2 more | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternType) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternsService) | - | | | [data_views.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_views.ts#:~:text=ensureDefaultDataView) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern) | - | @@ -260,8 +250,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=removeScriptedField) | - | | | [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getNonScriptedFields) | - | | | [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=getScriptedFields), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=getScriptedFields), [data_views.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_views.ts#:~:text=getScriptedFields), [register_index_pattern_usage_collection.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/register_index_pattern_usage_collection.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields) | - | -| | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.1 | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/utils.ts#:~:text=IndexPatternAttributes), [scripted_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/deprecations/scripted_fields.ts#:~:text=IndexPatternAttributes), [scripted_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/deprecations/scripted_fields.ts#:~:text=IndexPatternAttributes) | - | +| | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.2 | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternAttributes) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternField), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPatternField), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPatternField), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPatternField)+ 2 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternsService) | - | @@ -283,6 +273,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=IndexPattern)+ 44 more | - | | | [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField)+ 5 more | - | | | [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=IndexPattern)+ 17 more | - | +| | [results_links.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=DiscoverUrlGeneratorState), [results_links.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=DiscoverUrlGeneratorState), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=DiscoverUrlGeneratorState), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=DiscoverUrlGeneratorState) | - | +| | [results_links.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=DISCOVER_APP_URL_GENERATOR), [results_links.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=DISCOVER_APP_URL_GENERATOR), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=DISCOVER_APP_URL_GENERATOR), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=DISCOVER_APP_URL_GENERATOR) | - | @@ -375,6 +367,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/index.tsx#:~:text=fieldFormats) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/plugin.ts#:~:text=license%24) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=license%24) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/integrations/index.tsx#:~:text=appBasePath), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/fleet/index.tsx#:~:text=appBasePath), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/public/applications/fleet/index.d.ts#:~:text=appBasePath), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/public/applications/integrations/index.d.ts#:~:text=appBasePath) | - | @@ -402,14 +397,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex -## home - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/home/public/plugin.ts#:~:text=indexPatterns) | - | - - - ## indexLifecycleManagement | Deprecated API | Reference location(s) | Remove By | @@ -463,7 +450,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [overview.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_overview/public/components/overview/overview.tsx#:~:text=indexPatterns) | - | | | [application.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_overview/public/application.tsx#:~:text=appBasePath) | - | @@ -530,7 +516,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | ---------------|-----------|-----------| | | [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract) | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern)+ 206 more | - | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern)+ 204 more | - | | | [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 268 more | - | | | [es_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch) | 8.1 | | | [kibana_services.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/kibana_services.ts#:~:text=indexPatterns) | - | @@ -539,12 +525,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract) | - | | | [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 268 more | - | | | [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService) | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern)+ 206 more | - | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern)+ 204 more | - | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | | | [data_request_descriptor_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts#:~:text=Filter), [data_request_descriptor_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/types.ts#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter)+ 21 more | 8.1 | | | [es_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch) | 8.1 | | | [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [es_agg_utils.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/common/elasticsearch_util/es_agg_utils.d.ts#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 129 more | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern)+ 98 more | - | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [es_agg_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [agg_field_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/agg_field_types.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [percentile_agg_field.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.ts#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern), [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=IndexPattern)+ 97 more | - | | | [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService) | - | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | | | [data_request_descriptor_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts#:~:text=Filter), [data_request_descriptor_types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/common/elasticsearch_util/types.ts#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=Filter)+ 21 more | 8.1 | @@ -584,12 +570,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern)+ 2 more | - | -| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.1 | +| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.2 | | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=indexPatterns), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=indexPatterns) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=esKuery) | 8.1 | -| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.1 | +| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.2 | | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern)+ 14 more | - | -| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.1 | +| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.2 | | | [legacy_shims.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/legacy_shims.ts#:~:text=injectedMetadata) | - | | | [bulk_uploader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/kibana_monitoring/bulk_uploader.ts#:~:text=process) | - | @@ -663,10 +649,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract) | - | | | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/plugin.ts#:~:text=indexPatterns), [saved_object.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=indexPatterns), [saved_object.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=indexPatterns) | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract), [hydrate_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/hydrate_index_pattern.ts#:~:text=IndexPatternsContract) | - | +| | [saved_object.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=indexPatterns), [saved_object.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=indexPatterns) | - | | | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern) | - | | | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/types.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern), [apply_es_resp.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects/public/saved_object/helpers/apply_es_resp.ts#:~:text=IndexPattern) | - | @@ -676,12 +660,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract) | - | -| | [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern) | - | -| | [saved_objects_table_page.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/saved_objects_table_page.tsx#:~:text=indexPatterns) | - | -| | [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=IndexPatternsContract) | - | -| | [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern) | - | -| | [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern), [flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=IndexPattern) | - | | | [resolve_import_errors.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/lib/resolve_import_errors.ts#:~:text=createNewCopy) | - | | | [resolve_import_errors.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_management/public/lib/resolve_import_errors.ts#:~:text=createNewCopy) | - | @@ -725,9 +703,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract) | - | -| | [roles_management_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/roles_management_app.tsx#:~:text=indexPatterns) | - | -| | [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract), [edit_role_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts#:~:text=IndexPatternsContract) | - | | | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | - | | | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | - | | | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | - | @@ -746,7 +721,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [use_risky_hosts_dashboard_button_href.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href.ts#:~:text=dashboardUrlGenerator), [use_risky_hosts_dashboard_links.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_links.tsx#:~:text=dashboardUrlGenerator) | - | +| | [use_risky_hosts_dashboard_button_href.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href.ts#:~:text=dashboardUrlGenerator) | - | | | [middleware.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=indexPatterns), [dependencies_start_mock.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts#:~:text=indexPatterns) | - | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | - | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | - | @@ -781,16 +756,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract) | - | | | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern) | - | | | [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern)+ 1 more | - | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.1 | +| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.2 | | | [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=indexPatterns), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns) | - | | | [expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.tsx#:~:text=fieldFormats) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery) | 8.1 | | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery) | 8.1 | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 42 more | 8.1 | +| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 42 more | 8.2 | | | [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern)+ 12 more | - | | | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPatternsContract) | - | | | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern) | - | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.1 | +| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.2 | | | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern), [geo_index_pattern_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.d.ts#:~:text=IndexPattern) | - | @@ -810,6 +785,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern)+ 30 more | - | | | [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=IndexPatternAttributes), [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=IndexPatternAttributes) | - | | | [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern)+ 10 more | - | +| | [step_create_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx#:~:text=getUrl) | - | +| | [step_create_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx#:~:text=getUrl) | - | | | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/services/license.ts#:~:text=license%24) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index a4eb29cdbd6b2..4c2e83abeaf21 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team summary: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -21,12 +21,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.1 | -| dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 66 more | 8.1 | -| dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.1 | -| dataViewFieldEditor | | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName) | 8.1 | -| dataViewFieldEditor | | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName) | 8.1 | -| dataViewFieldEditor | | [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName), [field_format_editor.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx#:~:text=castEsToKbnFieldTypeName) | 8.1 | +| dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.2 | +| dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 66 more | 8.2 | +| dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.2 | | dashboardEnhanced | | [embeddable_to_dashboard_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx#:~:text=esFilters), [embeddable_to_dashboard_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx#:~:text=esFilters), [embeddable_to_dashboard_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx#:~:text=esFilters) | 8.1 | | dashboardEnhanced | | [embeddable_to_dashboard_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx#:~:text=isFilters), [embeddable_to_dashboard_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx#:~:text=isFilters) | 8.1 | | dashboardEnhanced | | [embeddable_to_dashboard_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx#:~:text=Filter), [embeddable_to_dashboard_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx#:~:text=Filter), [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter) | 8.1 | @@ -56,22 +53,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex -## Enterprise Search - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Fleet - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - ## GIS | Plugin | Deprecated API | Reference location(s) | Remove By | @@ -89,11 +70,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.1 | +| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.2 | | stackAlerts | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery) | 8.1 | | stackAlerts | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery) | 8.1 | -| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 42 more | 8.1 | -| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.1 | +| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 42 more | 8.2 | +| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType), [single_field_select.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/target/types/public/alert_types/geo_containment/query_builder/util_components/single_field_select.d.ts#:~:text=IFieldType)+ 16 more | 8.2 | | alerting | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | | alerting | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | | alerting | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder) | 8.1 | @@ -101,14 +82,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex -## Kibana Core - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - ## Kibana Presentation | Plugin | Deprecated API | Reference location(s) | Remove By | @@ -122,106 +95,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex -## Kibana Reporting Services - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Kibana Telemetry - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Logs and Metrics UI - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Logstash - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Machine Learning UI - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Observability UI - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Platform Security - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Security asset management - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Security solution - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Stack Management - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - ## Stack Monitoring | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| monitoring | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.1 | +| monitoring | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.2 | | monitoring | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=esKuery) | 8.1 | -| monitoring | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.1 | -| monitoring | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.1 | - - - -## Uptime - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| - - - - -## Vis Editors - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| \ No newline at end of file +| monitoring | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.2 | +| monitoring | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IFieldType) | 8.2 | \ No newline at end of file diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 8dd032f64d5e1..70bad6ae3cc46 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github summary: API docs for the devTools plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json index 209752ad2ed6f..e1bd08b488430 100644 --- a/api_docs/discover.devdocs.json +++ b/api_docs/discover.devdocs.json @@ -486,11 +486,31 @@ "parentPluginId": "discover", "id": "def-public.DiscoverUrlGeneratorState", "type": "Interface", - "tags": [], + "tags": [ + "deprecated" + ], "label": "DiscoverUrlGeneratorState", "description": [], "path": "src/plugins/discover/public/url_generator.ts", - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + } + ], "children": [ { "parentPluginId": "discover", @@ -1271,16 +1291,50 @@ "misc": [ { "parentPluginId": "discover", - "id": "def-public.DISCOVER_APP_URL_GENERATOR", + "id": "def-public.DISCOVER_APP_LOCATOR", "type": "string", "tags": [], + "label": "DISCOVER_APP_LOCATOR", + "description": [], + "signature": [ + "\"DISCOVER_APP_LOCATOR\"" + ], + "path": "src/plugins/discover/public/locator.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.DISCOVER_APP_URL_GENERATOR", + "type": "string", + "tags": [ + "deprecated" + ], "label": "DISCOVER_APP_URL_GENERATOR", "description": [], "signature": [ "\"DISCOVER_APP_URL_GENERATOR\"" ], "path": "src/plugins/discover/public/url_generator.ts", - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + } + ], "initialIsOpen": false }, { diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 66a9cf62fdc04..1dbf60bf028d5 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github summary: API docs for the discover plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 89 | 0 | 61 | 7 | +| 90 | 0 | 62 | 7 | ## Client diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 8efdfa4b38b16..77ed073be04b1 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the discoverEnhanced plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/elastic_apm_synthtrace.mdx b/api_docs/elastic_apm_synthtrace.mdx index c7e1e721ec579..50cfdad6233f6 100644 --- a/api_docs/elastic_apm_synthtrace.mdx +++ b/api_docs/elastic_apm_synthtrace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/elastic-apm-synthtrace title: "@elastic/apm-synthtrace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @elastic/apm-synthtrace plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/apm-synthtrace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/elastic_datemath.mdx b/api_docs/elastic_datemath.mdx index 17412cf9336c3..04a7940da47c8 100644 --- a/api_docs/elastic_datemath.mdx +++ b/api_docs/elastic_datemath.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/elastic-datemath title: "@elastic/datemath" image: https://source.unsplash.com/400x175/?github summary: API docs for the @elastic/datemath plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/datemath'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index 3f01a77bfec81..36bf7d9bf5c68 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -5828,6 +5828,19 @@ "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", "deprecated": false }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddableChildPanelProps.index", + "type": "number", + "tags": [], + "label": "index", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false + }, { "parentPluginId": "embeddable", "id": "def-public.EmbeddableChildPanelProps.className", @@ -5917,7 +5930,7 @@ "section": "def-public.EmbeddableContainerContext", "text": "EmbeddableContainerContext" }, - " | undefined; }>" + " | undefined; index?: number | undefined; }>" ], "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", "deprecated": false, @@ -8680,7 +8693,7 @@ "section": "def-public.EmbeddableContainerContext", "text": "EmbeddableContainerContext" }, - " | undefined; }>" + " | undefined; index?: number | undefined; }>" ], "path": "src/plugins/embeddable/public/plugin.tsx", "deprecated": false, @@ -9348,7 +9361,7 @@ "section": "def-public.EmbeddableContainerContext", "text": "EmbeddableContainerContext" }, - " | undefined; }>" + " | undefined; index?: number | undefined; }>" ], "path": "src/plugins/embeddable/public/plugin.tsx", "deprecated": false, diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 0cd1d9d0ffb0b..01a0289f93c94 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddable plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 467 | 0 | 380 | 4 | +| 468 | 0 | 381 | 4 | ## Client diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 9e35225aeed18..f744090733fd4 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddableEnhanced plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 4b0f9f1d27e12..e61b497129d4e 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the encryptedSavedObjects plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 90e3baa926ed2..cf2e61a87b48a 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the enterpriseSearch plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 46c2630a3dced..79c635e2ffc8e 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github summary: API docs for the esUiShared plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/event_log.devdocs.json b/api_docs/event_log.devdocs.json index 98c6bbdbd7d21..55b4f53b1a8f8 100644 --- a/api_docs/event_log.devdocs.json +++ b/api_docs/event_log.devdocs.json @@ -893,7 +893,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; error?: Readonly<{ message?: string | undefined; type?: string | undefined; id?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; reporting?: Readonly<{ id?: string | undefined; jobType?: string | undefined; byteSize?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; url?: string | undefined; original?: string | undefined; duration?: number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; dataset?: string | undefined; severity?: number | undefined; created?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined)[]" + "(Readonly<{ user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; error?: Readonly<{ message?: string | undefined; type?: string | undefined; id?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: number | undefined; total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; reporting?: Readonly<{ id?: string | undefined; jobType?: string | undefined; byteSize?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; url?: string | undefined; original?: string | undefined; duration?: number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; dataset?: string | undefined; severity?: number | undefined; created?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined)[]" ], "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", "deprecated": false @@ -912,7 +912,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial | undefined; message?: string | undefined; error?: Readonly<{ message?: string | undefined; type?: string | undefined; id?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; reporting?: Readonly<{ id?: string | undefined; jobType?: string | undefined; byteSize?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; url?: string | undefined; original?: string | undefined; duration?: number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; dataset?: string | undefined; severity?: number | undefined; created?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; message?: string | undefined; error?: Readonly<{ message?: string | undefined; type?: string | undefined; id?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: number | undefined; total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; reporting?: Readonly<{ id?: string | undefined; jobType?: string | undefined; byteSize?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; url?: string | undefined; original?: string | undefined; duration?: number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; dataset?: string | undefined; severity?: number | undefined; created?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, @@ -926,7 +926,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; error?: Readonly<{ message?: string | undefined; type?: string | undefined; id?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; reporting?: Readonly<{ id?: string | undefined; jobType?: string | undefined; byteSize?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; url?: string | undefined; original?: string | undefined; duration?: number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; dataset?: string | undefined; severity?: number | undefined; created?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined" + "Readonly<{ user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; error?: Readonly<{ message?: string | undefined; type?: string | undefined; id?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: number | undefined; total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; reporting?: Readonly<{ id?: string | undefined; jobType?: string | undefined; byteSize?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; url?: string | undefined; original?: string | undefined; duration?: number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; dataset?: string | undefined; severity?: number | undefined; created?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index f0d6dd77b7fd0..4730c2ca003ac 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github summary: API docs for the eventLog plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 018a43a0d1ede..ab44374fd004d 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionError plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index ca78d69bcdafa..6d95053eab630 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionGauge plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_heatmap.devdocs.json b/api_docs/expression_heatmap.devdocs.json index ccf99a399585e..a3d9863b71625 100644 --- a/api_docs/expression_heatmap.devdocs.json +++ b/api_docs/expression_heatmap.devdocs.json @@ -1127,6 +1127,89 @@ } ] }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.isYAxisTitleVisible", + "type": "Object", + "tags": [], + "label": "isYAxisTitleVisible", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.isYAxisTitleVisible.types", + "type": "Array", + "tags": [], + "label": "types", + "description": [], + "signature": [ + "\"boolean\"[]" + ], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.isYAxisTitleVisible.help", + "type": "string", + "tags": [], + "label": "help", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.yTitle", + "type": "Object", + "tags": [], + "label": "yTitle", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.yTitle.types", + "type": "Array", + "tags": [], + "label": "types", + "description": [], + "signature": [ + "\"string\"[]" + ], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.yTitle.help", + "type": "string", + "tags": [], + "label": "help", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.yTitle.required", + "type": "boolean", + "tags": [], + "label": "required", + "description": [], + "signature": [ + "false" + ], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + } + ] + }, { "parentPluginId": "expressionHeatmap", "id": "def-common.heatmapGridConfig.args.isXAxisLabelVisible", @@ -1163,6 +1246,89 @@ "deprecated": false } ] + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.isXAxisTitleVisible", + "type": "Object", + "tags": [], + "label": "isXAxisTitleVisible", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.isXAxisTitleVisible.types", + "type": "Array", + "tags": [], + "label": "types", + "description": [], + "signature": [ + "\"boolean\"[]" + ], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.isXAxisTitleVisible.help", + "type": "string", + "tags": [], + "label": "help", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.xTitle", + "type": "Object", + "tags": [], + "label": "xTitle", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.xTitle.types", + "type": "Array", + "tags": [], + "label": "types", + "description": [], + "signature": [ + "\"string\"[]" + ], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.xTitle.help", + "type": "string", + "tags": [], + "label": "help", + "description": [], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionHeatmap", + "id": "def-common.heatmapGridConfig.args.xTitle.required", + "type": "boolean", + "tags": [], + "label": "required", + "description": [], + "signature": [ + "false" + ], + "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", + "deprecated": false + } + ] } ] }, @@ -1176,7 +1342,7 @@ "signature": [ "(input: null, args: ", "HeatmapGridConfig", - ") => { strokeWidth?: number | undefined; strokeColor?: string | undefined; isCellLabelVisible: boolean; isYAxisLabelVisible: boolean; isXAxisLabelVisible: boolean; type: \"heatmap_grid\"; }" + ") => { strokeWidth?: number | undefined; strokeColor?: string | undefined; isCellLabelVisible: boolean; isYAxisLabelVisible: boolean; isYAxisTitleVisible: boolean; yTitle?: string | undefined; isXAxisLabelVisible: boolean; isXAxisTitleVisible: boolean; xTitle?: string | undefined; type: \"heatmap_grid\"; }" ], "path": "src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts", "deprecated": false, diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 276355f698815..2041aded5816e 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionHeatmap plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 99 | 0 | 95 | 3 | +| 113 | 0 | 109 | 3 | ## Client diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index f1ed57455a566..f4203071673b0 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionImage plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index e5ed85750e1b0..e6cf09438fcd4 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetric plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 91e2a27265816..d84a57d016965 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetricVis plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_pie.mdx b/api_docs/expression_pie.mdx index 9f30f8d8643cb..1803ce47b7cc4 100644 --- a/api_docs/expression_pie.mdx +++ b/api_docs/expression_pie.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionPie title: "expressionPie" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionPie plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPie'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 0e25dd631b0cd..906f0a5daf172 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRepeatImage plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 36b1278166a9f..8cce3a6e9e03c 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRevealImage plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index b17d82a0c4c87..ff2a0aff79837 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionShape plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index bc835e9b95daf..dca54b2e22864 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionTagcloud plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 399bea13537c8..3ff820838cd2c 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressions plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/features.devdocs.json b/api_docs/features.devdocs.json index bb5503a83a2ba..736522f08e897 100644 --- a/api_docs/features.devdocs.json +++ b/api_docs/features.devdocs.json @@ -333,6 +333,10 @@ "plugin": "security", "path": "x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/plugin.ts" + }, { "plugin": "security", "path": "x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts" @@ -1561,6 +1565,10 @@ "plugin": "security", "path": "x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/plugin.ts" + }, { "plugin": "security", "path": "x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts" @@ -3123,6 +3131,10 @@ "plugin": "security", "path": "x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/plugin.ts" + }, { "plugin": "security", "path": "x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts" diff --git a/api_docs/features.mdx b/api_docs/features.mdx index ea065bbe54b22..1e41e5e34bf13 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github summary: API docs for the features plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 104be21a086b5..7b36799d37e81 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github summary: API docs for the fieldFormats plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index af752579b0a54..dad7f02535ea9 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github summary: API docs for the fileUpload plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 5008cff334928..85bbf0741f5d0 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -2455,15 +2455,13 @@ "Authorization for the current user" ], "signature": [ - "Promise<", { "pluginId": "fleet", "scope": "common", "docId": "kibFleetPluginApi", "section": "def-common.FleetAuthz", "text": "FleetAuthz" - }, - ">" + } ], "path": "x-pack/plugins/fleet/public/plugin.ts", "deprecated": false @@ -3642,367 +3640,6 @@ } ] }, - { - "parentPluginId": "fleet", - "id": "def-server.AgentPolicyServiceInterface.getDefaultAgentPolicyId", - "type": "Function", - "tags": [], - "label": "getDefaultAgentPolicyId", - "description": [], - "signature": [ - "(soClient: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClientContract", - "text": "SavedObjectsClientContract" - }, - ") => Promise" - ], - "path": "x-pack/plugins/fleet/server/services/index.ts", - "deprecated": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "fleet", - "id": "def-server.AgentPolicyServiceInterface.getDefaultAgentPolicyId.$1", - "type": "Object", - "tags": [], - "label": "soClient", - "description": [], - "signature": [ - "{ create: (type: string, attributes: T, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" - }, - " | undefined) => Promise<", - "SavedObject", - ">; bulkCreate: (objects: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkCreateObject", - "text": "SavedObjectsBulkCreateObject" - }, - "[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkResponse", - "text": "SavedObjectsBulkResponse" - }, - ">; checkConflicts: (objects?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCheckConflictsObject", - "text": "SavedObjectsCheckConflictsObject" - }, - "[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCheckConflictsResponse", - "text": "SavedObjectsCheckConflictsResponse" - }, - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; find: (options: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindOptions", - "text": "SavedObjectsFindOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindResponse", - "text": "SavedObjectsFindResponse" - }, - ">; bulkGet: (objects?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkGetObject", - "text": "SavedObjectsBulkGetObject" - }, - "[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkResponse", - "text": "SavedObjectsBulkResponse" - }, - ">; bulkResolve: (objects: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkResolveObject", - "text": "SavedObjectsBulkResolveObject" - }, - "[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkResolveResponse", - "text": "SavedObjectsBulkResolveResponse" - }, - ">; get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; resolve: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsResolveResponse", - "text": "SavedObjectsResolveResponse" - }, - ">; update: (type: string, id: string, attributes: Partial, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateOptions", - "text": "SavedObjectsUpdateOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateResponse", - "text": "SavedObjectsUpdateResponse" - }, - ">; collectMultiNamespaceReferences: (objects: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCollectMultiNamespaceReferencesObject", - "text": "SavedObjectsCollectMultiNamespaceReferencesObject" - }, - "[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCollectMultiNamespaceReferencesOptions", - "text": "SavedObjectsCollectMultiNamespaceReferencesOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCollectMultiNamespaceReferencesResponse", - "text": "SavedObjectsCollectMultiNamespaceReferencesResponse" - }, - ">; updateObjectsSpaces: (objects: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateObjectsSpacesObject", - "text": "SavedObjectsUpdateObjectsSpacesObject" - }, - "[], spacesToAdd: string[], spacesToRemove: string[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateObjectsSpacesOptions", - "text": "SavedObjectsUpdateObjectsSpacesOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateObjectsSpacesResponse", - "text": "SavedObjectsUpdateObjectsSpacesResponse" - }, - ">; bulkUpdate: (objects: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateObject", - "text": "SavedObjectsBulkUpdateObject" - }, - "[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateOptions", - "text": "SavedObjectsBulkUpdateOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateResponse", - "text": "SavedObjectsBulkUpdateResponse" - }, - ">; removeReferencesTo: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsRemoveReferencesToOptions", - "text": "SavedObjectsRemoveReferencesToOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsRemoveReferencesToResponse", - "text": "SavedObjectsRemoveReferencesToResponse" - }, - ">; openPointInTimeForType: (type: string | string[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsOpenPointInTimeOptions", - "text": "SavedObjectsOpenPointInTimeOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsOpenPointInTimeResponse", - "text": "SavedObjectsOpenPointInTimeResponse" - }, - ">; closePointInTime: (id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClosePointInTimeResponse", - "text": "SavedObjectsClosePointInTimeResponse" - }, - ">; createPointInTimeFinder: (findOptions: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreatePointInTimeFinderOptions", - "text": "SavedObjectsCreatePointInTimeFinderOptions" - }, - ", dependencies?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreatePointInTimeFinderDependencies", - "text": "SavedObjectsCreatePointInTimeFinderDependencies" - }, - " | undefined) => ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.ISavedObjectsPointInTimeFinder", - "text": "ISavedObjectsPointInTimeFinder" - }, - "; errors: typeof ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsErrorHelpers", - "text": "SavedObjectsErrorHelpers" - }, - "; }" - ], - "path": "x-pack/plugins/fleet/server/services/agent_policy.ts", - "deprecated": false - } - ] - }, { "parentPluginId": "fleet", "id": "def-server.AgentPolicyServiceInterface.getFullAgentPolicy", @@ -8617,7 +8254,7 @@ "label": "error", "description": [], "signature": [ - "\"MISSING_SECURITY\" | \"MISSING_SUPERUSER_ROLE\" | undefined" + "\"MISSING_SECURITY\" | \"MISSING_PRIVILEGES\" | \"MISSING_FLEET_SERVER_SETUP_PRIVILEGES\" | undefined" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/app.ts", "deprecated": false @@ -12963,6 +12600,19 @@ "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false }, + { + "parentPluginId": "fleet", + "id": "def-common.NewAgentPolicy.has_fleet_server", + "type": "CompoundType", + "tags": [], + "label": "has_fleet_server", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", + "deprecated": false + }, { "parentPluginId": "fleet", "id": "def-common.NewAgentPolicy.is_managed", @@ -16764,7 +16414,7 @@ "section": "def-common.ValueOf", "text": "ValueOf" }, - "<{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }>; description?: string | undefined; name: string; updated_at: string; updated_by: string; namespace: string; is_default?: boolean | undefined; package_policies: string[] | ", + "<{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }>; description?: string | undefined; name: string; updated_at: string; updated_by: string; namespace: string; package_policies: string[] | ", { "pluginId": "fleet", "scope": "common", @@ -16772,7 +16422,7 @@ "section": "def-common.PackagePolicy", "text": "PackagePolicy" }, - "[]; is_default_fleet_server?: boolean | undefined; is_managed: boolean; monitoring_enabled?: (\"metrics\" | \"logs\")[] | undefined; unenroll_timeout?: number | undefined; is_preconfigured?: boolean | undefined; data_output_id?: string | undefined; monitoring_output_id?: string | undefined; revision: number; }" + "[]; is_managed: boolean; revision: number; is_default?: boolean | undefined; is_default_fleet_server?: boolean | undefined; has_fleet_server?: boolean | undefined; monitoring_enabled?: (\"metrics\" | \"logs\")[] | undefined; unenroll_timeout?: number | undefined; is_preconfigured?: boolean | undefined; data_output_id?: string | undefined; monitoring_output_id?: string | undefined; }" ], "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false, @@ -17149,124 +16799,40 @@ }, { "parentPluginId": "fleet", - "id": "def-common.DATA_STREAM_API_ROOT", - "type": "string", - "tags": [], - "label": "DATA_STREAM_API_ROOT", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/routes.ts", - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DataType", - "type": "Type", - "tags": [], - "label": "DataType", - "description": [], - "signature": [ - "{ readonly Logs: \"logs\"; readonly Metrics: \"metrics\"; }" - ], - "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY_ID_SEED", - "type": "string", - "tags": [], - "label": "DEFAULT_AGENT_POLICY_ID_SEED", - "description": [], - "signature": [ - "\"default-agent-policy\"" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY_ID_SEED", - "type": "string", - "tags": [], - "label": "DEFAULT_FLEET_SERVER_AGENT_POLICY_ID_SEED", - "description": [], - "signature": [ - "\"default-fleet-server\"" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_POLICY_ID", - "type": "string", - "tags": [], - "label": "DEFAULT_FLEET_SERVER_POLICY_ID", - "description": [], - "signature": [ - "\"default-fleet-server-agent-policy\"" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_OUTPUT_ID", + "id": "def-common.DATA_STREAM_API_ROOT", "type": "string", "tags": [], - "label": "DEFAULT_OUTPUT_ID", + "label": "DATA_STREAM_API_ROOT", "description": [], - "signature": [ - "\"fleet-default-output\"" - ], - "path": "x-pack/plugins/fleet/common/constants/output.ts", + "path": "x-pack/plugins/fleet/common/constants/routes.ts", "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "fleet", - "id": "def-common.DEFAULT_PACKAGES", - "type": "Array", + "id": "def-common.DataType", + "type": "Type", "tags": [], - "label": "DEFAULT_PACKAGES", + "label": "DataType", "description": [], "signature": [ - "{ name: string; version: string; }[]" + "{ readonly Logs: \"logs\"; readonly Metrics: \"metrics\"; }" ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", + "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "fleet", - "id": "def-common.DEFAULT_SYSTEM_PACKAGE_POLICY_ID", + "id": "def-common.DEFAULT_OUTPUT_ID", "type": "string", "tags": [], - "label": "DEFAULT_SYSTEM_PACKAGE_POLICY_ID", - "description": [], - "signature": [ - "\"default-system-policy\"" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.defaultPackages", - "type": "Array", - "tags": [], - "label": "defaultPackages", + "label": "DEFAULT_OUTPUT_ID", "description": [], "signature": [ - "string[]" + "\"fleet-default-output\"" ], - "path": "x-pack/plugins/fleet/common/constants/epm.ts", + "path": "x-pack/plugins/fleet/common/constants/output.ts", "deprecated": false, "initialIsOpen": false }, @@ -19185,20 +18751,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "fleet", - "id": "def-common.unremovablePackages", - "type": "Array", - "tags": [], - "label": "unremovablePackages", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/fleet/common/constants/epm.ts", - "deprecated": false, - "initialIsOpen": false - }, { "parentPluginId": "fleet", "id": "def-common.UpdateAgentPolicyRequest", @@ -20209,11 +19761,26 @@ "label": "getCheckPermissionsPath", "description": [], "signature": [ - "() => string" + "(fleetServerSetup?: boolean | undefined) => string" ], "path": "x-pack/plugins/fleet/common/services/routes.ts", "deprecated": false, - "children": [], + "children": [ + { + "parentPluginId": "fleet", + "id": "def-common.appRoutesService.getCheckPermissionsPath.$1", + "type": "CompoundType", + "tags": [], + "label": "fleetServerSetup", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "isRequired": false + } + ], "returnComment": [] }, { @@ -20299,229 +19866,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY", - "type": "Object", - "tags": [], - "label": "DEFAULT_AGENT_POLICY", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.namespace", - "type": "string", - "tags": [], - "label": "namespace", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.package_policies", - "type": "Array", - "tags": [], - "label": "package_policies", - "description": [], - "signature": [ - "{ id: string; name: string; package: { name: string; }; }[]" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.is_default", - "type": "boolean", - "tags": [], - "label": "is_default", - "description": [], - "signature": [ - "true" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.is_managed", - "type": "boolean", - "tags": [], - "label": "is_managed", - "description": [], - "signature": [ - "false" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_AGENT_POLICY.monitoring_enabled", - "type": "Array", - "tags": [], - "label": "monitoring_enabled", - "description": [], - "signature": [ - "(\"metrics\" | \"logs\")[]" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY", - "type": "Object", - "tags": [], - "label": "DEFAULT_FLEET_SERVER_AGENT_POLICY", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.namespace", - "type": "string", - "tags": [], - "label": "namespace", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.package_policies", - "type": "Array", - "tags": [], - "label": "package_policies", - "description": [], - "signature": [ - "{ id: string; name: string; package: { name: string; }; }[]" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.is_default", - "type": "boolean", - "tags": [], - "label": "is_default", - "description": [], - "signature": [ - "false" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.is_default_fleet_server", - "type": "boolean", - "tags": [], - "label": "is_default_fleet_server", - "description": [], - "signature": [ - "true" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.is_managed", - "type": "boolean", - "tags": [], - "label": "is_managed", - "description": [], - "signature": [ - "false" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.DEFAULT_FLEET_SERVER_AGENT_POLICY.monitoring_enabled", - "type": "Array", - "tags": [], - "label": "monitoring_enabled", - "description": [], - "signature": [ - "(\"metrics\" | \"logs\")[]" - ], - "path": "x-pack/plugins/fleet/common/constants/preconfiguration.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "fleet", "id": "def-common.DEFAULT_OUTPUT", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index bb628b4492b91..9e2872fa5684a 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github summary: API docs for the fleet plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1284 | 8 | 1168 | 10 | +| 1258 | 8 | 1142 | 10 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 32d4863678f5e..48586c3a2d29f 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the globalSearch plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 3400ea7b74c77..de975f527f39a 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github summary: API docs for the home plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index cb38a550ce58b..9cd98ff2df434 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexLifecycleManagement plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 1ca48ed8d4e42..e5ecaf70e199a 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexManagement plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index fe9667eae1442..461678e3160ce 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github summary: API docs for the infra plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index c272173dbf0d6..55ef57d0263fe 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github summary: API docs for the inspector plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 5729f801acba1..8fe462adf725f 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github summary: API docs for the interactiveSetup plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index b54f7af1d61d1..d9302e7a991c5 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ace plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 121b1c8740407..0765da54c9272 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/alerts plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 31529e687dccb..d142dc0e1cff0 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index d7a3634e1c02f..f7d164288eb36 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-config-loader plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 93f48b7d18d8a..5130f133bc9c6 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index b5766b136a98f..fde5d66e03e55 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/cli-dev-mode plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index e86ecfe240169..ae7e2cb5acc0a 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index a2c655201d178..4ac8c2b27ee26 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config-schema plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index a0c9b30e38dcc..6e43df93e3d6f 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/crypto plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 7bc1798dac801..183e1e01e943a 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json new file mode 100644 index 0000000000000..d1ca28c919752 --- /dev/null +++ b/api_docs/kbn_doc_links.devdocs.json @@ -0,0 +1,845 @@ +{ + "id": "@kbn/doc-links", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.getDocLinks", + "type": "Function", + "tags": [], + "label": "getDocLinks", + "description": [], + "signature": [ + "({ kibanaBranch }: ", + "GetDocLinkOptions", + ") => ", + { + "pluginId": "@kbn/doc-links", + "scope": "server", + "docId": "kibKbnDocLinksPluginApi", + "section": "def-server.DocLinks", + "text": "DocLinks" + } + ], + "path": "packages/kbn-doc-links/src/get_doc_links.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.getDocLinks.$1", + "type": "Object", + "tags": [], + "label": "{ kibanaBranch }", + "description": [], + "signature": [ + "GetDocLinkOptions" + ], + "path": "packages/kbn-doc-links/src/get_doc_links.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.getDocLinksMeta", + "type": "Function", + "tags": [], + "label": "getDocLinksMeta", + "description": [], + "signature": [ + "({ kibanaBranch }: ", + "GetDocLinksMetaOptions", + ") => ", + { + "pluginId": "@kbn/doc-links", + "scope": "server", + "docId": "kibKbnDocLinksPluginApi", + "section": "def-server.DocLinksMeta", + "text": "DocLinksMeta" + } + ], + "path": "packages/kbn-doc-links/src/get_doc_meta.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.getDocLinksMeta.$1", + "type": "Object", + "tags": [], + "label": "{ kibanaBranch }", + "description": [], + "signature": [ + "GetDocLinksMetaOptions" + ], + "path": "packages/kbn-doc-links/src/get_doc_meta.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks", + "type": "Interface", + "tags": [], + "label": "DocLinks", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.settings", + "type": "string", + "tags": [], + "label": "settings", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.elasticStackGetStarted", + "type": "string", + "tags": [], + "label": "elasticStackGetStarted", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.upgrade", + "type": "Object", + "tags": [], + "label": "upgrade", + "description": [], + "signature": [ + "{ readonly upgradingStackOnPrem: string; readonly upgradingStackOnCloud: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.apm", + "type": "Object", + "tags": [], + "label": "apm", + "description": [], + "signature": [ + "{ readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.canvas", + "type": "Object", + "tags": [], + "label": "canvas", + "description": [], + "signature": [ + "{ readonly guide: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.cloud", + "type": "Object", + "tags": [], + "label": "cloud", + "description": [], + "signature": [ + "{ readonly indexManagement: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.console", + "type": "Object", + "tags": [], + "label": "console", + "description": [], + "signature": [ + "{ readonly guide: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.dashboard", + "type": "Object", + "tags": [], + "label": "dashboard", + "description": [], + "signature": [ + "{ readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.discover", + "type": "Object", + "tags": [], + "label": "discover", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.filebeat", + "type": "Object", + "tags": [], + "label": "filebeat", + "description": [], + "signature": [ + "{ 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; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.auditbeat", + "type": "Object", + "tags": [], + "label": "auditbeat", + "description": [], + "signature": [ + "{ readonly base: string; readonly auditdModule: string; readonly systemModule: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.metricbeat", + "type": "Object", + "tags": [], + "label": "metricbeat", + "description": [], + "signature": [ + "{ readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.appSearch", + "type": "Object", + "tags": [], + "label": "appSearch", + "description": [], + "signature": [ + "{ readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.enterpriseSearch", + "type": "Object", + "tags": [], + "label": "enterpriseSearch", + "description": [], + "signature": [ + "{ readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.workplaceSearch", + "type": "Object", + "tags": [], + "label": "workplaceSearch", + "description": [], + "signature": [ + "{ readonly apiKeys: string; readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly synch: string; readonly zendesk: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.heartbeat", + "type": "Object", + "tags": [], + "label": "heartbeat", + "description": [], + "signature": [ + "{ readonly base: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.libbeat", + "type": "Object", + "tags": [], + "label": "libbeat", + "description": [], + "signature": [ + "{ readonly getStarted: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.logstash", + "type": "Object", + "tags": [], + "label": "logstash", + "description": [], + "signature": [ + "{ readonly base: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.functionbeat", + "type": "Object", + "tags": [], + "label": "functionbeat", + "description": [], + "signature": [ + "{ readonly base: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.winlogbeat", + "type": "Object", + "tags": [], + "label": "winlogbeat", + "description": [], + "signature": [ + "{ readonly base: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.aggs", + "type": "Object", + "tags": [], + "label": "aggs", + "description": [], + "signature": [ + "{ 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 rare_terms: 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; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.runtimeFields", + "type": "Object", + "tags": [], + "label": "runtimeFields", + "description": [], + "signature": [ + "{ readonly overview: string; readonly mapping: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.scriptedFields", + "type": "Object", + "tags": [], + "label": "scriptedFields", + "description": [], + "signature": [ + "{ readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.search", + "type": "Object", + "tags": [], + "label": "search", + "description": [], + "signature": [ + "{ readonly sessions: string; readonly sessionLimits: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.indexPatterns", + "type": "Object", + "tags": [], + "label": "indexPatterns", + "description": [], + "signature": [ + "{ readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.addData", + "type": "string", + "tags": [], + "label": "addData", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.kibana", + "type": "Object", + "tags": [], + "label": "kibana", + "description": [], + "signature": [ + "{ readonly guide: string; readonly autocompleteSuggestions: string; readonly xpackSecurity: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.upgradeAssistant", + "type": "Object", + "tags": [], + "label": "upgradeAssistant", + "description": [], + "signature": [ + "{ readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.rollupJobs", + "type": "string", + "tags": [], + "label": "rollupJobs", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.elasticsearch", + "type": "Object", + "tags": [], + "label": "elasticsearch", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.siem", + "type": "Object", + "tags": [], + "label": "siem", + "description": [], + "signature": [ + "{ readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.securitySolution", + "type": "Object", + "tags": [], + "label": "securitySolution", + "description": [], + "signature": [ + "{ readonly trustedApps: string; readonly eventFilters: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.query", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "{ readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuery: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.date", + "type": "Object", + "tags": [], + "label": "date", + "description": [], + "signature": [ + "{ readonly dateMath: string; readonly dateMathIndexNames: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.management", + "type": "Object", + "tags": [], + "label": "management", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.ml", + "type": "Object", + "tags": [], + "label": "ml", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.transforms", + "type": "Object", + "tags": [], + "label": "transforms", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.visualize", + "type": "Object", + "tags": [], + "label": "visualize", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.apis", + "type": "Object", + "tags": [], + "label": "apis", + "description": [], + "signature": [ + "{ readonly bulkIndexAlias: string; readonly byteSizeUnits: string; readonly createAutoFollowPattern: string; readonly createFollower: string; readonly createIndex: string; readonly createSnapshotLifecyclePolicy: string; readonly createRoleMapping: string; readonly createRoleMappingTemplates: string; readonly createRollupJobsRequest: string; readonly createApiKey: string; readonly createPipeline: string; readonly createTransformRequest: string; readonly cronExpressions: string; readonly executeWatchActionModes: string; readonly indexExists: string; readonly multiSearch: string; readonly openIndex: string; readonly putComponentTemplate: string; readonly painlessExecute: string; readonly painlessExecuteAPIContexts: string; readonly putComponentTemplateMetadata: string; readonly putSnapshotLifecyclePolicy: string; readonly putIndexTemplateV1: string; readonly putWatch: string; readonly searchPreference: string; readonly simulatePipeline: string; readonly timeUnits: string; readonly unfreezeIndex: string; readonly updateTransform: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.observability", + "type": "Object", + "tags": [], + "label": "observability", + "description": [], + "signature": [ + "{ readonly guide: string; readonly infrastructureThreshold: string; readonly logsThreshold: string; readonly metricsThreshold: string; readonly monitorStatus: string; readonly monitorUptime: string; readonly tlsCertificate: string; readonly uptimeDurationAnomaly: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.alerting", + "type": "Object", + "tags": [], + "label": "alerting", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.maps", + "type": "Object", + "tags": [], + "label": "maps", + "description": [], + "signature": [ + "{ readonly guide: string; readonly importGeospatialPrivileges: string; readonly gdalTutorial: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.monitoring", + "type": "Object", + "tags": [], + "label": "monitoring", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [], + "signature": [ + "{ readonly apiKeyServiceSettings: string; readonly clusterPrivileges: string; readonly elasticsearchSettings: string; readonly elasticsearchEnableSecurity: string; readonly elasticsearchEnableApiKeys: string; readonly indicesPrivileges: string; readonly kibanaTLS: string; readonly kibanaPrivileges: string; readonly mappingRoles: string; readonly mappingRolesFieldRules: string; readonly runAsPrivilege: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.spaces", + "type": "Object", + "tags": [], + "label": "spaces", + "description": [], + "signature": [ + "{ readonly kibanaLegacyUrlAliases: string; readonly kibanaDisableLegacyUrlAliasesApi: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.watcher", + "type": "Object", + "tags": [], + "label": "watcher", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.ccs", + "type": "Object", + "tags": [], + "label": "ccs", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.plugins", + "type": "Object", + "tags": [], + "label": "plugins", + "description": [], + "signature": [ + "{ azureRepo: string; gcsRepo: string; hdfsRepo: string; s3Repo: string; snapshotRestoreRepos: string; mapperSize: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.snapshotRestore", + "type": "Object", + "tags": [], + "label": "snapshotRestore", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.ingest", + "type": "Object", + "tags": [], + "label": "ingest", + "description": [], + "signature": [ + "{ [x: string]: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.fleet", + "type": "Object", + "tags": [], + "label": "fleet", + "description": [], + "signature": [ + "{ readonly beatsAgentComparison: string; readonly guide: string; readonly fleetServer: string; readonly fleetServerAddFleetServer: string; readonly settings: string; readonly settingsFleetServerHostSettings: string; readonly settingsFleetServerProxySettings: string; readonly troubleshooting: string; readonly elasticAgent: string; readonly datastreams: string; readonly datastreamsNamingScheme: string; readonly installElasticAgent: string; readonly installElasticAgentStandalone: string; readonly upgradeElasticAgent: string; readonly upgradeElasticAgent712lower: string; readonly learnMoreBlog: string; readonly apiKeysLearnMore: string; readonly onPremRegistry: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.ecs", + "type": "Object", + "tags": [], + "label": "ecs", + "description": [], + "signature": [ + "{ readonly guide: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.clients", + "type": "Object", + "tags": [], + "label": "clients", + "description": [], + "signature": [ + "{ 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; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinks.endpoints", + "type": "Object", + "tags": [], + "label": "endpoints", + "description": [], + "signature": [ + "{ readonly troubleshooting: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinksMeta", + "type": "Interface", + "tags": [], + "label": "DocLinksMeta", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinksMeta.version", + "type": "string", + "tags": [], + "label": "version", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-server.DocLinksMeta.elasticWebsiteUrl", + "type": "string", + "tags": [], + "label": "elasticWebsiteUrl", + "description": [], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx new file mode 100644 index 0000000000000..1a0ebc39e7653 --- /dev/null +++ b/api_docs/kbn_doc_links.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnDocLinksPluginApi +slug: /kibana-dev-docs/api/kbn-doc-links +title: "@kbn/doc-links" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/doc-links plugin +date: 2022-02-01 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 62 | 0 | 62 | 2 | + +## Server + +### Functions + + +### Interfaces + + diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 95b6f30cbda1e..9d57db61fa889 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/docs-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 22080cb75af77..d5b1a1e02f53a 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-archiver plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index a3cb51446becd..7bc4fd3a286e1 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-query plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 197ac441bc792..5fc26e0379a1f 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/field-types plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index c83d0d3c50f00..08663725b695a 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/i18n plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 55d059965ecb1..90bcfe24bcb94 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/interpreter plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 3625829226576..3f26f95e53180 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/io-ts-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 92d18856bad7c..7018e5aef3af9 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/logging plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 573a077d93aed..a8caa692d2668 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/mapbox-gl plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index df75605be760b..e466599201586 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/monaco plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 8aa1509f17210..1befd4710060d 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/optimizer plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 92c93c36b174a..714a8515228cd 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-generator plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index ebdb90cb77685..ca854cec7e4f0 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-helpers plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_pm.mdx b/api_docs/kbn_pm.mdx index f5c1f0bf69e08..38ec7b1c21d3a 100644 --- a/api_docs/kbn_pm.mdx +++ b/api_docs/kbn_pm.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-pm title: "@kbn/pm" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/pm plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/pm'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 49ee1aa9c823c..629e14c0cb73e 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/react-field plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 9bb8b7144b2fa..8894f1a39e344 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/rule-data-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 8032305998f26..a53bba94ba4c6 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 1c984077e50b7..3346108da8d44 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 28cb7da82c5ee..cfd08b58b6b54 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 679af1df82423..bfb1c7b3f377d 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index e545a2628db14..a5925d02df5a8 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index a809b1c48427d..81c62be66db66 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 8b6df135d9853..7ede1e2abfb1a 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index cc79a95bcad3a..a74572deb0c89 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index a4f18d9647a3b..a28efeed8ccc3 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 1ff24984a869a..1b726db091d08 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 4974a3121c43a..c21c85bc63f1d 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 380a973c8109c..802ce03a5944b 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-rules plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 8ce257e6d44db..c5a51fae41880 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 41fa703812efc..a6c98e86b3f23 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index d5eac6a0694a2..4e2cc1dd0123c 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-http-tools plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index a3a80d3e389f1..69955fdb03f23 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-route-repository plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 291089f525db1..a8e93ef998218 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/std plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 94cbaa583e3d3..c3e85d4a033cd 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/storybook plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index fafa09e140292..03af47f987ed2 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/telemetry-tools plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 8c6af854e191a..48c8d10e55e88 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/test plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index ce2a13817156a..d6fbf65802d0a 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/typed-react-router-config plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index e54cab4d69818..174f1b94e49ca 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ui-theme plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 4774234d1878e..623a46be96210 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utility-types plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 9e93f672cf3c7..ca168dc265a25 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 91f202a6234b7..0ef25dc752372 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaOverview plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index aaca51943ccc7..a2413d73b585e 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaReact plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index d18745ae21302..e5ac5d0c8c9ab 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaUtils plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 9db735fd22525..f0dd2a46bbb38 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github summary: API docs for the lens plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index f3a4df3a4cedf..4ce92d9cda770 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseApiGuard plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 54ab3f110c3e6..52fb9d8b17477 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseManagement plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index f98edec73a073..8d65296357849 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github summary: API docs for the licensing plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 5ba6977335c53..bd05489de6d36 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github summary: API docs for the lists plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 3c23f7d71aeae..3a1e8b73a6d1f 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github summary: API docs for the management plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 75cc23c71d358..60791237c9120 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github summary: API docs for the maps plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 219aea9b6e7ff..5680d50c9c123 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github summary: API docs for the mapsEms plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/metrics_entities.mdx b/api_docs/metrics_entities.mdx index 1bfb53b578187..3521f0b99596e 100644 --- a/api_docs/metrics_entities.mdx +++ b/api_docs/metrics_entities.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/metricsEntities title: "metricsEntities" image: https://source.unsplash.com/400x175/?github summary: API docs for the metricsEntities plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsEntities'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 2945f2c6e8937..58fb2b0fa05f7 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github summary: API docs for the ml plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index bfc586c0dcaac..b44e3922d0e2c 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github summary: API docs for the monitoring plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 6ad1a5dd9e901..53b297bf2dcf4 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github summary: API docs for the navigation plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 2388c2d65a49b..916ff29e6772a 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github summary: API docs for the newsfeed plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index d0de12835f82c..f0cb06b608137 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github summary: API docs for the observability plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 412994ea44b61..ab7e58fc13839 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github summary: API docs for the osquery plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 482f23e164bc5..a3845233cd3d9 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -3,7 +3,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory summary: Directory of public APIs available through plugins or packages. -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -12,13 +12,13 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 210 | 166 | 32 | +| 211 | 167 | 32 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 23237 | 166 | 17652 | 1690 | +| 23352 | 168 | 17755 | 1690 | ## Plugin Directory @@ -26,32 +26,32 @@ warning: This document is auto-generated and is meant to be viewed inside our ex |--------------|----------------|-----------|--------------|----------|---------------|--------| | | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 125 | 0 | 125 | 11 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 23 | 0 | 19 | 1 | -| | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 283 | 0 | 275 | 19 | +| | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 290 | 0 | 282 | 19 | | | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 40 | 0 | 40 | 49 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 78 | 1 | 69 | 2 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | -| | [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 83 | 0 | 57 | 23 | +| | [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 75 | 0 | 51 | 20 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 319 | 2 | 286 | 4 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 28 | 0 | 23 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 118 | 0 | 117 | 3 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2353 | 15 | 968 | 32 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2364 | 15 | 972 | 32 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 96 | 0 | 77 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 155 | 0 | 142 | 13 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 51 | 0 | 50 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3368 | 39 | 2771 | 26 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3390 | 40 | 2795 | 26 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Enhanced data plugin. (See src/plugins/data.) Enhances the main data plugin with a search session management UI. Includes a reusable search session indicator component to use in other applications. Exposes routes for managing search sessions. Includes a service that monitors, updates, and cleans up search session saved objects. | 16 | 0 | 16 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout from any kibana app | 13 | 0 | 7 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 42 | 0 | 37 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 734 | 3 | 592 | 7 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 745 | 3 | 600 | 7 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 23 | 2 | 19 | 1 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | -| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 89 | 0 | 61 | 7 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 90 | 0 | 62 | 7 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 37 | 0 | 35 | 2 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 467 | 0 | 380 | 4 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 468 | 0 | 381 | 4 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 48 | 0 | 44 | 0 | | | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 2 | 0 | 2 | 0 | @@ -59,7 +59,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 82 | 0 | 82 | 6 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 62 | 0 | 62 | 1 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 99 | 0 | 95 | 3 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 113 | 0 | 109 | 3 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'image' function and renderer to expressions | 26 | 0 | 26 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'metric' function and renderer to expressions | 32 | 0 | 27 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression MetricVis plugin adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. | 40 | 0 | 40 | 0 | @@ -72,7 +72,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 222 | 0 | 98 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 286 | 6 | 247 | 3 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1284 | 8 | 1168 | 10 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1258 | 8 | 1142 | 10 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -111,7 +111,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 30 | 0 | 30 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 21 | 0 | 21 | 0 | -| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 176 | 0 | 149 | 7 | +| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 177 | 0 | 150 | 7 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 24 | 0 | 19 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 221 | 3 | 177 | 5 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 103 | 0 | 90 | 0 | @@ -122,7 +122,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 181 | 0 | 102 | 0 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 45 | 0 | 45 | 18 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 132 | 0 | 79 | 10 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 138 | 0 | 79 | 10 | | | [Shared UX](https://github.com/orgs/elastic/teams/shared-ux) | A plugin providing components and services for shared user experiences in Kibana. | 10 | 0 | 0 | 1 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 20 | 1 | 20 | 1 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 248 | 0 | 61 | 0 | @@ -155,7 +155,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Registers the vega visualization. Is the elastic version of vega and vega-lite libraries. | 2 | 0 | 2 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and heatmap charts. We want to replace them with elastic-charts. | 26 | 0 | 25 | 1 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the new xy-axis chart using the elastic-charts library, which will eventually replace the vislib xy-axis charts including bar, area, and line. | 57 | 0 | 51 | 5 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 303 | 11 | 283 | 15 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 316 | 12 | 296 | 15 | | watcher | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | ## Package Directory @@ -174,6 +174,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 125 | 3 | 123 | 17 | | | [Owner missing] | - | 13 | 0 | 7 | 0 | | | [Owner missing] | - | 250 | 3 | 194 | 0 | +| | [Owner missing] | - | 62 | 0 | 62 | 2 | | | [Owner missing] | - | 1 | 0 | 1 | 0 | | | [Owner missing] | - | 27 | 0 | 14 | 1 | | | [Owner missing] | - | 211 | 1 | 159 | 11 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 6a229ee9923ad..a3392834060a1 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github summary: API docs for the presentationUtil plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 887ca2f6b5e25..6ec3db4fa8e9d 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github summary: API docs for the remoteClusters plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index c37650f248c97..9437887093aa1 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github summary: API docs for the reporting plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index c3d565e282490..065bff87ff4f1 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github summary: API docs for the rollup plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index f8c41be72aa9f..47227b2004df9 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -3372,7 +3372,7 @@ "label": "parseTechnicalFields", "description": [], "signature": [ - "(input: unknown) => OutputOf>" + "(input: unknown, partial?: boolean) => OutputOf>" ], "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", "deprecated": false, @@ -3390,6 +3390,20 @@ "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", "deprecated": false, "isRequired": true + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-common.parseTechnicalFields.$2", + "type": "boolean", + "tags": [], + "label": "partial", + "description": [], + "signature": [ + "boolean" + ], + "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", + "deprecated": false, + "isRequired": true } ], "returnComment": [], diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 1dabd0d68aece..868e391f28ea7 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github summary: API docs for the ruleRegistry plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [RAC](https://github.com/orgs/elastic/teams/rac) for questions regarding | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 176 | 0 | 149 | 7 | +| 177 | 0 | 150 | 7 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index bf1fcf9cad8b9..ee397c225593e 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github summary: API docs for the runtimeFields plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index e26cdc437c892..16b7bc8a54956 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjects plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index f4395f56e86ba..4a49807f35d17 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsManagement plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index d5811b0625421..b0253f0385e63 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTagging plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 9d4e11fe9c528..5921c0c49fe25 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTaggingOss plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 8bffb222c0d03..48647268023f5 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotMode plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 00a846192508d..327d8ee6fa72c 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotting plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 4272662795123..a5ebb9f6030e7 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github summary: API docs for the security plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 6847dbec9f88c..cb1e88359ce94 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github summary: API docs for the securitySolution plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/share.devdocs.json b/api_docs/share.devdocs.json index 219e9c5e5ce54..482ea0044e4a5 100644 --- a/api_docs/share.devdocs.json +++ b/api_docs/share.devdocs.json @@ -717,6 +717,10 @@ "plugin": "ingestPipelines", "path": "x-pack/plugins/ingest_pipelines/public/locator.test.ts" }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx" + }, { "plugin": "upgradeAssistant", "path": "x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx" @@ -877,6 +881,59 @@ ], "returnComment": [] }, + { + "parentPluginId": "share", + "id": "def-public.LocatorPublic.navigateSync", + "type": "Function", + "tags": [], + "label": "navigateSync", + "description": [ + "\nSynchronous fire-and-forget navigation method. Use it when you want to\nnavigate without waiting for the navigation to complete and you don't\ncare to process any async promise errors.\n" + ], + "signature": [ + "(params: P, navigationParams?: ", + "LocatorNavigationParams", + " | undefined) => void" + ], + "path": "src/plugins/share/common/url_service/locators/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "share", + "id": "def-public.LocatorPublic.navigateSync.$1", + "type": "Uncategorized", + "tags": [], + "label": "params", + "description": [ + "URL locator parameters." + ], + "signature": [ + "P" + ], + "path": "src/plugins/share/common/url_service/locators/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "share", + "id": "def-public.LocatorPublic.navigateSync.$2", + "type": "Object", + "tags": [], + "label": "navigationParams", + "description": [ + "Navigation parameters." + ], + "signature": [ + "LocatorNavigationParams", + " | undefined" + ], + "path": "src/plugins/share/common/url_service/locators/types.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, { "parentPluginId": "share", "id": "def-public.LocatorPublic.useUrl", @@ -2417,6 +2474,10 @@ "plugin": "ingestPipelines", "path": "x-pack/plugins/ingest_pipelines/public/locator.test.ts" }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx" + }, { "plugin": "upgradeAssistant", "path": "x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx" @@ -2577,6 +2638,59 @@ ], "returnComment": [] }, + { + "parentPluginId": "share", + "id": "def-common.LocatorPublic.navigateSync", + "type": "Function", + "tags": [], + "label": "navigateSync", + "description": [ + "\nSynchronous fire-and-forget navigation method. Use it when you want to\nnavigate without waiting for the navigation to complete and you don't\ncare to process any async promise errors.\n" + ], + "signature": [ + "(params: P, navigationParams?: ", + "LocatorNavigationParams", + " | undefined) => void" + ], + "path": "src/plugins/share/common/url_service/locators/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "share", + "id": "def-common.LocatorPublic.navigateSync.$1", + "type": "Uncategorized", + "tags": [], + "label": "params", + "description": [ + "URL locator parameters." + ], + "signature": [ + "P" + ], + "path": "src/plugins/share/common/url_service/locators/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "share", + "id": "def-common.LocatorPublic.navigateSync.$2", + "type": "Object", + "tags": [], + "label": "navigationParams", + "description": [ + "Navigation parameters." + ], + "signature": [ + "LocatorNavigationParams", + " | undefined" + ], + "path": "src/plugins/share/common/url_service/locators/types.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, { "parentPluginId": "share", "id": "def-common.LocatorPublic.useUrl", diff --git a/api_docs/share.mdx b/api_docs/share.mdx index fd734bd7dc667..29a0dd37c499a 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github summary: API docs for the share plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 132 | 0 | 79 | 10 | +| 138 | 0 | 79 | 10 | ## Client diff --git a/api_docs/shared_u_x.mdx b/api_docs/shared_u_x.mdx index 4b9dbf66109a5..ee261981b8e01 100644 --- a/api_docs/shared_u_x.mdx +++ b/api_docs/shared_u_x.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/sharedUX title: "sharedUX" image: https://source.unsplash.com/400x175/?github summary: API docs for the sharedUX plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sharedUX'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 34654d2db8ff1..9c420fdcf386b 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github summary: API docs for the snapshotRestore plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index bb64ffb6f6bf2..ab3ee29de2a4c 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github summary: API docs for the spaces plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index aa362623efdee..786d1717787e1 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the stackAlerts plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/task_manager.devdocs.json b/api_docs/task_manager.devdocs.json index d92188643d8f4..47eeb3e55ede0 100644 --- a/api_docs/task_manager.devdocs.json +++ b/api_docs/task_manager.devdocs.json @@ -1144,6 +1144,10 @@ { "plugin": "actions", "path": "x-pack/plugins/actions/server/plugin.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/usage/task.ts" } ] }, diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index fef89d4959072..a80694e3a1edd 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the taskManager plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 37df078f5925a..5d4592852987e 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetry plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 7ed490b94526c..efcd2a3f25428 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionManager plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 147208cab92b0..dcb47c2aa2a73 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionXpack plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 3344b01f33534..2e9e7cb0e2059 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryManagementSection plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 55a0baa7d668c..4c9c8212941da 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github summary: API docs for the timelines plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 46a51e594fa98..c2b6cb3b47d73 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github summary: API docs for the transform plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index c03571dd585e3..9d1179440a0a9 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github summary: API docs for the triggersActionsUi plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 4b82a03570c33..0c586267445b7 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActions plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 6e127b2481f25..5ec1ffc4c30b9 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActionsEnhanced plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index fde1c806412d0..6cb1f599c8f38 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github summary: API docs for the urlForwarding plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index a7afb41e6d828..b916e1a578f5a 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github summary: API docs for the usageCollection plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index aeb91b732b320..627d579aa53f1 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the visDefaultEditor plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index fcc444df197ad..1a3f82e2a37c0 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeHeatmap plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 48ef62e80e72e..7705935b83dbc 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypePie plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index d975cab5a314f..62de1d5690cf5 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTable plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 0e943ff5df7e2..03d36cf774b47 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimelion plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index f84d75e672896..4b2a1d031b671 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimeseries plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index bf818de84cc2f..9830530c2ae86 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVega plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 0779dda1a3a00..5b8b1f808061c 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVislib plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index d0e04ffea402d..037eb01497ecb 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeXy plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index 00e88ef0d2723..8c02d49b762fb 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -980,9 +980,9 @@ "signature": [ { "pluginId": "visualizations", - "scope": "public", + "scope": "common", "docId": "kibVisualizationsPluginApi", - "section": "def-public.SerializedVis", + "section": "def-common.SerializedVis", "text": "SerializedVis" }, "" @@ -1058,9 +1058,9 @@ "() => ", { "pluginId": "visualizations", - "scope": "public", + "scope": "common", "docId": "kibVisualizationsPluginApi", - "section": "def-public.SerializedVis", + "section": "def-common.SerializedVis", "text": "SerializedVis" }, "<", @@ -2332,14 +2332,14 @@ "signature": [ { "pluginId": "visualizations", - "scope": "public", + "scope": "common", "docId": "kibVisualizationsPluginApi", - "section": "def-public.SerializedVis", + "section": "def-common.SerializedVis", "text": "SerializedVis" }, "" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false, "children": [ { @@ -2352,7 +2352,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2362,7 +2362,7 @@ "tags": [], "label": "title", "description": [], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2375,7 +2375,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2385,7 +2385,7 @@ "tags": [], "label": "type", "description": [], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2398,7 +2398,7 @@ "signature": [ "T" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2411,7 +2411,7 @@ "signature": [ "any" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2424,13 +2424,13 @@ "signature": [ { "pluginId": "visualizations", - "scope": "public", + "scope": "common", "docId": "kibVisualizationsPluginApi", - "section": "def-public.SerializedVisData", + "section": "def-common.SerializedVisData", "text": "SerializedVisData" } ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false } ], @@ -2443,7 +2443,7 @@ "tags": [], "label": "SerializedVisData", "description": [], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false, "children": [ { @@ -2456,7 +2456,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2471,7 +2471,7 @@ "SerializableRecord", " | undefined; schema?: string | undefined; }[]" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2528,7 +2528,7 @@ }, " | undefined; }" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false }, { @@ -2541,7 +2541,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/visualizations/public/vis.ts", + "path": "src/plugins/visualizations/common/types.ts", "deprecated": false } ], @@ -4257,9 +4257,9 @@ "signature": [ { "pluginId": "visualizations", - "scope": "public", + "scope": "common", "docId": "kibVisualizationsPluginApi", - "section": "def-public.SerializedVis", + "section": "def-common.SerializedVis", "text": "SerializedVis" }, "<", @@ -4845,9 +4845,9 @@ " & { savedVis?: ", { "pluginId": "visualizations", - "scope": "public", + "scope": "common", "docId": "kibVisualizationsPluginApi", - "section": "def-public.SerializedVis", + "section": "def-common.SerializedVis", "text": "SerializedVis" }, "<", @@ -5553,6 +5553,231 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis", + "type": "Interface", + "tags": [], + "label": "SerializedVis", + "description": [], + "signature": [ + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.SerializedVis", + "text": "SerializedVis" + }, + "" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis.params", + "type": "Uncategorized", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "T" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis.uiState", + "type": "Any", + "tags": [], + "label": "uiState", + "description": [], + "signature": [ + "any" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVis.data", + "type": "Object", + "tags": [], + "label": "data", + "description": [], + "signature": [ + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.SerializedVisData", + "text": "SerializedVisData" + } + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVisData", + "type": "Interface", + "tags": [], + "label": "SerializedVisData", + "description": [], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVisData.expression", + "type": "string", + "tags": [], + "label": "expression", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVisData.aggs", + "type": "Array", + "tags": [], + "label": "aggs", + "description": [], + "signature": [ + "{ type: string; enabled?: boolean | undefined; id?: string | undefined; params?: {} | ", + "SerializableRecord", + " | undefined; schema?: string | undefined; }[]" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVisData.searchSource", + "type": "Object", + "tags": [], + "label": "searchSource", + "description": [], + "signature": [ + "{ type?: string | undefined; query?: ", + "Query", + " | undefined; filter?: ", + "Filter", + "[] | undefined; sort?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EsQuerySortValue", + "text": "EsQuerySortValue" + }, + "[] | undefined; highlight?: ", + "SerializableRecord", + " | undefined; highlightAll?: boolean | undefined; trackTotalHits?: number | boolean | undefined; aggs?: { type: string; enabled?: boolean | undefined; id?: string | undefined; params?: {} | ", + "SerializableRecord", + " | undefined; schema?: string | undefined; }[] | undefined; from?: number | undefined; size?: number | undefined; source?: boolean | ", + "Fields", + " | undefined; version?: boolean | undefined; fields?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchFieldValue", + "text": "SearchFieldValue" + }, + "[] | undefined; fieldsFromSource?: ", + "Fields", + " | undefined; index?: string | undefined; searchAfter?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.EsQuerySearchAfter", + "text": "EsQuerySearchAfter" + }, + " | undefined; timeout?: string | undefined; terminate_after?: number | undefined; parent?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SerializedSearchSourceFields", + "text": "SerializedSearchSourceFields" + }, + " | undefined; }" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.SerializedVisData.savedSearchId", + "type": "string", + "tags": [], + "label": "savedSearchId", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/common/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.VisParams", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index e57e724ebb7fe..232406797649f 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github summary: API docs for the visualizations plugin -date: 2022-01-31 +date: 2022-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 303 | 11 | 283 | 15 | +| 316 | 12 | 296 | 15 | ## Client diff --git a/docs/apm/machine-learning.asciidoc b/docs/apm/machine-learning.asciidoc index b31d717a6932e..1baf28180890b 100644 --- a/docs/apm/machine-learning.asciidoc +++ b/docs/apm/machine-learning.asciidoc @@ -52,9 +52,6 @@ That's it! After a few minutes, the job will begin calculating results; it might take additional time for results to appear on your service maps. Existing jobs can be managed in *Machine Learning jobs management*. -APM specific anomaly detection wizards are also available for certain Agents. -See the machine learning {ml-docs}/ootb-ml-jobs-apm.html[APM anomaly detection configurations] for more information. - [float] [[warning-ml-integration]] === Anomaly detection warning diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index ef0f8dec3488c..ede29f5e3d2c8 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -244,6 +244,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | --- | --- | | [APP\_WRAPPER\_CLASS](./kibana-plugin-core-server.app_wrapper_class.md) | The class name for top level \*and\* nested application wrappers to ensure proper layout | | [kibanaResponseFactory](./kibana-plugin-core-server.kibanaresponsefactory.md) | Set of helpers used to create KibanaResponse to form HTTP response on an incoming request. Should be returned as a result of [RequestHandler](./kibana-plugin-core-server.requesthandler.md) execution. | +| [mergeSavedObjectMigrationMaps](./kibana-plugin-core-server.mergesavedobjectmigrationmaps.md) | Merges two saved object migration maps. | | [pollEsNodesVersion](./kibana-plugin-core-server.pollesnodesversion.md) | | | [ServiceStatusLevels](./kibana-plugin-core-server.servicestatuslevels.md) | The current "level" of availability of a service. | | [validBodyOutput](./kibana-plugin-core-server.validbodyoutput.md) | The set of valid body.output | diff --git a/docs/development/core/server/kibana-plugin-core-server.mergesavedobjectmigrationmaps.md b/docs/development/core/server/kibana-plugin-core-server.mergesavedobjectmigrationmaps.md new file mode 100644 index 0000000000000..52d40097ca487 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.mergesavedobjectmigrationmaps.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [mergeSavedObjectMigrationMaps](./kibana-plugin-core-server.mergesavedobjectmigrationmaps.md) + +## mergeSavedObjectMigrationMaps variable + +Merges two saved object migration maps. + +Signature: + +```typescript +mergeSavedObjectMigrationMaps: (map1: SavedObjectMigrationMap, map2: SavedObjectMigrationMap) => SavedObjectMigrationMap +``` diff --git a/docs/maps/images/drawing_layer.png b/docs/maps/images/drawing_layer.png new file mode 100644 index 0000000000000..5e6a6d5c33b89 Binary files /dev/null and b/docs/maps/images/drawing_layer.png differ diff --git a/docs/maps/import-geospatial-data.asciidoc b/docs/maps/import-geospatial-data.asciidoc index 58d9ca2255dd3..7a35b7d1df599 100644 --- a/docs/maps/import-geospatial-data.asciidoc +++ b/docs/maps/import-geospatial-data.asciidoc @@ -6,7 +6,7 @@ To import geospatical data into the Elastic Stack, the data must be indexed as { Geospatial data comes in many formats. Choose an import tool based on the format of your geospatial data. -TIP: When you upload GeoJSON or delimited files in {kib}, there is a file size +TIP: When you upload files in {kib}, there is a file size limit, which is configurable in <>. [discrete] @@ -19,7 +19,7 @@ spaces in **{stack-manage-app}** in {kib}. For more information, see {ref}/security-privileges.html[Security privileges], <>, and <>. -To upload GeoJSON files in {kib} with *Maps*, you must have: +To upload GeoJSON files, shapefiles, and draw features in {kib} with *Maps*, you must have: * The `all` {kib} privilege for *Maps* * The `all` {kib} privilege for *{ipm-app}* @@ -50,14 +50,79 @@ On the {kib} home page, you can upload a file and import it into an {es} index w [discrete] === Upload a GeoJSON file -*Upload GeoJSON* indexes GeoJSON features as a `geo_point` or `geo_shape`. +*Upload file* indexes GeoJSON features in {es}, creating a document for each feature. + +NOTE: GeoJSON feature coordinates must be in EPSG:4326 coordinate reference system.. + +. <>. +. Click *Add layer*. +. Select *Upload file*. +. Use the file chooser to select a GeoJSON file with the extension `.json` or `.geojson`. +. Click *Import file*. + +discrete] +=== Upload a shapefile + +*Upload file* indexes shapefile features in {es}, creating a document for each feature. . <>. . Click *Add layer*. -. Select *Upload GeoJSON*. -. Use the file chooser to select a GeoJSON file. +. Select *Upload file*. +. Use the file chooser to select the `.shp` file from your shapefile folder. +. Use the `.dbf` file chooser to select the `.dbf` file from your shapefile folder. +. Use the `.prj` file chooser to select the `.prj` file from your shapefile folder. +. Use the `.shx` file chooser to select the `.shx` file from your shapefile folder. . Click *Import file*. +[discrete] +=== Draw features in a map + +Upload features into {es} by drawing lines, polygons, circles, bounding boxes, and points in a map. + +To create a new index for drawing: + +. <>. +. Click *Add layer*. +. Select *Create index*. +. Set *Index name*. +. Click *Create index*. + +To open an existing index for drawing: + +. <>. + +. Click *Add layer*. + +. Select *Documents*. + +. Select the data view that points to your index. A <> can point to one or more indices. For feature editing, the data view must point to a single index. + +. Click *Add layer*. + +. Set *Scaling* to *Limit results to 10,000*. + +. In **Filtering**: +** Clear the *Apply global search to layer data* checkbox. +** If your data view contains a default time field, clear the *Apply global time to layer data* checkbox. + +. Click *Save & close*. + +. In the legend, click the layer name and select *Edit features*. + +When feature editing is open, a feature editing toolbox is displayed on the left side of the map. + +[role="screenshot"] +image::maps/images/drawing_layer.png[] + +To draw features: + +. Click on the line, polygon, circle, bounding box, or point icon. +. Move the mouse cursor over the map and follow the on screen instructions to draw a feature. ++ +When a feature is complete, the feature is added to the index as a new document. +. Repeat to draw additional features. +. When you are finished adding features, go to the legend, and click *Exit* under the layer name. + [discrete] === Upload data with IP addresses diff --git a/docs/maps/index.asciidoc b/docs/maps/index.asciidoc index 157eb0f044666..f1fdb48c248ab 100644 --- a/docs/maps/index.asciidoc +++ b/docs/maps/index.asciidoc @@ -12,7 +12,7 @@ Create beautiful maps from your geographical data. With **Maps**, you can: * Build maps with multiple layers and indices. * Animate spatial temporal data. -* Upload GeoJSON. +* Upload GeoJSON files and shapefiles. * Embed your map in dashboards. * Symbolize features using data values. * Focus on only the data thatā€™s important to you. @@ -50,8 +50,8 @@ This animated map uses the time slider to show Portland buses over a period of 1 image::maps/images/timeslider.gif[] [float] -=== Upload GeoJSON -Use **Maps** to drag and drop your GeoJSON points, lines, and polygons into Elasticsearch, and then use them as layers in your map. +=== Upload GeoJSON files and shapefiles +Use **Maps** to drag and drop your GeoJSON and shapefile data into Elasticsearch, and then use them as layers in your map. [float] === Embed your map in dashboards diff --git a/docs/maps/indexing-geojson-data-tutorial.asciidoc b/docs/maps/indexing-geojson-data-tutorial.asciidoc index 50f2e9aed9248..50c32b98f0b4c 100644 --- a/docs/maps/indexing-geojson-data-tutorial.asciidoc +++ b/docs/maps/indexing-geojson-data-tutorial.asciidoc @@ -47,7 +47,7 @@ image::maps/images/fu_gs_new_england_map.png[] For each GeoJSON file you downloaded, complete the following steps: . Click *Add layer*. -. From the list of layer types, click *Upload GeoJSON*. +. From the list of layer types, click *Upload file*. . Using the File Picker, upload the GeoJSON file. + Depending on the geometry type of your features, this will diff --git a/docs/maps/reverse-geocoding-tutorial.asciidoc b/docs/maps/reverse-geocoding-tutorial.asciidoc index 8760d3ab4df8b..5997637b2eb13 100644 --- a/docs/maps/reverse-geocoding-tutorial.asciidoc +++ b/docs/maps/reverse-geocoding-tutorial.asciidoc @@ -42,16 +42,16 @@ CSAs generally share the same telecom providers and ad networks. New fast food f To get the CSA boundary data: -. Download the https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html[Cartographic Boundary shapefile (.shp)] from the Census Bureauā€™s website. -. To use the data in Kibana, convert it to GeoJSON format. Follow this https://gist.github.com/YKCzoli/b7f5ff0e0f641faba0f47fa5d16c4d8d[helpful tutorial] to use QGIS to convert the Cartographic Boundary shapefile to GeoJSON. Or, download a https://raw.githubusercontent.com/elastic/examples/master/blog/reverse-geocoding/csba.json[prebuilt GeoJSON version]. - -Once you have your GeoJSON file: - -. Open the main menu, and click *Maps*. +. Download the "Combined Statistical Areas (CSAs)" zip file from https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html[Census Bureauā€™s website]. +. Uncompress the zip file. +. In Kibana, open the main menu, and click *Maps*. . Click *Create map*. . Click *Add layer*. -. Click *Upload GeoJSON*. -. Use the file chooser to import the CSA GeoJSON file. +. Click *Upload file*. +. Use the file chooser to select the `.shp` file from the CSA shapefile folder. +. Use the `.dbf` file chooser to select the `.dbf` file from the CSA shapefile folder. +. Use the `.prj` file chooser to select the `.prj` file from the CSA shapefile folder. +. Use the `.shx` file chooser to select the `.shx` file from the CSA shapefile folder. . Set index name to *csa* and click *Import file*. . When importing is complete, click *Add as document layer*. . Add Tooltip fields: diff --git a/fleet_packages.json b/fleet_packages.json new file mode 100644 index 0000000000000..9dd281dacae8a --- /dev/null +++ b/fleet_packages.json @@ -0,0 +1,36 @@ +/* + + Packages in this file are considered "bundled" and are installed as part of Fleet's setup process. Each entry points to a valid version name + avaiable in the Elastic Package Registry service, and must include a sha-512 checksum of the `.zip` archive for the given package. + + You may opt in to using the "snapshot" environment of the EPR service by passing the `--use-epr-snapshot-registry` flag to `yarn build`. This will + cause the package archive download to pull from the "spapshot" environment instead of the "production" environment. Be aware that not all packages + exist in the snapshot environment, so you may have errors when fetching package versions. It's recommended to alter this file to contain _only_ the + packages you're testing when using the snapshot environment. + + These files don't include any kind of checksum, but they should eventually include a package signature as introduced in https://github.com/elastic/elastic-package/issues/583 + in order to verify package integrity. +*/ + +[ + { + "name": "apm", + "version": "8.0.0" + }, + { + "name": "elastic_agent", + "version": "1.3.0" + }, + { + "name": "endpoint", + "version": "1.4.1" + }, + { + "name": "fleet_server", + "version": "1.1.0" + }, + { + "name": "synthetics", + "version": "0.9.0" + } +] diff --git a/package.json b/package.json index eb58ae02d9a9c..30221795a6177 100644 --- a/package.json +++ b/package.json @@ -176,6 +176,7 @@ "@kbn/utils": "link:bazel-bin/packages/kbn-utils", "@loaders.gl/core": "^2.3.1", "@loaders.gl/json": "^2.3.1", + "@loaders.gl/shapefile": "^2.3.1", "@mapbox/geojson-rewind": "^0.5.0", "@mapbox/mapbox-gl-draw": "1.3.0", "@mapbox/mapbox-gl-rtl-text": "0.2.3", @@ -607,6 +608,7 @@ "@types/kbn__server-http-tools": "link:bazel-bin/packages/kbn-server-http-tools/npm_module_types", "@types/kbn__server-route-repository": "link:bazel-bin/packages/kbn-server-route-repository/npm_module_types", "@types/kbn__std": "link:bazel-bin/packages/kbn-std/npm_module_types", + "@types/kbn__storybook": "link:bazel-bin/packages/kbn-storybook/npm_module_types", "@types/kbn__telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools/npm_module_types", "@types/kbn__ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm/npm_module_types", "@types/kbn__ui-shared-deps-src": "link:bazel-bin/packages/kbn-ui-shared-deps-src/npm_module_types", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 433118934ef95..3b95f652f5bc5 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -124,6 +124,7 @@ filegroup( "//packages/kbn-server-http-tools:build_types", "//packages/kbn-server-route-repository:build_types", "//packages/kbn-std:build_types", + "//packages/kbn-storybook:build_types", "//packages/kbn-telemetry-tools:build_types", "//packages/kbn-ui-shared-deps-npm:build_types", "//packages/kbn-ui-shared-deps-src:build_types", diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 6c4882ca96f88..b2e8641cd62f2 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -362,6 +362,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { customRules: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-rules`, customUrls: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-url.html`, dataFrameAnalytics: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfanalytics.html`, + dFAPrepareData: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-overview.html#prepare-transform-data`, featureImportance: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-feature-importance.html`, outlierDetectionRoc: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-finding-outliers.html#ml-dfanalytics-roc`, regressionEvaluation: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-regression.html#ml-dfanalytics-regression-evaluation`, diff --git a/packages/kbn-docs-utils/src/api_docs/mdx/write_deprecations_due_by_team.ts b/packages/kbn-docs-utils/src/api_docs/mdx/write_deprecations_due_by_team.ts index 596532a730f49..8397f84eb9812 100644 --- a/packages/kbn-docs-utils/src/api_docs/mdx/write_deprecations_due_by_team.ts +++ b/packages/kbn-docs-utils/src/api_docs/mdx/write_deprecations_due_by_team.ts @@ -29,7 +29,7 @@ export function writeDeprecationDueByTeam( const dueDeprecations = deprecationsByPlugin[pluginId].filter( (dep) => !!dep.deprecatedApi.removeBy ); - if (!dueDeprecations) return teamMap; + if (!dueDeprecations || dueDeprecations.length === 0) return teamMap; const pluginMetaInfo = plugins.find((p) => p.manifest.id === pluginId); if (!pluginMetaInfo || !pluginMetaInfo.manifest.owner.name) return teamMap; diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 5ad540f982d61..3e5b2c77d1839 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -112,7 +112,7 @@ pageLoadAssetSize: uiActionsEnhanced: 38494 urlDrilldown: 30063 dataViewEditor: 12000 - dataViewFieldEditor: 20000 + dataViewFieldEditor: 27000 dataViewManagement: 5000 reporting: 57003 visTypeHeatmap: 25340 diff --git a/packages/kbn-storybook/BUILD.bazel b/packages/kbn-storybook/BUILD.bazel index fc7599b058373..686de744b656f 100644 --- a/packages/kbn-storybook/BUILD.bazel +++ b/packages/kbn-storybook/BUILD.bazel @@ -1,9 +1,10 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") -load("//src/dev/bazel:index.bzl", "jsts_transpiler") +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") PKG_BASE_NAME = "kbn-storybook" PKG_REQUIRE_NAME = "@kbn/storybook" +TYPES_PKG_REQUIRE_NAME = "@types/kbn__storybook" SOURCE_FILES = glob( [ @@ -64,7 +65,6 @@ TYPES_DEPS = [ "@npm//@storybook/node-logger", "@npm//@storybook/react", "@npm//@storybook/theming", - "@npm//@types/express", # necessary for storybook which is missing the types "@npm//@types/loader-utils", "@npm//@types/node", "@npm//@types/react", @@ -104,7 +104,7 @@ ts_project( js_library( name = PKG_BASE_NAME, srcs = NPM_MODULE_EXTRA_FILES, - deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + deps = RUNTIME_DEPS + [":target_node"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) @@ -123,3 +123,21 @@ filegroup( ], visibility = ["//visibility:public"], ) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = TYPES_PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [ + ":npm_module_types", + ], + visibility = ["//visibility:public"], +) + diff --git a/packages/kbn-storybook/package.json b/packages/kbn-storybook/package.json index ba03240262e9c..f24d926aa42a3 100644 --- a/packages/kbn-storybook/package.json +++ b/packages/kbn-storybook/package.json @@ -5,7 +5,6 @@ "private": true, "license": "SSPL-1.0 OR Elastic License 2.0", "main": "./target_node/index.js", - "types": "./target_types/index.d.ts", "kibana": { "devOnly": true } diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index f79fc497d24ba..8d5818182b876 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -68,7 +68,7 @@ function isDesiredPreset(preset: Preset) { // Extend the Storybook Webpack config with some customizations /* eslint-disable import/no-default-export */ -export default function ({ config: storybookConfig }: { config: Configuration }) { +export default ({ config: storybookConfig }: { config: Configuration }) => { const config = { devServer: { stats, @@ -195,4 +195,4 @@ export default function ({ config: storybookConfig }: { config: Configuration }) }, config ); -} +}; diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 2b2995787f94f..6907f7ef1238b 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -276,6 +276,7 @@ export { SavedObjectsSerializer, SavedObjectTypeRegistry, SavedObjectsUtils, + mergeSavedObjectMigrationMaps, } from './saved_objects'; export type { diff --git a/src/core/server/saved_objects/index.ts b/src/core/server/saved_objects/index.ts index 99b21a1a99c7c..73a20c0402bbe 100644 --- a/src/core/server/saved_objects/index.ts +++ b/src/core/server/saved_objects/index.ts @@ -84,6 +84,7 @@ export type { SavedObjectMigrationFn, SavedObjectMigrationContext, } from './migrations'; +export { mergeSavedObjectMigrationMaps } from './migrations'; export type { SavedObjectsNamespaceType, diff --git a/src/core/server/saved_objects/migrations/index.ts b/src/core/server/saved_objects/migrations/index.ts index 91be12425c605..7cc9a860868a9 100644 --- a/src/core/server/saved_objects/migrations/index.ts +++ b/src/core/server/saved_objects/migrations/index.ts @@ -14,3 +14,4 @@ export type { SavedObjectMigrationMap, SavedObjectMigrationContext, } from './types'; +export { mergeSavedObjectMigrationMaps } from './utils'; diff --git a/src/core/server/saved_objects/migrations/utils.test.ts b/src/core/server/saved_objects/migrations/utils.test.ts new file mode 100644 index 0000000000000..49ed5ef1cee3f --- /dev/null +++ b/src/core/server/saved_objects/migrations/utils.test.ts @@ -0,0 +1,70 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { SavedObjectMigrationContext, SavedObjectMigrationMap } from '.'; +import { mergeSavedObjectMigrationMaps } from './utils'; +import { SavedObjectUnsanitizedDoc } from '..'; + +describe('mergeSavedObjectMigrationMaps', () => { + const obj1: SavedObjectMigrationMap = { + '7.12.1': (doc, context) => { + context.log.info(''); + return { + ...doc, + attributes: { ...doc.attributes, counter: doc.attributes.counter + 1 }, + }; + }, + '7.12.2': (doc, context) => { + context.log.info(''); + return { + ...doc, + attributes: { ...doc.attributes, counter: doc.attributes.counter + 2 }, + }; + }, + }; + + const obj2: SavedObjectMigrationMap = { + '7.12.0': (doc, context) => { + context.log.info(''); + return { + ...doc, + attributes: { ...doc.attributes, counter: doc.attributes.counter - 2 }, + }; + }, + '7.12.2': (doc, context) => { + context.log.info(''); + return { + ...doc, + attributes: { ...doc.attributes, counter: doc.attributes.counter + 2 }, + }; + }, + }; + + test('correctly merges two saved object migration maps', () => { + const context = { log: { info: jest.fn() } } as unknown as SavedObjectMigrationContext; + + const result = mergeSavedObjectMigrationMaps(obj1, obj2); + expect( + result['7.12.0']({ attributes: { counter: 5 } } as SavedObjectUnsanitizedDoc, context) + .attributes.counter + ).toEqual(3); + expect(context.log.info).toHaveBeenCalledTimes(1); + + expect( + result['7.12.1']({ attributes: { counter: 5 } } as SavedObjectUnsanitizedDoc, context) + .attributes.counter + ).toEqual(6); + expect(context.log.info).toHaveBeenCalledTimes(2); + + expect( + result['7.12.2']({ attributes: { counter: 5 } } as SavedObjectUnsanitizedDoc, context) + .attributes.counter + ).toEqual(9); + expect(context.log.info).toHaveBeenCalledTimes(4); + }); +}); diff --git a/src/core/server/saved_objects/migrations/utils.ts b/src/core/server/saved_objects/migrations/utils.ts new file mode 100644 index 0000000000000..108317fc6698b --- /dev/null +++ b/src/core/server/saved_objects/migrations/utils.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { mergeWith } from 'lodash'; +import { + SavedObjectMigrationContext, + SavedObjectMigrationFn, + SavedObjectMigrationMap, + SavedObjectUnsanitizedDoc, +} from '../..'; + +/** + * Merges two saved object migration maps. + * + * If there is a migration for a given version on only one of the maps, + * that migration function will be used: + * + * mergeSavedObjectMigrationMaps({ '1.2.3': f }, { '4.5.6': g }) -> { '1.2.3': f, '4.5.6': g } + * + * If there is a migration for a given version on both maps, the migrations will be composed: + * + * mergeSavedObjectMigrationMaps({ '1.2.3': f }, { '1.2.3': g }) -> { '1.2.3': (doc, context) => f(g(doc, context), context) } + * + * @public + */ +export const mergeSavedObjectMigrationMaps = ( + map1: SavedObjectMigrationMap, + map2: SavedObjectMigrationMap +): SavedObjectMigrationMap => { + const customizer = (objValue: SavedObjectMigrationFn, srcValue: SavedObjectMigrationFn) => { + if (!srcValue || !objValue) { + return srcValue || objValue; + } + return (state: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => + objValue(srcValue(state, context), context); + }; + + return mergeWith({ ...map1 }, map2, customizer); +}; diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index cc782aa218215..2f68b82ac5635 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -1467,6 +1467,9 @@ export type MakeUsageFromSchema = { [Key in keyof T]?: T[Key] extends Maybe ? false : T[Key] extends Maybe ? boolean : T[Key] extends Maybe ? MakeUsageFromSchema | boolean : boolean; }; +// @public +export const mergeSavedObjectMigrationMaps: (map1: SavedObjectMigrationMap, map2: SavedObjectMigrationMap) => SavedObjectMigrationMap; + // @public export interface MetricsServiceSetup { readonly collectionInterval: number; diff --git a/src/dev/build/args.test.ts b/src/dev/build/args.test.ts index 5601e063414b3..f372a9e88f2f9 100644 --- a/src/dev/build/args.test.ts +++ b/src/dev/build/args.test.ts @@ -43,6 +43,7 @@ it('build default and oss dist for current platform, without packages, by defaul "initialize": true, "isRelease": false, "targetAllPlatforms": false, + "useSnapshotEpr": false, "versionQualifier": "", }, "log": , @@ -73,6 +74,7 @@ it('builds packages if --all-platforms is passed', () => { "initialize": true, "isRelease": false, "targetAllPlatforms": true, + "useSnapshotEpr": false, "versionQualifier": "", }, "log": , @@ -103,6 +105,7 @@ it('limits packages if --rpm passed with --all-platforms', () => { "initialize": true, "isRelease": false, "targetAllPlatforms": true, + "useSnapshotEpr": false, "versionQualifier": "", }, "log": , @@ -133,6 +136,7 @@ it('limits packages if --deb passed with --all-platforms', () => { "initialize": true, "isRelease": false, "targetAllPlatforms": true, + "useSnapshotEpr": false, "versionQualifier": "", }, "log": , @@ -164,6 +168,7 @@ it('limits packages if --docker passed with --all-platforms', () => { "initialize": true, "isRelease": false, "targetAllPlatforms": true, + "useSnapshotEpr": false, "versionQualifier": "", }, "log": , @@ -202,6 +207,7 @@ it('limits packages if --docker passed with --skip-docker-ubi and --all-platform "initialize": true, "isRelease": false, "targetAllPlatforms": true, + "useSnapshotEpr": false, "versionQualifier": "", }, "log": , @@ -233,6 +239,7 @@ it('limits packages if --all-platforms passed with --skip-docker-ubuntu', () => "initialize": true, "isRelease": false, "targetAllPlatforms": true, + "useSnapshotEpr": false, "versionQualifier": "", }, "log": , diff --git a/src/dev/build/args.ts b/src/dev/build/args.ts index d890dbef4e74f..9c38fe1866856 100644 --- a/src/dev/build/args.ts +++ b/src/dev/build/args.ts @@ -40,6 +40,7 @@ export function readCliArgs(argv: string[]) { 'silent', 'debug', 'help', + 'use-snapshot-epr', ], alias: { v: 'verbose', @@ -115,6 +116,7 @@ export function readCliArgs(argv: string[]) { createDockerUBI: isOsPackageDesired('docker-images') && !Boolean(flags['skip-docker-ubi']), createDockerContexts: !Boolean(flags['skip-docker-contexts']), targetAllPlatforms: Boolean(flags['all-platforms']), + useSnapshotEpr: Boolean(flags['use-snapshot-epr']), }; return { diff --git a/src/dev/build/build_distributables.ts b/src/dev/build/build_distributables.ts index 992486796dfad..ba271eb6ba4da 100644 --- a/src/dev/build/build_distributables.ts +++ b/src/dev/build/build_distributables.ts @@ -30,6 +30,7 @@ export interface BuildOptions { versionQualifier: string | undefined; targetAllPlatforms: boolean; createExamplePlugins: boolean; + useSnapshotEpr: boolean; } export async function buildDistributables(log: ToolingLog, options: BuildOptions): Promise { @@ -84,6 +85,7 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions await run(Tasks.CleanTypescript); await run(Tasks.CleanExtraFilesFromModules); await run(Tasks.CleanEmptyFolders); + await run(Tasks.BundleFleetPackages); } /** diff --git a/src/dev/build/tasks/bundle_fleet_packages.ts b/src/dev/build/tasks/bundle_fleet_packages.ts new file mode 100644 index 0000000000000..0fd584354494f --- /dev/null +++ b/src/dev/build/tasks/bundle_fleet_packages.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import axios from 'axios'; +import JSON5 from 'json5'; + +// @ts-expect-error untyped internal module used to prevent axios from using xhr adapter in tests +import AxiosHttpAdapter from 'axios/lib/adapters/http'; + +import { ToolingLog } from '@kbn/dev-utils'; +import { closeSync, openSync, writeSync } from 'fs'; +import { dirname } from 'path'; +import { readCliArgs } from '../args'; + +import { Task, read, mkdirp } from '../lib'; + +const BUNDLED_PACKAGES_DIR = 'x-pack/plugins/fleet/server/bundled_packages'; + +interface FleetPackage { + name: string; + version: string; +} + +export const BundleFleetPackages: Task = { + description: 'Bundling fleet packages', + + async run(config, log, build) { + log.info('Fetching fleet packages from package registry'); + log.indent(4); + + // Support the `--use-snapshot-epr` command line argument to fetch from the snapshot registry + // in development or test environments + const { buildOptions } = readCliArgs(process.argv); + const eprUrl = buildOptions?.useSnapshotEpr + ? 'https://epr-snapshot.elastic.co' + : 'https://epr.elastic.co'; + + const configFilePath = config.resolveFromRepo('fleet_packages.json'); + const fleetPackages = (await read(configFilePath)) || '[]'; + + await Promise.all( + JSON5.parse(fleetPackages).map(async (fleetPackage: FleetPackage) => { + const archivePath = `${fleetPackage.name}-${fleetPackage.version}.zip`; + const archiveUrl = `${eprUrl}/epr/${fleetPackage.name}/${fleetPackage.name}-${fleetPackage.version}.zip`; + + const destination = build.resolvePath(BUNDLED_PACKAGES_DIR, archivePath); + + try { + await downloadPackageArchive({ log, url: archiveUrl, destination }); + } catch (error) { + log.warning(`Failed to download bundled package archive ${archivePath}`); + log.warning(error); + } + }) + ); + }, +}; + +/** + * We need to skip the checksum process on Fleet's bundled packages for now because we can't reliably generate + * a consistent checksum for the `.zip` file returned from the EPR service. This download process should be updated + * to verify packages using the proposed package signature field provided in https://github.com/elastic/elastic-package/issues/583 + */ +async function downloadPackageArchive({ + log, + url, + destination, +}: { + log: ToolingLog; + url: string; + destination: string; +}) { + log.info(`Downloading bundled package from ${url}`); + + await mkdirp(dirname(destination)); + const file = openSync(destination, 'w'); + + try { + const response = await axios.request({ + url, + responseType: 'stream', + adapter: AxiosHttpAdapter, + }); + + await new Promise((resolve, reject) => { + response.data.on('data', (chunk: Buffer) => { + writeSync(file, chunk); + }); + + response.data.on('error', reject); + response.data.on('end', resolve); + }); + } catch (error) { + log.warning(`Error downloading bundled package from ${url}`); + log.warning(error); + } finally { + closeSync(file); + } +} diff --git a/src/dev/build/tasks/index.ts b/src/dev/build/tasks/index.ts index 5043be288928e..f158634829100 100644 --- a/src/dev/build/tasks/index.ts +++ b/src/dev/build/tasks/index.ts @@ -10,6 +10,7 @@ export * from './bin'; export * from './build_kibana_platform_plugins'; export * from './build_kibana_example_plugins'; export * from './build_packages_task'; +export * from './bundle_fleet_packages'; export * from './clean_tasks'; export * from './copy_source_task'; export * from './create_archives_sources_task'; diff --git a/src/dev/i18n/extract_default_translations.js b/src/dev/i18n/extract_default_translations.js index a453b0bbae2fb..7d86105fed7fd 100644 --- a/src/dev/i18n/extract_default_translations.js +++ b/src/dev/i18n/extract_default_translations.js @@ -55,6 +55,7 @@ export async function matchEntriesWithExctractors(inputPath, options = {}) { '**/dist/**', '**/target/**', '**/vendor/**', + '**/build/**', '**/*.test.{js,jsx,ts,tsx}', '**/*.d.ts', ].concat(additionalIgnore); diff --git a/src/dev/i18n/tasks/extract_untracked_translations.ts b/src/dev/i18n/tasks/extract_untracked_translations.ts index 7afaa1ef71a06..1455a9a00f766 100644 --- a/src/dev/i18n/tasks/extract_untracked_translations.ts +++ b/src/dev/i18n/tasks/extract_untracked_translations.ts @@ -38,7 +38,6 @@ export async function extractUntrackedMessagesTask({ '**/packages/kbn-i18n/**', '**/packages/kbn-i18n-react/**', '**/packages/kbn-plugin-generator/template/**', - '**/target/**', '**/test/**', '**/scripts/**', '**/src/dev/**', diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index 3eba9ffa4e7ad..e5581631f6baf 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -26,6 +26,7 @@ export const IGNORE_FILE_GLOBS = [ '**/{Dockerfile,docker-compose.yml}', 'x-pack/plugins/canvas/tasks/**/*', 'x-pack/plugins/canvas/canvas_plugin_src/**/*', + 'x-pack/plugins/cases/docs/**/*', 'x-pack/plugins/monitoring/public/lib/jquery_flot/**/*', '**/.*', '**/__mocks__/**/*', @@ -60,6 +61,9 @@ export const IGNORE_FILE_GLOBS = [ 'x-pack/plugins/maps/server/fonts/**/*', + // Bundled package names typically use a format like ${pkgName}-${pkgVersion}, so don't lint them + 'x-pack/plugins/fleet/server/bundled_packages/**/*', + // Bazel default files '**/WORKSPACE.bazel', '**/BUILD.bazel', diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx index 0dbd4d2cade04..935c4d66a4506 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx @@ -212,7 +212,7 @@ describe('GaugeComponent', function () { stops: [10, 20, 30] as unknown as ColorStop[], range: 'number', rangeMin: 0, - rangeMax: 20, + rangeMax: 30, }, }; const customProps = { @@ -253,8 +253,8 @@ describe('GaugeComponent', function () { }, } as GaugeRenderProps; const goal = shallowWithIntl().find(Goal); - expect(goal.prop('ticks')).toEqual([0, 1, 2, 3, 10]); - expect(goal.prop('bands')).toEqual([0, 1, 2, 3, 10]); + expect(goal.prop('ticks')).toEqual([0, 1, 2, 3, 4, 10]); + expect(goal.prop('bands')).toEqual([0, 1, 2, 3, 4, 10]); }); it('sets proper color bands and ticks on color bands if palette steps are smaller than minimum', () => { const palette = { @@ -281,8 +281,8 @@ describe('GaugeComponent', function () { }, } as GaugeRenderProps; const goal = shallowWithIntl().find(Goal); - expect(goal.prop('ticks')).toEqual([0, 10]); - expect(goal.prop('bands')).toEqual([0, 10]); + expect(goal.prop('ticks')).toEqual([0, 4, 10]); + expect(goal.prop('bands')).toEqual([0, 4, 10]); }); it('sets proper color bands and ticks on color bands if percent palette steps are smaller than 0', () => { const palette = { @@ -294,7 +294,7 @@ describe('GaugeComponent', function () { stops: [-20, -60, 80], range: 'percent', rangeMin: 0, - rangeMax: 4, + rangeMax: 100, }, }; const customProps = { @@ -407,7 +407,7 @@ describe('GaugeComponent', function () { stops: [20, 60, 80], range: 'percent', rangeMin: 0, - rangeMax: 10, + rangeMax: 100, }, }; const customProps = { diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx index a63746505a35c..dfd7755c47681 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx @@ -29,7 +29,11 @@ declare global { } } -function normalizeColors({ colors, stops, range }: CustomPaletteState, min: number) { +function normalizeColors( + { colors, stops, range, rangeMin, rangeMax }: CustomPaletteState, + min: number, + max: number +) { if (!colors) { return; } @@ -37,23 +41,61 @@ function normalizeColors({ colors, stops, range }: CustomPaletteState, min: numb stops.filter((stop, i) => (range === 'percent' ? stop < 0 : stop < min)).length, 0 ); - return colors.slice(colorsOutOfRangeSmaller); + let updatedColors = colors.slice(colorsOutOfRangeSmaller); + + let correctMin = rangeMin; + let correctMax = rangeMax; + if (range === 'percent') { + correctMin = min + rangeMin * ((max - min) / 100); + correctMax = min + rangeMax * ((max - min) / 100); + } + + if (correctMin > min && isFinite(correctMin)) { + updatedColors = [`rgba(255,255,255,0)`, ...updatedColors]; + } + + if (correctMax < max && isFinite(correctMax)) { + updatedColors = [...updatedColors, `rgba(255,255,255,0)`]; + } + + return updatedColors; } function normalizeBands( - { colors, stops, range }: CustomPaletteState, + { colors, stops, range, rangeMax, rangeMin }: CustomPaletteState, { min, max }: { min: number; max: number } ) { if (!stops.length) { const step = (max - min) / colors.length; return [min, ...colors.map((_, i) => min + (i + 1) * step)]; } + let firstRanges = [min]; + let lastRanges = [max]; + let correctMin = rangeMin; + let correctMax = rangeMax; + if (range === 'percent') { + correctMin = min + rangeMin * ((max - min) / 100); + correctMax = min + rangeMax * ((max - min) / 100); + } + + if (correctMin > min && isFinite(correctMin)) { + firstRanges = [min, correctMin]; + } + + if (correctMax < max && isFinite(correctMax)) { + lastRanges = [correctMax, max]; + } + if (range === 'percent') { - const filteredStops = stops.filter((stop) => stop >= 0 && stop <= 100); - return [min, ...filteredStops.map((step) => min + step * ((max - min) / 100)), max]; + const filteredStops = stops.filter((stop) => stop > 0 && stop < 100); + return [ + ...firstRanges, + ...filteredStops.map((step) => min + step * ((max - min) / 100)), + ...lastRanges, + ]; } const orderedStops = stops.filter((stop, i) => stop < max && stop > min); - return [min, ...orderedStops, max]; + return [...firstRanges, ...orderedStops, ...lastRanges]; } function getTitle( @@ -179,7 +221,7 @@ export const GaugeComponent: FC = memo( }, } ); - const colors = palette?.params?.colors ? normalizeColors(palette.params, min) : undefined; + const colors = palette?.params?.colors ? normalizeColors(palette.params, min, max) : undefined; const bands: number[] = (palette?.params as CustomPaletteState) ? normalizeBands(args.palette?.params as CustomPaletteState, { min, max }) : [min, max]; @@ -193,8 +235,8 @@ export const GaugeComponent: FC = memo( = min && goal <= max ? goal : undefined} + base={bands[0]} + target={goal && goal >= bands[0] && goal <= bands[bands.length - 1] ? goal : undefined} actual={formattedActual} tickValueFormatter={({ value: tickValue }) => tickFormatter.convert(tickValue)} bands={bands} @@ -205,6 +247,8 @@ export const GaugeComponent: FC = memo( const index = bands && bands.indexOf(val.value) - 1; return colors && index >= 0 && colors[index] ? colors[index] + : val.value <= bands[0] + ? colors[0] : colors[colors.length - 1]; } : () => `rgba(255,255,255,0)` diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx index 3713a4b3c01df..969db9263a4e6 100644 --- a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx @@ -271,8 +271,13 @@ export const HeatmapComponent: FC = memo( // adds a very small number to the max value to make sure the max value will be included const smattering = 0.00001; - const endValue = - (paletteParams?.range === 'number' ? paletteParams.rangeMax : max) + smattering; + let endValue = max + smattering; + if (paletteParams?.rangeMax || paletteParams?.rangeMax === 0) { + endValue = + (paletteParams?.range === 'number' + ? paletteParams.rangeMax + : min + ((max - min) * paletteParams.rangeMax) / 100) + smattering; + } const overwriteColors = uiState?.get('vis.colors') ?? null; diff --git a/src/plugins/data/common/index.ts b/src/plugins/data/common/index.ts index 9a58b73d2c49c..7bb4b78850dcd 100644 --- a/src/plugins/data/common/index.ts +++ b/src/plugins/data/common/index.ts @@ -35,7 +35,6 @@ export type { GetFieldsOptions, GetFieldsOptionsTimePattern, IDataViewsApiClient, - IIndexPatternsApiClient, SavedObject, AggregationRestrictions, TypeMeta, @@ -43,9 +42,7 @@ export type { FieldSpecExportFmt, FieldSpec, DataViewFieldMap, - IndexPatternFieldMap, DataViewSpec, - IndexPatternSpec, SourceFilter, IndexPatternExpressionType, IndexPatternLoadStartDependencies, @@ -54,7 +51,6 @@ export type { export type { IndexPatternsContract, DataViewsContract, - IndexPatternListItem, DataViewListItem, } from '../../data_views/common'; export { @@ -68,7 +64,6 @@ export { DataViewField, IndexPatternField, DataViewType, - IndexPatternType, IndexPatternsService, DataViewsService, IndexPattern, diff --git a/src/plugins/data/common/kbn_field_types/index.ts b/src/plugins/data/common/kbn_field_types/index.ts index 26fd3abd232d4..f01401948dec8 100644 --- a/src/plugins/data/common/kbn_field_types/index.ts +++ b/src/plugins/data/common/kbn_field_types/index.ts @@ -8,19 +8,12 @@ // NOTE: trick to mark exports as deprecated (only for constants and types, but not for interfaces, classes or enums) import { - castEsToKbnFieldTypeName as oldCastEsToKbnFieldTypeName, getFilterableKbnTypeNames as oldGetFilterableKbnTypeNames, getKbnFieldType as oldGetKbnFieldType, getKbnTypeNames as oldGetKbnTypeNames, KbnFieldType, } from '@kbn/field-types'; -/** - * @deprecated Import from the "@kbn/field-types" package directly instead. - * @removeBy 8.1 - */ -const castEsToKbnFieldTypeName = oldCastEsToKbnFieldTypeName; - /** * @deprecated Import from the "@kbn/field-types" package directly instead. * @removeBy 8.1 @@ -39,10 +32,4 @@ const getKbnFieldType = oldGetKbnFieldType; */ const getKbnTypeNames = oldGetKbnTypeNames; -export { - castEsToKbnFieldTypeName, - getKbnFieldType, - getKbnTypeNames, - getFilterableKbnTypeNames, - KbnFieldType, -}; +export { getKbnFieldType, getKbnTypeNames, getFilterableKbnTypeNames, KbnFieldType }; diff --git a/src/plugins/data/common/search/expressions/__snapshots__/eql_raw_response.test.ts.snap b/src/plugins/data/common/search/expressions/__snapshots__/eql_raw_response.test.ts.snap new file mode 100644 index 0000000000000..341a04cef373f --- /dev/null +++ b/src/plugins/data/common/search/expressions/__snapshots__/eql_raw_response.test.ts.snap @@ -0,0 +1,208 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`eqlRawResponse converts events to table simple aggregation response 1`] = ` +Object { + "columns": Array [ + Object { + "id": "prop", + "meta": Object { + "field": "prop", + "params": Object {}, + "type": "string", + }, + "name": "prop", + }, + Object { + "id": "prop2", + "meta": Object { + "field": "prop2", + "params": Object {}, + "type": "number", + }, + "name": "prop2", + }, + ], + "meta": Object { + "source": "*", + "type": "eql", + }, + "rows": Array [ + Object { + "prop": "value", + "prop2": 3, + }, + Object { + "prop": "value2", + "prop2": 5, + }, + ], + "type": "datatable", +} +`; + +exports[`eqlRawResponse converts sequences to table simple docs response 1`] = ` +Object { + "columns": Array [ + Object { + "id": "category", + "meta": Object { + "field": "category", + "params": Object {}, + "type": "object", + }, + "name": "category", + }, + Object { + "id": "currency", + "meta": Object { + "field": "currency", + "params": Object {}, + "type": "string", + }, + "name": "currency", + }, + Object { + "id": "customer_first_name", + "meta": Object { + "field": "customer_first_name", + "params": Object {}, + "type": "string", + }, + "name": "customer_first_name", + }, + Object { + "id": "customer_full_name", + "meta": Object { + "field": "customer_full_name", + "params": Object {}, + "type": "string", + }, + "name": "customer_full_name", + }, + Object { + "id": "customer_gender", + "meta": Object { + "field": "customer_gender", + "params": Object {}, + "type": "string", + }, + "name": "customer_gender", + }, + Object { + "id": "products", + "meta": Object { + "field": "products", + "params": Object {}, + "type": "object", + }, + "name": "products", + }, + Object { + "id": "sku", + "meta": Object { + "field": "sku", + "params": Object {}, + "type": "object", + }, + "name": "sku", + }, + Object { + "id": "geoip.country_iso_code", + "meta": Object { + "field": "geoip.country_iso_code", + "params": Object {}, + "type": "string", + }, + "name": "geoip.country_iso_code", + }, + Object { + "id": "geoip.location.lon", + "meta": Object { + "field": "geoip.location.lon", + "params": Object {}, + "type": "number", + }, + "name": "geoip.location.lon", + }, + Object { + "id": "geoip.location.lat", + "meta": Object { + "field": "geoip.location.lat", + "params": Object {}, + "type": "number", + }, + "name": "geoip.location.lat", + }, + Object { + "id": "geoip.continent_name", + "meta": Object { + "field": "geoip.continent_name", + "params": Object {}, + "type": "string", + }, + "name": "geoip.continent_name", + }, + ], + "meta": Object { + "source": "*", + "type": "eql", + }, + "rows": Array [ + Object { + "category": Array [ + "Men's Clothing", + ], + "currency": "EUR", + "customer_first_name": "Oliver", + "customer_full_name": "Oliver Rios", + "customer_gender": "MALE", + "geoip.continent_name": "Europe", + "geoip.country_iso_code": "GB", + "geoip.location.lat": 51.5, + "geoip.location.lon": -0.1, + "products": Array [ + Object { + "base_price": 20.99, + "discount_percentage": 0, + }, + Object { + "base_price": 24.99, + "discount_percentage": 0, + }, + ], + "sku": Array [ + "ZO0417504175", + "ZO0535205352", + ], + }, + Object { + "category": Array [ + "Men's Clothing", + ], + "currency": "EUR", + "customer_first_name": "Boris", + "customer_full_name": "Boris Bradley", + "customer_gender": "MALE", + "geoip.continent_name": "Europe", + "geoip.country_iso_code": "GB", + "geoip.location.lat": 51.5, + "geoip.location.lon": -0.1, + "products": Array [ + Object { + "base_price": 32.99, + "discount_percentage": 0, + }, + Object { + "base_price": 28.99, + "discount_percentage": 0, + }, + ], + "sku": Array [ + "ZO0112101121", + "ZO0530405304", + ], + }, + ], + "type": "datatable", +} +`; diff --git a/src/plugins/data/common/search/expressions/eql.ts b/src/plugins/data/common/search/expressions/eql.ts new file mode 100644 index 0000000000000..b7a8c47985601 --- /dev/null +++ b/src/plugins/data/common/search/expressions/eql.ts @@ -0,0 +1,172 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { i18n } from '@kbn/i18n'; +import { buildEsQuery } from '@kbn/es-query'; +import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; + +import { EqlSearchRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { RequestStatistics, RequestAdapter } from '../../../../inspector/common'; +import { + ISearchGeneric, + KibanaContext, + EqlSearchStrategyResponse, + EQL_SEARCH_STRATEGY, + EqlSearchStrategyRequest, +} from '..'; +import { getEsQueryConfig } from '../../es_query'; +import { DataViewsContract, UiSettingsCommon } from '../..'; +import { EqlRawResponse } from './eql_raw_response'; + +const name = 'eql'; + +type Input = KibanaContext | null; +type Output = Promise; + +interface Arguments { + query: string; + index: string; + size: number; + field: string[]; +} + +export type EqlExpressionFunctionDefinition = ExpressionFunctionDefinition< + typeof name, + Input, + Arguments, + Output +>; + +interface EqlStartDependencies { + search: ISearchGeneric; + uiSettingsClient: UiSettingsCommon; + dataViews: DataViewsContract; +} + +export const getEqlFn = ({ + getStartDependencies, +}: { + getStartDependencies: (getKibanaRequest: any) => Promise; +}) => { + const eql: EqlExpressionFunctionDefinition = { + name, + type: 'eql_raw_response', + inputTypes: ['kibana_context', 'null'], + help: i18n.translate('data.search.eql.help', { + defaultMessage: 'Run Elasticsearch request', + }), + args: { + query: { + types: ['string'], + aliases: ['_', 'q', 'query'], + help: i18n.translate('data.search.eql.q.help', { + defaultMessage: 'Query DSL', + }), + required: true, + }, + index: { + types: ['string'], + help: i18n.translate('data.search.eql.index.help', { + defaultMessage: 'ElasticSearch index to query', + }), + required: true, + }, + size: { + types: ['number'], + help: i18n.translate('data.search.eql.size.help', { + defaultMessage: 'ElasticSearch searchAPI size parameter', + }), + default: 10, + }, + field: { + types: ['string'], + help: i18n.translate('data.search.eql.field.help', { + defaultMessage: 'List of fields to retrieve', + }), + multi: true, + required: false, + }, + }, + async fn(input, args, { inspectorAdapters, abortSignal, getKibanaRequest }) { + const { search, uiSettingsClient, dataViews } = await getStartDependencies(getKibanaRequest); + + const dsl = { + query: args.query, + size: args.size, + fields: args.field, + } as unknown as Required['body']; + + if (input) { + const dataview = args.index ? await dataViews.create({ title: args.index }) : undefined; + const esQueryConfigs = getEsQueryConfig(uiSettingsClient as any); + const query = buildEsQuery( + dataview, + input.query || [], + input.filters || [], + esQueryConfigs + ); + + dsl.filter = query; + } + + if (!inspectorAdapters.requests) { + inspectorAdapters.requests = new RequestAdapter(); + } + + const request = inspectorAdapters.requests.start( + i18n.translate('data.search.dataRequest.title', { + defaultMessage: 'Data', + }), + { + description: i18n.translate('data.search.es_search.dataRequest.description', { + defaultMessage: + 'This request queries Elasticsearch to fetch the data for the visualization.', + }), + } + ); + + request.stats({ + indexPattern: { + label: i18n.translate('data.search.es_search.dataViewLabel', { + defaultMessage: 'Data view', + }), + value: args.index, + description: i18n.translate('data.search.es_search.indexPatternDescription', { + defaultMessage: 'The data view that connected to the Elasticsearch indices.', + }), + }, + }); + + try { + const response = await search( + { + params: { + index: args.index, + body: dsl, + }, + }, + { abortSignal, strategy: EQL_SEARCH_STRATEGY } + ).toPromise(); + + const stats: RequestStatistics = {}; + + request.stats(stats).ok({ json: response }); + request.json(dsl!); + + return { + type: 'eql_raw_response', + body: response.rawResponse.body, + }; + } catch (e) { + request.error({ json: e }); + throw e; + } + }, + }; + return eql; +}; diff --git a/src/plugins/data/common/search/expressions/eql_raw_response.test.ts b/src/plugins/data/common/search/expressions/eql_raw_response.test.ts new file mode 100644 index 0000000000000..80d7ca25c89df --- /dev/null +++ b/src/plugins/data/common/search/expressions/eql_raw_response.test.ts @@ -0,0 +1,133 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { EqlRawResponse, eqlRawResponse } from './eql_raw_response'; + +jest.mock('@kbn/i18n', () => { + return { + i18n: { + translate: (id: string, { defaultMessage }: { defaultMessage: string }) => defaultMessage, + }, + }; +}); + +describe('eqlRawResponse', () => { + describe('converts events to table', () => { + test('simple aggregation response', () => { + const response: EqlRawResponse = { + type: 'eql_raw_response', + body: { + hits: { + events: [ + { + _source: { + prop: 'value', + prop2: 3, + }, + }, + { + _source: { + prop: 'value2', + prop2: 5, + }, + }, + ], + }, + }, + }; + const result = eqlRawResponse.to!.datatable(response, {}); + expect(result).toMatchSnapshot(); + }); + }); + + describe('converts sequences to table', () => { + test('simple docs response', () => { + const response: EqlRawResponse = { + type: 'eql_raw_response', + body: { + hits: { + sequences: [ + { + events: [ + { + _index: 'kibana_sample_data_ecommerce', + _id: 'AncqUnMBMY_orZma2mZy', + _score: 0, + _source: { + category: ["Men's Clothing"], + currency: 'EUR', + customer_first_name: 'Oliver', + customer_full_name: 'Oliver Rios', + customer_gender: 'MALE', + products: [ + { + base_price: 20.99, + discount_percentage: 0, + }, + { + base_price: 24.99, + discount_percentage: 0, + }, + ], + sku: ['ZO0417504175', 'ZO0535205352'], + geoip: { + country_iso_code: 'GB', + location: { + lon: -0.1, + lat: 51.5, + }, + continent_name: 'Europe', + }, + }, + }, + ], + }, + { + events: [ + { + _index: 'kibana_sample_data_ecommerce', + _id: 'I3cqUnMBMY_orZma2mZy', + _score: 0, + _source: { + category: ["Men's Clothing"], + currency: 'EUR', + customer_first_name: 'Boris', + customer_full_name: 'Boris Bradley', + customer_gender: 'MALE', + products: [ + { + base_price: 32.99, + discount_percentage: 0, + }, + { + base_price: 28.99, + discount_percentage: 0, + }, + ], + sku: ['ZO0112101121', 'ZO0530405304'], + geoip: { + country_iso_code: 'GB', + location: { + lon: -0.1, + lat: 51.5, + }, + continent_name: 'Europe', + }, + }, + }, + ], + }, + ], + }, + }, + }; + const result = eqlRawResponse.to?.datatable(response, {}); + expect(result).toMatchSnapshot(); + }); + }); +}); diff --git a/src/plugins/data/common/search/expressions/eql_raw_response.ts b/src/plugins/data/common/search/expressions/eql_raw_response.ts new file mode 100644 index 0000000000000..64e41332a8c17 --- /dev/null +++ b/src/plugins/data/common/search/expressions/eql_raw_response.ts @@ -0,0 +1,134 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ExpressionTypeDefinition } from '../../../../expressions/common'; +import { EqlSearchStrategyResponse } from '..'; + +const name = 'eql_raw_response'; + +export interface EqlRawResponse { + type: typeof name; + body: EqlSearchStrategyResponse['rawResponse']['body']; +} + +// duplocated from x-pack/timelines plugin +export type SearchTypes = + | string + | string[] + | number + | number[] + | boolean + | boolean[] + | object + | object[] + | undefined; + +export interface TotalValue { + value: number; + relation: string; +} + +export interface BaseHit { + _index: string; + _id: string; + _source: T; + fields?: Record; +} + +export interface EqlSequence { + join_keys: SearchTypes[]; + events: Array>; +} + +export interface EqlSearchResponse { + is_partial: boolean; + is_running: boolean; + took: number; + timed_out: boolean; + hits: { + total: TotalValue; + sequences?: Array>; + events?: Array>; + }; +} + +export type EqlRawResponseExpressionTypeDefinition = ExpressionTypeDefinition< + typeof name, + EqlRawResponse, + EqlRawResponse +>; + +const flatten = (obj: Record) => { + const _flatten = (o: Record, path: string[] = []): unknown[] => { + return Object.keys(o) + .map((k: string) => { + if (typeof o[k] === 'object' && o[k] !== null && !Array.isArray(o[k])) { + return _flatten(o[k] as Record, [...path, k]); + } else { + const key = [...path, k].join('.'); + return { [key]: o[k] }; + } + }) + .flat(); + }; + + return Object.assign({}, ..._flatten(obj)); +}; + +const parseEventDocs = (events: Array>, joinKeys?: unknown[]) => { + return events + .map((hit) => hit.fields || hit._source) + .filter((hit) => hit) + .map((event) => flatten(event as Record)) + .map((event) => { + if (joinKeys) { + event.joinKeys = joinKeys; + } + return event; + }); +}; + +const parseResponse = (hits: EqlSearchResponse['hits']) => { + if (hits.sequences) { + return hits.sequences.flatMap((sequence) => + parseEventDocs(sequence.events, sequence.join_keys) + ); + } + return parseEventDocs(hits.events!); +}; + +export const eqlRawResponse: EqlRawResponseExpressionTypeDefinition = { + name, + to: { + datatable: (context: EqlRawResponse) => { + // improved handling needs to be added when we know some usecases + const rows = parseResponse((context.body as EqlSearchResponse).hits); + const columns = rows.length + ? Object.keys(rows[0]).map((key) => ({ + id: key, + name: key, + meta: { + type: typeof rows[0][key], + field: key, + params: {}, + }, + })) + : []; + + return { + type: 'datatable', + meta: { + type: 'eql', + source: '*', + }, + columns, + rows, + }; + }, + }, +}; diff --git a/src/plugins/data/common/search/expressions/index.ts b/src/plugins/data/common/search/expressions/index.ts index 05496b4d8c885..23d3b865b4c05 100644 --- a/src/plugins/data/common/search/expressions/index.ts +++ b/src/plugins/data/common/search/expressions/index.ts @@ -42,4 +42,6 @@ export * from './kibana_filter'; export * from './filters_to_ast'; export * from './timerange'; export * from './es_raw_response'; +export * from './eql_raw_response'; export * from './esdsl'; +export * from './eql'; diff --git a/src/plugins/data/common/search/search_source/search_source_service.ts b/src/plugins/data/common/search/search_source/search_source_service.ts index a97596d322ccd..1a3c835bd9058 100644 --- a/src/plugins/data/common/search/search_source/search_source_service.ts +++ b/src/plugins/data/common/search/search_source/search_source_service.ts @@ -16,11 +16,31 @@ import { SerializedSearchSourceFields, } from './'; import { IndexPatternsContract } from '../..'; -import { mergeMigrationFunctionMaps } from '../../../../kibana_utils/common'; +import { + mergeMigrationFunctionMaps, + MigrateFunctionsObject, +} from '../../../../kibana_utils/common'; import { getAllMigrations as filtersGetAllMigrations } from '../../query/persistable_state'; +const getAllMigrations = (): MigrateFunctionsObject => { + const searchSourceMigrations = {}; + + // we don't know if embeddables have any migrations defined so we need to fetch them and map the received functions so we pass + // them the correct input and that we correctly map the response + const filterMigrations = mapValues(filtersGetAllMigrations(), (migrate) => { + return (state: SerializedSearchSourceFields) => ({ + ...state, + filter: migrate(state.filter), + }); + }); + + return mergeMigrationFunctionMaps(searchSourceMigrations, filterMigrations); +}; + export class SearchSourceService { - public setup() {} + public setup() { + return { getAllMigrations }; + } public start(indexPatterns: IndexPatternsContract, dependencies: SearchSourceDependencies) { return { @@ -39,20 +59,7 @@ export class SearchSourceService { return { state: newState, references }; }, inject: injectReferences, - getAllMigrations: () => { - const searchSourceMigrations = {}; - - // we don't know if embeddables have any migrations defined so we need to fetch them and map the received functions so we pass - // them the correct input and that we correctly map the response - const filterMigrations = mapValues(filtersGetAllMigrations(), (migrate) => { - return (state: SerializedSearchSourceFields) => ({ - ...state, - filter: migrate(state.filter), - }); - }); - - return mergeMigrationFunctionMaps(searchSourceMigrations, filterMigrations); - }, + getAllMigrations, telemetry: () => { return {}; }, diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index ec380a0845985..4b7b447d2c8be 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -78,11 +78,9 @@ export type { IFieldType, IndexPatternAttributes, AggregationRestrictions as IndexPatternAggRestrictions, - IndexPatternSpec, IndexPatternLoadExpressionFunctionDefinition, GetFieldsOptions, AggregationRestrictions, - IndexPatternListItem, DataViewListItem, } from '../common'; export { @@ -90,7 +88,6 @@ export { KBN_FIELD_TYPES, UI_SETTINGS, fieldList, - IndexPatternType, DuplicateDataViewError, } from '../common'; @@ -295,12 +292,7 @@ export type { export type { AggsStart } from './search/aggs'; -export { - getTime, - // kbn field types - castEsToKbnFieldTypeName, - getKbnTypeNames, -} from '../common'; +export { getTime, getKbnTypeNames } from '../common'; export { isTimeRange, isQuery } from '../common'; diff --git a/src/plugins/data/public/query/saved_query/saved_query_service.test.ts b/src/plugins/data/public/query/saved_query/saved_query_service.test.ts index 57af09a0ea824..7527ed60d41f9 100644 --- a/src/plugins/data/public/query/saved_query/saved_query_service.test.ts +++ b/src/plugins/data/public/query/saved_query/saved_query_service.test.ts @@ -67,9 +67,7 @@ describe('saved query service', () => { }); const result = await getAllSavedQueries(); expect(http.post).toBeCalled(); - expect(http.post).toHaveBeenCalledWith('/api/saved_query/_find', { - body: '{"perPage":10000}', - }); + expect(http.post).toHaveBeenCalledWith('/api/saved_query/_all'); expect(result).toEqual([{ attributes: savedQueryAttributes }]); }); }); diff --git a/src/plugins/data/public/query/saved_query/saved_query_service.ts b/src/plugins/data/public/query/saved_query/saved_query_service.ts index b5a21e2ac2095..e73baba66c4f1 100644 --- a/src/plugins/data/public/query/saved_query/saved_query_service.ts +++ b/src/plugins/data/public/query/saved_query/saved_query_service.ts @@ -28,8 +28,7 @@ export const createSavedQueryService = (http: HttpStart) => { // we have to tell the saved objects client how many to fetch, otherwise it defaults to fetching 20 per page const getAllSavedQueries = async (): Promise => { const { savedQueries } = await http.post<{ savedQueries: SavedQuery[] }>( - '/api/saved_query/_find', - { body: JSON.stringify({ perPage: 10000 }) } + '/api/saved_query/_all' ); return savedQueries; }; diff --git a/src/plugins/data/public/search/expressions/__snapshots__/eql.test.ts.snap b/src/plugins/data/public/search/expressions/__snapshots__/eql.test.ts.snap new file mode 100644 index 0000000000000..ea1d33aef1b12 --- /dev/null +++ b/src/plugins/data/public/search/expressions/__snapshots__/eql.test.ts.snap @@ -0,0 +1,184 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`eql correctly handles filter, query and timerange on context 1`] = ` +Object { + "body": Object { + "params": Object { + "body": Object { + "fields": Array [], + "filter": Object { + "bool": Object { + "filter": Array [ + Object { + "match_phrase": Object { + "gender": "male", + }, + }, + ], + "must": Array [ + Object { + "query_string": Object { + "query": "*", + "time_zone": true, + }, + }, + ], + "must_not": Array [], + "should": Array [], + }, + }, + "query": "test", + "size": 4, + }, + "index": "kibana_sample_data_logs", + }, + }, + "type": "eql_raw_response", +} +`; + +exports[`eql correctly handles input adds filters 1`] = ` +Object { + "body": Object { + "params": Object { + "body": Object { + "fields": Array [], + "filter": Object { + "bool": Object { + "filter": Array [ + Object { + "match_phrase": Object { + "gender": "male", + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + "query": "test", + "size": 0, + }, + "index": "test", + }, + }, + "type": "eql_raw_response", +} +`; + +exports[`eql correctly handles input adds filters to query with filters 1`] = ` +Object { + "body": Object { + "params": Object { + "body": Object { + "fields": Array [], + "filter": Object { + "bool": Object { + "filter": Array [ + Object { + "match_phrase": Object { + "gender": "male", + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + "query": "test", + "size": 4, + }, + "index": "kibana_sample_data_logs", + }, + }, + "type": "eql_raw_response", +} +`; + +exports[`eql correctly handles input adds query 1`] = ` +Object { + "body": Object { + "params": Object { + "body": Object { + "fields": Array [], + "filter": Object { + "bool": Object { + "filter": Array [], + "must": Array [ + Object { + "query_string": Object { + "query": "*", + "time_zone": true, + }, + }, + ], + "must_not": Array [], + "should": Array [], + }, + }, + "query": "test", + "size": 0, + }, + "index": "test", + }, + }, + "type": "eql_raw_response", +} +`; + +exports[`eql correctly handles input adds query to a query with filters 1`] = ` +Object { + "body": Object { + "params": Object { + "body": Object { + "fields": Array [], + "filter": Object { + "bool": Object { + "filter": Array [], + "must": Array [ + Object { + "query_string": Object { + "query": "*", + "time_zone": true, + }, + }, + ], + "must_not": Array [], + "should": Array [], + }, + }, + "query": "test", + "size": 4, + }, + "index": "kibana_sample_data_logs", + }, + }, + "type": "eql_raw_response", +} +`; + +exports[`eql correctly handles input ignores timerange 1`] = ` +Object { + "body": Object { + "params": Object { + "body": Object { + "fields": Array [], + "filter": Object { + "bool": Object { + "filter": Array [], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + "query": "test", + "size": 0, + }, + "index": "test", + }, + }, + "type": "eql_raw_response", +} +`; diff --git a/src/plugins/data/public/search/expressions/eql.test.ts b/src/plugins/data/public/search/expressions/eql.test.ts new file mode 100644 index 0000000000000..71655a551253c --- /dev/null +++ b/src/plugins/data/public/search/expressions/eql.test.ts @@ -0,0 +1,165 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getEql } from './eql'; +import { MockedKeys } from '@kbn/utility-types/jest'; +import { EqlExpressionFunctionDefinition } from '../../../common/search/expressions'; +import { StartServicesAccessor } from 'kibana/public'; +import { DataPublicPluginStart, DataStartDependencies } from '../../types'; +import { of } from 'rxjs'; + +jest.mock('@kbn/i18n', () => { + return { + i18n: { + translate: (id: string, { defaultMessage }: { defaultMessage: string }) => defaultMessage, + }, + }; +}); + +describe('eql', () => { + let getStartServices: StartServicesAccessor; + let startDependencies: MockedKeys< + StartServicesAccessor + >; + let eql: EqlExpressionFunctionDefinition; + + beforeEach(() => { + jest.clearAllMocks(); + startDependencies = [ + { + uiSettings: { + get: jest.fn().mockReturnValue(true), + }, + }, + {}, + { + search: { + search: jest.fn((params: any) => of({ rawResponse: { body: params } })), + }, + indexPatterns: { + get: jest.fn(), + create: jest.fn(), + }, + }, + ]; + getStartServices = jest.fn().mockResolvedValue(startDependencies); + eql = getEql({ getStartServices }); + }); + + describe('correctly handles input', () => { + test('adds filters', async () => { + const result = await eql.fn( + { + type: 'kibana_context', + filters: [ + { + meta: { index: '1', alias: 'test', negate: false, disabled: false }, + query: { match_phrase: { gender: 'male' } }, + }, + ], + }, + { query: 'test', index: 'test', size: 0, field: [] }, + { inspectorAdapters: {} } as any + ); + + expect(result).toMatchSnapshot(); + }); + + test('adds filters to query with filters', async () => { + const result = await eql.fn( + { + type: 'kibana_context', + filters: [ + { + meta: { index: '1', alias: 'test', negate: false, disabled: false }, + query: { match_phrase: { gender: 'male' } }, + }, + ], + }, + { + index: 'kibana_sample_data_logs', + size: 4, + query: 'test', + field: [], + }, + { inspectorAdapters: {} } as any + ); + + expect(result).toMatchSnapshot(); + }); + + test('adds query', async () => { + const result = await eql.fn( + { + type: 'kibana_context', + query: { language: 'lucene', query: '*' }, + }, + { query: 'test', index: 'test', size: 0, field: [] }, + { inspectorAdapters: {} } as any + ); + + expect(result).toMatchSnapshot(); + }); + + test('adds query to a query with filters', async () => { + const result = await eql.fn( + { + type: 'kibana_context', + query: { language: 'lucene', query: '*' }, + }, + { + index: 'kibana_sample_data_logs', + size: 4, + query: 'test', + field: [], + }, + { inspectorAdapters: {} } as any + ); + + expect(result).toMatchSnapshot(); + }); + + test('ignores timerange', async () => { + const result = await eql.fn( + { + type: 'kibana_context', + timeRange: { from: 'now-15m', to: 'now' }, + }, + { query: 'test', index: 'test', size: 0, field: [] }, + { inspectorAdapters: {} } as any + ); + + expect(result).toMatchSnapshot(); + }); + }); + + test('correctly handles filter, query and timerange on context', async () => { + const result = await eql.fn( + { + type: 'kibana_context', + query: { language: 'lucene', query: '*' }, + timeRange: { from: 'now-15m', to: 'now' }, + filters: [ + { + meta: { index: '1', alias: 'test', negate: false, disabled: false }, + query: { match_phrase: { gender: 'male' } }, + }, + ], + }, + { + index: 'kibana_sample_data_logs', + size: 4, + query: 'test', + field: [], + }, + { inspectorAdapters: {} } as any + ); + + expect(result).toMatchSnapshot(); + }); +}); diff --git a/src/plugins/data/public/search/expressions/eql.ts b/src/plugins/data/public/search/expressions/eql.ts new file mode 100644 index 0000000000000..03444dd22adc2 --- /dev/null +++ b/src/plugins/data/public/search/expressions/eql.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { StartServicesAccessor } from 'src/core/public'; +import { DataPublicPluginStart, DataStartDependencies } from '../../types'; +import { getEqlFn } from '../../../common/search/expressions/eql'; +import { UiSettingsCommon } from '../../../common'; + +/** + * This is some glue code that takes in `core.getStartServices`, extracts the dependencies + * needed for this function, and wraps them behind a `getStartDependencies` function that + * is then called at runtime. + * + * We do this so that we can be explicit about exactly which dependencies the function + * requires, without cluttering up the top-level `plugin.ts` with this logic. It also + * makes testing the expression function a bit easier since `getStartDependencies` is + * the only thing you should need to mock. + * + * @param getStartServices - core's StartServicesAccessor for this plugin + * + * @internal + */ +export function getEql({ + getStartServices, +}: { + getStartServices: StartServicesAccessor; +}) { + return getEqlFn({ + getStartDependencies: async () => { + const [core, , { search, indexPatterns }] = await getStartServices(); + return { + uiSettingsClient: core.uiSettings as unknown as UiSettingsCommon, + search: search.search, + dataViews: indexPatterns, + }; + }, + }); +} diff --git a/src/plugins/data/public/search/expressions/index.ts b/src/plugins/data/public/search/expressions/index.ts index d60ab610d27b5..6594b235fda72 100644 --- a/src/plugins/data/public/search/expressions/index.ts +++ b/src/plugins/data/public/search/expressions/index.ts @@ -9,3 +9,4 @@ export * from './esaggs'; export * from './esdsl'; export * from '../../../common/search/expressions'; +export * from './eql'; diff --git a/src/plugins/data/public/search/search_service.ts b/src/plugins/data/public/search/search_service.ts index 311a863a74933..961599de713df 100644 --- a/src/plugins/data/public/search/search_service.ts +++ b/src/plugins/data/public/search/search_service.ts @@ -44,13 +44,14 @@ import { kibanaFilterFunction, phraseFilterFunction, esRawResponse, + eqlRawResponse, } from '../../common/search'; import { AggsService, AggsStartDependencies } from './aggs'; import { IKibanaSearchResponse, IndexPatternsContract, SearchRequest } from '..'; import { ISearchInterceptor, SearchInterceptor } from './search_interceptor'; import { SearchUsageCollector, createUsageCollector } from './collectors'; import { UsageCollectionSetup } from '../../../usage_collection/public'; -import { getEsaggs, getEsdsl } from './expressions'; +import { getEsaggs, getEsdsl, getEql } from './expressions'; import { ExpressionsSetup } from '../../../expressions/public'; import { ISessionsClient, ISessionService, SessionsClient, SessionService } from './session'; import { ConfigSchema } from '../../config'; @@ -152,7 +153,13 @@ export class SearchService implements Plugin { getStartServices: StartServicesAccessor; }) ); + expressions.registerFunction( + getEql({ getStartServices } as { + getStartServices: StartServicesAccessor; + }) + ); expressions.registerType(esRawResponse); + expressions.registerType(eqlRawResponse); const aggs = this.aggsService.setup({ registerFunction: expressions.registerFunction, diff --git a/src/plugins/data/server/index.ts b/src/plugins/data/server/index.ts index 939d4a9fa3237..87c41cf76a359 100644 --- a/src/plugins/data/server/index.ts +++ b/src/plugins/data/server/index.ts @@ -106,7 +106,7 @@ export const search = { */ export type { TimeRange } from '../common'; -export { castEsToKbnFieldTypeName, getTime, parseInterval } from '../common'; +export { getTime, parseInterval } from '../common'; /** * Static code to be shared externally diff --git a/src/plugins/data/server/query/route_handler_context.ts b/src/plugins/data/server/query/route_handler_context.ts index 3c60b33559b72..9351bd26408f5 100644 --- a/src/plugins/data/server/query/route_handler_context.ts +++ b/src/plugins/data/server/query/route_handler_context.ts @@ -136,6 +136,22 @@ export function registerSavedQueryRouteHandlerContext(context: RequestHandlerCon return { total, savedQueries }; }; + const getAllSavedQueries = async () => { + const finder = context.core.savedObjects.client.createPointInTimeFinder({ + type: 'query', + perPage: 100, + }); + + const savedObjects: Array> = []; + for await (const response of finder.find()) { + savedObjects.push(...(response.saved_objects ?? [])); + } + await finder.close(); + + const savedQueries = savedObjects.map(injectReferences); + return { total: savedQueries.length, savedQueries }; + }; + const deleteSavedQuery = (id: string) => { return context.core.savedObjects.client.delete('query', id); }; @@ -146,6 +162,7 @@ export function registerSavedQueryRouteHandlerContext(context: RequestHandlerCon get: getSavedQuery, count: getSavedQueriesCount, find: findSavedQueries, + getAll: getAllSavedQueries, delete: deleteSavedQuery, }; } diff --git a/src/plugins/data/server/query/routes.ts b/src/plugins/data/server/query/routes.ts index cdf9e6f43dccc..3f813b56b4fb3 100644 --- a/src/plugins/data/server/query/routes.ts +++ b/src/plugins/data/server/query/routes.ts @@ -123,6 +123,22 @@ export function registerSavedQueryRoutes({ http }: CoreSetup): void { } ); + router.post( + { + path: `${SAVED_QUERY_PATH}/_all`, + validate: {}, + }, + async (context, request, response) => { + try { + const body = await context.savedQuery.getAll(); + return response.ok({ body }); + } catch (e) { + // TODO: Handle properly + return response.customError(e); + } + } + ); + router.delete( { path: `${SAVED_QUERY_PATH}/{id}`, diff --git a/src/plugins/data/server/search/expressions/eql.ts b/src/plugins/data/server/search/expressions/eql.ts new file mode 100644 index 0000000000000..e9acac3ffc08f --- /dev/null +++ b/src/plugins/data/server/search/expressions/eql.ts @@ -0,0 +1,52 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { StartServicesAccessor } from 'src/core/server'; +import { DataPluginStart, DataPluginStartDependencies } from '../../plugin'; +import { getEqlFn } from '../../../common/search/expressions/eql'; + +/** + * This is some glue code that takes in `core.getStartServices`, extracts the dependencies + * needed for this function, and wraps them behind a `getStartDependencies` function that + * is then called at runtime. + * + * We do this so that we can be explicit about exactly which dependencies the function + * requires, without cluttering up the top-level `plugin.ts` with this logic. It also + * makes testing the expression function a bit easier since `getStartDependencies` is + * the only thing you should need to mock. + * + * @param getStartServices - core's StartServicesAccessor for this plugin + * + * @internal + */ +export function getEql({ + getStartServices, +}: { + getStartServices: StartServicesAccessor; +}) { + return getEqlFn({ + getStartDependencies: async (getKibanaRequest: any) => { + const [core, , { search, indexPatterns }] = await getStartServices(); + const request = getKibanaRequest?.(); + if (request) { + throw new Error('missing dependencies'); + } + const savedObjectsClient = core.savedObjects.getScopedClient(request); + const dataViews = await indexPatterns.dataViewsServiceFactory( + savedObjectsClient, + core.elasticsearch.client.asScoped(request).asCurrentUser, + request + ); + return { + uiSettingsClient: core.uiSettings.asScopedToClient(savedObjectsClient), + search: search.asScoped(request).search, + dataViews, + }; + }, + }); +} diff --git a/src/plugins/data/server/search/expressions/index.ts b/src/plugins/data/server/search/expressions/index.ts index bb690c2e6e7c6..8273f6f424a2d 100644 --- a/src/plugins/data/server/search/expressions/index.ts +++ b/src/plugins/data/server/search/expressions/index.ts @@ -8,3 +8,4 @@ export * from './esaggs'; export * from './esdsl'; +export * from './eql'; diff --git a/src/plugins/data/server/search/mocks.ts b/src/plugins/data/server/search/mocks.ts index bca01c6a15d55..740be105703a7 100644 --- a/src/plugins/data/server/search/mocks.ts +++ b/src/plugins/data/server/search/mocks.ts @@ -17,6 +17,7 @@ export function createSearchSetupMock(): jest.Mocked { aggs: searchAggsSetupMock(), registerSearchStrategy: jest.fn(), __enhance: jest.fn(), + searchSource: searchSourceMock.createSetupContract(), }; } diff --git a/src/plugins/data/server/search/search_service.ts b/src/plugins/data/server/search/search_service.ts index d3b1c57b67779..8fb92136bc259 100644 --- a/src/plugins/data/server/search/search_service.ts +++ b/src/plugins/data/server/search/search_service.ts @@ -74,10 +74,11 @@ import { SearchSourceService, phraseFilterFunction, esRawResponse, + eqlRawResponse, ENHANCED_ES_SEARCH_STRATEGY, EQL_SEARCH_STRATEGY, } from '../../common/search'; -import { getEsaggs, getEsdsl } from './expressions'; +import { getEsaggs, getEsdsl, getEql } from './expressions'; import { getShardDelayBucketAgg, SHARD_DELAY_AGG_NAME, @@ -189,6 +190,7 @@ export class SearchService implements Plugin { expressions.registerFunction(getEsaggs({ getStartServices: core.getStartServices })); expressions.registerFunction(getEsdsl({ getStartServices: core.getStartServices })); + expressions.registerFunction(getEql({ getStartServices: core.getStartServices })); expressions.registerFunction(cidrFunction); expressions.registerFunction(dateRangeFunction); expressions.registerFunction(extendedBoundsFunction); @@ -212,6 +214,7 @@ export class SearchService implements Plugin { expressions.registerFunction(phraseFilterFunction); expressions.registerType(kibanaContext); expressions.registerType(esRawResponse); + expressions.registerType(eqlRawResponse); const aggs = this.aggsService.setup({ registerFunction: expressions.registerFunction }); @@ -233,6 +236,7 @@ export class SearchService implements Plugin { aggs, registerSearchStrategy: this.registerSearchStrategy, usage, + searchSource: this.searchSourceService.setup(), }; } diff --git a/src/plugins/data/server/search/search_source/mocks.ts b/src/plugins/data/server/search/search_source/mocks.ts index 6ae30e0391000..6c93c39812301 100644 --- a/src/plugins/data/server/search/search_source/mocks.ts +++ b/src/plugins/data/server/search/search_source/mocks.ts @@ -10,7 +10,13 @@ import type { MockedKeys } from '@kbn/utility-types/jest'; import { KibanaRequest } from 'src/core/server'; import { searchSourceCommonMock } from '../../../common/search/search_source/mocks'; -import type { ISearchStart } from '../types'; +import type { ISearchStart, ISearchSetup } from '../types'; + +function createSetupContract(): MockedKeys { + return { + getAllMigrations: jest.fn(), + }; +} function createStartContract(): MockedKeys { return { @@ -21,5 +27,6 @@ function createStartContract(): MockedKeys { } export const searchSourceMock = { + createSetupContract, createStartContract, }; diff --git a/src/plugins/data/server/search/types.ts b/src/plugins/data/server/search/types.ts index b2e28eec40c09..02372d149779f 100644 --- a/src/plugins/data/server/search/types.ts +++ b/src/plugins/data/server/search/types.ts @@ -23,6 +23,7 @@ import { ISearchClient, IEsSearchResponse, IEsSearchRequest, + SearchSourceService, } from '../../common/search'; import { AggsSetup, AggsStart } from './aggs'; import { SearchUsage } from './collectors'; @@ -63,6 +64,8 @@ export interface ISearchSetup { * @internal */ __enhance: (enhancements: SearchEnhancements) => void; + + searchSource: ReturnType; } /** diff --git a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx index 3c62d6f5eb8c4..0c5381e99b8fa 100644 --- a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx +++ b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx @@ -13,7 +13,7 @@ import memoizeOne from 'memoize-one'; import { DataViewField } from '../../../data_views/public'; import { - IndexPatternSpec, + DataViewSpec, Form, useForm, useFormData, @@ -51,7 +51,7 @@ export interface Props { /** * Handler for the "save" footer button */ - onSave: (indexPatternSpec: IndexPatternSpec) => void; + onSave: (dataViewSpec: DataViewSpec) => void; /** * Handler for the "cancel" footer button */ @@ -84,7 +84,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ return; } - const indexPatternStub: IndexPatternSpec = { + const indexPatternStub: DataViewSpec = { title: formData.title, timeFieldName: formData.timestampField?.value, id: formData.id, diff --git a/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx b/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx index bf42582db8e3f..2fe95d753bb09 100644 --- a/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx +++ b/src/plugins/data_view_editor/public/components/data_view_flyout_content_container.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { IndexPatternSpec, useKibana } from '../shared_imports'; +import { DataViewSpec, useKibana } from '../shared_imports'; import { IndexPatternEditorFlyoutContent } from './data_view_editor_flyout_content'; import { DataViewEditorContext, DataViewEditorProps } from '../types'; @@ -23,9 +23,9 @@ const IndexPatternFlyoutContentContainer = ({ services: { dataViews, notifications }, } = useKibana(); - const onSaveClick = async (indexPatternSpec: IndexPatternSpec) => { + const onSaveClick = async (dataViewSpec: DataViewSpec) => { try { - const indexPattern = await dataViews.createAndSave(indexPatternSpec); + const indexPattern = await dataViews.createAndSave(dataViewSpec); const message = i18n.translate('indexPatternEditor.saved', { defaultMessage: "Saved '{indexPatternTitle}'", diff --git a/src/plugins/data_view_editor/public/shared_imports.ts b/src/plugins/data_view_editor/public/shared_imports.ts index 02204bb1c176f..cca695bc9a95e 100644 --- a/src/plugins/data_view_editor/public/shared_imports.ts +++ b/src/plugins/data_view_editor/public/shared_imports.ts @@ -8,11 +8,11 @@ export type { DataPublicPluginStart, - IndexPatternSpec, GetFieldsOptions, IndexPatternAggRestrictions, } from '../../data/public'; export { IndexPattern, IndexPatternField } from '../../data/public'; +export type { DataViewSpec } from '../../data_views/public'; export { DataView } from '../../data_views/public'; export { diff --git a/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx b/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx index 3879abeab2f58..c55385e152bcf 100644 --- a/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx +++ b/src/plugins/data_view_field_editor/public/components/field_format_editor/field_format_editor.tsx @@ -19,7 +19,7 @@ import { } from 'src/plugins/data/public'; import type { FieldFormatInstanceType } from 'src/plugins/field_formats/common'; import { CoreStart } from 'src/core/public'; -import { castEsToKbnFieldTypeName } from '../../../../data/public'; +import { castEsToKbnFieldTypeName } from '@kbn/field-types'; import { FormatEditor } from './format_editor'; import { FormatEditorServiceStart } from '../../service'; import { FieldFormatConfig } from '../../types'; diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx index d797da7221575..aa74ae8c78fae 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { shallow, ShallowWrapper } from 'enzyme'; import { ScriptedFieldsTable } from '../scripted_fields_table'; -import { IIndexPattern, IndexPattern } from '../../../../../../plugins/data/common'; +import { DataView } from '../../../../../../plugins/data_views/public'; jest.mock('@elastic/eui', () => ({ EuiTitle: 'eui-title', @@ -40,10 +40,10 @@ const helpers = { getRouteHref: () => '#', }; -const getIndexPatternMock = (mockedFields: any = {}) => ({ ...mockedFields } as IIndexPattern); +const getIndexPatternMock = (mockedFields: any = {}) => ({ ...mockedFields } as DataView); describe('ScriptedFieldsTable', () => { - let indexPattern: IndexPattern; + let indexPattern: DataView; beforeEach(() => { indexPattern = getIndexPatternMock({ @@ -56,7 +56,7 @@ describe('ScriptedFieldsTable', () => { script: 'z++', }, ], - }) as IndexPattern; + }) as DataView; }); test('should render normally', async () => { @@ -112,7 +112,7 @@ describe('ScriptedFieldsTable', () => { { isUserEditable: true, name: 'JustATest', lang: 'painless', script: 'z++' }, { isUserEditable: true, name: 'Bad', lang: 'somethingElse', script: 'z++' }, ], - }) as IndexPattern + }) as DataView } painlessDocLink={'painlessDoc'} helpers={helpers} @@ -137,7 +137,7 @@ describe('ScriptedFieldsTable', () => { indexPattern={ getIndexPatternMock({ getScriptedFields: () => [], - }) as IndexPattern + }) as DataView } painlessDocLink={'painlessDoc'} helpers={helpers} @@ -184,7 +184,7 @@ describe('ScriptedFieldsTable', () => { { ...indexPattern, removeScriptedField, - } as unknown as IndexPattern + } as unknown as DataView } helpers={helpers} painlessDocLink={'painlessDoc'} diff --git a/src/plugins/data_views/common/constants.ts b/src/plugins/data_views/common/constants.ts index ca42221806b2e..d656a044e1080 100644 --- a/src/plugins/data_views/common/constants.ts +++ b/src/plugins/data_views/common/constants.ts @@ -40,3 +40,5 @@ export const DATA_VIEW_SAVED_OBJECT_TYPE = 'index-pattern'; */ export const INDEX_PATTERN_SAVED_OBJECT_TYPE = DATA_VIEW_SAVED_OBJECT_TYPE; + +export const PLUGIN_NAME = 'DataViews'; diff --git a/src/plugins/data_views/common/data_views/data_views.ts b/src/plugins/data_views/common/data_views/data_views.ts index 26e1683b60006..8ce6b00d131bb 100644 --- a/src/plugins/data_views/common/data_views/data_views.ts +++ b/src/plugins/data_views/common/data_views/data_views.ts @@ -53,12 +53,6 @@ export interface DataViewListItem { typeMeta?: TypeMeta; } -/** - * @deprecated Use DataViewListItem. All index pattern interfaces were renamed. - */ - -export type IndexPatternListItem = DataViewListItem; - export interface DataViewsServiceDeps { uiSettings: UiSettingsCommon; savedObjectsClient: SavedObjectsClientCommon; @@ -173,7 +167,7 @@ export class DataViewsService { * Get list of index pattern ids with titles * @param refresh Force refresh of index pattern list */ - getIdsWithTitle = async (refresh: boolean = false): Promise => { + getIdsWithTitle = async (refresh: boolean = false): Promise => { if (!this.savedObjectsCache || refresh) { await this.refreshSavedObjectsCache(); } @@ -373,7 +367,7 @@ export class DataViewsService { /** * Converts index pattern saved object to index pattern spec * @param savedObject - * @returns IndexPatternSpec + * @returns DataViewSpec */ savedObjectToSpec = (savedObject: SavedObject): DataViewSpec => { diff --git a/src/plugins/data_views/common/fields/types.ts b/src/plugins/data_views/common/fields/types.ts index 2bd1cf5834548..b68f5db4f2cdc 100644 --- a/src/plugins/data_views/common/fields/types.ts +++ b/src/plugins/data_views/common/fields/types.ts @@ -10,7 +10,7 @@ import { FieldSpec, DataView } from '..'; /** * @deprecated Use {@link IndexPatternField} - * @removeBy 8.1 + * @removeBy 8.2 */ export interface IFieldType extends DataViewFieldBase { count?: number; diff --git a/src/plugins/data_views/common/index.ts b/src/plugins/data_views/common/index.ts index 7253091e8115b..ece482ff79eaa 100644 --- a/src/plugins/data_views/common/index.ts +++ b/src/plugins/data_views/common/index.ts @@ -41,7 +41,6 @@ export type { GetFieldsOptions, GetFieldsOptionsTimePattern, IDataViewsApiClient, - IIndexPatternsApiClient, SavedObject, AggregationRestrictions, TypeMeta, @@ -49,15 +48,13 @@ export type { FieldSpecExportFmt, FieldSpec, DataViewFieldMap, - IndexPatternFieldMap, DataViewSpec, - IndexPatternSpec, SourceFilter, } from './types'; -export { DataViewType, IndexPatternType } from './types'; +export { DataViewType } from './types'; export type { IndexPatternsContract, DataViewsContract } from './data_views'; export { IndexPatternsService, DataViewsService } from './data_views'; -export type { IndexPatternListItem, DataViewListItem, TimeBasedDataView } from './data_views'; +export type { DataViewListItem, TimeBasedDataView } from './data_views'; export { IndexPattern, DataView } from './data_views'; export { DuplicateDataViewError, diff --git a/src/plugins/data_views/common/types.ts b/src/plugins/data_views/common/types.ts index db0e19cca32b4..f991b61bfad5f 100644 --- a/src/plugins/data_views/common/types.ts +++ b/src/plugins/data_views/common/types.ts @@ -32,7 +32,7 @@ export interface RuntimeField { /** * @deprecated * IIndexPattern allows for an IndexPattern OR an index pattern saved object - * Use IndexPattern or IndexPatternSpec instead + * Use DataView or DataViewSpec instead */ export interface IIndexPattern extends DataViewBase { title: string; @@ -145,11 +145,6 @@ export interface IDataViewsApiClient { hasUserIndexPattern: () => Promise; } -/** - * @deprecated Use IDataViewsApiClient. All index pattern interfaces were renamed. - */ -export type IIndexPatternsApiClient = IDataViewsApiClient; - export type { SavedObject }; export type AggregationRestrictions = Record< @@ -229,11 +224,6 @@ export interface FieldSpec extends DataViewFieldBase { export type DataViewFieldMap = Record; -/** - * @deprecated Use DataViewFieldMap. All index pattern interfaces were renamed. - */ -export type IndexPatternFieldMap = DataViewFieldMap; - /** * Static index pattern format * Serialized data object, representing index pattern attributes and state @@ -259,11 +249,6 @@ export interface DataViewSpec { allowNoIndex?: boolean; } -/** - * @deprecated Use DataViewSpec. All index pattern interfaces were renamed. - */ -export type IndexPatternSpec = DataViewSpec; - export interface SourceFilter { value: string; } diff --git a/src/plugins/data_views/public/index.ts b/src/plugins/data_views/public/index.ts index 9cb07d4f3c54f..11b3edaa09628 100644 --- a/src/plugins/data_views/public/index.ts +++ b/src/plugins/data_views/public/index.ts @@ -16,6 +16,7 @@ export { export { onRedirectNoIndexPattern } from './data_views'; export type { IIndexPatternFieldList, TypeMeta } from '../common'; +export type { DataViewSpec } from '../common'; export { IndexPatternField, DataViewField, DataViewType, META_FIELDS } from '../common'; export type { IndexPatternsContract } from './data_views'; diff --git a/src/plugins/data_views/server/constants.ts b/src/plugins/data_views/server/constants.ts index 15ca2c97f50ec..7daafe65f9b92 100644 --- a/src/plugins/data_views/server/constants.ts +++ b/src/plugins/data_views/server/constants.ts @@ -25,3 +25,5 @@ export const SPECIFIC_SCRIPTED_FIELD_PATH_LEGACY = `${SCRIPTED_FIELD_PATH_LEGACY export const SERVICE_KEY = 'data_view'; export const SERVICE_KEY_LEGACY = 'index_pattern'; export type SERVICE_KEY_TYPE = typeof SERVICE_KEY | typeof SERVICE_KEY_LEGACY; + +export const CREATE_DATA_VIEW_COUNTER_NAME = `POST ${DATA_VIEW_PATH}`; diff --git a/src/plugins/data_views/server/deprecations/scripted_fields.ts b/src/plugins/data_views/server/deprecations/scripted_fields.ts index 684115a19299a..0d668466ff099 100644 --- a/src/plugins/data_views/server/deprecations/scripted_fields.ts +++ b/src/plugins/data_views/server/deprecations/scripted_fields.ts @@ -13,9 +13,9 @@ import { RegisterDeprecationsConfig, } from 'kibana/server'; import { i18n } from '@kbn/i18n'; -import { IndexPatternAttributes } from '../../common'; +import { DataViewAttributes } from '../../common'; -type IndexPatternAttributesWithFields = Pick; +type IndexPatternAttributesWithFields = Pick; export const createScriptedFieldsDeprecationsConfig: ( core: CoreSetup diff --git a/src/plugins/data_views/server/index_patterns_api_client.ts b/src/plugins/data_views/server/index_patterns_api_client.ts index b40c0922589b1..4f036449fe7ee 100644 --- a/src/plugins/data_views/server/index_patterns_api_client.ts +++ b/src/plugins/data_views/server/index_patterns_api_client.ts @@ -9,14 +9,14 @@ import { ElasticsearchClient, SavedObjectsClientContract } from 'kibana/server'; import { GetFieldsOptions, - IIndexPatternsApiClient, GetFieldsOptionsTimePattern, + IDataViewsApiClient, } from '../common/types'; import { DataViewMissingIndices } from '../common/lib'; import { IndexPatternsFetcher } from './fetcher'; import { hasUserIndexPattern } from './has_user_index_pattern'; -export class IndexPatternsApiServer implements IIndexPatternsApiClient { +export class IndexPatternsApiServer implements IDataViewsApiClient { esClient: ElasticsearchClient; constructor( elasticsearchClient: ElasticsearchClient, diff --git a/src/plugins/data_views/server/mocks.ts b/src/plugins/data_views/server/mocks.ts index 70a582810a1e2..63dd54f771bc1 100644 --- a/src/plugins/data_views/server/mocks.ts +++ b/src/plugins/data_views/server/mocks.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import { DataViewsService } from 'src/plugins/data_views/common'; + export function createIndexPatternsStartMock() { const dataViewsServiceFactory = jest.fn().mockResolvedValue({ get: jest.fn() }); return { @@ -13,3 +15,18 @@ export function createIndexPatternsStartMock() { dataViewsServiceFactory, }; } + +export const dataViewsService = { + find: jest.fn((search) => [{ id: search, title: search }]), + ensureDefaultIndexPattern: jest.fn(), + ensureDefaultDataView: jest.fn().mockReturnValue(Promise.resolve({})), + get: jest.fn().mockReturnValue(Promise.resolve({})), + clearCache: jest.fn(), + createAndSave: jest.fn(), + setDefault: jest.fn(), + delete: jest.fn(), + hasUserDataView: jest.fn(), + getDefaultId: jest.fn(), + updateSavedObject: jest.fn(), + refreshFields: jest.fn(), +} as unknown as jest.Mocked; diff --git a/src/plugins/data_views/server/plugin.ts b/src/plugins/data_views/server/plugin.ts index 6b9e28101ac24..7884db67a9d9c 100644 --- a/src/plugins/data_views/server/plugin.ts +++ b/src/plugins/data_views/server/plugin.ts @@ -42,8 +42,9 @@ export class DataViewsServerPlugin ) { core.savedObjects.registerType(dataViewSavedObjectType); core.capabilities.registerProvider(capabilitiesProvider); + const dataViewRestCounter = usageCollection?.createUsageCounter('dataViewsRestApi'); - registerRoutes(core.http, core.getStartServices); + registerRoutes(core.http, core.getStartServices, dataViewRestCounter); expressions.registerFunction(getIndexPatternLoad({ getStartServices: core.getStartServices })); registerIndexPatternsUsageCollector(core.getStartServices, usageCollection); diff --git a/src/plugins/data_views/server/rest_api_routes/create_data_view.test.ts b/src/plugins/data_views/server/rest_api_routes/create_data_view.test.ts new file mode 100644 index 0000000000000..82e0d628bf4c7 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/create_data_view.test.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { createDataView } from './create_data_view'; +import { dataViewsService } from '../mocks'; +import { getUsageCollection } from './test_utils'; + +describe('create data view', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + createDataView({ + dataViewsService, + spec: {}, + counterName: 'POST /path', + usageCollection, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/create_index_pattern.ts b/src/plugins/data_views/server/rest_api_routes/create_data_view.ts similarity index 70% rename from src/plugins/data_views/server/routes/create_index_pattern.ts rename to src/plugins/data_views/server/rest_api_routes/create_data_view.ts index 7f5575c8e7cae..4b103ba87662c 100644 --- a/src/plugins/data_views/server/routes/create_index_pattern.ts +++ b/src/plugins/data_views/server/rest_api_routes/create_data_view.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { schema } from '@kbn/config-schema'; -import { DataViewSpec } from 'src/plugins/data_views/common'; +import { DataViewSpec, DataViewsService } from 'src/plugins/data_views/common'; import { handleErrors } from './util/handle_errors'; import { fieldSpecSchema, @@ -23,7 +24,28 @@ import { SERVICE_KEY_LEGACY, } from '../constants'; -const indexPatternSpecSchema = schema.object({ +interface CreateDataViewArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + spec: DataViewSpec; + override?: boolean; + refreshFields?: boolean; + counterName: string; +} + +export const createDataView = async ({ + dataViewsService, + usageCollection, + spec, + override, + refreshFields, + counterName, +}: CreateDataViewArgs) => { + usageCollection?.incrementCounter({ counterName }); + return dataViewsService.createAndSave(spec, override, !refreshFields); +}; + +const dataViewSpecSchema = schema.object({ title: schema.string(), version: schema.maybe(schema.string()), id: schema.maybe(schema.string()), @@ -59,7 +81,8 @@ const registerCreateDataViewRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.post( { @@ -68,9 +91,8 @@ const registerCreateDataViewRouteFactory = body: schema.object({ override: schema.maybe(schema.boolean({ defaultValue: false })), refresh_fields: schema.maybe(schema.boolean({ defaultValue: false })), - data_view: serviceKey === SERVICE_KEY ? indexPatternSpecSchema : schema.never(), - index_pattern: - serviceKey === SERVICE_KEY_LEGACY ? indexPatternSpecSchema : schema.never(), + data_view: serviceKey === SERVICE_KEY ? dataViewSpecSchema : schema.never(), + index_pattern: serviceKey === SERVICE_KEY_LEGACY ? dataViewSpecSchema : schema.never(), }), }, }, @@ -79,7 +101,8 @@ const registerCreateDataViewRouteFactory = const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req @@ -88,19 +111,22 @@ const registerCreateDataViewRouteFactory = const spec = serviceKey === SERVICE_KEY ? body.data_view : body.index_pattern; - const indexPattern = await indexPatternsService.createAndSave( - spec as DataViewSpec, - body.override, - !body.refresh_fields - ); + const dataView = await createDataView({ + dataViewsService, + usageCollection, + spec: spec as DataViewSpec, + override: body.override, + refreshFields: body.refresh_fields, + counterName: `${req.route.method} ${path}`, + }); return res.ok({ headers: { 'content-type': 'application/json', }, - body: JSON.stringify({ - [serviceKey]: indexPattern.toSpec(), - }), + body: { + [serviceKey]: dataView.toSpec(), + }, }); }) ) diff --git a/src/plugins/data_views/server/rest_api_routes/default_data_view.test.ts b/src/plugins/data_views/server/rest_api_routes/default_data_view.test.ts new file mode 100644 index 0000000000000..58252b6e971a1 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/default_data_view.test.ts @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { setDefault, getDefault } from './default_data_view'; +import { dataViewsService } from '../mocks'; +import { getUsageCollection } from './test_utils'; + +describe('default data view', () => { + it('set - calls usageCollection', () => { + const usageCollection = getUsageCollection(); + setDefault({ + dataViewsService, + counterName: 'POST /path', + usageCollection, + newDefaultId: '1', + force: false, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); + + it('get - calls usageCollection', () => { + const usageCollection = getUsageCollection(); + getDefault({ + dataViewsService, + counterName: 'GET /path', + usageCollection, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/default_index_pattern.ts b/src/plugins/data_views/server/rest_api_routes/default_data_view.ts similarity index 65% rename from src/plugins/data_views/server/routes/default_index_pattern.ts rename to src/plugins/data_views/server/rest_api_routes/default_data_view.ts index ae6653e638ef6..b2f6c3b633724 100644 --- a/src/plugins/data_views/server/routes/default_index_pattern.ts +++ b/src/plugins/data_views/server/rest_api_routes/default_data_view.ts @@ -6,12 +6,48 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { schema } from '@kbn/config-schema'; +import { DataViewsService } from 'src/plugins/data_views/common'; import { IRouter, StartServicesAccessor } from '../../../../core/server'; import type { DataViewsServerPluginStartDependencies, DataViewsServerPluginStart } from '../types'; import { handleErrors } from './util/handle_errors'; import { SERVICE_PATH, SERVICE_PATH_LEGACY, SERVICE_KEY, SERVICE_KEY_LEGACY } from '../constants'; +interface GetDefaultArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; +} + +export const getDefault = async ({ + dataViewsService, + usageCollection, + counterName, +}: GetDefaultArgs) => { + usageCollection?.incrementCounter({ counterName }); + return dataViewsService.getDefaultId(); +}; + +interface SetDefaultArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + newDefaultId: string; + force: boolean; +} + +export const setDefault = async ({ + dataViewsService, + usageCollection, + counterName, + newDefaultId, + force, +}: SetDefaultArgs) => { + usageCollection?.incrementCounter({ counterName }); + return dataViewsService.setDefault(newDefaultId, force); +}; + const manageDefaultIndexPatternRoutesFactory = (path: string, serviceKey: string) => ( @@ -19,7 +55,8 @@ const manageDefaultIndexPatternRoutesFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.get( { @@ -30,17 +67,21 @@ const manageDefaultIndexPatternRoutesFactory = const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req ); - const defaultIndexPatternId = await indexPatternsService.getDefaultId(); + const id = await getDefault({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + }); return res.ok({ body: { - [`${serviceKey}_id`]: defaultIndexPatternId, + [`${serviceKey}_id`]: id, }, }); }) @@ -65,7 +106,7 @@ const manageDefaultIndexPatternRoutesFactory = const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req @@ -74,7 +115,13 @@ const manageDefaultIndexPatternRoutesFactory = const newDefaultId = req.body[`${serviceKey}_id`] as string; const force = req.body.force as boolean; - await indexPatternsService.setDefault(newDefaultId, force); + await setDefault({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + newDefaultId, + force, + }); return res.ok({ body: { diff --git a/src/plugins/data_views/server/rest_api_routes/delete_data_view.test.ts b/src/plugins/data_views/server/rest_api_routes/delete_data_view.test.ts new file mode 100644 index 0000000000000..67fbd7d6a00b7 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/delete_data_view.test.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { deleteDataView } from './delete_data_view'; +import { dataViewsService } from '../mocks'; +import { getUsageCollection } from './test_utils'; + +describe('delete data view', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + deleteDataView({ + dataViewsService, + counterName: 'DELETE /path', + usageCollection, + id: '1', + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/delete_index_pattern.ts b/src/plugins/data_views/server/rest_api_routes/delete_data_view.ts similarity index 72% rename from src/plugins/data_views/server/routes/delete_index_pattern.ts rename to src/plugins/data_views/server/rest_api_routes/delete_data_view.ts index 077795a6b7c36..277fb7daf9e5d 100644 --- a/src/plugins/data_views/server/routes/delete_index_pattern.ts +++ b/src/plugins/data_views/server/rest_api_routes/delete_data_view.ts @@ -6,12 +6,31 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { schema } from '@kbn/config-schema'; +import { DataViewsService } from 'src/plugins/data_views/common'; import { handleErrors } from './util/handle_errors'; import { IRouter, StartServicesAccessor } from '../../../../core/server'; import type { DataViewsServerPluginStartDependencies, DataViewsServerPluginStart } from '../types'; import { SPECIFIC_DATA_VIEW_PATH, SPECIFIC_DATA_VIEW_PATH_LEGACY } from '../constants'; +interface DeleteDataViewArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; +} + +export const deleteDataView = async ({ + dataViewsService, + usageCollection, + counterName, + id, +}: DeleteDataViewArgs) => { + usageCollection?.incrementCounter({ counterName }); + return dataViewsService.delete(id); +}; + const deleteIndexPatternRouteFactory = (path: string) => ( @@ -19,7 +38,8 @@ const deleteIndexPatternRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.delete( { @@ -41,14 +61,19 @@ const deleteIndexPatternRouteFactory = const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req ); const id = req.params.id; - await indexPatternsService.delete(id); + await deleteDataView({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + id, + }); return res.ok({ headers: { diff --git a/src/plugins/data_views/server/rest_api_routes/fields/index.ts b/src/plugins/data_views/server/rest_api_routes/fields/index.ts new file mode 100644 index 0000000000000..42e13efc0642b --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/fields/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './update_fields'; diff --git a/src/plugins/data_views/server/rest_api_routes/fields/update_fields.test.ts b/src/plugins/data_views/server/rest_api_routes/fields/update_fields.test.ts new file mode 100644 index 0000000000000..caf673ebbf3d9 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/fields/update_fields.test.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { updateFields } from './update_fields'; +import { dataViewsService } from '../../mocks'; +import { getUsageCollection } from '../test_utils'; +import { DataView } from 'src/plugins/data_views/common'; + +describe('create runtime field', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + + dataViewsService.get.mockImplementation( + async (id: string) => + ({ + addRuntimeField: jest.fn(), + setFieldCount: jest.fn(), + fields: { + getByName: jest.fn().mockReturnValueOnce(undefined).mockReturnValueOnce({}), + }, + } as unknown as DataView) + ); + + updateFields({ + dataViewsService, + counterName: 'POST /path', + usageCollection, + id: 'dataViewId', + fields: { thisField: { count: 1 } }, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/fields/update_fields.ts b/src/plugins/data_views/server/rest_api_routes/fields/update_fields.ts similarity index 51% rename from src/plugins/data_views/server/routes/fields/update_fields.ts rename to src/plugins/data_views/server/rest_api_routes/fields/update_fields.ts index 7b0e83dbf2e9b..8e1d1686e2e24 100644 --- a/src/plugins/data_views/server/routes/fields/update_fields.ts +++ b/src/plugins/data_views/server/rest_api_routes/fields/update_fields.ts @@ -6,10 +6,13 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; +import { DataViewsService } from 'src/plugins/data_views/common'; import { schema } from '@kbn/config-schema'; import { handleErrors } from '../util/handle_errors'; import { serializedFieldFormatSchema } from '../util/schemas'; import { IRouter, StartServicesAccessor } from '../../../../../core/server'; +import { FieldFormatParams, SerializedFieldFormat } from '../../../../field_formats/common'; import type { DataViewsServerPluginStartDependencies, DataViewsServerPluginStart, @@ -21,13 +24,89 @@ import { SERVICE_KEY_LEGACY, } from '../../constants'; +interface UpdateFieldsArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; + fields: Record; +} + +export const updateFields = async ({ + dataViewsService, + usageCollection, + counterName, + id, + fields, +}: UpdateFieldsArgs) => { + usageCollection?.incrementCounter({ counterName }); + const dataView = await dataViewsService.get(id); + + const fieldNames = Object.keys(fields); + + if (fieldNames.length < 1) { + throw new Error('No fields provided.'); + } + + let changeCount = 0; + for (const fieldName of fieldNames) { + const field = fields[fieldName]; + + if (field.customLabel !== undefined) { + changeCount++; + dataView.setFieldCustomLabel(fieldName, field.customLabel); + } + + if (field.count !== undefined) { + changeCount++; + dataView.setFieldCount(fieldName, field.count); + } + + if (field.format !== undefined) { + changeCount++; + if (field.format) { + dataView.setFieldFormat(fieldName, field.format); + } else { + dataView.deleteFieldFormat(fieldName); + } + } + } + + if (changeCount < 1) { + throw new Error('Change set is empty.'); + } + + await dataViewsService.updateSavedObject(dataView); + return dataView; +}; + +interface FieldUpdateType { + customLabel?: string | null; + count?: number | null; + format?: SerializedFieldFormat | null; +} + +const fieldUpdateSchema = schema.object({ + customLabel: schema.maybe( + schema.nullable( + schema.string({ + minLength: 1, + maxLength: 1_000, + }) + ) + ), + count: schema.maybe(schema.nullable(schema.number())), + format: schema.maybe(schema.nullable(serializedFieldFormatSchema)), +}); + const updateFieldsActionRouteFactory = (path: string, serviceKey: string) => { return ( router: IRouter, getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.post( { @@ -48,18 +127,7 @@ const updateFieldsActionRouteFactory = (path: string, serviceKey: string) => { minLength: 1, maxLength: 1_000, }), - schema.object({ - customLabel: schema.maybe( - schema.nullable( - schema.string({ - minLength: 1, - maxLength: 1_000, - }) - ) - ), - count: schema.maybe(schema.nullable(schema.number())), - format: schema.maybe(schema.nullable(serializedFieldFormatSchema)), - }) + fieldUpdateSchema ), }), }, @@ -69,58 +137,29 @@ const updateFieldsActionRouteFactory = (path: string, serviceKey: string) => { const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req ); const id = req.params.id; const { fields } = req.body; - const fieldNames = Object.keys(fields); - - if (fieldNames.length < 1) { - throw new Error('No fields provided.'); - } - - const indexPattern = await indexPatternsService.get(id); - - let changeCount = 0; - for (const fieldName of fieldNames) { - const field = fields[fieldName]; - - if (field.customLabel !== undefined) { - changeCount++; - indexPattern.setFieldCustomLabel(fieldName, field.customLabel); - } - if (field.count !== undefined) { - changeCount++; - indexPattern.setFieldCount(fieldName, field.count); - } - - if (field.format !== undefined) { - changeCount++; - if (field.format) { - indexPattern.setFieldFormat(fieldName, field.format); - } else { - indexPattern.deleteFieldFormat(fieldName); - } - } - } - - if (changeCount < 1) { - throw new Error('Change set is empty.'); - } - - await indexPatternsService.updateSavedObject(indexPattern); + const dataView = await updateFields({ + dataViewsService, + usageCollection, + id, + fields, + counterName: `${req.route.method} ${path}`, + }); return res.ok({ headers: { 'content-type': 'application/json', }, - body: JSON.stringify({ - [serviceKey]: indexPattern.toSpec(), - }), + body: { + [serviceKey]: dataView.toSpec(), + }, }); }) ) diff --git a/src/plugins/data_views/server/rest_api_routes/get_data_view.test.ts b/src/plugins/data_views/server/rest_api_routes/get_data_view.test.ts new file mode 100644 index 0000000000000..da3c8f3cf94a3 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/get_data_view.test.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getDataView } from './get_data_view'; +import { dataViewsService } from '../mocks'; +import { getUsageCollection } from './test_utils'; + +describe('get default data view', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + getDataView({ + dataViewsService, + counterName: 'GET /path', + usageCollection, + id: '1', + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/get_index_pattern.ts b/src/plugins/data_views/server/rest_api_routes/get_data_view.ts similarity index 70% rename from src/plugins/data_views/server/routes/get_index_pattern.ts rename to src/plugins/data_views/server/rest_api_routes/get_data_view.ts index 40e67e972f5d7..e943165adebab 100644 --- a/src/plugins/data_views/server/routes/get_index_pattern.ts +++ b/src/plugins/data_views/server/rest_api_routes/get_data_view.ts @@ -6,7 +6,9 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { schema } from '@kbn/config-schema'; +import { DataViewsService } from 'src/plugins/data_views/common'; import { handleErrors } from './util/handle_errors'; import { IRouter, StartServicesAccessor } from '../../../../core/server'; import type { DataViewsServerPluginStartDependencies, DataViewsServerPluginStart } from '../types'; @@ -17,6 +19,23 @@ import { SERVICE_KEY_LEGACY, } from '../constants'; +interface GetDataViewArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; +} + +export const getDataView = async ({ + dataViewsService, + usageCollection, + counterName, + id, +}: GetDataViewArgs) => { + usageCollection?.incrementCounter({ counterName }); + return dataViewsService.get(id); +}; + const getDataViewRouteFactory = (path: string, serviceKey: string) => ( @@ -24,7 +43,8 @@ const getDataViewRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.get( { @@ -46,21 +66,27 @@ const getDataViewRouteFactory = const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req ); const id = req.params.id; - const indexPattern = await indexPatternsService.get(id); + + const dataView = await getDataView({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + id, + }); return res.ok({ headers: { 'content-type': 'application/json', }, - body: JSON.stringify({ - [serviceKey]: indexPattern.toSpec(), - }), + body: { + [serviceKey]: dataView.toSpec(), + }, }); }) ) diff --git a/src/plugins/data_views/server/rest_api_routes/has_user_data_view.test.ts b/src/plugins/data_views/server/rest_api_routes/has_user_data_view.test.ts new file mode 100644 index 0000000000000..53309d2f2d237 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/has_user_data_view.test.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { hasUserDataView } from './has_user_data_view'; +import { dataViewsService } from '../mocks'; +import { getUsageCollection } from './test_utils'; + +describe('get default data view', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + hasUserDataView({ + dataViewsService, + counterName: 'GET /path', + usageCollection, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/has_user_index_pattern.ts b/src/plugins/data_views/server/rest_api_routes/has_user_data_view.ts similarity index 67% rename from src/plugins/data_views/server/routes/has_user_index_pattern.ts rename to src/plugins/data_views/server/rest_api_routes/has_user_data_view.ts index 883a7ff3111ae..f684f346dbd6d 100644 --- a/src/plugins/data_views/server/routes/has_user_index_pattern.ts +++ b/src/plugins/data_views/server/rest_api_routes/has_user_data_view.ts @@ -6,11 +6,28 @@ * Side Public License, v 1. */ +import { DataViewsService } from 'src/plugins/data_views/common'; +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { handleErrors } from './util/handle_errors'; import { IRouter, StartServicesAccessor } from '../../../../core/server'; import type { DataViewsServerPluginStartDependencies, DataViewsServerPluginStart } from '../types'; import { SERVICE_PATH, SERVICE_PATH_LEGACY } from '../constants'; +interface HasUserDataViewArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; +} + +export const hasUserDataView = async ({ + dataViewsService, + usageCollection, + counterName, +}: HasUserDataViewArgs) => { + usageCollection?.incrementCounter({ counterName }); + return dataViewsService.hasUserDataView(); +}; + const hasUserDataViewRouteFactory = (path: string) => ( @@ -18,7 +35,8 @@ const hasUserDataViewRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.get( { @@ -30,15 +48,22 @@ const hasUserDataViewRouteFactory = const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req ); + const result = await hasUserDataView({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + }); + return res.ok({ body: { - result: await indexPatternsService.hasUserDataView(), + result, }, }); }) diff --git a/src/plugins/data_views/server/rest_api_routes/index.ts b/src/plugins/data_views/server/rest_api_routes/index.ts new file mode 100644 index 0000000000000..3ed0ac6608e1e --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/index.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import * as fieldRoutes from './fields'; +import * as runtimeRoutes from './runtime_fields'; +import * as scriptedRoutes from './scripted_fields'; + +import * as createRoutes from './create_data_view'; +import * as defaultRoutes from './default_data_view'; +import * as deleteRoutes from './delete_data_view'; +import * as getRoutes from './get_data_view'; +import * as hasRoutes from './has_user_data_view'; +import * as updateRoutes from './update_data_view'; + +const routes = [ + fieldRoutes.registerUpdateFieldsRoute, + fieldRoutes.registerUpdateFieldsRouteLegacy, + runtimeRoutes.registerCreateRuntimeFieldRoute, + runtimeRoutes.registerCreateRuntimeFieldRouteLegacy, + runtimeRoutes.registerDeleteRuntimeFieldRoute, + runtimeRoutes.registerDeleteRuntimeFieldRouteLegacy, + runtimeRoutes.registerGetRuntimeFieldRoute, + runtimeRoutes.registerGetRuntimeFieldRouteLegacy, + runtimeRoutes.registerPutRuntimeFieldRoute, + runtimeRoutes.registerPutRuntimeFieldRouteLegacy, + runtimeRoutes.registerUpdateRuntimeFieldRoute, + runtimeRoutes.registerUpdateRuntimeFieldRouteLegacy, + createRoutes.registerCreateDataViewRoute, + createRoutes.registerCreateDataViewRouteLegacy, + defaultRoutes.registerManageDefaultDataViewRoute, + defaultRoutes.registerManageDefaultDataViewRouteLegacy, + deleteRoutes.registerDeleteDataViewRoute, + deleteRoutes.registerDeleteDataViewRouteLegacy, + getRoutes.registerGetDataViewRoute, + getRoutes.registerGetDataViewRouteLegacy, + hasRoutes.registerHasUserDataViewRoute, + hasRoutes.registerHasUserDataViewRouteLegacy, + updateRoutes.registerUpdateDataViewRoute, + updateRoutes.registerUpdateDataViewRouteLegacy, + ...Object.values(scriptedRoutes), +]; + +export { routes }; diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/__snapshots__/response_formatter.test.ts.snap b/src/plugins/data_views/server/rest_api_routes/runtime_fields/__snapshots__/response_formatter.test.ts.snap new file mode 100644 index 0000000000000..12fcb0786df1b --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/__snapshots__/response_formatter.test.ts.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`responseFormatter returns correct format 1`] = ` +Object { + "body": Object { + "SERVICE_KEY": Object { + "title": "dataView", + }, + "fields": Array [ + Object { + "name": "field", + }, + ], + }, +} +`; + +exports[`responseFormatter returns correct format for legacy 1`] = ` +Object { + "body": Object { + "SERVICE_KEY_LEGACY": Object { + "title": "dataView", + }, + "field": Object { + "name": "field", + }, + }, +} +`; diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/create_runtime_field.test.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/create_runtime_field.test.ts new file mode 100644 index 0000000000000..555cbaad32252 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/create_runtime_field.test.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { createRuntimeField } from './create_runtime_field'; +import { dataViewsService } from '../../mocks'; +import { getUsageCollection } from '../test_utils'; +import { DataView } from 'src/plugins/data_views/common'; + +describe('create runtime field', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + + dataViewsService.get.mockImplementation( + async (id: string) => + ({ + addRuntimeField: jest.fn(), + fields: { + getByName: jest.fn().mockReturnValueOnce(undefined).mockReturnValueOnce({}), + }, + } as unknown as DataView) + ); + + createRuntimeField({ + dataViewsService, + counterName: 'POST /path', + usageCollection, + id: 'dataViewId', + name: 'fieldName', + runtimeField: { + type: 'keyword', + }, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/runtime_fields/create_runtime_field.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/create_runtime_field.ts similarity index 58% rename from src/plugins/data_views/server/routes/runtime_fields/create_runtime_field.ts rename to src/plugins/data_views/server/rest_api_routes/runtime_fields/create_runtime_field.ts index 41890dd1c5f31..d8f20c9ea6daf 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/create_runtime_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/create_runtime_field.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; +import { DataViewsService, RuntimeField } from 'src/plugins/data_views/common'; import { schema } from '@kbn/config-schema'; import { handleErrors } from '../util/handle_errors'; import { runtimeFieldSpecSchema } from '../util/schemas'; @@ -21,6 +23,41 @@ import { SERVICE_KEY_LEGACY, SERVICE_KEY_TYPE, } from '../../constants'; +import { responseFormatter } from './response_formatter'; + +interface CreateRuntimeFieldArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; + name: string; + runtimeField: RuntimeField; +} + +export const createRuntimeField = async ({ + dataViewsService, + usageCollection, + counterName, + id, + name, + runtimeField, +}: CreateRuntimeFieldArgs) => { + usageCollection?.incrementCounter({ counterName }); + const dataView = await dataViewsService.get(id); + + if (dataView.fields.getByName(name)) { + throw new Error(`Field [name = ${name}] already exists.`); + } + + dataView.addRuntimeField(name, runtimeField); + + const field = dataView.fields.getByName(name); + if (!field) throw new Error(`Could not create a field [name = ${name}].`); + + await dataViewsService.updateSavedObject(dataView); + + return { dataView, field }; +}; const runtimeCreateFieldRouteFactory = (path: string, serviceKey: SERVICE_KEY_TYPE) => @@ -29,7 +66,8 @@ const runtimeCreateFieldRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.post( { @@ -53,8 +91,8 @@ const runtimeCreateFieldRouteFactory = handleErrors(async (ctx, req, res) => { const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; - const [, , { indexPatternsServiceFactory }] = await getStartServices(); - const indexPatternsService = await indexPatternsServiceFactory( + const [, , { dataViewsServiceFactory }] = await getStartServices(); + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req @@ -62,37 +100,16 @@ const runtimeCreateFieldRouteFactory = const id = req.params.id; const { name, runtimeField } = req.body; - const indexPattern = await indexPatternsService.get(id); - - if (indexPattern.fields.getByName(name)) { - throw new Error(`Field [name = ${name}] already exists.`); - } - - indexPattern.addRuntimeField(name, runtimeField); - - const addedField = indexPattern.fields.getByName(name); - if (!addedField) throw new Error(`Could not create a field [name = ${name}].`); - - await indexPatternsService.updateSavedObject(indexPattern); - - const savedField = indexPattern.fields.getByName(name); - if (!savedField) throw new Error(`Could not create a field [name = ${name}].`); - - const response = { - body: { - fields: [savedField.toSpec()], - [serviceKey]: indexPattern.toSpec(), - }, - }; - - const legacyResponse = { - body: { - [serviceKey]: indexPattern.toSpec(), - field: savedField.toSpec(), - }, - }; + const { dataView, field } = await createRuntimeField({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + id, + name, + runtimeField, + }); - return res.ok(serviceKey === SERVICE_KEY_LEGACY ? legacyResponse : response); + return res.ok(responseFormatter({ serviceKey, dataView, field })); }) ); }; diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/delete_runtime_field.test.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/delete_runtime_field.test.ts new file mode 100644 index 0000000000000..10fa4d63f3441 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/delete_runtime_field.test.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { deleteRuntimeField } from './delete_runtime_field'; +import { dataViewsService } from '../../mocks'; +import { getUsageCollection } from '../test_utils'; +import { DataView } from 'src/plugins/data_views/common'; + +describe('delete runtime field', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + + dataViewsService.get.mockImplementation( + async (id: string) => + ({ + removeRuntimeField: jest.fn(), + fields: { + getByName: jest.fn().mockReturnValueOnce({ + runtimeField: {}, + }), + }, + } as unknown as DataView) + ); + + deleteRuntimeField({ + dataViewsService, + counterName: 'DELETE /path', + usageCollection, + id: 'dataViewId', + name: 'fieldName', + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/runtime_fields/delete_runtime_field.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/delete_runtime_field.ts similarity index 62% rename from src/plugins/data_views/server/routes/runtime_fields/delete_runtime_field.ts rename to src/plugins/data_views/server/rest_api_routes/runtime_fields/delete_runtime_field.ts index 4c68a91e8f743..706fe49582b5a 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/delete_runtime_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/delete_runtime_field.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; +import { DataViewsService } from 'src/plugins/data_views/common'; import { schema } from '@kbn/config-schema'; import { ErrorIndexPatternFieldNotFound } from '../../error'; import { handleErrors } from '../util/handle_errors'; @@ -16,6 +18,38 @@ import type { } from '../../types'; import { SPECIFIC_RUNTIME_FIELD_PATH, SPECIFIC_RUNTIME_FIELD_PATH_LEGACY } from '../../constants'; +interface DeleteRuntimeFieldArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; + name: string; +} + +export const deleteRuntimeField = async ({ + dataViewsService, + usageCollection, + counterName, + id, + name, +}: DeleteRuntimeFieldArgs) => { + usageCollection?.incrementCounter({ counterName }); + const dataView = await dataViewsService.get(id); + const field = dataView.fields.getByName(name); + + if (!field) { + throw new ErrorIndexPatternFieldNotFound(id, name); + } + + if (!field.runtimeField) { + throw new Error('Only runtime fields can be deleted.'); + } + + dataView.removeRuntimeField(name); + + await dataViewsService.updateSavedObject(dataView); +}; + const deleteRuntimeFieldRouteFactory = (path: string) => ( @@ -23,7 +57,8 @@ const deleteRuntimeFieldRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.delete( { @@ -44,8 +79,8 @@ const deleteRuntimeFieldRouteFactory = handleErrors(async (ctx, req, res) => { const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; - const [, , { indexPatternsServiceFactory }] = await getStartServices(); - const indexPatternsService = await indexPatternsServiceFactory( + const [, , { dataViewsServiceFactory }] = await getStartServices(); + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req @@ -53,20 +88,13 @@ const deleteRuntimeFieldRouteFactory = const id = req.params.id; const name = req.params.name; - const indexPattern = await indexPatternsService.get(id); - const field = indexPattern.fields.getByName(name); - - if (!field) { - throw new ErrorIndexPatternFieldNotFound(id, name); - } - - if (!field.runtimeField) { - throw new Error('Only runtime fields can be deleted.'); - } - - indexPattern.removeRuntimeField(name); - - await indexPatternsService.updateSavedObject(indexPattern); + await deleteRuntimeField({ + dataViewsService, + usageCollection, + id, + name, + counterName: `${req.route.method} ${path}`, + }); return res.ok(); }) diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/get_runtime_field.test.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/get_runtime_field.test.ts new file mode 100644 index 0000000000000..4e75e7b0d6f2c --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/get_runtime_field.test.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getRuntimeField } from './get_runtime_field'; +import { dataViewsService } from '../../mocks'; +import { getUsageCollection } from '../test_utils'; +import { DataView } from 'src/plugins/data_views/common'; + +describe('get runtime field', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + + dataViewsService.get.mockImplementation( + async (id: string) => + ({ + fields: { + getByName: jest.fn().mockReturnValueOnce({ + runtimeField: {}, + }), + }, + } as unknown as DataView) + ); + + getRuntimeField({ + dataViewsService, + counterName: 'GET /path', + usageCollection, + id: 'dataViewId', + name: 'fieldName', + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/runtime_fields/get_runtime_field.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/get_runtime_field.ts similarity index 61% rename from src/plugins/data_views/server/routes/runtime_fields/get_runtime_field.ts rename to src/plugins/data_views/server/rest_api_routes/runtime_fields/get_runtime_field.ts index e79aa9cb76fbe..bcb9e93152626 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/get_runtime_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/get_runtime_field.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; +import { DataViewsService } from 'src/plugins/data_views/common'; import { schema } from '@kbn/config-schema'; import { ErrorIndexPatternFieldNotFound } from '../../error'; import { handleErrors } from '../util/handle_errors'; @@ -21,6 +23,38 @@ import { SERVICE_KEY_LEGACY, SERVICE_KEY_TYPE, } from '../../constants'; +import { responseFormatter } from './response_formatter'; + +interface GetRuntimeFieldArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; + name: string; +} + +export const getRuntimeField = async ({ + dataViewsService, + usageCollection, + counterName, + id, + name, +}: GetRuntimeFieldArgs) => { + usageCollection?.incrementCounter({ counterName }); + const dataView = await dataViewsService.get(id); + + const field = dataView.fields.getByName(name); + + if (!field) { + throw new ErrorIndexPatternFieldNotFound(id, name); + } + + if (!field.runtimeField) { + throw new Error('Only runtime fields can be retrieved.'); + } + + return { dataView, field }; +}; const getRuntimeFieldRouteFactory = (path: string, serviceKey: SERVICE_KEY_TYPE) => @@ -29,7 +63,8 @@ const getRuntimeFieldRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.get( { @@ -51,8 +86,8 @@ const getRuntimeFieldRouteFactory = handleErrors(async (ctx, req, res) => { const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; - const [, , { indexPatternsServiceFactory }] = await getStartServices(); - const indexPatternsService = await indexPatternsServiceFactory( + const [, , { dataViewsServiceFactory }] = await getStartServices(); + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req @@ -60,33 +95,15 @@ const getRuntimeFieldRouteFactory = const id = req.params.id; const name = req.params.name; - const indexPattern = await indexPatternsService.get(id); - - const field = indexPattern.fields.getByName(name); - - if (!field) { - throw new ErrorIndexPatternFieldNotFound(id, name); - } - - if (!field.runtimeField) { - throw new Error('Only runtime fields can be retrieved.'); - } - - const legacyResponse = { - body: { - field: field.toSpec(), - runtimeField: indexPattern.getRuntimeField(name), - }, - }; - - const response = { - body: { - fields: [field.toSpec()], - runtimeField: indexPattern.getRuntimeField(name), - }, - }; + const { dataView, field } = await getRuntimeField({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + id, + name, + }); - return res.ok(serviceKey === SERVICE_KEY_LEGACY ? legacyResponse : response); + return res.ok(responseFormatter({ serviceKey, dataView, field })); }) ); }; diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/index.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/index.ts new file mode 100644 index 0000000000000..90c4ab7acc3a1 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './create_runtime_field'; +export * from './delete_runtime_field'; +export * from './get_runtime_field'; +export * from './put_runtime_field'; +export * from './update_runtime_field'; diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/put_runtime_field.test.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/put_runtime_field.test.ts new file mode 100644 index 0000000000000..62d56d46d38fa --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/put_runtime_field.test.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { putRuntimeField } from './put_runtime_field'; +import { dataViewsService } from '../../mocks'; +import { getUsageCollection } from '../test_utils'; +import { DataView } from 'src/plugins/data_views/common'; + +describe('put runtime field', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + + dataViewsService.get.mockImplementation( + async (id: string) => + ({ + removeRuntimeField: jest.fn(), + addRuntimeField: jest.fn(), + fields: { + getByName: jest.fn().mockReturnValue({ + runtimeField: {}, + }), + }, + } as unknown as DataView) + ); + + putRuntimeField({ + dataViewsService, + counterName: 'PUT /path', + usageCollection, + id: 'dataViewId', + name: 'fieldName', + runtimeField: { + type: 'keyword', + }, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/runtime_fields/put_runtime_field.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/put_runtime_field.ts similarity index 54% rename from src/plugins/data_views/server/routes/runtime_fields/put_runtime_field.ts rename to src/plugins/data_views/server/rest_api_routes/runtime_fields/put_runtime_field.ts index 7acd212f4f09c..cf6b05c378e14 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/put_runtime_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/put_runtime_field.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; +import { DataViewsService, RuntimeField } from 'src/plugins/data_views/common'; import { schema } from '@kbn/config-schema'; import { handleErrors } from '../util/handle_errors'; import { runtimeFieldSpecSchema } from '../util/schemas'; @@ -19,16 +21,59 @@ import { RUNTIME_FIELD_PATH_LEGACY, SERVICE_KEY, SERVICE_KEY_LEGACY, + SERVICE_KEY_TYPE, } from '../../constants'; +import { responseFormatter } from './response_formatter'; + +interface PutRuntimeFieldArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; + name: string; + runtimeField: RuntimeField; +} + +export const putRuntimeField = async ({ + dataViewsService, + usageCollection, + counterName, + id, + name, + runtimeField, +}: PutRuntimeFieldArgs) => { + usageCollection?.incrementCounter({ counterName }); + const dataView = await dataViewsService.get(id); + + const oldFieldObject = dataView.fields.getByName(name); + + if (oldFieldObject && !oldFieldObject.runtimeField) { + throw new Error('Only runtime fields can be updated'); + } + + if (oldFieldObject) { + dataView.removeRuntimeField(name); + } + + dataView.addRuntimeField(name, runtimeField); + + await dataViewsService.updateSavedObject(dataView); + + const field = dataView.fields.getByName(name); + if (!field) throw new Error(`Could not create a field [name = ${name}].`); + + return { dataView, field }; +}; const putRuntimeFieldRouteFactory = - (path: string, serviceKey: string) => + (path: string, serviceKey: SERVICE_KEY_TYPE) => ( router: IRouter, getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.put( { @@ -52,8 +97,8 @@ const putRuntimeFieldRouteFactory = handleErrors(async (ctx, req, res) => { const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; - const [, , { indexPatternsServiceFactory }] = await getStartServices(); - const indexPatternsService = await indexPatternsServiceFactory( + const [, , { dataViewsServiceFactory }] = await getStartServices(); + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req @@ -61,40 +106,16 @@ const putRuntimeFieldRouteFactory = const id = req.params.id; const { name, runtimeField } = req.body; - const indexPattern = await indexPatternsService.get(id); - - const oldFieldObject = indexPattern.fields.getByName(name); - - if (oldFieldObject && !oldFieldObject.runtimeField) { - throw new Error('Only runtime fields can be updated'); - } - - if (oldFieldObject) { - indexPattern.removeRuntimeField(name); - } - - indexPattern.addRuntimeField(name, runtimeField); - - await indexPatternsService.updateSavedObject(indexPattern); - - const fieldObject = indexPattern.fields.getByName(name); - if (!fieldObject) throw new Error(`Could not create a field [name = ${name}].`); - - const legacyResponse = { - body: { - field: fieldObject.toSpec(), - [serviceKey]: indexPattern.toSpec(), - }, - }; - - const response = { - body: { - fields: [fieldObject.toSpec()], - [serviceKey]: indexPattern.toSpec(), - }, - }; + const { dataView, field } = await putRuntimeField({ + dataViewsService, + id, + name, + runtimeField, + usageCollection, + counterName: `${req.route.method} ${path}`, + }); - return res.ok(serviceKey === SERVICE_KEY_LEGACY ? legacyResponse : response); + return res.ok(responseFormatter({ serviceKey, dataView, field })); }) ); }; diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/response_formatter.test.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/response_formatter.test.ts new file mode 100644 index 0000000000000..a2db82466868b --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/response_formatter.test.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { responseFormatter } from './response_formatter'; +import { SERVICE_KEY, SERVICE_KEY_LEGACY } from '../../constants'; +import { DataView, DataViewField } from 'src/plugins/data_views/common'; + +const dataView = { + toSpec: () => { + return { + title: 'dataView', + }; + }, +} as DataView; + +const field = { + toSpec: () => { + return { + name: 'field', + }; + }, +} as DataViewField; + +describe('responseFormatter', () => { + it('returns correct format', () => { + const response = responseFormatter({ + serviceKey: SERVICE_KEY, + dataView, + field, + }); + expect(response).toMatchSnapshot(); + }); + + it('returns correct format for legacy', () => { + const response = responseFormatter({ + serviceKey: SERVICE_KEY_LEGACY, + dataView, + field, + }); + expect(response).toMatchSnapshot(); + }); +}); diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/response_formatter.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/response_formatter.ts new file mode 100644 index 0000000000000..81e33e5290176 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/response_formatter.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DataView, DataViewField } from 'src/plugins/data_views/common'; +import { SERVICE_KEY_LEGACY, SERVICE_KEY_TYPE } from '../../constants'; + +interface ResponseFormatterArgs { + serviceKey: SERVICE_KEY_TYPE; + field: DataViewField; + dataView: DataView; +} + +export const responseFormatter = ({ serviceKey, field, dataView }: ResponseFormatterArgs) => { + const response = { + body: { + fields: [field.toSpec()], + SERVICE_KEY: dataView.toSpec(), + }, + }; + + const legacyResponse = { + body: { + SERVICE_KEY_LEGACY: dataView.toSpec(), + field: field.toSpec(), + }, + }; + + return serviceKey === SERVICE_KEY_LEGACY ? legacyResponse : response; +}; diff --git a/src/plugins/data_views/server/rest_api_routes/runtime_fields/update_runtime_field.test.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/update_runtime_field.test.ts new file mode 100644 index 0000000000000..e21c0775f79b2 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/update_runtime_field.test.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { updateRuntimeField } from './update_runtime_field'; +import { dataViewsService } from '../../mocks'; +import { getUsageCollection } from '../test_utils'; +import { DataView } from 'src/plugins/data_views/common'; + +describe('update runtime field', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + + dataViewsService.get.mockImplementation( + async (id: string) => + ({ + removeRuntimeField: jest.fn(), + addRuntimeField: jest.fn(), + getRuntimeField: jest.fn().mockReturnValue({}), + fields: { + getByName: jest.fn().mockReturnValue({ + runtimeField: {}, + }), + }, + } as unknown as DataView) + ); + + updateRuntimeField({ + dataViewsService, + counterName: 'POST /path', + usageCollection, + id: 'dataViewId', + name: 'fieldName', + runtimeField: { + type: 'keyword', + }, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/runtime_fields/update_runtime_field.ts b/src/plugins/data_views/server/rest_api_routes/runtime_fields/update_runtime_field.ts similarity index 61% rename from src/plugins/data_views/server/routes/runtime_fields/update_runtime_field.ts rename to src/plugins/data_views/server/rest_api_routes/runtime_fields/update_runtime_field.ts index 4cca07a59cfbd..d097408ec211d 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/update_runtime_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/runtime_fields/update_runtime_field.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { schema } from '@kbn/config-schema'; -import { RuntimeField } from 'src/plugins/data_views/common'; +import { DataViewsService, RuntimeField } from 'src/plugins/data_views/common'; import { ErrorIndexPatternFieldNotFound } from '../../error'; import { handleErrors } from '../util/handle_errors'; import { runtimeFieldSpec, runtimeFieldSpecTypeSchema } from '../util/schemas'; @@ -23,6 +24,45 @@ import { SERVICE_KEY_LEGACY, SERVICE_KEY_TYPE, } from '../../constants'; +import { responseFormatter } from './response_formatter'; + +interface UpdateRuntimeFieldArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + counterName: string; + id: string; + name: string; + runtimeField: Partial; +} + +export const updateRuntimeField = async ({ + dataViewsService, + usageCollection, + counterName, + id, + name, + runtimeField, +}: UpdateRuntimeFieldArgs) => { + usageCollection?.incrementCounter({ counterName }); + const dataView = await dataViewsService.get(id); + const existingRuntimeField = dataView.getRuntimeField(name); + + if (!existingRuntimeField) { + throw new ErrorIndexPatternFieldNotFound(id, name); + } + + dataView.removeRuntimeField(name); + dataView.addRuntimeField(name, { + ...existingRuntimeField, + ...runtimeField, + }); + + await dataViewsService.updateSavedObject(dataView); + + const field = dataView.fields.getByName(name); + if (!field) throw new Error(`Could not create a field [name = ${name}].`); + return { dataView, field }; +}; const updateRuntimeFieldRouteFactory = (path: string, serviceKey: SERVICE_KEY_TYPE) => @@ -31,7 +71,8 @@ const updateRuntimeFieldRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.post( { @@ -61,8 +102,8 @@ const updateRuntimeFieldRouteFactory = handleErrors(async (ctx, req, res) => { const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; - const [, , { indexPatternsServiceFactory }] = await getStartServices(); - const indexPatternsService = await indexPatternsServiceFactory( + const [, , { dataViewsServiceFactory }] = await getStartServices(); + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req @@ -71,39 +112,16 @@ const updateRuntimeFieldRouteFactory = const name = req.params.name; const runtimeField = req.body.runtimeField as Partial; - const indexPattern = await indexPatternsService.get(id); - const existingRuntimeField = indexPattern.getRuntimeField(name); - - if (!existingRuntimeField) { - throw new ErrorIndexPatternFieldNotFound(id, name); - } - - indexPattern.removeRuntimeField(name); - indexPattern.addRuntimeField(name, { - ...existingRuntimeField, - ...runtimeField, + const { dataView, field } = await updateRuntimeField({ + dataViewsService, + usageCollection, + counterName: `${req.route.method} ${path}`, + id, + name, + runtimeField, }); - await indexPatternsService.updateSavedObject(indexPattern); - - const fieldObject = indexPattern.fields.getByName(name); - if (!fieldObject) throw new Error(`Could not create a field [name = ${name}].`); - - const legacyResponse = { - body: { - field: fieldObject.toSpec(), - [serviceKey]: indexPattern.toSpec(), - }, - }; - - const response = { - body: { - fields: [fieldObject.toSpec()], - [serviceKey]: indexPattern.toSpec(), - }, - }; - - return res.ok(serviceKey === SERVICE_KEY_LEGACY ? legacyResponse : response); + return res.ok(responseFormatter({ serviceKey, dataView, field })); }) ); }; diff --git a/src/plugins/data_views/server/routes/scripted_fields/create_scripted_field.ts b/src/plugins/data_views/server/rest_api_routes/scripted_fields/create_scripted_field.ts similarity index 100% rename from src/plugins/data_views/server/routes/scripted_fields/create_scripted_field.ts rename to src/plugins/data_views/server/rest_api_routes/scripted_fields/create_scripted_field.ts diff --git a/src/plugins/data_views/server/routes/scripted_fields/delete_scripted_field.ts b/src/plugins/data_views/server/rest_api_routes/scripted_fields/delete_scripted_field.ts similarity index 100% rename from src/plugins/data_views/server/routes/scripted_fields/delete_scripted_field.ts rename to src/plugins/data_views/server/rest_api_routes/scripted_fields/delete_scripted_field.ts diff --git a/src/plugins/data_views/server/routes/scripted_fields/get_scripted_field.ts b/src/plugins/data_views/server/rest_api_routes/scripted_fields/get_scripted_field.ts similarity index 100% rename from src/plugins/data_views/server/routes/scripted_fields/get_scripted_field.ts rename to src/plugins/data_views/server/rest_api_routes/scripted_fields/get_scripted_field.ts diff --git a/src/plugins/data_views/server/rest_api_routes/scripted_fields/index.ts b/src/plugins/data_views/server/rest_api_routes/scripted_fields/index.ts new file mode 100644 index 0000000000000..20a9a8009ada7 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/scripted_fields/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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './create_scripted_field'; +export * from './delete_scripted_field'; +export * from './get_scripted_field'; +export * from './put_scripted_field'; +export * from './update_scripted_field'; diff --git a/src/plugins/data_views/server/routes/scripted_fields/put_scripted_field.ts b/src/plugins/data_views/server/rest_api_routes/scripted_fields/put_scripted_field.ts similarity index 100% rename from src/plugins/data_views/server/routes/scripted_fields/put_scripted_field.ts rename to src/plugins/data_views/server/rest_api_routes/scripted_fields/put_scripted_field.ts diff --git a/src/plugins/data_views/server/routes/scripted_fields/update_scripted_field.ts b/src/plugins/data_views/server/rest_api_routes/scripted_fields/update_scripted_field.ts similarity index 100% rename from src/plugins/data_views/server/routes/scripted_fields/update_scripted_field.ts rename to src/plugins/data_views/server/rest_api_routes/scripted_fields/update_scripted_field.ts diff --git a/src/plugins/data_views/server/rest_api_routes/test_utils.ts b/src/plugins/data_views/server/rest_api_routes/test_utils.ts new file mode 100644 index 0000000000000..3fea6a01a722a --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/test_utils.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const getUsageCollection = () => ({ + incrementCounter: jest.fn(), +}); diff --git a/src/plugins/data_views/server/rest_api_routes/update_data_view.test.ts b/src/plugins/data_views/server/rest_api_routes/update_data_view.test.ts new file mode 100644 index 0000000000000..cf0f7a1040858 --- /dev/null +++ b/src/plugins/data_views/server/rest_api_routes/update_data_view.test.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { updateDataView } from './update_data_view'; +import { dataViewsService } from '../mocks'; +import { getUsageCollection } from './test_utils'; + +describe('get default data view', () => { + it('call usageCollection', () => { + const usageCollection = getUsageCollection(); + updateDataView({ + dataViewsService, + counterName: 'GET /path', + usageCollection, + spec: { + title: 'kibana*', + }, + id: 'abc', + refreshFields: false, + }); + expect(usageCollection.incrementCounter).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/data_views/server/routes/update_index_pattern.ts b/src/plugins/data_views/server/rest_api_routes/update_data_view.ts similarity index 56% rename from src/plugins/data_views/server/routes/update_index_pattern.ts rename to src/plugins/data_views/server/rest_api_routes/update_data_view.ts index a9da81df7f911..ed3f75599b90a 100644 --- a/src/plugins/data_views/server/routes/update_index_pattern.ts +++ b/src/plugins/data_views/server/rest_api_routes/update_data_view.ts @@ -7,7 +7,8 @@ */ import { schema } from '@kbn/config-schema'; -import { DataViewSpec } from 'src/plugins/data_views/common'; +import { DataViewSpec, DataViewsService } from 'src/plugins/data_views/common'; +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { handleErrors } from './util/handle_errors'; import { fieldSpecSchema, @@ -41,6 +42,98 @@ const indexPatternUpdateSchema = schema.object({ runtimeFieldMap: schema.maybe(schema.recordOf(schema.string(), runtimeFieldSpecSchema)), }); +interface UpdateDataViewArgs { + dataViewsService: DataViewsService; + usageCollection?: UsageCounter; + spec: DataViewSpec; + id: string; + refreshFields: boolean; + counterName: string; +} + +export const updateDataView = async ({ + dataViewsService, + usageCollection, + spec, + id, + refreshFields, + counterName, +}: UpdateDataViewArgs) => { + usageCollection?.incrementCounter({ counterName }); + const dataView = await dataViewsService.get(id); + const { + title, + timeFieldName, + sourceFilters, + fieldFormats, + type, + typeMeta, + fields, + runtimeFieldMap, + } = spec; + + let changeCount = 0; + let doRefreshFields = false; + + if (title !== undefined && title !== dataView.title) { + changeCount++; + dataView.title = title; + } + + if (timeFieldName !== undefined && timeFieldName !== dataView.timeFieldName) { + changeCount++; + dataView.timeFieldName = timeFieldName; + } + + if (sourceFilters !== undefined) { + changeCount++; + dataView.sourceFilters = sourceFilters; + } + + if (fieldFormats !== undefined) { + changeCount++; + dataView.fieldFormatMap = fieldFormats; + } + + if (type !== undefined) { + changeCount++; + dataView.type = type; + } + + if (typeMeta !== undefined) { + changeCount++; + dataView.typeMeta = typeMeta; + } + + if (fields !== undefined) { + changeCount++; + doRefreshFields = true; + dataView.fields.replaceAll( + Object.values(fields || {}).map((field) => ({ + ...field, + aggregatable: true, + searchable: true, + })) + ); + } + + if (runtimeFieldMap !== undefined) { + changeCount++; + dataView.replaceAllRuntimeFields(runtimeFieldMap); + } + + if (changeCount < 1) { + throw new Error('Index pattern change set is empty.'); + } + + await dataViewsService.updateSavedObject(dataView); + + if (doRefreshFields && refreshFields) { + await dataViewsService.refreshFields(dataView); + } + return dataView; +}; + const updateDataViewRouteFactory = (path: string, serviceKey: string) => ( @@ -48,7 +141,8 @@ const updateDataViewRouteFactory = getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + usageCollection?: UsageCounter ) => { router.post( { @@ -74,99 +168,37 @@ const updateDataViewRouteFactory = const savedObjectsClient = ctx.core.savedObjects.client; const elasticsearchClient = ctx.core.elasticsearch.client.asCurrentUser; const [, , { dataViewsServiceFactory }] = await getStartServices(); - const indexPatternsService = await dataViewsServiceFactory( + + const dataViewsService = await dataViewsServiceFactory( savedObjectsClient, elasticsearchClient, req ); const id = req.params.id; - const indexPattern = await indexPatternsService.get(id); - const { // eslint-disable-next-line @typescript-eslint/naming-convention refresh_fields = true, } = req.body; - const indexPatternSpec = req.body[serviceKey] as DataViewSpec; - const { - title, - timeFieldName, - sourceFilters, - fieldFormats, - type, - typeMeta, - fields, - runtimeFieldMap, - } = indexPatternSpec; - - let changeCount = 0; - let doRefreshFields = false; - - if (title !== undefined && title !== indexPattern.title) { - changeCount++; - indexPattern.title = title; - } - - if (timeFieldName !== undefined && timeFieldName !== indexPattern.timeFieldName) { - changeCount++; - indexPattern.timeFieldName = timeFieldName; - } - - if (sourceFilters !== undefined) { - changeCount++; - indexPattern.sourceFilters = sourceFilters; - } - - if (fieldFormats !== undefined) { - changeCount++; - indexPattern.fieldFormatMap = fieldFormats; - } - - if (type !== undefined) { - changeCount++; - indexPattern.type = type; - } - - if (typeMeta !== undefined) { - changeCount++; - indexPattern.typeMeta = typeMeta; - } - - if (fields !== undefined) { - changeCount++; - doRefreshFields = true; - indexPattern.fields.replaceAll( - Object.values(fields || {}).map((field) => ({ - ...field, - aggregatable: true, - searchable: true, - })) - ); - } - - if (runtimeFieldMap !== undefined) { - changeCount++; - indexPattern.replaceAllRuntimeFields(runtimeFieldMap); - } - - if (changeCount < 1) { - throw new Error('Index pattern change set is empty.'); - } - - await indexPatternsService.updateSavedObject(indexPattern); - - if (doRefreshFields && refresh_fields) { - await indexPatternsService.refreshFields(indexPattern); - } + const spec = req.body[serviceKey] as DataViewSpec; + + const dataView = await updateDataView({ + dataViewsService, + usageCollection, + id, + refreshFields: refresh_fields as boolean, + spec, + counterName: `${req.route.method} ${path}`, + }); return res.ok({ headers: { 'content-type': 'application/json', }, - body: JSON.stringify({ - [serviceKey]: indexPattern.toSpec(), - }), + body: { + [serviceKey]: dataView.toSpec(), + }, }); }) ) diff --git a/src/plugins/data_views/server/routes/util/handle_errors.ts b/src/plugins/data_views/server/rest_api_routes/util/handle_errors.ts similarity index 100% rename from src/plugins/data_views/server/routes/util/handle_errors.ts rename to src/plugins/data_views/server/rest_api_routes/util/handle_errors.ts diff --git a/src/plugins/data_views/server/routes/util/schemas.ts b/src/plugins/data_views/server/rest_api_routes/util/schemas.ts similarity index 100% rename from src/plugins/data_views/server/routes/util/schemas.ts rename to src/plugins/data_views/server/rest_api_routes/util/schemas.ts diff --git a/src/plugins/data_views/server/routes.ts b/src/plugins/data_views/server/routes.ts index 2a2f561997cd6..1e50e36316ff0 100644 --- a/src/plugins/data_views/server/routes.ts +++ b/src/plugins/data_views/server/routes.ts @@ -8,63 +8,11 @@ import { schema } from '@kbn/config-schema'; import { HttpServiceSetup, StartServicesAccessor } from 'kibana/server'; +import { UsageCounter } from 'src/plugins/usage_collection/server'; import { IndexPatternsFetcher } from './fetcher'; -import { - registerCreateDataViewRoute, - registerCreateDataViewRouteLegacy, -} from './routes/create_index_pattern'; -import { - registerGetDataViewRoute, - registerGetDataViewRouteLegacy, -} from './routes/get_index_pattern'; -import { - registerDeleteDataViewRoute, - registerDeleteDataViewRouteLegacy, -} from './routes/delete_index_pattern'; -import { - registerUpdateDataViewRoute, - registerUpdateDataViewRouteLegacy, -} from './routes/update_index_pattern'; -import { - registerUpdateFieldsRoute, - registerUpdateFieldsRouteLegacy, -} from './routes/fields/update_fields'; -import { registerCreateScriptedFieldRoute } from './routes/scripted_fields/create_scripted_field'; -import { registerPutScriptedFieldRoute } from './routes/scripted_fields/put_scripted_field'; -import { registerGetScriptedFieldRoute } from './routes/scripted_fields/get_scripted_field'; -import { registerDeleteScriptedFieldRoute } from './routes/scripted_fields/delete_scripted_field'; -import { registerUpdateScriptedFieldRoute } from './routes/scripted_fields/update_scripted_field'; -import { - registerManageDefaultDataViewRoute, - registerManageDefaultDataViewRouteLegacy, -} from './routes/default_index_pattern'; +import { routes } from './rest_api_routes'; import type { DataViewsServerPluginStart, DataViewsServerPluginStartDependencies } from './types'; -import { - registerCreateRuntimeFieldRoute, - registerCreateRuntimeFieldRouteLegacy, -} from './routes/runtime_fields/create_runtime_field'; -import { - registerGetRuntimeFieldRoute, - registerGetRuntimeFieldRouteLegacy, -} from './routes/runtime_fields/get_runtime_field'; -import { - registerDeleteRuntimeFieldRoute, - registerDeleteRuntimeFieldRouteLegacy, -} from './routes/runtime_fields/delete_runtime_field'; -import { - registerPutRuntimeFieldRoute, - registerPutRuntimeFieldRouteLegacy, -} from './routes/runtime_fields/put_runtime_field'; -import { - registerUpdateRuntimeFieldRoute, - registerUpdateRuntimeFieldRouteLegacy, -} from './routes/runtime_fields/update_runtime_field'; -import { - registerHasUserDataViewRoute, - registerHasUserDataViewRouteLegacy, -} from './routes/has_user_index_pattern'; - import { registerFieldForWildcard } from './fields_for'; export function registerRoutes( @@ -72,7 +20,8 @@ export function registerRoutes( getStartServices: StartServicesAccessor< DataViewsServerPluginStartDependencies, DataViewsServerPluginStart - > + >, + dataViewRestCounter?: UsageCounter ) { const parseMetaFields = (metaFields: string | string[]) => { let parsedFields: string[] = []; @@ -86,51 +35,7 @@ export function registerRoutes( const router = http.createRouter(); - // Data Views API - registerCreateDataViewRoute(router, getStartServices); - registerGetDataViewRoute(router, getStartServices); - registerDeleteDataViewRoute(router, getStartServices); - registerUpdateDataViewRoute(router, getStartServices); - registerManageDefaultDataViewRoute(router, getStartServices); - registerHasUserDataViewRoute(router, getStartServices); - - // Fields API - registerUpdateFieldsRoute(router, getStartServices); - - // Runtime Fields API - registerCreateRuntimeFieldRoute(router, getStartServices); - registerGetRuntimeFieldRoute(router, getStartServices); - registerDeleteRuntimeFieldRoute(router, getStartServices); - registerPutRuntimeFieldRoute(router, getStartServices); - registerUpdateRuntimeFieldRoute(router, getStartServices); - - // ### - // Legacy Index Pattern API - // ### - registerCreateDataViewRouteLegacy(router, getStartServices); - registerGetDataViewRouteLegacy(router, getStartServices); - registerDeleteDataViewRouteLegacy(router, getStartServices); - registerUpdateDataViewRouteLegacy(router, getStartServices); - registerManageDefaultDataViewRouteLegacy(router, getStartServices); - registerHasUserDataViewRouteLegacy(router, getStartServices); - - // Fields API - registerUpdateFieldsRouteLegacy(router, getStartServices); - - // Scripted Field API - registerCreateScriptedFieldRoute(router, getStartServices); - registerPutScriptedFieldRoute(router, getStartServices); - registerGetScriptedFieldRoute(router, getStartServices); - registerDeleteScriptedFieldRoute(router, getStartServices); - registerUpdateScriptedFieldRoute(router, getStartServices); - - // Runtime Fields API - registerCreateRuntimeFieldRouteLegacy(router, getStartServices); - registerGetRuntimeFieldRouteLegacy(router, getStartServices); - registerDeleteRuntimeFieldRouteLegacy(router, getStartServices); - registerPutRuntimeFieldRouteLegacy(router, getStartServices); - registerUpdateRuntimeFieldRouteLegacy(router, getStartServices); - // ### + routes.forEach((route) => route(router, getStartServices, dataViewRestCounter)); registerFieldForWildcard(router, getStartServices); diff --git a/src/plugins/data_views/server/utils.ts b/src/plugins/data_views/server/utils.ts index bb7d23f832233..a3b6aeb5e8c26 100644 --- a/src/plugins/data_views/server/utils.ts +++ b/src/plugins/data_views/server/utils.ts @@ -10,13 +10,13 @@ import { SavedObjectsClientContract } from 'kibana/server'; import { IFieldType, DATA_VIEW_SAVED_OBJECT_TYPE, - IndexPatternAttributes, + DataViewAttributes, SavedObject, } from '../common'; export const getFieldByName = ( fieldName: string, - indexPattern: SavedObject + indexPattern: SavedObject ): IFieldType | undefined => { const fields: IFieldType[] = indexPattern && JSON.parse(indexPattern.attributes.fields); const field = fields && fields.find((f) => f.name === fieldName); @@ -27,8 +27,8 @@ export const getFieldByName = ( export const findIndexPatternById = async ( savedObjectsClient: SavedObjectsClientContract, index: string -): Promise | undefined> => { - const savedObjectsResponse = await savedObjectsClient.find({ +): Promise | undefined> => { + const savedObjectsResponse = await savedObjectsClient.find({ type: DATA_VIEW_SAVED_OBJECT_TYPE, fields: ['fields'], search: `"${index}"`, diff --git a/src/plugins/discover/common/index.ts b/src/plugins/discover/common/index.ts index 6262855409b29..98ce5fc3b0b2b 100644 --- a/src/plugins/discover/common/index.ts +++ b/src/plugins/discover/common/index.ts @@ -22,4 +22,5 @@ export const MAX_DOC_FIELDS_DISPLAYED = 'discover:maxDocFieldsDisplayed'; export const SHOW_FIELD_STATISTICS = 'discover:showFieldStatistics'; export const SHOW_MULTIFIELDS = 'discover:showMultiFields'; export const TRUNCATE_MAX_HEIGHT = 'truncate:maxHeight'; +export const ROW_HEIGHT_OPTION = 'discover:rowHeightOption'; export const SEARCH_EMBEDDABLE_TYPE = 'search'; diff --git a/src/plugins/discover/public/__mocks__/services.ts b/src/plugins/discover/public/__mocks__/services.ts index 337d44227139e..e0a76a8617135 100644 --- a/src/plugins/discover/public/__mocks__/services.ts +++ b/src/plugins/discover/public/__mocks__/services.ts @@ -20,6 +20,7 @@ import { import { UI_SETTINGS } from '../../../data/common'; import { TopNavMenu } from '../../../navigation/public'; import { FORMATS_UI_SETTINGS } from 'src/plugins/field_formats/common'; +import { LocalStorageMock } from './local_storage_mock'; const dataPlugin = dataPluginMock.createStartContract(); export const discoverServiceMock = { @@ -94,8 +95,6 @@ export const discoverServiceMock = { useChartsTheme: jest.fn(() => EUI_CHARTS_THEME_LIGHT.theme), useChartsBaseTheme: jest.fn(() => EUI_CHARTS_THEME_LIGHT.theme), }, - storage: { - get: jest.fn(), - }, + storage: new LocalStorageMock({}) as unknown as Storage, addBasePath: jest.fn(), } as unknown as DiscoverServices; diff --git a/src/plugins/discover/public/__mocks__/ui_settings.ts b/src/plugins/discover/public/__mocks__/ui_settings.ts index be50f73041f8d..7c6a4768b577f 100644 --- a/src/plugins/discover/public/__mocks__/ui_settings.ts +++ b/src/plugins/discover/public/__mocks__/ui_settings.ts @@ -14,6 +14,7 @@ import { SAMPLE_SIZE_SETTING, SHOW_MULTIFIELDS, SEARCH_FIELDS_FROM_SOURCE, + ROW_HEIGHT_OPTION, } from '../../common'; export const uiSettingsMock = { @@ -30,6 +31,8 @@ export const uiSettingsMock = { return false; } else if (key === SHOW_MULTIFIELDS) { return false; + } else if (key === ROW_HEIGHT_OPTION) { + return 3; } }, } as unknown as IUiSettingsClient; diff --git a/src/plugins/discover/public/application/context/context_app.test.tsx b/src/plugins/discover/public/application/context/context_app.test.tsx index b97c9ed9fe8d9..aa3428e52fa96 100644 --- a/src/plugins/discover/public/application/context/context_app.test.tsx +++ b/src/plugins/discover/public/application/context/context_app.test.tsx @@ -19,6 +19,7 @@ import { indexPatternsMock } from '../../__mocks__/index_patterns'; import { act } from 'react-dom/test-utils'; import { uiSettingsMock } from '../../__mocks__/ui_settings'; import { themeServiceMock } from '../../../../../core/public/mocks'; +import { LocalStorageMock } from '../../__mocks__/local_storage_mock'; import { KibanaContextProvider } from '../../../../kibana_react/public'; const mockFilterManager = createFilterManagerMock(); @@ -55,6 +56,7 @@ describe('ContextApp test', () => { }, filterManager: mockFilterManager, uiSettings: uiSettingsMock, + storage: new LocalStorageMock({}), } as unknown as DiscoverServices; const defaultProps = { diff --git a/src/plugins/discover/public/application/context/context_app_content.test.tsx b/src/plugins/discover/public/application/context/context_app_content.test.tsx index a70770f5d230f..a066dbe0deddb 100644 --- a/src/plugins/discover/public/application/context/context_app_content.test.tsx +++ b/src/plugins/discover/public/application/context/context_app_content.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { mountWithIntl } from '@kbn/test/jest'; import { findTestSubject } from '@elastic/eui/lib/test'; import { ActionBar } from './components/action_bar/action_bar'; -import { AppState, GetStateReturn } from './services/context_state'; +import { GetStateReturn } from './services/context_state'; import { SortDirection } from 'src/plugins/data/common'; import { ContextAppContent, ContextAppContentProps } from './context_app_content'; import { LoadingStatus } from './services/context_query_state'; @@ -52,7 +52,6 @@ describe('ContextAppContent test', () => { const props = { columns: ['order_date', '_source'], indexPattern: indexPatternMock, - appState: {} as unknown as AppState, stateContainer: {} as unknown as GetStateReturn, anchorStatus: anchorStatus || LoadingStatus.LOADED, predecessorsStatus: LoadingStatus.LOADED, diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx index 5f9d2d41f862d..cf547b42c7277 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx @@ -43,7 +43,7 @@ function mountComponent(fetchStatus: FetchStatus, hits: ElasticSearchHit[]) { searchSource: documents$, setExpandedDoc: jest.fn(), state: { columns: [] }, - stateContainer: {} as GetStateReturn, + stateContainer: { setAppState: () => {} } as unknown as GetStateReturn, navigateTo: jest.fn(), }; diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx index eccc6ab2fb694..71033de462751 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx @@ -99,6 +99,13 @@ function DiscoverDocumentsComponent({ [stateContainer] ); + const onUpdateRowHeight = useCallback( + (newRowHeight: number) => { + stateContainer.setAppState({ rowHeight: newRowHeight }); + }, + [stateContainer] + ); + const showTimeCol = useMemo( () => !uiSettings.get(DOC_HIDE_TIME_COLUMN_SETTING, false) && !!indexPattern.timeFieldName, [uiSettings, indexPattern.timeFieldName] @@ -170,6 +177,8 @@ function DiscoverDocumentsComponent({ onSort={onSort} onResize={onResize} useNewFieldsApi={useNewFieldsApi} + rowHeightState={state.rowHeight} + onUpdateRowHeight={onUpdateRowHeight} /> )} diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx index 0791f98280268..aa2149abdde62 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx @@ -33,31 +33,27 @@ import { RequestAdapter } from '../../../../../../inspector'; import { Chart } from '../chart/point_series'; import { DiscoverSidebar } from '../sidebar/discover_sidebar'; import { ElasticSearchHit } from '../../../../types'; +import { LocalStorageMock } from 'src/plugins/discover/public/__mocks__/local_storage_mock'; import { KibanaContextProvider } from '../../../../../../kibana_react/public'; -import { FieldFormatsStart } from '../../../../../../field_formats/public'; -import { IUiSettingsClient } from 'kibana/public'; +import { DiscoverServices } from '../../../../build_services'; setHeaderActionMenuMounter(jest.fn()); function mountComponent(indexPattern: DataView, prevSidebarClosed?: boolean) { const searchSourceMock = createSearchSourceMock({}); - const services = discoverServiceMock; + const services = { + ...discoverServiceMock, + fieldFormats: { + getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })), + getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), + }, + storage: new LocalStorageMock({ + [SIDEBAR_CLOSED_KEY]: prevSidebarClosed, + }) as unknown as Storage, + } as unknown as DiscoverServices; services.data.query.timefilter.timefilter.getAbsoluteTime = () => { return { from: '2020-05-14T11:05:13.590', to: '2020-05-14T11:20:13.590' }; }; - services.storage.get = (key: string) => { - if (key === SIDEBAR_CLOSED_KEY) { - return prevSidebarClosed; - } - }; - services.fieldFormats = { - getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })), - getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), - } as unknown as FieldFormatsStart; - services.uiSettings = { - ...services.uiSettings, - get: jest.fn((key: string) => key === 'discover:maxDocFieldsDisplayed' && 50), - } as unknown as IUiSettingsClient; const indexPatternList = [indexPattern].map((ip) => { return { ...ip, ...{ attributes: { title: ip.title } } }; @@ -153,7 +149,7 @@ function mountComponent(indexPattern: DataView, prevSidebarClosed?: boolean) { savedSearchRefetch$: new Subject(), searchSource: searchSourceMock, state: { columns: [] }, - stateContainer: {} as GetStateReturn, + stateContainer: { setAppState: () => {} } as unknown as GetStateReturn, setExpandedDoc: jest.fn(), }; diff --git a/src/plugins/discover/public/application/main/services/discover_state.ts b/src/plugins/discover/public/application/main/services/discover_state.ts index c1587b0d9ebff..ad448702aba40 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.ts @@ -82,6 +82,10 @@ export interface AppState { * Hide mini distribution/preview charts when in Field Statistics mode */ hideAggregatedPreview?: boolean; + /** + * Document explorer row height option + */ + rowHeight?: number; } interface GetStateParams { diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts index 0d38b1997716b..1b651643e8443 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts @@ -36,6 +36,7 @@ describe('getStateDefaults', () => { "index": "index-pattern-with-timefield-id", "interval": "auto", "query": undefined, + "rowHeight": undefined, "savedQuery": undefined, "sort": Array [ Array [ @@ -68,6 +69,7 @@ describe('getStateDefaults', () => { "index": "the-index-pattern-id", "interval": "auto", "query": undefined, + "rowHeight": undefined, "savedQuery": undefined, "sort": Array [], "viewMode": undefined, diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts index 10ef04ca8643e..807988ddf36d2 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts @@ -63,6 +63,7 @@ export function getStateDefaults({ viewMode: undefined, hideAggregatedPreview: undefined, savedQuery: undefined, + rowHeight: undefined, } as AppState; if (savedSearch.grid) { defaultState.grid = savedSearch.grid; @@ -70,6 +71,9 @@ export function getStateDefaults({ if (savedSearch.hideChart !== undefined) { defaultState.hideChart = savedSearch.hideChart; } + if (savedSearch.rowHeight !== undefined) { + defaultState.rowHeight = savedSearch.rowHeight; + } if (savedSearch.viewMode) { defaultState.viewMode = savedSearch.viewMode; } diff --git a/src/plugins/discover/public/application/main/utils/persist_saved_search.ts b/src/plugins/discover/public/application/main/utils/persist_saved_search.ts index 95d7421b83f42..60a9b0b7d5fcd 100644 --- a/src/plugins/discover/public/application/main/utils/persist_saved_search.ts +++ b/src/plugins/discover/public/application/main/utils/persist_saved_search.ts @@ -51,6 +51,9 @@ export async function persistSavedSearch( if (typeof state.hideChart !== 'undefined') { savedSearch.hideChart = state.hideChart; } + if (typeof state.rowHeight !== 'undefined') { + savedSearch.rowHeight = state.rowHeight; + } if (state.viewMode) { savedSearch.viewMode = state.viewMode; diff --git a/src/plugins/discover/public/application/main/utils/use_discover_state.ts b/src/plugins/discover/public/application/main/utils/use_discover_state.ts index baf0195c4539c..4d5d911f8abf3 100644 --- a/src/plugins/discover/public/application/main/utils/use_discover_state.ts +++ b/src/plugins/discover/public/application/main/utils/use_discover_state.ts @@ -99,6 +99,11 @@ export function useDiscoverState({ useNewFieldsApi, }); + /** + * Reset to display loading spinner when savedSearch is changing + */ + useEffect(() => reset(), [savedSearch.id, reset]); + /** * Sync URL state with local app state on saved search load * or dataView / savedSearch switch diff --git a/src/plugins/discover/public/components/discover_grid/constants.ts b/src/plugins/discover/public/components/discover_grid/constants.ts index 80900c06d4932..d026607aef373 100644 --- a/src/plugins/discover/public/components/discover_grid/constants.ts +++ b/src/plugins/discover/public/components/discover_grid/constants.ts @@ -6,14 +6,16 @@ * Side Public License, v 1. */ +import { EuiDataGridStyle } from '@elastic/eui'; + // data types export const kibanaJSON = 'kibana-json'; -export const gridStyle = { +export const GRID_STYLE = { border: 'all', fontSize: 's', cellPadding: 's', rowHover: 'none', -}; +} as EuiDataGridStyle; export const pageSizeArr = [25, 50, 100, 250]; export const defaultPageSize = 100; @@ -23,7 +25,6 @@ export const toolbarVisibility = { allowHide: false, allowReorder: true, }, - showDisplaySelector: false, }; export const defaultMonacoEditorWidth = 370; diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx index 4307afbeb9e38..92ca4ce96bf72 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx @@ -11,7 +11,6 @@ import { FormattedMessage } from '@kbn/i18n-react'; import './discover_grid.scss'; import { EuiDataGridSorting, - EuiDataGridStyle, EuiDataGridProps, EuiDataGrid, EuiScreenReaderOnly, @@ -35,7 +34,7 @@ import { } from './discover_grid_columns'; import { defaultPageSize, - gridStyle, + GRID_STYLE, pageSizeArr, toolbarVisibility as toolbarVisibilityDefaults, } from './constants'; @@ -49,6 +48,7 @@ import { DiscoverGridDocumentToolbarBtn, getDocId } from './discover_grid_docume import { SortPairArr } from '../doc_table/lib/get_sort'; import { getFieldsToShow } from '../../utils/get_fields_to_show'; import { ElasticSearchHit } from '../../types'; +import { useRowHeightsOptions } from '../../utils/use_row_heights_options'; import { useDiscoverServices } from '../../utils/use_discover_services'; interface SortObj { @@ -154,6 +154,14 @@ export interface DiscoverGridProps { * List of used control columns (available: 'openDetails', 'select') */ controlColumnIds?: string[]; + /** + * Row height from state + */ + rowHeightState?: number; + /** + * Update row height state + */ + onUpdateRowHeight?: (rowHeight: number) => void; } export const EuiDataGridMemoized = React.memo((props: EuiDataGridProps) => { @@ -187,6 +195,8 @@ export const DiscoverGrid = ({ isPaginationEnabled = true, controlColumnIds = CONTROL_COLUMN_IDS_DEFAULT, className, + rowHeightState, + onUpdateRowHeight, }: DiscoverGridProps) => { const services = useDiscoverServices(); const [selectedDocs, setSelectedDocs] = useState([]); @@ -349,6 +359,17 @@ export const DiscoverGrid = ({ [usedSelectedDocs, isFilterActive, rows, setIsFilterActive] ); + const showDisplaySelector = useMemo( + () => + !!onUpdateRowHeight + ? { + allowDensity: false, + allowRowHeight: true, + } + : undefined, + [onUpdateRowHeight] + ); + const toolbarVisibility = useMemo( () => defaultColumns @@ -357,15 +378,22 @@ export const DiscoverGrid = ({ showColumnSelector: false, showSortSelector: isSortEnabled, additionalControls, + showDisplaySelector, } : { ...toolbarVisibilityDefaults, showSortSelector: isSortEnabled, additionalControls, + showDisplaySelector, }, - [defaultColumns, additionalControls, isSortEnabled] + [showDisplaySelector, defaultColumns, additionalControls, isSortEnabled] ); + const rowHeightsOptions = useRowHeightsOptions({ + rowHeightState, + onUpdateRowHeight, + }); + if (!rowCount && isLoading) { return (
@@ -423,7 +451,6 @@ export const DiscoverGrid = ({ columns={euiGridColumns} columnVisibility={columnsVisibility} data-test-subj="docTable" - gridStyle={gridStyle as EuiDataGridStyle} leadingControlColumns={lead} onColumnResize={onResize} pagination={paginationObj} @@ -432,6 +459,8 @@ export const DiscoverGrid = ({ schemaDetectors={schemaDetectors} sorting={sorting as EuiDataGridSorting} toolbarVisibility={toolbarVisibility} + rowHeightsOptions={rowHeightsOptions} + gridStyle={GRID_STYLE} /> {showDisclaimer && ( diff --git a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx index 5e0f06f143a0c..b950e42fb5f22 100644 --- a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx @@ -62,6 +62,7 @@ export type SearchProps = Partial & hits?: ElasticSearchHit[]; totalHitCount?: number; onMoveColumn?: (column: string, index: number) => void; + onUpdateRowHeight?: (rowHeight?: number) => void; }; interface SearchEmbeddableConfig { @@ -293,6 +294,10 @@ export class SavedSearchEmbeddable useNewFieldsApi: !this.services.uiSettings.get(SEARCH_FIELDS_FROM_SOURCE, false), showTimeCol: !this.services.uiSettings.get(DOC_HIDE_TIME_COLUMN_SETTING, false), ariaLabelledBy: 'documentsAriaLabel', + rowHeightState: this.input.rowHeight || this.savedSearch.rowHeight, + onUpdateRowHeight: (rowHeight) => { + this.updateInput({ rowHeight }); + }, }; const timeRangeSearchSource = searchSource.create(); @@ -342,6 +347,7 @@ export class SavedSearchEmbeddable ); searchProps.sort = this.input.sort || savedSearchSort; searchProps.sharedItemTitle = this.panelTitle; + searchProps.rowHeightState = this.input.rowHeight || this.savedSearch.rowHeight; if (forceFetch || isFetchRequired) { this.filtersSearchSource.setField('filter', this.input.filters); this.filtersSearchSource.setField('query', this.input.query); @@ -414,9 +420,9 @@ export class SavedSearchEmbeddable } const useLegacyTable = this.services.uiSettings.get(DOC_TABLE_LEGACY); const props = { + savedSearch: this.savedSearch, searchProps, useLegacyTable, - refs: domNode, }; if (searchProps.services) { ReactDOM.render( diff --git a/src/plugins/discover/public/embeddable/saved_search_embeddable_component.tsx b/src/plugins/discover/public/embeddable/saved_search_embeddable_component.tsx index 5d7907d3cf791..46681a5d9ec40 100644 --- a/src/plugins/discover/public/embeddable/saved_search_embeddable_component.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_embeddable_component.tsx @@ -16,7 +16,6 @@ import { SearchProps } from './saved_search_embeddable'; interface SavedSearchEmbeddableComponentProps { searchProps: SearchProps; useLegacyTable: boolean; - refs: HTMLElement; } const DiscoverDocTableEmbeddableMemoized = React.memo(DiscoverDocTableEmbeddable); @@ -25,15 +24,14 @@ const DiscoverGridEmbeddableMemoized = React.memo(DiscoverGridEmbeddable); export function SavedSearchEmbeddableComponent({ searchProps, useLegacyTable, - refs, }: SavedSearchEmbeddableComponentProps) { if (useLegacyTable) { - const docTableProps = { - ...searchProps, - refs, - }; - return ; + return ; } - const discoverGridProps = searchProps as DiscoverGridEmbeddableProps; - return ; + return ( + + ); } diff --git a/src/plugins/discover/public/embeddable/saved_search_grid.tsx b/src/plugins/discover/public/embeddable/saved_search_grid.tsx index b4785b9911da1..ca750ca6fb976 100644 --- a/src/plugins/discover/public/embeddable/saved_search_grid.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_grid.tsx @@ -7,7 +7,6 @@ */ import React, { useState, memo } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { I18nProvider } from '@kbn/i18n-react'; import { DiscoverGrid, DiscoverGridProps } from '../components/discover_grid/discover_grid'; import { TotalDocuments } from '../application/main/components/total_documents/total_documents'; import { ElasticSearchHit } from '../types'; @@ -22,17 +21,15 @@ export function DiscoverGridEmbeddable(props: DiscoverGridEmbeddableProps) { const [expandedDoc, setExpandedDoc] = useState(undefined); return ( - - - {props.totalHitCount !== 0 && ( - - - - )} - - + + {props.totalHitCount !== 0 && ( + + - - + )} + + + + ); } diff --git a/src/plugins/discover/public/embeddable/types.ts b/src/plugins/discover/public/embeddable/types.ts index 509d9644f8735..32c029cccf7b1 100644 --- a/src/plugins/discover/public/embeddable/types.ts +++ b/src/plugins/discover/public/embeddable/types.ts @@ -23,6 +23,7 @@ export interface SearchInput extends EmbeddableInput { hidePanelTitles?: boolean; columns?: string[]; sort?: SortOrder[]; + rowHeight?: number; } export interface SearchOutput extends EmbeddableOutput { diff --git a/src/plugins/discover/public/index.ts b/src/plugins/discover/public/index.ts index e7abbdfc328ab..15707e4cda284 100644 --- a/src/plugins/discover/public/index.ts +++ b/src/plugins/discover/public/index.ts @@ -28,5 +28,10 @@ export { SEARCH_EMBEDDABLE_TYPE } from './embeddable'; export { loadSharingDataHelpers } from './utils'; export type { DiscoverUrlGeneratorState } from './url_generator'; + +/** + * @deprecated + */ export { DISCOVER_APP_URL_GENERATOR } from './url_generator'; +export { DISCOVER_APP_LOCATOR } from './locator'; export type { DiscoverAppLocator, DiscoverAppLocatorParams } from './locator'; diff --git a/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts b/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts index 1159320c9a09f..13254aa7b077e 100644 --- a/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts +++ b/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts @@ -104,6 +104,7 @@ describe('getSavedSearch', () => { "hideAggregatedPreview": undefined, "hideChart": false, "id": "ccf1af80-2297-11ec-86e0-1155ffb9c7a7", + "rowHeight": undefined, "searchSource": Object { "create": [MockFunction], "createChild": [MockFunction], diff --git a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts index f2ad8b92adbc8..13739f0b1f4d1 100644 --- a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts +++ b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts @@ -57,6 +57,7 @@ describe('saved_searches_utils', () => { "hideAggregatedPreview": undefined, "hideChart": true, "id": "id", + "rowHeight": undefined, "searchSource": SearchSource { "dependencies": Object { "getConfig": [MockFunction], @@ -130,6 +131,7 @@ describe('saved_searches_utils', () => { "kibanaSavedObjectMeta": Object { "searchSourceJSON": "{}", }, + "rowHeight": undefined, "sort": Array [ Array [ "a", diff --git a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts index 064ee6afe0e99..4dbb84613ead8 100644 --- a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts +++ b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts @@ -43,6 +43,7 @@ export const fromSavedSearchAttributes = ( hideChart: attributes.hideChart, viewMode: attributes.viewMode, hideAggregatedPreview: attributes.hideAggregatedPreview, + rowHeight: attributes.rowHeight, }); export const toSavedSearchAttributes = ( @@ -58,4 +59,5 @@ export const toSavedSearchAttributes = ( hideChart: savedSearch.hideChart ?? false, viewMode: savedSearch.viewMode, hideAggregatedPreview: savedSearch.hideAggregatedPreview, + rowHeight: savedSearch.rowHeight, }); diff --git a/src/plugins/discover/public/services/saved_searches/types.ts b/src/plugins/discover/public/services/saved_searches/types.ts index 4247f68ba8194..9fa579048d4af 100644 --- a/src/plugins/discover/public/services/saved_searches/types.ts +++ b/src/plugins/discover/public/services/saved_searches/types.ts @@ -25,6 +25,7 @@ export interface SavedSearchAttributes { }; viewMode?: VIEW_MODE; hideAggregatedPreview?: boolean; + rowHeight?: number; } /** @internal **/ @@ -49,4 +50,5 @@ export interface SavedSearch { }; viewMode?: VIEW_MODE; hideAggregatedPreview?: boolean; + rowHeight?: number; } diff --git a/src/plugins/discover/public/url_generator.ts b/src/plugins/discover/public/url_generator.ts index 32e89691574df..450ad15e3598b 100644 --- a/src/plugins/discover/public/url_generator.ts +++ b/src/plugins/discover/public/url_generator.ts @@ -12,8 +12,14 @@ import { esFilters } from '../../data/public'; import { setStateToKbnUrl } from '../../kibana_utils/public'; import { VIEW_MODE } from './components/view_mode_toggle'; +/** + * @deprecated + */ export const DISCOVER_APP_URL_GENERATOR = 'DISCOVER_APP_URL_GENERATOR'; +/** + * @deprecated + */ export interface DiscoverUrlGeneratorState { /** * Optionally set saved search ID. @@ -87,6 +93,9 @@ interface Params { export const SEARCH_SESSION_ID_QUERY_PARAM = 'searchSessionId'; +/** + * @deprecated + */ export class DiscoverUrlGenerator implements UrlGeneratorsDefinition { diff --git a/src/plugins/discover/public/utils/row_heights.ts b/src/plugins/discover/public/utils/row_heights.ts new file mode 100644 index 0000000000000..e3759853f60cf --- /dev/null +++ b/src/plugins/discover/public/utils/row_heights.ts @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Storage } from '../../../kibana_utils/public'; +import { isValidRowHeight } from './validate_row_height'; + +export interface DataGridOptionsRecord { + previousRowHeight: number; + previousConfigRowHeight: number; +} + +const ROW_HEIGHT_KEY = 'discover:dataGridRowHeight'; + +export const getStoredRowHeight = (storage: Storage): DataGridOptionsRecord | null => { + const entry = storage.get(ROW_HEIGHT_KEY); + if ( + typeof entry === 'object' && + entry !== null && + isValidRowHeight(entry.previousRowHeight) && + isValidRowHeight(entry.previousConfigRowHeight) + ) { + return entry; + } + return null; +}; + +export const updateStoredRowHeight = ( + newRowHeight: number, + configRowHeight: number, + storage: Storage +) => { + storage.set(ROW_HEIGHT_KEY, { + previousRowHeight: newRowHeight, + previousConfigRowHeight: configRowHeight, + }); +}; diff --git a/src/plugins/discover/public/utils/use_row_heights_options.test.tsx b/src/plugins/discover/public/utils/use_row_heights_options.test.tsx new file mode 100644 index 0000000000000..c91e41c930649 --- /dev/null +++ b/src/plugins/discover/public/utils/use_row_heights_options.test.tsx @@ -0,0 +1,107 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { ReactNode } from 'react'; +import { renderHook } from '@testing-library/react-hooks'; +import { Storage } from '../../../kibana_utils/public'; +import { DiscoverServices } from '../build_services'; +import { LocalStorageMock } from '../__mocks__/local_storage_mock'; +import { uiSettingsMock } from '../__mocks__/ui_settings'; +import { useRowHeightsOptions } from './use_row_heights_options'; +import { KibanaContextProvider } from '../../../kibana_react/public'; + +const CONFIG_ROW_HEIGHT = 3; + +const getWrapper = (services: DiscoverServices) => { + return ({ children }: { children: ReactNode }) => ( + {children} + ); +}; + +describe('useRowHeightsOptions', () => { + test('should apply rowHeight from savedSearch', () => { + const { result } = renderHook( + () => { + return useRowHeightsOptions({ + rowHeightState: 2, + }); + }, + { + wrapper: getWrapper({ + uiSettings: uiSettingsMock, + storage: new LocalStorageMock({}) as unknown as Storage, + } as DiscoverServices), + } + ); + + expect(result.current.defaultHeight).toEqual({ lineCount: 2 }); + }); + + test('should apply rowHeight from local storage', () => { + const { result } = renderHook( + () => { + return useRowHeightsOptions({}); + }, + { + wrapper: getWrapper({ + uiSettings: uiSettingsMock, + storage: new LocalStorageMock({ + ['discover:dataGridRowHeight']: { + previousRowHeight: 5, + previousConfigRowHeight: 3, + }, + }) as unknown as Storage, + } as DiscoverServices), + } + ); + + expect(result.current.defaultHeight).toEqual({ lineCount: 5 }); + }); + + test('should apply rowHeight from uiSettings', () => { + const { result } = renderHook( + () => { + return useRowHeightsOptions({}); + }, + { + wrapper: getWrapper({ + uiSettings: uiSettingsMock, + storage: new LocalStorageMock({}) as unknown as Storage, + } as unknown as DiscoverServices), + } + ); + + expect(result.current.defaultHeight).toEqual({ + lineCount: CONFIG_ROW_HEIGHT, + }); + }); + + test('should apply rowHeight from uiSettings instead of local storage value, since uiSettings has been changed', () => { + const { result } = renderHook( + () => { + return useRowHeightsOptions({}); + }, + { + wrapper: getWrapper({ + uiSettings: uiSettingsMock, + storage: new LocalStorageMock({ + ['discover:dataGridRowHeight']: { + previousRowHeight: 4, + // different from uiSettings (config), now user changed it to 3, but prev was 4 + previousConfigRowHeight: 4, + }, + }) as unknown as Storage, + } as unknown as DiscoverServices), + } + ); + + expect(result.current.defaultHeight).toEqual({ + lineCount: CONFIG_ROW_HEIGHT, + }); + }); +}); diff --git a/src/plugins/discover/public/utils/use_row_heights_options.ts b/src/plugins/discover/public/utils/use_row_heights_options.ts new file mode 100644 index 0000000000000..8935d655002c8 --- /dev/null +++ b/src/plugins/discover/public/utils/use_row_heights_options.ts @@ -0,0 +1,87 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { EuiDataGridRowHeightOption, EuiDataGridRowHeightsOptions } from '@elastic/eui'; +import { useMemo } from 'react'; +import { ROW_HEIGHT_OPTION } from '../../common'; +import { isValidRowHeight } from './validate_row_height'; +import { useDiscoverServices } from './use_discover_services'; +import { DataGridOptionsRecord, getStoredRowHeight, updateStoredRowHeight } from './row_heights'; + +interface UseRowHeightProps { + rowHeightState?: number; + onUpdateRowHeight?: (rowHeight: number) => void; +} + +/** + * Row height might be a value from -1 to 20 + * A value of -1 automatically adjusts the row height to fit the contents. + * A value of 0 displays the content in a single line. + * A value from 1 to 20 represents number of lines of Document explorer row to display. + */ +const SINGLE_ROW_HEIGHT_OPTION = 0; +const AUTO_ROW_HEIGHT_OPTION = -1; + +/** + * Converts rowHeight of EuiDataGrid to rowHeight number (-1 to 20) + */ +const serializeRowHeight = (rowHeight?: EuiDataGridRowHeightOption): number => { + if (rowHeight === 'auto') { + return AUTO_ROW_HEIGHT_OPTION; + } else if (typeof rowHeight === 'object' && rowHeight.lineCount) { + return rowHeight.lineCount; // custom + } + + return SINGLE_ROW_HEIGHT_OPTION; +}; + +/** + * Converts rowHeight number (-1 to 20) of EuiDataGrid rowHeight + */ +const deserializeRowHeight = (number: number): EuiDataGridRowHeightOption | undefined => { + if (number === AUTO_ROW_HEIGHT_OPTION) { + return 'auto'; + } else if (number === SINGLE_ROW_HEIGHT_OPTION) { + return undefined; + } + + return { lineCount: number }; // custom +}; + +export const useRowHeightsOptions = ({ rowHeightState, onUpdateRowHeight }: UseRowHeightProps) => { + const { storage, uiSettings } = useDiscoverServices(); + + return useMemo((): EuiDataGridRowHeightsOptions => { + const rowHeightFromLS = getStoredRowHeight(storage); + const configRowHeight = uiSettings.get(ROW_HEIGHT_OPTION); + + const configHasNotChanged = ( + localStorageRecord: DataGridOptionsRecord | null + ): localStorageRecord is DataGridOptionsRecord => + localStorageRecord !== null && configRowHeight === localStorageRecord.previousConfigRowHeight; + + let rowHeight; + if (isValidRowHeight(rowHeightState)) { + rowHeight = rowHeightState; + } else if (configHasNotChanged(rowHeightFromLS)) { + rowHeight = rowHeightFromLS.previousRowHeight; + } else { + rowHeight = configRowHeight; + } + + return { + defaultHeight: deserializeRowHeight(rowHeight), + lineHeight: '1.6em', + onChange: ({ defaultHeight: newRowHeight }: EuiDataGridRowHeightsOptions) => { + const newSerializedRowHeight = serializeRowHeight(newRowHeight); + updateStoredRowHeight(newSerializedRowHeight, configRowHeight, storage); + onUpdateRowHeight?.(newSerializedRowHeight); + }, + }; + }, [rowHeightState, uiSettings, storage, onUpdateRowHeight]); +}; diff --git a/src/plugins/discover/public/utils/validate_row_height.ts b/src/plugins/discover/public/utils/validate_row_height.ts new file mode 100644 index 0000000000000..c66ae75dcccd9 --- /dev/null +++ b/src/plugins/discover/public/utils/validate_row_height.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const MIN_ROW_HEIGHT = -1; +const MAX_ROW_HEIGHT = 20; + +export const isValidRowHeight = (rowHeight?: number): rowHeight is number => { + return ( + // is number + typeof rowHeight === 'number' && + !Number.isNaN(rowHeight) && + // is integer + Math.floor(rowHeight) === rowHeight && + // does it fit the range + rowHeight >= MIN_ROW_HEIGHT && + rowHeight <= MAX_ROW_HEIGHT + ); +}; diff --git a/src/plugins/discover/server/saved_objects/search.ts b/src/plugins/discover/server/saved_objects/search.ts index 23d9312e82897..d5b0a3e09bc61 100644 --- a/src/plugins/discover/server/saved_objects/search.ts +++ b/src/plugins/discover/server/saved_objects/search.ts @@ -45,6 +45,7 @@ export const searchSavedObjectType: SavedObjectsType = { title: { type: 'text' }, grid: { type: 'object', enabled: false }, version: { type: 'integer' }, + rowHeight: { type: 'text' }, }, }, migrations: searchMigrations, diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index be82d6cfb9760..f35212ba43618 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -28,6 +28,7 @@ import { SHOW_MULTIFIELDS, TRUNCATE_MAX_HEIGHT, SHOW_FIELD_STATISTICS, + ROW_HEIGHT_OPTION, } from '../common'; export const getUiSettings: () => Record = () => ({ @@ -251,15 +252,27 @@ export const getUiSettings: () => Record = () => ({ category: ['discover'], schema: schema.boolean(), }, + [ROW_HEIGHT_OPTION]: { + name: i18n.translate('discover.advancedSettings.params.rowHeightTitle', { + defaultMessage: 'Row height in the Document Explorer', + }), + value: 3, + category: ['discover'], + description: i18n.translate('discover.advancedSettings.params.rowHeightText', { + defaultMessage: + 'The number of lines to allow in a row. A value of -1 automatically adjusts the row height to fit the contents. A value of 0 displays the content in a single line.', + }), + schema: schema.number({ min: -1 }), + }, [TRUNCATE_MAX_HEIGHT]: { name: i18n.translate('discover.advancedSettings.params.maxCellHeightTitle', { - defaultMessage: 'Maximum table cell height', + defaultMessage: 'Maximum cell height in the classic table', }), value: 115, category: ['discover'], description: i18n.translate('discover.advancedSettings.params.maxCellHeightText', { defaultMessage: - 'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation', + 'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation.', }), schema: schema.number({ min: 0 }), }, diff --git a/src/plugins/kibana_react/public/code_editor/code_editor.tsx b/src/plugins/kibana_react/public/code_editor/code_editor.tsx index 50ffa50350496..a8df56981f5d5 100644 --- a/src/plugins/kibana_react/public/code_editor/code_editor.tsx +++ b/src/plugins/kibana_react/public/code_editor/code_editor.tsx @@ -15,7 +15,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import classNames from 'classnames'; import './register_languages'; -import './remeasure_fonts'; +import { remeasureFonts } from './remeasure_fonts'; import { DARK_THEME, @@ -336,6 +336,8 @@ export const CodeEditor: React.FC = ({ throw new Error('react-monaco-editor is using a different version of monaco'); } + remeasureFonts(); + _editor.current = editor; const textbox = editor.getDomNode()?.getElementsByTagName('textarea')[0]; diff --git a/src/plugins/kibana_react/public/code_editor/remeasure_fonts.ts b/src/plugins/kibana_react/public/code_editor/remeasure_fonts.ts index a6510a2c45cd6..4fa143871f30b 100644 --- a/src/plugins/kibana_react/public/code_editor/remeasure_fonts.ts +++ b/src/plugins/kibana_react/public/code_editor/remeasure_fonts.ts @@ -12,15 +12,17 @@ import { monaco } from '@kbn/monaco'; * When using custom fonts with monaco need to call `monaco.editor.remeasureFonts()` when custom fonts finished loading * Otherwise initial measurements on fallback font are used which causes visual glitches in the editor */ -if ('fonts' in window.document && 'ready' in window.document.fonts) { - window.document.fonts.ready - .then(() => { - monaco.editor.remeasureFonts(); - }) - .catch((e) => { - // eslint-disable-next-line no-console - console.warn('Failed to remeasureFonts in '); - // eslint-disable-next-line no-console - console.warn(e); - }); +export function remeasureFonts() { + if ('fonts' in window.document && 'ready' in window.document.fonts) { + window.document.fonts.ready + .then(() => { + monaco.editor.remeasureFonts(); + }) + .catch((e) => { + // eslint-disable-next-line no-console + console.warn('Failed to remeasureFonts in '); + // eslint-disable-next-line no-console + console.warn(e); + }); + } } diff --git a/src/plugins/share/common/short_url_routes.ts b/src/plugins/share/common/short_url_routes.ts index d7a87463c0a98..6a5919f7e30cc 100644 --- a/src/plugins/share/common/short_url_routes.ts +++ b/src/plugins/share/common/short_url_routes.ts @@ -8,13 +8,4 @@ export const GOTO_PREFIX = '/goto'; -export const getUrlIdFromGotoRoute = (path: string) => - path.match(new RegExp(`${GOTO_PREFIX}/(.*)$`))?.[1]; - export const getGotoPath = (urlId: string) => `${GOTO_PREFIX}/${urlId}`; - -export const GETTER_PREFIX = '/api/short_url'; - -export const getUrlPath = (urlId: string) => `${GETTER_PREFIX}/${urlId}`; - -export const CREATE_PATH = '/api/shorten_url'; diff --git a/src/plugins/share/common/url_service/locators/locator.ts b/src/plugins/share/common/url_service/locators/locator.ts index 2bacdd67875bd..224a6eac07e8f 100644 --- a/src/plugins/share/common/url_service/locators/locator.ts +++ b/src/plugins/share/common/url_service/locators/locator.ts @@ -118,6 +118,15 @@ export class Locator

implements LocatorPublic

{ }); } + public navigateSync(locatorParams: P, navigationParams: LocatorNavigationParams = {}): void { + this.navigate(locatorParams, navigationParams).catch((error) => { + // eslint-disable-next-line no-console + console.log(`Failed to navigate [locator = ${this.id}].`, locatorParams, navigationParams); + // eslint-disable-next-line no-console + console.error(error); + }); + } + public readonly useUrl = ( params: P, getUrlParams?: LocatorGetUrlParams, diff --git a/src/plugins/share/common/url_service/locators/short_url_redirect_locator.ts b/src/plugins/share/common/url_service/locators/short_url_redirect_locator.ts new file mode 100644 index 0000000000000..ade5103670534 --- /dev/null +++ b/src/plugins/share/common/url_service/locators/short_url_redirect_locator.ts @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { SerializableRecord } from '@kbn/utility-types'; +import type { KibanaLocation, LocatorDefinition } from '../../url_service'; + +export const SHORT_URL_REDIRECT_LOCATOR = 'SHORT_URL_REDIRECT_LOCATOR'; + +export interface ShortUrlRedirectLocatorParams extends SerializableRecord { + slug: string; +} + +/** + * Locator that points to a frontend short URL redirect app by slug. + */ +export class ShortUrlRedirectLocatorDefinition + implements LocatorDefinition +{ + public readonly id = SHORT_URL_REDIRECT_LOCATOR; + + public async getLocation(params: ShortUrlRedirectLocatorParams): Promise { + const { slug } = params; + + return { + app: 'r', + path: 's/' + slug, + state: {}, + }; + } +} diff --git a/src/plugins/share/common/url_service/locators/types.ts b/src/plugins/share/common/url_service/locators/types.ts index c64dc588aaf22..c8cfcc503ce35 100644 --- a/src/plugins/share/common/url_service/locators/types.ts +++ b/src/plugins/share/common/url_service/locators/types.ts @@ -70,9 +70,10 @@ export interface LocatorPublic

extends Persistable /** * Returns a URL as a string. * - * @deprecated Use `getRedirectUrl` instead. `getRedirectUrl` will preserve - * the location state, whereas the `getUrl` just return the URL without - * the location state. + * You may want to use `getRedirectUrl` instead. `getRedirectUrl` will + * preserve the location state, whereas the `getUrl` just returns the URL + * without the location state. Use this method if you know you don't need + * remember the location state and version of the URL locator. * * @param params URL locator parameters. * @param getUrlParams URL construction parameters. @@ -98,6 +99,16 @@ export interface LocatorPublic

extends Persistable */ navigate(params: P, navigationParams?: LocatorNavigationParams): Promise; + /** + * Synchronous fire-and-forget navigation method. Use it when you want to + * navigate without waiting for the navigation to complete and you don't + * care to process any async promise errors. + * + * @param params URL locator parameters. + * @param navigationParams Navigation parameters. + */ + navigateSync(params: P, navigationParams?: LocatorNavigationParams): void; + /** * React hook which returns a URL string given locator parameters. Returns * empty string if URL is being loaded or an error happened. diff --git a/src/plugins/share/common/url_service/short_urls/types.ts b/src/plugins/share/common/url_service/short_urls/types.ts index 698ffe7b8421b..44e11a0610a66 100644 --- a/src/plugins/share/common/url_service/short_urls/types.ts +++ b/src/plugins/share/common/url_service/short_urls/types.ts @@ -16,13 +16,14 @@ import type { LocatorPublic, ILocatorClient, LocatorData } from '../locators'; * request and the current Kibana version. On the client, the Short URL Service * needs no dependencies. */ -export interface IShortUrlClientFactory { - get(dependencies: D): IShortUrlClient; +export interface IShortUrlClientFactory { + get(dependencies: D): Client; } -export type IShortUrlClientFactoryProvider = (params: { - locators: ILocatorClient; -}) => IShortUrlClientFactory; +export type IShortUrlClientFactoryProvider< + D, + ShortUrlClient extends IShortUrlClient = IShortUrlClient +> = (params: { locators: ILocatorClient }) => IShortUrlClientFactory; /** * CRUD-like API for short URLs. diff --git a/src/plugins/share/common/url_service/url_service.ts b/src/plugins/share/common/url_service/url_service.ts index 24e2ea0b62379..f25ccd30c863b 100644 --- a/src/plugins/share/common/url_service/url_service.ts +++ b/src/plugins/share/common/url_service/url_service.ts @@ -7,24 +7,31 @@ */ import { LocatorClient, LocatorClientDependencies } from './locators'; -import { IShortUrlClientFactoryProvider, IShortUrlClientFactory } from './short_urls'; +import { + IShortUrlClientFactoryProvider, + IShortUrlClientFactory, + IShortUrlClient, +} from './short_urls'; -export interface UrlServiceDependencies extends LocatorClientDependencies { - shortUrls: IShortUrlClientFactoryProvider; +export interface UrlServiceDependencies< + D = unknown, + ShortUrlClient extends IShortUrlClient = IShortUrlClient +> extends LocatorClientDependencies { + shortUrls: IShortUrlClientFactoryProvider; } /** * Common URL Service client interface for server-side and client-side. */ -export class UrlService { +export class UrlService { /** * Client to work with locators. */ public readonly locators: LocatorClient; - public readonly shortUrls: IShortUrlClientFactory; + public readonly shortUrls: IShortUrlClientFactory; - constructor(protected readonly deps: UrlServiceDependencies) { + constructor(protected readonly deps: UrlServiceDependencies) { this.locators = new LocatorClient(deps); this.shortUrls = deps.shortUrls({ locators: this.locators, diff --git a/src/plugins/share/public/components/__snapshots__/share_context_menu.test.tsx.snap b/src/plugins/share/public/components/__snapshots__/share_context_menu.test.tsx.snap index 95d3026f66d37..19be58c7792b4 100644 --- a/src/plugins/share/public/components/__snapshots__/share_context_menu.test.tsx.snap +++ b/src/plugins/share/public/components/__snapshots__/share_context_menu.test.tsx.snap @@ -10,9 +10,8 @@ exports[`shareContextMenuExtensions should sort ascending on sort order first an Object { "content": , "id": 1, "title": "Permalink", @@ -70,9 +69,8 @@ exports[`should only render permalink panel when there are no other panels 1`] = Object { "content": , "id": 1, "title": "Permalink", @@ -94,9 +92,8 @@ exports[`should render context menu panel when there are more than one panel 1`] Object { "content": , "id": 1, "title": "Permalink", @@ -104,10 +101,9 @@ exports[`should render context menu panel when there are more than one panel 1`] Object { "content": , "id": 2, "title": "Embed Code", diff --git a/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap b/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap index 0c80b72dc06b6..3278c01dd86da 100644 --- a/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap +++ b/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap @@ -482,25 +482,6 @@ exports[`share url panel content should hide short url section when allowShortUr } /> - - } - labelType="label" - > - - diff --git a/src/plugins/share/public/components/share_context_menu.test.tsx b/src/plugins/share/public/components/share_context_menu.test.tsx index c1c867fe67877..a101d3e03b58f 100644 --- a/src/plugins/share/public/components/share_context_menu.test.tsx +++ b/src/plugins/share/public/components/share_context_menu.test.tsx @@ -8,23 +8,19 @@ import { ShareMenuItem } from '../types'; -jest.mock('../lib/url_shortener', () => ({})); - import React from 'react'; import { shallow } from 'enzyme'; -import { ShareContextMenu } from './share_context_menu'; +import { ShareContextMenu, ShareContextMenuProps } from './share_context_menu'; -const defaultProps = { +const defaultProps: ShareContextMenuProps = { allowEmbed: true, allowShortUrl: false, shareMenuItems: [], sharingData: null, - isDirty: false, onClose: () => {}, - basePath: '', - post: () => Promise.resolve({} as any), objectType: 'dashboard', + urlService: {} as any, }; test('should render context menu panel when there are more than one panel', () => { diff --git a/src/plugins/share/public/components/share_context_menu.tsx b/src/plugins/share/public/components/share_context_menu.tsx index b15fbc32e8aa8..66cef3e663af3 100644 --- a/src/plugins/share/public/components/share_context_menu.tsx +++ b/src/plugins/share/public/components/share_context_menu.tsx @@ -12,14 +12,14 @@ import { I18nProvider } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { EuiContextMenu, EuiContextMenuPanelDescriptor } from '@elastic/eui'; -import { HttpStart } from 'kibana/public'; import type { Capabilities } from 'src/core/public'; import { UrlPanelContent } from './url_panel_content'; import { ShareMenuItem, ShareContextMenuPanelItem, UrlParamExtension } from '../types'; import { AnonymousAccessServiceContract } from '../../common/anonymous_access'; +import type { BrowserUrlService } from '../types'; -interface Props { +export interface ShareContextMenuProps { allowEmbed: boolean; allowShortUrl: boolean; objectId?: string; @@ -28,14 +28,13 @@ interface Props { shareMenuItems: ShareMenuItem[]; sharingData: any; onClose: () => void; - basePath: string; - post: HttpStart['post']; embedUrlParamExtensions?: UrlParamExtension[]; anonymousAccess?: AnonymousAccessServiceContract; showPublicUrlSwitch?: (anonymousUserCapabilities: Capabilities) => boolean; + urlService: BrowserUrlService; } -export class ShareContextMenu extends Component { +export class ShareContextMenu extends Component { public render() { const { panels, initialPanelId } = this.getPanels(); return ( @@ -63,11 +62,10 @@ export class ShareContextMenu extends Component { allowShortUrl={this.props.allowShortUrl} objectId={this.props.objectId} objectType={this.props.objectType} - basePath={this.props.basePath} - post={this.props.post} shareableUrl={this.props.shareableUrl} anonymousAccess={this.props.anonymousAccess} showPublicUrlSwitch={this.props.showPublicUrlSwitch} + urlService={this.props.urlService} /> ), }; @@ -93,12 +91,11 @@ export class ShareContextMenu extends Component { isEmbedded objectId={this.props.objectId} objectType={this.props.objectType} - basePath={this.props.basePath} - post={this.props.post} shareableUrl={this.props.shareableUrl} urlParamExtensions={this.props.embedUrlParamExtensions} anonymousAccess={this.props.anonymousAccess} showPublicUrlSwitch={this.props.showPublicUrlSwitch} + urlService={this.props.urlService} /> ), }; diff --git a/src/plugins/share/public/components/url_panel_content.test.tsx b/src/plugins/share/public/components/url_panel_content.test.tsx index 5d99609cd0e02..969c5dffa864f 100644 --- a/src/plugins/share/public/components/url_panel_content.test.tsx +++ b/src/plugins/share/public/components/url_panel_content.test.tsx @@ -8,20 +8,46 @@ import { EuiCopy, EuiRadioGroup, EuiSwitch, EuiSwitchEvent } from '@elastic/eui'; -jest.mock('../lib/url_shortener', () => ({ shortenUrl: jest.fn() })); - import React from 'react'; import { shallow } from 'enzyme'; -import { ExportUrlAsType, UrlPanelContent } from './url_panel_content'; +import { ExportUrlAsType, UrlPanelContent, UrlPanelContentProps } from './url_panel_content'; import { act } from 'react-dom/test-utils'; -import { shortenUrl } from '../lib/url_shortener'; -const defaultProps = { +const createFromLongUrl = jest.fn(async () => ({ + url: 'http://localhost/short/url', + data: {} as any, + locator: {} as any, + params: {} as any, +})); + +const defaultProps: UrlPanelContentProps = { allowShortUrl: true, objectType: 'dashboard', - basePath: '', - post: () => Promise.resolve({} as any), + urlService: { + locators: {} as any, + shortUrls: { + get: () => + ({ + createFromLongUrl, + create: async () => { + throw new Error('not implemented'); + }, + createWithLocator: async () => { + throw new Error('not implemented'); + }, + get: async () => { + throw new Error('not implemented'); + }, + resolve: async () => { + throw new Error('not implemented'); + }, + delete: async () => { + throw new Error('not implemented'); + }, + } as any), + }, + } as any, }; describe('share url panel content', () => { @@ -61,10 +87,6 @@ describe('share url panel content', () => { describe('short url', () => { test('should generate short url and put it in copy button', async () => { - const shortenUrlMock = shortenUrl as jest.Mock; - shortenUrlMock.mockReset(); - shortenUrlMock.mockResolvedValue('http://localhost/short/url'); - const component = shallow( { target: { checked: true }, } as unknown as EuiSwitchEvent); }); - expect(shortenUrlMock).toHaveBeenCalledWith( - 'http://localhost:5601/app/myapp#/?_g=()&_a=()', - expect.anything() + expect(createFromLongUrl).toHaveBeenCalledWith( + 'http://localhost:5601/app/myapp#/?_g=()&_a=()' ); expect(component.find(EuiCopy).prop('textToCopy')).toContain('http://localhost/short/url'); }); @@ -151,10 +172,6 @@ describe('share url panel content', () => { }); test('should generate short url with embed flag and put it in copy button', async () => { - const shortenUrlMock = shortenUrl as jest.Mock; - shortenUrlMock.mockReset(); - shortenUrlMock.mockResolvedValue('http://localhost/short/url'); - const component = shallow( { target: { checked: true }, } as unknown as EuiSwitchEvent); }); - expect(shortenUrlMock).toHaveBeenCalledWith( - 'http://localhost:5601/app/myapp#/?embed=true&_g=()&_a=()', - expect.anything() + expect(createFromLongUrl).toHaveBeenCalledWith( + 'http://localhost:5601/app/myapp#/?embed=true&_g=()&_a=()' ); expect(component.find(EuiCopy).prop('textToCopy')).toContain('http://localhost/short/url'); }); diff --git a/src/plugins/share/public/components/url_panel_content.tsx b/src/plugins/share/public/components/url_panel_content.tsx index 8670b84d5c48e..2399466ca575a 100644 --- a/src/plugins/share/public/components/url_panel_content.tsx +++ b/src/plugins/share/public/components/url_panel_content.tsx @@ -7,7 +7,6 @@ */ import React, { Component, ReactElement } from 'react'; - import { EuiButton, EuiCopy, @@ -26,28 +25,26 @@ import { import { format as formatUrl, parse as parseUrl } from 'url'; import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; -import { HttpStart } from 'kibana/public'; import { i18n } from '@kbn/i18n'; import type { Capabilities } from 'src/core/public'; -import { shortenUrl } from '../lib/url_shortener'; import { UrlParamExtension } from '../types'; import { AnonymousAccessServiceContract, AnonymousAccessState, } from '../../common/anonymous_access'; +import type { BrowserUrlService } from '../types'; -interface Props { +export interface UrlPanelContentProps { allowShortUrl: boolean; isEmbedded?: boolean; objectId?: string; objectType: string; shareableUrl?: string; - basePath: string; - post: HttpStart['post']; urlParamExtensions?: UrlParamExtension[]; anonymousAccess?: AnonymousAccessServiceContract; showPublicUrlSwitch?: (anonymousUserCapabilities: Capabilities) => boolean; + urlService: BrowserUrlService; } export enum ExportUrlAsType { @@ -73,11 +70,11 @@ interface State { showPublicUrlSwitch: boolean; } -export class UrlPanelContent extends Component { +export class UrlPanelContent extends Component { private mounted?: boolean; private shortUrlCache?: string; - constructor(props: Props) { + constructor(props: UrlPanelContentProps) { super(props); this.shortUrlCache = undefined; @@ -143,21 +140,27 @@ export class UrlPanelContent extends Component { } public render() { + const shortUrlSwitch = this.renderShortUrlSwitch(); + const publicUrlSwitch = this.renderPublicUrlSwitch(); + + const urlRow = (!!shortUrlSwitch || !!publicUrlSwitch) && ( + } + > + <> + + {shortUrlSwitch} + {publicUrlSwitch} + + + ); + return ( {this.renderExportAsRadioGroup()} {this.renderUrlParamExtensions()} - - } - > - <> - - {this.renderShortUrlSwitch()} - {this.renderPublicUrlSwitch()} - - + {urlRow} @@ -361,16 +364,16 @@ export class UrlPanelContent extends Component { }); try { - const shortUrl = await shortenUrl(this.getSnapshotUrl(), { - basePath: this.props.basePath, - post: this.props.post, - }); + const snapshotUrl = this.getSnapshotUrl(); + const shortUrl = await this.props.urlService.shortUrls + .get(null) + .createFromLongUrl(snapshotUrl); if (!this.mounted) { return; } - this.shortUrlCache = shortUrl; + this.shortUrlCache = shortUrl.url; this.setState( { isCreatingShortUrl: false, @@ -474,7 +477,7 @@ export class UrlPanelContent extends Component { this.state.exportUrlAs === ExportUrlAsType.EXPORT_URL_AS_SAVED_OBJECT || !this.props.allowShortUrl ) { - return; + return null; } const shortUrlLabel = ( diff --git a/src/plugins/share/public/index.ts b/src/plugins/share/public/index.ts index 2e57a9347b057..86d29f6ad84cf 100644 --- a/src/plugins/share/public/index.ts +++ b/src/plugins/share/public/index.ts @@ -22,6 +22,7 @@ export type { ShareMenuItem, ShowShareMenuOptions, ShareContextMenuPanelItem, + BrowserUrlService, } from './types'; export type { diff --git a/src/plugins/share/public/lib/url_shortener.test.ts b/src/plugins/share/public/lib/url_shortener.test.ts deleted file mode 100644 index 12c2a769d7037..0000000000000 --- a/src/plugins/share/public/lib/url_shortener.test.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { shortenUrl } from './url_shortener'; - -describe('Url shortener', () => { - const shareId = 'id123'; - - let postStub: jest.Mock; - beforeEach(() => { - postStub = jest.fn(() => Promise.resolve({ id: shareId })); - }); - - describe('Shorten without base path', () => { - it('should shorten urls with a port', async () => { - const shortUrl = await shortenUrl('http://localhost:5601/app/kibana#123', { - basePath: '', - post: postStub, - }); - expect(shortUrl).toBe(`http://localhost:5601/goto/${shareId}`); - }); - - it('should shorten urls without a port', async () => { - const shortUrl = await shortenUrl('http://localhost/app/kibana#123', { - basePath: '', - post: postStub, - }); - expect(shortUrl).toBe(`http://localhost/goto/${shareId}`); - }); - }); - - describe('Shorten with base path', () => { - const basePath = '/foo'; - - it('should shorten urls with a port', async () => { - const shortUrl = await shortenUrl(`http://localhost:5601${basePath}/app/kibana#123`, { - basePath, - post: postStub, - }); - expect(shortUrl).toBe(`http://localhost:5601${basePath}/goto/${shareId}`); - }); - - it('should shorten urls without a port', async () => { - const shortUrl = await shortenUrl(`http://localhost${basePath}/app/kibana#123`, { - basePath, - post: postStub, - }); - expect(shortUrl).toBe(`http://localhost${basePath}/goto/${shareId}`); - }); - - it('should shorten urls with a query string', async () => { - const shortUrl = await shortenUrl(`http://localhost${basePath}/app/kibana?foo#123`, { - basePath, - post: postStub, - }); - expect(shortUrl).toBe(`http://localhost${basePath}/goto/${shareId}`); - }); - - it('should shorten urls without a hash', async () => { - const shortUrl = await shortenUrl(`http://localhost${basePath}/app/kibana`, { - basePath, - post: postStub, - }); - expect(shortUrl).toBe(`http://localhost${basePath}/goto/${shareId}`); - }); - - it('should shorten urls with a query string in the hash', async () => { - const relativeUrl = - '/app/discover#/?_g=(refreshInterval:(pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))&_a=(columns:!(_source),index:%27logstash-*%27,interval:auto,query:(query_string:(analyze_wildcard:!t,query:%27*%27)),sort:!(%27@timestamp%27,desc))'; - const shortUrl = await shortenUrl(`http://localhost${basePath}${relativeUrl}`, { - basePath, - post: postStub, - }); - expect(shortUrl).toBe(`http://localhost${basePath}/goto/${shareId}`); - }); - }); -}); diff --git a/src/plugins/share/public/lib/url_shortener.ts b/src/plugins/share/public/lib/url_shortener.ts deleted file mode 100644 index 9a0ae9cfb0bad..0000000000000 --- a/src/plugins/share/public/lib/url_shortener.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import url from 'url'; -import { HttpStart } from 'kibana/public'; -import { getGotoPath } from '../../common/short_url_routes'; -import { LEGACY_SHORT_URL_LOCATOR_ID } from '../../common/url_service/locators/legacy_short_url_locator'; - -export async function shortenUrl( - absoluteUrl: string, - { basePath, post }: { basePath: string; post: HttpStart['post'] } -) { - const parsedUrl = url.parse(absoluteUrl); - - if (!parsedUrl || !parsedUrl.path) { - return; - } - - const path = parsedUrl.path.replace(basePath, ''); - const hash = parsedUrl.hash ? parsedUrl.hash : ''; - const relativeUrl = path + hash; - const body = JSON.stringify({ - locatorId: LEGACY_SHORT_URL_LOCATOR_ID, - params: { url: relativeUrl }, - }); - - const resp = await post<{ id: string }>('/api/short_url', { - body, - }); - - return url.format({ - protocol: parsedUrl.protocol, - host: parsedUrl.host, - pathname: `${basePath}${getGotoPath(resp.id)}`, - }); -} diff --git a/src/plugins/share/public/mocks.ts b/src/plugins/share/public/mocks.ts index 33cdf141de9f3..066767b87fcea 100644 --- a/src/plugins/share/public/mocks.ts +++ b/src/plugins/share/public/mocks.ts @@ -9,30 +9,30 @@ import { SerializableRecord } from '@kbn/utility-types'; import { SharePluginSetup, SharePluginStart } from '.'; import { LocatorPublic, UrlService } from '../common/url_service'; +import { BrowserShortUrlClient } from './url_service/short_urls/short_url_client'; +import type { BrowserShortUrlClientFactoryCreateParams } from './url_service/short_urls/short_url_client_factory'; export type Setup = jest.Mocked; export type Start = jest.Mocked; -const url = new UrlService({ +const url = new UrlService({ navigate: async () => {}, getUrl: async ({ app, path }, { absolute }) => { return `${absolute ? 'http://localhost:8888' : ''}/app/${app}${path}`; }, - shortUrls: () => ({ - get: () => ({ - create: async () => { - throw new Error('Not implemented'); - }, - get: async () => { - throw new Error('Not implemented'); - }, - delete: async () => { - throw new Error('Not implemented'); - }, - resolve: async () => { - throw new Error('Not implemented.'); - }, - }), + shortUrls: ({ locators }) => ({ + get: () => + new BrowserShortUrlClient({ + locators, + http: { + basePath: { + get: () => '', + }, + fetch: async () => { + throw new Error('fetch not implemented'); + }, + }, + }), }), }); @@ -70,6 +70,7 @@ const createLocator = (): jes getRedirectUrl: jest.fn(), useUrl: jest.fn(), navigate: jest.fn(), + navigateSync: jest.fn(), extract: jest.fn(), inject: jest.fn(), telemetry: jest.fn(), diff --git a/src/plugins/share/public/plugin.test.ts b/src/plugins/share/public/plugin.test.ts index 7d5da45f768d5..a13946e75caf4 100644 --- a/src/plugins/share/public/plugin.test.ts +++ b/src/plugins/share/public/plugin.test.ts @@ -41,38 +41,42 @@ describe('SharePlugin', () => { }); describe('start', () => { - test('wires up and returns show function, but not registry', async () => { - const coreSetup = coreMock.createSetup(); - const service = new SharePlugin(coreMock.createPluginInitializerContext()); - await service.setup(coreSetup); - const start = await service.start({} as CoreStart); - expect(registryMock.start).toHaveBeenCalled(); - expect(managerMock.start).toHaveBeenCalledWith( - expect.anything(), - expect.objectContaining({ - getShareMenuItems: expect.any(Function), - }), - undefined - ); - expect(start.toggleShareContextMenu).toBeDefined(); - }); + describe('share menu', () => { + test('wires up and returns show function, but not registry', async () => { + const coreSetup = coreMock.createSetup(); + const service = new SharePlugin(coreMock.createPluginInitializerContext()); + await service.setup(coreSetup); + const start = await service.start({} as CoreStart); + expect(registryMock.start).toHaveBeenCalled(); + expect(managerMock.start).toHaveBeenCalledWith( + expect.anything(), + expect.anything(), + expect.objectContaining({ + getShareMenuItems: expect.any(Function), + }), + undefined + ); + expect(start.toggleShareContextMenu).toBeDefined(); + }); - test('passes anonymous access service provider to the share menu manager when it is available', async () => { - const coreSetup = coreMock.createSetup(); - const service = new SharePlugin(coreMock.createPluginInitializerContext()); - const setup = await service.setup(coreSetup); - const anonymousAccessServiceProvider = () => anonymousAccessMock.create(); - setup.setAnonymousAccessServiceProvider(anonymousAccessServiceProvider); - const start = await service.start({} as CoreStart); - expect(registryMock.start).toHaveBeenCalled(); - expect(managerMock.start).toHaveBeenCalledWith( - expect.anything(), - expect.objectContaining({ - getShareMenuItems: expect.any(Function), - }), - anonymousAccessServiceProvider - ); - expect(start.toggleShareContextMenu).toBeDefined(); + test('passes anonymous access service provider to the share menu manager when it is available', async () => { + const coreSetup = coreMock.createSetup(); + const service = new SharePlugin(coreMock.createPluginInitializerContext()); + const setup = await service.setup(coreSetup); + const anonymousAccessServiceProvider = () => anonymousAccessMock.create(); + setup.setAnonymousAccessServiceProvider(anonymousAccessServiceProvider); + const start = await service.start({} as CoreStart); + expect(registryMock.start).toHaveBeenCalled(); + expect(managerMock.start).toHaveBeenCalledWith( + expect.anything(), + expect.anything(), + expect.objectContaining({ + getShareMenuItems: expect.any(Function), + }), + anonymousAccessServiceProvider + ); + expect(start.toggleShareContextMenu).toBeDefined(); + }); }); }); }); diff --git a/src/plugins/share/public/plugin.ts b/src/plugins/share/public/plugin.ts index 684d29caeb312..ce9eeb5c2da33 100644 --- a/src/plugins/share/public/plugin.ts +++ b/src/plugins/share/public/plugin.ts @@ -11,7 +11,6 @@ import './index.scss'; import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'src/core/public'; import { ShareMenuManager, ShareMenuManagerStart } from './services'; import { ShareMenuRegistry, ShareMenuRegistrySetup } from './services'; -import { createShortUrlRedirectApp } from './services/short_url_redirect_app'; import { UrlGeneratorsService, UrlGeneratorsSetup, @@ -20,8 +19,15 @@ import { import { UrlService } from '../common/url_service'; import { RedirectManager } from './url_service'; import type { RedirectOptions } from '../common/url_service/locators/redirect'; -import { LegacyShortUrlLocatorDefinition } from '../common/url_service/locators/legacy_short_url_locator'; +import { + BrowserShortUrlClientFactory, + BrowserShortUrlClientFactoryCreateParams, +} from './url_service/short_urls/short_url_client_factory'; +import type { BrowserShortUrlClient } from './url_service/short_urls/short_url_client'; import { AnonymousAccessServiceContract } from '../common'; +import { LegacyShortUrlLocatorDefinition } from '../common/url_service/locators/legacy_short_url_locator'; +import { ShortUrlRedirectLocatorDefinition } from '../common/url_service/locators/short_url_redirect_locator'; +import type { BrowserUrlService } from './types'; /** @public */ export type SharePluginSetup = ShareMenuRegistrySetup & { @@ -35,7 +41,7 @@ export type SharePluginSetup = ShareMenuRegistrySetup & { /** * Utilities to work with URL locators and short URLs. */ - url: UrlService; + url: BrowserUrlService; /** * Accepts serialized values for extracting a locator, migrating state from a provided version against @@ -61,7 +67,7 @@ export type SharePluginStart = ShareMenuManagerStart & { /** * Utilities to work with URL locators and short URLs. */ - url: UrlService; + url: BrowserUrlService; /** * Accepts serialized values for extracting a locator, migrating state from a provided version against @@ -76,16 +82,16 @@ export class SharePlugin implements Plugin { private readonly urlGeneratorsService = new UrlGeneratorsService(); private redirectManager?: RedirectManager; - private url?: UrlService; + private url?: BrowserUrlService; private anonymousAccessServiceProvider?: () => AnonymousAccessServiceContract; constructor(private readonly initializerContext: PluginInitializerContext) {} public setup(core: CoreSetup): SharePluginSetup { - const { application, http } = core; + const { http } = core; const { basePath } = http; - this.url = new UrlService({ + this.url = new UrlService({ baseUrl: basePath.get(), version: this.initializerContext.env.packageInfo.version, navigate: async ({ app, path, state }, { replace = false } = {}) => { @@ -104,32 +110,21 @@ export class SharePlugin implements Plugin { }); return url; }, - shortUrls: () => ({ - get: () => ({ - create: async () => { - throw new Error('Not implemented'); - }, - get: async () => { - throw new Error('Not implemented'); - }, - delete: async () => { - throw new Error('Not implemented'); - }, - resolve: async () => { - throw new Error('Not implemented.'); - }, + shortUrls: ({ locators }) => + new BrowserShortUrlClientFactory({ + http, + locators, }), - }), }); this.url.locators.create(new LegacyShortUrlLocatorDefinition()); - - application.register(createShortUrlRedirectApp(core, window.location, this.url)); + this.url.locators.create(new ShortUrlRedirectLocatorDefinition()); this.redirectManager = new RedirectManager({ url: this.url, }); - this.redirectManager.registerRedirectApp(core); + this.redirectManager.registerLocatorRedirectApp(core); + this.redirectManager.registerLegacyShortUrlRedirectApp(core); return { ...this.shareMenuRegistry.setup(), @@ -146,12 +141,15 @@ export class SharePlugin implements Plugin { } public start(core: CoreStart): SharePluginStart { + const sharingContextMenuStart = this.shareContextMenu.start( + core, + this.url!, + this.shareMenuRegistry.start(), + this.anonymousAccessServiceProvider + ); + return { - ...this.shareContextMenu.start( - core, - this.shareMenuRegistry.start(), - this.anonymousAccessServiceProvider - ), + ...sharingContextMenuStart, urlGenerators: this.urlGeneratorsService.start(core), url: this.url!, navigate: (options: RedirectOptions) => this.redirectManager!.navigate(options), diff --git a/src/plugins/share/public/services/share_menu_manager.tsx b/src/plugins/share/public/services/share_menu_manager.tsx index 237e71009d205..dc847ffd07351 100644 --- a/src/plugins/share/public/services/share_menu_manager.tsx +++ b/src/plugins/share/public/services/share_menu_manager.tsx @@ -11,12 +11,13 @@ import ReactDOM from 'react-dom'; import { I18nProvider } from '@kbn/i18n-react'; import { EuiWrappingPopover } from '@elastic/eui'; -import { CoreStart, HttpStart, ThemeServiceStart } from 'kibana/public'; +import { CoreStart, ThemeServiceStart } from 'kibana/public'; import { KibanaThemeProvider } from '../../../kibana_react/public'; import { ShareContextMenu } from '../components/share_context_menu'; import { ShareMenuItem, ShowShareMenuOptions } from '../types'; import { ShareMenuRegistryStart } from './share_menu_registry'; import { AnonymousAccessServiceContract } from '../../common/anonymous_access'; +import type { BrowserUrlService } from '../types'; export class ShareMenuManager { private isOpen = false; @@ -25,6 +26,7 @@ export class ShareMenuManager { start( core: CoreStart, + urlService: BrowserUrlService, shareRegistry: ShareMenuRegistryStart, anonymousAccessServiceProvider?: () => AnonymousAccessServiceContract ) { @@ -40,8 +42,7 @@ export class ShareMenuManager { this.toggleShareContextMenu({ ...options, menuItems, - post: core.http.post, - basePath: core.http.basePath.get(), + urlService, anonymousAccess, theme: core.theme, }); @@ -63,16 +64,14 @@ export class ShareMenuManager { sharingData, menuItems, shareableUrl, - post, - basePath, embedUrlParamExtensions, - anonymousAccess, theme, showPublicUrlSwitch, + urlService, + anonymousAccess, }: ShowShareMenuOptions & { menuItems: ShareMenuItem[]; - post: HttpStart['post']; - basePath: string; + urlService: BrowserUrlService; anonymousAccess: AnonymousAccessServiceContract | undefined; theme: ThemeServiceStart; }) { @@ -104,11 +103,10 @@ export class ShareMenuManager { sharingData={sharingData} shareableUrl={shareableUrl} onClose={this.onClose} - post={post} - basePath={basePath} embedUrlParamExtensions={embedUrlParamExtensions} anonymousAccess={anonymousAccess} showPublicUrlSwitch={showPublicUrlSwitch} + urlService={urlService} /> diff --git a/src/plugins/share/public/services/short_url_redirect_app.ts b/src/plugins/share/public/services/short_url_redirect_app.ts deleted file mode 100644 index b647e38fc1482..0000000000000 --- a/src/plugins/share/public/services/short_url_redirect_app.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { CoreSetup } from 'kibana/public'; -import { getUrlIdFromGotoRoute, getUrlPath, GOTO_PREFIX } from '../../common/short_url_routes'; -import { - LEGACY_SHORT_URL_LOCATOR_ID, - LegacyShortUrlLocatorParams, -} from '../../common/url_service/locators/legacy_short_url_locator'; -import type { UrlService, ShortUrlData } from '../../common/url_service'; - -export const createShortUrlRedirectApp = ( - core: CoreSetup, - location: Location, - urlService: UrlService -) => ({ - id: 'short_url_redirect', - appRoute: GOTO_PREFIX, - chromeless: true, - title: 'Short URL Redirect', - async mount() { - const urlId = getUrlIdFromGotoRoute(location.pathname); - if (!urlId) throw new Error('Url id not present in path'); - - const response = await core.http.get(getUrlPath(urlId)); - const locator = urlService.locators.get(response.locator.id); - - if (!locator) throw new Error(`Locator [id = ${response.locator.id}] not found.`); - - if (response.locator.id !== LEGACY_SHORT_URL_LOCATOR_ID) { - await locator.navigate(response.locator.state, { replace: true }); - return () => {}; - } - - let redirectUrl = (response.locator.state as LegacyShortUrlLocatorParams).url; - const storeInSessionStorage = core.uiSettings.get('state:storeInSessionStorage'); - if (storeInSessionStorage) { - const { hashUrl } = await import('../../../kibana_utils/public'); - redirectUrl = hashUrl(redirectUrl); - } - - const url = core.http.basePath.prepend(redirectUrl); - - location.href = url; - - return () => {}; - }, -}); diff --git a/src/plugins/share/public/types.ts b/src/plugins/share/public/types.ts index 2fc4778ffd4f2..084108bf49fa9 100644 --- a/src/plugins/share/public/types.ts +++ b/src/plugins/share/public/types.ts @@ -10,6 +10,14 @@ import { ComponentType } from 'react'; import { EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { EuiContextMenuPanelItemDescriptorEntry } from '@elastic/eui/src/components/context_menu/context_menu'; import type { Capabilities } from 'src/core/public'; +import type { UrlService } from '../common/url_service'; +import type { BrowserShortUrlClientFactoryCreateParams } from './url_service/short_urls/short_url_client_factory'; +import type { BrowserShortUrlClient } from './url_service/short_urls/short_url_client'; + +export type BrowserUrlService = UrlService< + BrowserShortUrlClientFactoryCreateParams, + BrowserShortUrlClient +>; /** * @public diff --git a/src/plugins/share/public/url_service/redirect/redirect_manager.test.ts b/src/plugins/share/public/url_service/redirect/redirect_manager.test.ts index 1fde60d4389fa..817e0e0fbad6a 100644 --- a/src/plugins/share/public/url_service/redirect/redirect_manager.test.ts +++ b/src/plugins/share/public/url_service/redirect/redirect_manager.test.ts @@ -40,23 +40,33 @@ describe('on page mount', () => { test('execute locator "navigate" method', async () => { const { locator, manager } = setup(); const spy = jest.spyOn(locator, 'navigate'); + const search = `l=TEST_LOCATOR&v=0.0.3&p=${encodeURIComponent(JSON.stringify({}))}`; expect(spy).toHaveBeenCalledTimes(0); - manager.onMount(`l=TEST_LOCATOR&v=0.0.3&p=${encodeURIComponent(JSON.stringify({}))}`); + manager.onMount({ + search, + hash: '', + pathname: '', + state: null, + }); expect(spy).toHaveBeenCalledTimes(1); }); test('passes arguments provided in URL to locator "navigate" method', async () => { const { locator, manager } = setup(); const spy = jest.spyOn(locator, 'navigate'); + const search = `l=TEST_LOCATOR&v=0.0.3&p=${encodeURIComponent( + JSON.stringify({ + foo: 'bar', + }) + )}`; - manager.onMount( - `l=TEST_LOCATOR&v=0.0.3&p=${encodeURIComponent( - JSON.stringify({ - foo: 'bar', - }) - )}` - ); + manager.onMount({ + search, + hash: '', + pathname: '', + state: null, + }); expect(spy).toHaveBeenCalledWith( { foo: 'bar', @@ -68,14 +78,18 @@ describe('on page mount', () => { test('migrates parameters on-the-fly to the latest version', async () => { const { locator, manager } = setup(); const spy = jest.spyOn(locator, 'navigate'); + const search = `l=TEST_LOCATOR&v=0.0.1&p=${encodeURIComponent( + JSON.stringify({ + num: 1, + }) + )}`; - manager.onMount( - `l=TEST_LOCATOR&v=0.0.1&p=${encodeURIComponent( - JSON.stringify({ - num: 1, - }) - )}` - ); + manager.onMount({ + search, + hash: '', + pathname: '', + state: null, + }); expect(spy).toHaveBeenCalledWith( { num: 2, @@ -86,11 +100,17 @@ describe('on page mount', () => { test('throws if locator does not exist', async () => { const { manager } = setup(); + const search = `l=TEST_LOCATOR_WHICH_DOES_NOT_EXIST&v=0.0.3&p=${encodeURIComponent( + JSON.stringify({}) + )}`; expect(() => - manager.onMount( - `l=TEST_LOCATOR_WHICH_DOES_NOT_EXIST&v=0.0.3&p=${encodeURIComponent(JSON.stringify({}))}` - ) + manager.onMount({ + search, + hash: '', + pathname: '', + state: null, + }) ).toThrowErrorMatchingInlineSnapshot( `"Locator [ID = TEST_LOCATOR_WHICH_DOES_NOT_EXIST] does not exist."` ); diff --git a/src/plugins/share/public/url_service/redirect/redirect_manager.ts b/src/plugins/share/public/url_service/redirect/redirect_manager.ts index b7b2d39589c33..1f38b78670d55 100644 --- a/src/plugins/share/public/url_service/redirect/redirect_manager.ts +++ b/src/plugins/share/public/url_service/redirect/redirect_manager.ts @@ -9,9 +9,14 @@ import type { CoreSetup } from 'src/core/public'; import { i18n } from '@kbn/i18n'; import { BehaviorSubject } from 'rxjs'; +import type { Location } from 'history'; import { migrateToLatest } from '../../../../kibana_utils/common'; import type { UrlService } from '../../../common/url_service'; import { parseSearchParams, RedirectOptions } from '../../../common/url_service/locators/redirect'; +import { + LEGACY_SHORT_URL_LOCATOR_ID, + LegacyShortUrlLocatorParams, +} from '../../../common/url_service/locators/legacy_short_url_locator'; export interface RedirectManagerDependencies { url: UrlService; @@ -22,7 +27,7 @@ export class RedirectManager { constructor(public readonly deps: RedirectManagerDependencies) {} - public registerRedirectApp(core: CoreSetup) { + public registerLocatorRedirectApp(core: CoreSetup) { core.application.register({ id: 'r', title: 'Redirect endpoint', @@ -30,7 +35,7 @@ export class RedirectManager { mount: async (params) => { const { render } = await import('./render'); const unmount = render(params.element, { manager: this, theme: core.theme }); - this.onMount(params.history.location.search); + this.onMount(params.history.location); return () => { unmount(); }; @@ -38,11 +43,68 @@ export class RedirectManager { }); } - public onMount(urlLocationSearch: string) { + public registerLegacyShortUrlRedirectApp(core: CoreSetup) { + core.application.register({ + id: 'short_url_redirect', + appRoute: '/goto', + title: 'Short URL Redirect', + chromeless: true, + mount: async () => { + const urlId = location.pathname.match(new RegExp(`/goto/(.*)$`))?.[1]; + if (!urlId) throw new Error('Url id not present in path'); + const urlService = this.deps.url; + const shortUrls = urlService.shortUrls.get(null); + const shortUrl = await shortUrls.get(urlId); + const locatorId = shortUrl.data.locator.id; + const locator = urlService.locators.get(locatorId); + if (!locator) throw new Error(`Locator [id = ${locatorId}] not found.`); + const locatorState = shortUrl.data.locator.state; + if (shortUrl.data.locator.id !== LEGACY_SHORT_URL_LOCATOR_ID) { + await locator.navigate(locatorState, { replace: true }); + return () => {}; + } + let redirectUrl = (locatorState as LegacyShortUrlLocatorParams).url; + const storeInSessionStorage = core.uiSettings.get('state:storeInSessionStorage'); + if (storeInSessionStorage) { + const { hashUrl } = await import('../../../../kibana_utils/public'); + redirectUrl = hashUrl(redirectUrl); + } + const url = core.http.basePath.prepend(redirectUrl); + location.href = url; + return () => {}; + }, + }); + } + + public onMount(location: Location) { + const pathname = location.pathname; + const isShortUrlRedirectBySlug = pathname.startsWith('/s/'); + if (isShortUrlRedirectBySlug) { + this.navigateToShortUrlBySlug(pathname.substring('/s/'.length)); + return; + } + const urlLocationSearch = location.search; const options = this.parseSearchParams(urlLocationSearch); this.navigate(options); } + private navigateToShortUrlBySlug(slug: string) { + (async () => { + const urlService = this.deps.url; + const shortUrls = urlService.shortUrls.get(null); + const shortUrl = await shortUrls.resolve(slug); + const locatorId = shortUrl.data.locator.id; + const locator = urlService.locators.get(locatorId); + if (!locator) throw new Error(`Locator "${locatorId}" not found.`); + const locatorState = shortUrl.data.locator.state; + await locator.navigate(locatorState, { replace: true }); + })().catch((error) => { + this.error$.next(error); + // eslint-disable-next-line no-console + console.error(error); + }); + } + public navigate(options: RedirectOptions) { const locator = this.deps.url.locators.get(options.id); diff --git a/src/plugins/share/public/url_service/short_urls/short_url_client.test.ts b/src/plugins/share/public/url_service/short_urls/short_url_client.test.ts new file mode 100644 index 0000000000000..0f385c42e2de5 --- /dev/null +++ b/src/plugins/share/public/url_service/short_urls/short_url_client.test.ts @@ -0,0 +1,376 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { of } from '../../../../kibana_utils'; +import { + KibanaLocation, + Locator, + LocatorGetUrlParams, + UrlService, +} from '../../../common/url_service'; +import { + LegacyShortUrlLocatorDefinition, + LegacyShortUrlLocatorParams, + LEGACY_SHORT_URL_LOCATOR_ID, +} from '../../../common/url_service/locators/legacy_short_url_locator'; +import { ShortUrlRedirectLocatorDefinition } from '../../../common/url_service/locators/short_url_redirect_locator'; +import { BrowserShortUrlClientHttp, BrowserShortUrlClient } from './short_url_client'; +import { + BrowserShortUrlClientFactory, + BrowserShortUrlClientFactoryCreateParams, +} from './short_url_client_factory'; + +const setup = () => { + const navigate = jest.fn(async () => {}); + const getUrl = jest.fn( + async (location: KibanaLocation, params: LocatorGetUrlParams): Promise => { + return `${params.absolute ? 'https://example.com' : ''}/xyz/${location.app}/${location.path}`; + } + ); + const http: BrowserShortUrlClientHttp = { + basePath: { + get: () => '/xyz', + }, + fetch: jest.fn(async () => { + return {} as any; + }), + }; + const service = new UrlService({ + baseUrl: '/xyz', + version: '1.2.3', + navigate, + getUrl, + shortUrls: ({ locators }) => + new BrowserShortUrlClientFactory({ + http, + locators, + }), + }); + + service.locators.create(new LegacyShortUrlLocatorDefinition()); + service.locators.create(new ShortUrlRedirectLocatorDefinition()); + + const legacyShortUrlLocator = service.locators.get( + LEGACY_SHORT_URL_LOCATOR_ID + )!; + + return { + service, + navigate, + getUrl, + http, + legacyShortUrlLocator, + }; +}; + +describe('create()', () => { + test('calls HTTP short URL creation endpoint', async () => { + const { service, http, legacyShortUrlLocator } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + await service.shortUrls.get(null).create({ + locator: legacyShortUrlLocator!, + params: { + url: 'https://example.com/foo/bar', + }, + }); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(fetchSpy).toHaveBeenCalledWith('/api/short_url', { + method: 'POST', + body: expect.any(String), + }); + expect(JSON.parse(fetchSpy.mock.calls[0][1].body)).toStrictEqual({ + humanReadableSlug: false, + locatorId: LEGACY_SHORT_URL_LOCATOR_ID, + params: { + url: 'https://example.com/foo/bar', + }, + }); + }); + + test('returns the short URL object', async () => { + const { service, http } = setup(); + const legacyShortUrlLocator = service.locators.get( + LEGACY_SHORT_URL_LOCATOR_ID + ); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const shortUrlData = { + id: '123', + slug: 'yellow-orange-tomato', + accessCount: 0, + accessDate: 1600000000000, + createDate: 1600000000000, + locator: { + id: LEGACY_SHORT_URL_LOCATOR_ID, + state: { + url: 'https://example.com/foo/bar', + }, + }, + }; + + fetchSpy.mockImplementation(async () => { + return shortUrlData; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const shortUrl = await service.shortUrls.get(null).create({ + locator: legacyShortUrlLocator!, + params: { + url: 'https://example.com/foo/bar', + }, + }); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(shortUrl.data).toMatchObject(shortUrlData); + }); + + test('passes through error thrown by HTTP client', async () => { + const { service, http, legacyShortUrlLocator } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const error = { message: 'Something went wrong...' }; + + fetchSpy.mockImplementation(async () => { + throw error; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const [, err] = await of( + service.shortUrls.get(null).create({ + locator: legacyShortUrlLocator!, + params: { + url: 'https://example.com/foo/bar', + }, + }) + ); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(err).toStrictEqual(error); + }); +}); + +describe('createFromLongUrl()', () => { + test('calls HTTP short URL creation endpoint', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + await service.shortUrls.get(null).createFromLongUrl('https://www.example.com/a/b/c'); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(fetchSpy).toHaveBeenCalledWith('/api/short_url', { + method: 'POST', + body: expect.any(String), + }); + expect(JSON.parse(fetchSpy.mock.calls[0][1].body)).toStrictEqual({ + humanReadableSlug: true, + locatorId: LEGACY_SHORT_URL_LOCATOR_ID, + params: { + url: '/a/b/c', + }, + }); + }); + + test('returns the short URL object and additional data', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const shortUrlData = { + id: '123', + slug: 'yellow-orange-tomato', + accessCount: 0, + accessDate: 1600000000000, + createDate: 1600000000000, + locator: { + id: LEGACY_SHORT_URL_LOCATOR_ID, + state: { + url: 'https://example.com/foo/bar', + }, + }, + }; + + fetchSpy.mockImplementation(async () => { + return shortUrlData; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const shortUrl = await service.shortUrls + .get(null) + .createFromLongUrl('https://www.example.com/a/b/c'); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(shortUrl.data).toMatchObject(shortUrlData); + expect(shortUrl.locator).toBeInstanceOf(Locator); + expect(shortUrl.params).toStrictEqual({ + slug: 'yellow-orange-tomato', + }); + expect(shortUrl.url).toBe('https://example.com/xyz/r/s/yellow-orange-tomato'); + }); +}); + +describe('get()', () => { + test('calls HTTP "get" endpoint', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + await service.shortUrls.get(null).get('foobar'); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(fetchSpy).toHaveBeenCalledWith('/api/short_url/foobar', { + method: 'GET', + }); + }); + + test('returns data returned by the "get" endpoint', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const shortUrlData = { + id: '123', + slug: 'yellow-orange-tomato', + accessCount: 0, + accessDate: 1600000000000, + createDate: 1600000000000, + locator: { + id: LEGACY_SHORT_URL_LOCATOR_ID, + state: { + url: 'https://example.com/foo/bar', + }, + }, + }; + + fetchSpy.mockImplementation(async () => { + return shortUrlData; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const shortUrl = await service.shortUrls.get(null).get('foobar'); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(shortUrl.data).toStrictEqual(shortUrlData); + }); + + test('passes through error thrown by HTTP client', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const error = { message: 'Something went wrong...' }; + + fetchSpy.mockImplementation(async () => { + throw error; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const [, err] = await of(service.shortUrls.get(null).get('foobar')); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(err).toStrictEqual(error); + }); +}); + +describe('resolve()', () => { + test('calls HTTP "resolve" endpoint', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + await service.shortUrls.get(null).resolve('pink-orange-tomato'); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(fetchSpy).toHaveBeenCalledWith('/api/short_url/_slug/pink-orange-tomato', { + method: 'GET', + }); + }); + + test('returns data returned by the "resolve" endpoint', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const shortUrlData = { + id: '123', + slug: 'yellow-orange-tomato', + accessCount: 0, + accessDate: 1600000000000, + createDate: 1600000000000, + locator: { + id: LEGACY_SHORT_URL_LOCATOR_ID, + state: { + url: 'https://example.com/foo/bar', + }, + }, + }; + + fetchSpy.mockImplementation(async () => { + return shortUrlData; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const shortUrl = await service.shortUrls.get(null).resolve('pink-orange-tomato'); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(shortUrl.data).toStrictEqual(shortUrlData); + }); + + test('passes through error thrown by HTTP client', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const error = { message: 'Something went wrong...' }; + + fetchSpy.mockImplementation(async () => { + throw error; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const [, err] = await of(service.shortUrls.get(null).resolve('pink-orange-tomato')); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(err).toStrictEqual(error); + }); +}); + +describe('delete()', () => { + test('calls the HTTP endpoint', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + await service.shortUrls.get(null).delete('foobar'); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(fetchSpy).toHaveBeenCalledWith('/api/short_url/foobar', { + method: 'DELETE', + }); + }); + + test('passes through error thrown by HTTP client', async () => { + const { service, http } = setup(); + const fetchSpy = http.fetch as unknown as jest.SpyInstance; + const error = { message: 'Something went wrong...' }; + + fetchSpy.mockImplementation(async () => { + throw error; + }); + + expect(fetchSpy).toHaveBeenCalledTimes(0); + + const [, err] = await of(service.shortUrls.get(null).delete('foobar')); + + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(err).toStrictEqual(error); + }); +}); diff --git a/src/plugins/share/public/url_service/short_urls/short_url_client.ts b/src/plugins/share/public/url_service/short_urls/short_url_client.ts new file mode 100644 index 0000000000000..63dcdc0b78718 --- /dev/null +++ b/src/plugins/share/public/url_service/short_urls/short_url_client.ts @@ -0,0 +1,165 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { parse as parseUrl } from 'url'; +import type { SerializableRecord } from '@kbn/utility-types'; +import { + LegacyShortUrlLocatorParams, + LEGACY_SHORT_URL_LOCATOR_ID, +} from '../../../common/url_service/locators/legacy_short_url_locator'; +import { + SHORT_URL_REDIRECT_LOCATOR, + ShortUrlRedirectLocatorParams, +} from '../../../common/url_service/locators/short_url_redirect_locator'; +import type { + IShortUrlClient, + ShortUrl, + ShortUrlCreateParams, + ILocatorClient, + ShortUrlData, + LocatorPublic, +} from '../../../common/url_service'; + +export interface BrowserShortUrlClientHttp { + basePath: { + get: () => string; + }; + fetch: (url: string, params: BrowserShortUrlClientHttpFetchParams) => Promise; +} + +interface BrowserShortUrlClientHttpFetchParams { + method: 'GET' | 'POST' | 'DELETE'; + body?: string; +} + +/** + * Dependencies of the Short URL Client. + */ +export interface BrowserShortUrlClientDependencies { + /** + * The locators service. + */ + locators: ILocatorClient; + + /** + * HTTP client. + */ + http: BrowserShortUrlClientHttp; +} + +export class BrowserShortUrlClient implements IShortUrlClient { + constructor(private readonly dependencies: BrowserShortUrlClientDependencies) {} + + public async create

({ + locator, + params, + slug = undefined, + humanReadableSlug = false, + }: ShortUrlCreateParams

): Promise> { + const { http } = this.dependencies; + const data = await http.fetch>('/api/short_url', { + method: 'POST', + body: JSON.stringify({ + locatorId: locator.id, + slug, + humanReadableSlug, + params, + }), + }); + + return { data }; + } + + public async createWithLocator

( + params: ShortUrlCreateParams

+ ): Promise> { + const result = await this.create(params); + const redirectLocator = this.dependencies.locators.get( + SHORT_URL_REDIRECT_LOCATOR + )!; + const redirectParams: ShortUrlRedirectLocatorParams = { + slug: result.data.slug, + }; + + return { + ...result, + locator: redirectLocator, + params: redirectParams, + }; + } + + public async createFromLongUrl(longUrl: string): Promise { + const parsedUrl = parseUrl(longUrl); + + if (!parsedUrl || !parsedUrl.path) { + throw new Error(`Invalid URL: ${longUrl}`); + } + + const path = parsedUrl.path.replace(this.dependencies.http.basePath.get(), ''); + const hash = parsedUrl.hash ? parsedUrl.hash : ''; + const relativeUrl = path + hash; + const locator = this.dependencies.locators.get( + LEGACY_SHORT_URL_LOCATOR_ID + ); + + if (!locator) { + throw new Error(`Locator "${LEGACY_SHORT_URL_LOCATOR_ID}" not found`); + } + + const result = await this.createWithLocator({ + locator, + humanReadableSlug: true, + params: { + url: relativeUrl, + }, + }); + const shortUrl = await result.locator.getUrl(result.params, { absolute: true }); + + return { + ...result, + url: shortUrl, + }; + } + + public async get(id: string): Promise { + const { http } = this.dependencies; + const data = await http.fetch('/api/short_url/' + id, { + method: 'GET', + }); + + return { data }; + } + + public async resolve(slug: string): Promise { + const { http } = this.dependencies; + const data = await http.fetch('/api/short_url/_slug/' + slug, { + method: 'GET', + }); + + return { data }; + } + + public async delete(id: string): Promise { + const { http } = this.dependencies; + await http.fetch('/api/short_url/' + id, { + method: 'DELETE', + }); + } +} + +export interface ShortUrlCreateResponse< + LocatorParams extends SerializableRecord = SerializableRecord +> extends ShortUrl { + locator: LocatorPublic; + params: ShortUrlRedirectLocatorParams; +} + +export interface ShortUrlCreateFromLongUrlResponse + extends ShortUrlCreateResponse { + url: string; +} diff --git a/src/plugins/share/public/url_service/short_urls/short_url_client_factory.ts b/src/plugins/share/public/url_service/short_urls/short_url_client_factory.ts new file mode 100644 index 0000000000000..3f9213800d02f --- /dev/null +++ b/src/plugins/share/public/url_service/short_urls/short_url_client_factory.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { IShortUrlClientFactory } from '../../../common/url_service'; +import { BrowserShortUrlClient, BrowserShortUrlClientDependencies } from './short_url_client'; + +export type BrowserShortUrlClientFactoryDependencies = BrowserShortUrlClientDependencies; + +export type BrowserShortUrlClientFactoryCreateParams = null; + +export class BrowserShortUrlClientFactory + implements IShortUrlClientFactory +{ + constructor(private readonly dependencies: BrowserShortUrlClientFactoryDependencies) {} + + public get(params: BrowserShortUrlClientFactoryCreateParams): BrowserShortUrlClient { + const client = new BrowserShortUrlClient(this.dependencies); + + return client; + } +} diff --git a/src/plugins/share/server/plugin.ts b/src/plugins/share/server/plugin.ts index d79588420fe87..595aefb9d630b 100644 --- a/src/plugins/share/server/plugin.ts +++ b/src/plugins/share/server/plugin.ts @@ -18,6 +18,7 @@ import { registerUrlServiceSavedObjectType, } from './url_service'; import { LegacyShortUrlLocatorDefinition } from '../common/url_service/locators/legacy_short_url_locator'; +import { ShortUrlRedirectLocatorDefinition } from '../common/url_service/locators/short_url_redirect_locator'; /** @public */ export interface SharePluginSetup { @@ -54,6 +55,7 @@ export class SharePlugin implements Plugin { }), }); this.url.locators.create(new LegacyShortUrlLocatorDefinition()); + this.url.locators.create(new ShortUrlRedirectLocatorDefinition()); registerUrlServiceSavedObjectType(core.savedObjects, this.url); registerUrlServiceRoutes(core, core.http.createRouter(), this.url); diff --git a/src/plugins/share/server/url_service/http/register_url_service_routes.ts b/src/plugins/share/server/url_service/http/register_url_service_routes.ts index 35b513bebbc84..9fe0714c7245b 100644 --- a/src/plugins/share/server/url_service/http/register_url_service_routes.ts +++ b/src/plugins/share/server/url_service/http/register_url_service_routes.ts @@ -13,7 +13,6 @@ import { registerGetRoute } from './short_urls/register_get_route'; import { registerDeleteRoute } from './short_urls/register_delete_route'; import { registerResolveRoute } from './short_urls/register_resolve_route'; import { registerGotoRoute } from './short_urls/register_goto_route'; -import { registerShortenUrlRoute } from './short_urls/register_shorten_url_route'; export const registerUrlServiceRoutes = ( core: CoreSetup, @@ -25,5 +24,4 @@ export const registerUrlServiceRoutes = ( registerDeleteRoute(router, url); registerResolveRoute(router, url); registerGotoRoute(router, core); - registerShortenUrlRoute(router, core); }; diff --git a/src/plugins/share/server/url_service/http/short_urls/register_shorten_url_route.ts b/src/plugins/share/server/url_service/http/short_urls/register_shorten_url_route.ts deleted file mode 100644 index 19fa9339e9022..0000000000000 --- a/src/plugins/share/server/url_service/http/short_urls/register_shorten_url_route.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { CoreSetup, IRouter } from 'kibana/server'; - -export const registerShortenUrlRoute = (router: IRouter, core: CoreSetup) => { - core.http.resources.register( - { - path: '/api/shorten_url', - validate: {}, - }, - router.handleLegacyErrors(async (ctx, req, res) => { - return res.badRequest({ - body: 'This endpoint is no longer supported. Please use the new URL shortening service.', - }); - }) - ); -}; diff --git a/src/plugins/telemetry/server/routes/telemetry_usage_stats.test.ts b/src/plugins/telemetry/server/routes/telemetry_usage_stats.test.ts new file mode 100644 index 0000000000000..736367446d3c0 --- /dev/null +++ b/src/plugins/telemetry/server/routes/telemetry_usage_stats.test.ts @@ -0,0 +1,103 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { registerTelemetryUsageStatsRoutes } from './telemetry_usage_stats'; +import { coreMock, httpServerMock } from 'src/core/server/mocks'; +import type { RequestHandlerContext, IRouter } from 'kibana/server'; +import { telemetryCollectionManagerPluginMock } from '../../../telemetry_collection_manager/server/mocks'; + +async function runRequest( + mockRouter: IRouter, + body?: { unencrypted?: boolean; refreshCache?: boolean } +) { + expect(mockRouter.post).toBeCalled(); + const [, handler] = (mockRouter.post as jest.Mock).mock.calls[0]; + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest({ body }); + await handler(null, mockRequest, mockResponse); + + return { mockResponse, mockRequest }; +} + +describe('registerTelemetryUsageStatsRoutes', () => { + const router = { + handler: undefined, + config: undefined, + post: jest.fn().mockImplementation((config, handler) => { + router.config = config; + router.handler = handler; + }), + }; + const telemetryCollectionManager = telemetryCollectionManagerPluginMock.createSetupContract(); + const mockCoreSetup = coreMock.createSetup(); + const mockRouter = mockCoreSetup.http.createRouter(); + const mockStats = [{ clusterUuid: 'text', stats: 'enc_str' }]; + telemetryCollectionManager.getStats.mockResolvedValue(mockStats); + + describe('clusters/_stats POST route', () => { + it('registers _stats POST route and accepts body configs', () => { + registerTelemetryUsageStatsRoutes(mockRouter, telemetryCollectionManager, true); + expect(mockRouter.post).toBeCalledTimes(1); + const [routeConfig, handler] = (mockRouter.post as jest.Mock).mock.calls[0]; + expect(routeConfig.path).toMatchInlineSnapshot(`"/api/telemetry/v2/clusters/_stats"`); + expect(Object.keys(routeConfig.validate.body.props)).toEqual(['unencrypted', 'refreshCache']); + expect(handler).toBeInstanceOf(Function); + }); + + it('responds with encrypted stats with no cache refresh by default', async () => { + registerTelemetryUsageStatsRoutes(mockRouter, telemetryCollectionManager, true); + + const { mockRequest, mockResponse } = await runRequest(mockRouter); + expect(telemetryCollectionManager.getStats).toBeCalledWith({ + request: mockRequest, + unencrypted: undefined, + refreshCache: undefined, + }); + expect(mockResponse.ok).toBeCalled(); + expect(mockResponse.ok.mock.calls[0][0]).toEqual({ body: mockStats }); + }); + + it('when unencrypted is set getStats is called with unencrypted and refreshCache', async () => { + registerTelemetryUsageStatsRoutes(mockRouter, telemetryCollectionManager, true); + + const { mockRequest } = await runRequest(mockRouter, { unencrypted: true }); + expect(telemetryCollectionManager.getStats).toBeCalledWith({ + request: mockRequest, + unencrypted: true, + refreshCache: true, + }); + }); + + it('calls getStats with refreshCache when set in body', async () => { + registerTelemetryUsageStatsRoutes(mockRouter, telemetryCollectionManager, true); + const { mockRequest } = await runRequest(mockRouter, { refreshCache: true }); + expect(telemetryCollectionManager.getStats).toBeCalledWith({ + request: mockRequest, + unencrypted: undefined, + refreshCache: true, + }); + }); + + it('calls getStats with refreshCache:true even if set to false in body when unencrypted is set to true', async () => { + registerTelemetryUsageStatsRoutes(mockRouter, telemetryCollectionManager, true); + const { mockRequest } = await runRequest(mockRouter, { + refreshCache: false, + unencrypted: true, + }); + expect(telemetryCollectionManager.getStats).toBeCalledWith({ + request: mockRequest, + unencrypted: true, + refreshCache: true, + }); + }); + + it.todo('always returns an empty array on errors on encrypted payload'); + it.todo('returns the actual request error object when in development mode'); + it.todo('returns forbidden on unencrypted and ES returns 403 in getStats'); + }); +}); diff --git a/src/plugins/telemetry/server/routes/telemetry_usage_stats.ts b/src/plugins/telemetry/server/routes/telemetry_usage_stats.ts index e3ce8cbc5190a..2f72ae818f112 100644 --- a/src/plugins/telemetry/server/routes/telemetry_usage_stats.ts +++ b/src/plugins/telemetry/server/routes/telemetry_usage_stats.ts @@ -35,7 +35,7 @@ export function registerTelemetryUsageStatsRoutes( const statsConfig: StatsGetterConfig = { request: req, unencrypted, - refreshCache, + refreshCache: unencrypted || refreshCache, }; const stats = await telemetryCollectionManager.getStats(statsConfig); diff --git a/src/plugins/telemetry_collection_manager/server/mocks.ts b/src/plugins/telemetry_collection_manager/server/mocks.ts new file mode 100644 index 0000000000000..cbd9dac9cfaa6 --- /dev/null +++ b/src/plugins/telemetry_collection_manager/server/mocks.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { + TelemetryCollectionManagerPluginSetup, + TelemetryCollectionManagerPluginStart, +} from './types'; + +export type Setup = jest.Mocked; +export type Start = jest.Mocked; + +export const telemetryCollectionManagerPluginMock = { + createSetupContract, + createStartContract, +}; + +function createSetupContract(): Setup { + const setupContract: Setup = { + getStats: jest.fn(), + getOptInStats: jest.fn(), + setCollectionStrategy: jest.fn(), + }; + + return setupContract; +} + +function createStartContract(): Start { + const startContract: Start = { + getOptInStats: jest.fn(), + getStats: jest.fn(), + }; + + return startContract; +} diff --git a/src/plugins/telemetry_collection_manager/server/plugin.test.ts b/src/plugins/telemetry_collection_manager/server/plugin.test.ts index 77cc2ac9ca510..ca932e92d98bd 100644 --- a/src/plugins/telemetry_collection_manager/server/plugin.test.ts +++ b/src/plugins/telemetry_collection_manager/server/plugin.test.ts @@ -135,6 +135,45 @@ describe('Telemetry Collection Manager', () => { collectionStrategy.clusterDetailsGetter.mock.calls[0][0].soClient ).toBeInstanceOf(TelemetrySavedObjectsClient); }); + + it('calls getStats with passed refreshCache config', async () => { + const getStatsCollectionConfig: jest.SpyInstance< + TelemetryCollectionManagerPlugin['getStatsCollectionConfig'] + // @ts-expect-error spying on private method. + > = jest.spyOn(telemetryCollectionManager, 'getStatsCollectionConfig'); + await setupApi.getStats(config); + await setupApi.getStats({ ...config, refreshCache: false }); + await setupApi.getStats({ ...config, refreshCache: true }); + + expect(getStatsCollectionConfig).toBeCalledTimes(3); + expect(getStatsCollectionConfig).toHaveBeenNthCalledWith(1, config, usageCollection); + expect(getStatsCollectionConfig).toHaveNthReturnedWith( + 1, + expect.objectContaining({ refreshCache: false }) + ); + + expect(getStatsCollectionConfig).toHaveBeenNthCalledWith( + 2, + expect.objectContaining({ refreshCache: false }), + usageCollection + ); + expect(getStatsCollectionConfig).toHaveNthReturnedWith( + 2, + expect.objectContaining({ refreshCache: false }) + ); + + expect(getStatsCollectionConfig).toHaveBeenNthCalledWith( + 3, + expect.objectContaining({ refreshCache: true }), + usageCollection + ); + expect(getStatsCollectionConfig).toHaveNthReturnedWith( + 3, + expect.objectContaining({ refreshCache: true }) + ); + + getStatsCollectionConfig.mockRestore(); + }); }); describe('getOptInStats', () => { @@ -178,9 +217,10 @@ describe('Telemetry Collection Manager', () => { }); }); describe('unencrypted: true', () => { + const mockRequest = httpServerMock.createKibanaRequest(); const config: StatsGetterConfig = { unencrypted: true, - request: httpServerMock.createKibanaRequest(), + request: mockRequest, }; describe('getStats', () => { @@ -212,23 +252,26 @@ describe('Telemetry Collection Manager', () => { ).not.toBeInstanceOf(TelemetrySavedObjectsClient); }); - test('returns cached object on multiple calls', async () => { - collectionStrategy.clusterDetailsGetter.mockResolvedValue([ - { clusterUuid: 'clusterUuid' }, - ]); - collectionStrategy.statsGetter.mockResolvedValue([basicStats]); + it('calls getStats with config { refreshCache: true } even if set to false', async () => { + const getStatsCollectionConfig: jest.SpyInstance< + TelemetryCollectionManagerPlugin['getStatsCollectionConfig'] + // @ts-expect-error spying on private method. + > = jest.spyOn(telemetryCollectionManager, 'getStatsCollectionConfig'); await setupApi.getStats(config); - await expect(setupApi.getStats(config)).resolves.toStrictEqual([ - { - clusterUuid: 'clusterUuid', - stats: { - ...basicStats, - cacheDetails: { updatedAt: expect.any(String), fetchedAt: expect.any(String) }, - collectionSource: 'test_collection', - }, - }, - ]); + expect(getStatsCollectionConfig).toBeCalledTimes(1); + expect(getStatsCollectionConfig).toBeCalledWith( + expect.not.objectContaining({ refreshCache: true }), + usageCollection + ); + expect(getStatsCollectionConfig).toReturnWith( + expect.objectContaining({ + refreshCache: true, + kibanaRequest: mockRequest, + }) + ); + + getStatsCollectionConfig.mockRestore(); }); }); diff --git a/src/plugins/telemetry_collection_manager/server/plugin.ts b/src/plugins/telemetry_collection_manager/server/plugin.ts index bdce2c8be31d8..fad51ca1dbfde 100644 --- a/src/plugins/telemetry_collection_manager/server/plugin.ts +++ b/src/plugins/telemetry_collection_manager/server/plugin.ts @@ -127,7 +127,7 @@ export class TelemetryCollectionManagerPlugin const soClient = this.getSavedObjectsClient(config); // Provide the kibanaRequest so opted-in plugins can scope their custom clients only if the request is not encrypted const kibanaRequest = config.unencrypted ? config.request : void 0; - const refreshCache = !!config.refreshCache; + const refreshCache = config.unencrypted ? true : !!config.refreshCache; if (esClient && soClient) { return { usageCollection, esClient, soClient, kibanaRequest, refreshCache }; diff --git a/src/plugins/visualizations/common/types.ts b/src/plugins/visualizations/common/types.ts index 187e55566c9d9..a1c81b6d32046 100644 --- a/src/plugins/visualizations/common/types.ts +++ b/src/plugins/visualizations/common/types.ts @@ -8,7 +8,7 @@ import { SavedObjectAttributes } from 'kibana/server'; import type { SerializableRecord } from '@kbn/utility-types'; -import { AggConfigSerialized } from 'src/plugins/data/common'; +import { AggConfigSerialized, SerializedSearchSourceFields } from 'src/plugins/data/common'; export interface VisParams { [key: string]: any; @@ -32,3 +32,20 @@ export interface VisualizationSavedObjectAttributes extends SavedObjectAttribute visState: string; uiStateJSON: string; } + +export interface SerializedVisData { + expression?: string; + aggs: AggConfigSerialized[]; + searchSource: SerializedSearchSourceFields; + savedSearchId?: string; +} + +export interface SerializedVis { + id?: string; + title: string; + description?: string; + type: string; + params: T; + uiState?: any; + data: SerializedVisData; +} diff --git a/src/plugins/visualizations/public/types.ts b/src/plugins/visualizations/public/types.ts index 13349136125c3..c323feb6800d8 100644 --- a/src/plugins/visualizations/public/types.ts +++ b/src/plugins/visualizations/public/types.ts @@ -16,9 +16,9 @@ import { import type { ISearchSource } from '../../data/common'; import { ExpressionAstExpression } from '../../expressions/public'; -import type { SerializedVis, Vis } from './vis'; +import type { Vis } from './vis'; import type { PersistedState } from './persisted_state'; -import type { VisParams } from '../common'; +import type { VisParams, SerializedVis } from '../common'; export type { Vis, SerializedVis, VisParams }; export interface SavedVisState { diff --git a/src/plugins/visualizations/public/vis.ts b/src/plugins/visualizations/public/vis.ts index 821becf3da9c1..6aa70c080f8e7 100644 --- a/src/plugins/visualizations/public/vis.ts +++ b/src/plugins/visualizations/public/vis.ts @@ -22,34 +22,13 @@ import { i18n } from '@kbn/i18n'; import { PersistedState } from './persisted_state'; import { getTypes, getAggs, getSearch, getSavedObjects, getSpaces } from './services'; -import { - IAggConfigs, - IndexPattern, - ISearchSource, - AggConfigSerialized, - SerializedSearchSourceFields, -} from '../../data/public'; +import { IAggConfigs, IndexPattern, ISearchSource, AggConfigSerialized } from '../../data/public'; import { BaseVisType } from './vis_types'; -import { VisParams } from '../common/types'; +import { SerializedVis, SerializedVisData, VisParams } from '../common/types'; import { getSavedSearch, throwErrorOnSavedSearchUrlConflict } from '../../discover/public'; -export interface SerializedVisData { - expression?: string; - aggs: AggConfigSerialized[]; - searchSource: SerializedSearchSourceFields; - savedSearchId?: string; -} - -export interface SerializedVis { - id?: string; - title: string; - description?: string; - type: string; - params: T; - uiState?: any; - data: SerializedVisData; -} +export type { SerializedVis, SerializedVisData }; export interface VisData { ast?: string; diff --git a/src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.test.ts b/src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.test.ts new file mode 100644 index 0000000000000..61f41fe72ba5b --- /dev/null +++ b/src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.test.ts @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import semverGte from 'semver/functions/gte'; +import { makeVisualizeEmbeddableFactory } from './make_visualize_embeddable_factory'; +import { getAllMigrations } from '../migrations/visualization_saved_object_migrations'; +import { SerializedSearchSourceFields } from 'src/plugins/data/public'; +import { GetMigrationFunctionObjectFn } from 'src/plugins/kibana_utils/common'; + +describe('embeddable migrations', () => { + test('should have same versions registered as saved object migrations versions (>7.13.0)', () => { + const savedObjectMigrationVersions = Object.keys(getAllMigrations({})).filter((version) => { + return semverGte(version, '7.13.1'); + }); + const embeddableMigrationVersions = ( + makeVisualizeEmbeddableFactory(() => ({}))()?.migrations as GetMigrationFunctionObjectFn + )(); + if (embeddableMigrationVersions) { + expect(savedObjectMigrationVersions.sort()).toEqual( + Object.keys(embeddableMigrationVersions).sort() + ); + } + }); + + test('should properly apply a filter migration within a legacy visualization', () => { + const migrationVersion = 'some-version'; + + const embeddedVisualizationDoc = { + savedVis: { + data: { + searchSource: { + type: 'some-type', + migrated: false, + }, + }, + }, + }; + + const embeddableMigrationVersions = ( + makeVisualizeEmbeddableFactory(() => ({ + [migrationVersion]: (searchSource: SerializedSearchSourceFields) => { + return { + ...searchSource, + migrated: true, + }; + }, + }))()?.migrations as GetMigrationFunctionObjectFn + )(); + + const migratedVisualizationDoc = + embeddableMigrationVersions?.[migrationVersion](embeddedVisualizationDoc); + + expect(migratedVisualizationDoc).toEqual({ + savedVis: { + data: { + searchSource: { + type: 'some-type', + migrated: true, + }, + }, + }, + }); + }); +}); diff --git a/src/plugins/visualizations/server/embeddable/visualize_embeddable_factory.ts b/src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.ts similarity index 53% rename from src/plugins/visualizations/server/embeddable/visualize_embeddable_factory.ts rename to src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.ts index 2875b1f66bcdd..fa41cf6354d65 100644 --- a/src/plugins/visualizations/server/embeddable/visualize_embeddable_factory.ts +++ b/src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.ts @@ -6,9 +6,15 @@ * Side Public License, v 1. */ -import { flow } from 'lodash'; +import { flow, mapValues } from 'lodash'; import { EmbeddableRegistryDefinition } from 'src/plugins/embeddable/server'; import type { SerializableRecord } from '@kbn/utility-types'; +import { SerializedSearchSourceFields } from 'src/plugins/data/public'; +import { + mergeMigrationFunctionMaps, + MigrateFunctionsObject, + MigrateFunction, +} from '../../../kibana_utils/common'; import { commonAddSupportOfDualIndexSelectionModeInTSVB, commonHideTSVBLastValueIndicator, @@ -20,6 +26,7 @@ import { commonAddDropLastBucketIntoTSVBModel714Above, commonRemoveMarkdownLessFromTSVB, } from '../migrations/visualization_common_migrations'; +import { SerializedVis } from '../../common'; const byValueAddSupportOfDualIndexSelectionModeInTSVB = (state: SerializableRecord) => { return { @@ -84,26 +91,53 @@ const byValueRemoveMarkdownLessFromTSVB = (state: SerializableRecord) => { }; }; -export const visualizeEmbeddableFactory = (): EmbeddableRegistryDefinition => { - return { - id: 'visualization', - migrations: { - // These migrations are run in 7.13.1 for `by value` panels because the 7.13 release window was missed. - '7.13.1': (state) => - flow( - byValueAddSupportOfDualIndexSelectionModeInTSVB, - byValueHideTSVBLastValueIndicator, - byValueRemoveDefaultIndexPatternAndTimeFieldFromTSVBModel - )(state), - '7.14.0': (state) => - flow( - byValueAddEmptyValueColorRule, - byValueMigrateVislibPie, - byValueMigrateTagcloud, - byValueAddDropLastBucketIntoTSVBModel - )(state), - '7.17.0': (state) => flow(byValueAddDropLastBucketIntoTSVBModel714Above)(state), - '8.0.0': (state) => flow(byValueRemoveMarkdownLessFromTSVB)(state), - }, +const getEmbeddedVisualizationSearchSourceMigrations = ( + searchSourceMigrations: MigrateFunctionsObject +) => + mapValues( + searchSourceMigrations, + (migrate: MigrateFunction): MigrateFunction => + (state) => { + const _state = state as unknown as { savedVis: SerializedVis }; + return { + ..._state, + savedVis: { + ..._state.savedVis, + data: { + ..._state.savedVis.data, + searchSource: migrate(_state.savedVis.data.searchSource), + }, + }, + }; + } + ); + +export const makeVisualizeEmbeddableFactory = + (getSearchSourceMigrations: () => MigrateFunctionsObject) => (): EmbeddableRegistryDefinition => { + return { + id: 'visualization', + // migrations set up as a callable so that getSearchSourceMigrations doesn't get invoked till after plugin setup steps + migrations: () => + mergeMigrationFunctionMaps( + getEmbeddedVisualizationSearchSourceMigrations(getSearchSourceMigrations()), + { + // These migrations are run in 7.13.1 for `by value` panels because the 7.13 release window was missed. + '7.13.1': (state) => + flow( + byValueAddSupportOfDualIndexSelectionModeInTSVB, + byValueHideTSVBLastValueIndicator, + byValueRemoveDefaultIndexPatternAndTimeFieldFromTSVBModel + )(state), + '7.14.0': (state) => + flow( + byValueAddEmptyValueColorRule, + byValueMigrateVislibPie, + byValueMigrateTagcloud, + byValueAddDropLastBucketIntoTSVBModel + )(state), + '7.17.0': (state) => flow(byValueAddDropLastBucketIntoTSVBModel714Above)(state), + '8.0.0': (state) => flow(byValueRemoveMarkdownLessFromTSVB)(state), + } + ), + }; }; -}; diff --git a/src/plugins/visualizations/server/embeddable/visualize_embeddable_factory.test.ts b/src/plugins/visualizations/server/embeddable/visualize_embeddable_factory.test.ts deleted file mode 100644 index fe0f1a766e8ac..0000000000000 --- a/src/plugins/visualizations/server/embeddable/visualize_embeddable_factory.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import semverGte from 'semver/functions/gte'; -import { visualizeEmbeddableFactory } from './visualize_embeddable_factory'; -import { visualizationSavedObjectTypeMigrations } from '../migrations/visualization_saved_object_migrations'; - -describe('saved object migrations and embeddable migrations', () => { - test('should have same versions registered (>7.13.0)', () => { - const savedObjectMigrationVersions = Object.keys(visualizationSavedObjectTypeMigrations).filter( - (version) => { - return semverGte(version, '7.13.1'); - } - ); - const embeddableMigrationVersions = visualizeEmbeddableFactory()?.migrations; - if (embeddableMigrationVersions) { - expect(savedObjectMigrationVersions.sort()).toEqual( - Object.keys(embeddableMigrationVersions).sort() - ); - } - }); -}); diff --git a/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts b/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts index 89df61b39e10d..093990eab8584 100644 --- a/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts +++ b/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.test.ts @@ -6,8 +6,12 @@ * Side Public License, v 1. */ -import { visualizationSavedObjectTypeMigrations } from './visualization_saved_object_migrations'; -import { SavedObjectMigrationContext, SavedObjectMigrationFn } from 'kibana/server'; +import { getAllMigrations } from './visualization_saved_object_migrations'; +import { + SavedObjectMigrationContext, + SavedObjectMigrationFn, + SavedObjectUnsanitizedDoc, +} from 'kibana/server'; const savedObjectMigrationContext = null as unknown as SavedObjectMigrationContext; @@ -56,6 +60,8 @@ const testMigrateMatchAllQuery = (migrate: Function) => { }; describe('migration visualization', () => { + const visualizationSavedObjectTypeMigrations = getAllMigrations({}); + describe('6.7.2', () => { const migrate = (doc: any) => visualizationSavedObjectTypeMigrations['6.7.2']( @@ -2432,4 +2438,35 @@ describe('migration visualization', () => { `); }); }); + + it('should apply search source migrations within visualization', () => { + const visualizationDoc = { + attributes: { + kibanaSavedObjectMeta: { + searchSourceJSON: JSON.stringify({ + some: 'prop', + migrated: false, + }), + }, + }, + } as SavedObjectUnsanitizedDoc; + + const versionToTest = '1.2.3'; + const visMigrations = getAllMigrations({ + [versionToTest]: (state) => ({ ...state, migrated: true }), + }); + + expect( + visMigrations[versionToTest](visualizationDoc, {} as SavedObjectMigrationContext) + ).toEqual({ + attributes: { + kibanaSavedObjectMeta: { + searchSourceJSON: JSON.stringify({ + some: 'prop', + migrated: true, + }), + }, + }, + }); + }); }); diff --git a/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts b/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts index b8413ddf07ed8..d168e82f69739 100644 --- a/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts +++ b/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts @@ -6,11 +6,16 @@ * Side Public License, v 1. */ -import { cloneDeep, get, omit, has, flow, forOwn } from 'lodash'; +import { cloneDeep, get, omit, has, flow, forOwn, mapValues } from 'lodash'; +import type { SavedObjectMigrationFn, SavedObjectMigrationMap } from 'kibana/server'; +import { mergeSavedObjectMigrationMaps } from '../../../../core/server'; +import { MigrateFunctionsObject, MigrateFunction } from '../../../kibana_utils/common'; -import type { SavedObjectMigrationFn } from 'kibana/server'; - -import { DEFAULT_QUERY_LANGUAGE, INDEX_PATTERN_SAVED_OBJECT_TYPE } from '../../../data/common'; +import { + DEFAULT_QUERY_LANGUAGE, + INDEX_PATTERN_SAVED_OBJECT_TYPE, + SerializedSearchSourceFields, +} from '../../../data/common'; import { commonAddSupportOfDualIndexSelectionModeInTSVB, commonHideTSVBLastValueIndicator, @@ -22,6 +27,7 @@ import { commonAddDropLastBucketIntoTSVBModel714Above, commonRemoveMarkdownLessFromTSVB, } from './visualization_common_migrations'; +import { VisualizationSavedObjectAttributes } from '../../common'; const migrateIndexPattern: SavedObjectMigrationFn = (doc) => { const searchSourceJSON = get(doc, 'attributes.kibanaSavedObjectMeta.searchSourceJSON'); @@ -1126,7 +1132,7 @@ export const removeMarkdownLessFromTSVB: SavedObjectMigrationFn = (doc return doc; }; -export const visualizationSavedObjectTypeMigrations = { +const visualizationSavedObjectTypeMigrations = { /** * We need to have this migration twice, once with a version prior to 7.0.0 once with a version * after it. The reason for that is, that this migration has been introduced once 7.0.0 was already @@ -1182,3 +1188,40 @@ export const visualizationSavedObjectTypeMigrations = { '7.17.0': flow(addDropLastBucketIntoTSVBModel714Above), '8.0.0': flow(removeMarkdownLessFromTSVB), }; + +/** + * This creates a migration map that applies search source migrations to legacy visualization SOs + */ +const getVisualizationSearchSourceMigrations = (searchSourceMigrations: MigrateFunctionsObject) => + mapValues( + searchSourceMigrations, + (migrate: MigrateFunction): MigrateFunction => + (state) => { + const _state = state as unknown as { attributes: VisualizationSavedObjectAttributes }; + + const parsedSearchSourceJSON = _state.attributes.kibanaSavedObjectMeta.searchSourceJSON; + + if (!parsedSearchSourceJSON) return _state; + + return { + ..._state, + attributes: { + ..._state.attributes, + kibanaSavedObjectMeta: { + ..._state.attributes.kibanaSavedObjectMeta, + searchSourceJSON: JSON.stringify(migrate(JSON.parse(parsedSearchSourceJSON))), + }, + }, + }; + } + ); + +export const getAllMigrations = ( + searchSourceMigrations: MigrateFunctionsObject +): SavedObjectMigrationMap => + mergeSavedObjectMigrationMaps( + visualizationSavedObjectTypeMigrations, + getVisualizationSearchSourceMigrations( + searchSourceMigrations + ) as unknown as SavedObjectMigrationMap + ); diff --git a/src/plugins/visualizations/server/plugin.ts b/src/plugins/visualizations/server/plugin.ts index 4fee36cf3530c..97c3e4bc19387 100644 --- a/src/plugins/visualizations/server/plugin.ts +++ b/src/plugins/visualizations/server/plugin.ts @@ -9,8 +9,8 @@ import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; +import { PluginSetup as DataPluginSetup } from 'src/plugins/data/server'; import { VISUALIZE_ENABLE_LABS_SETTING } from '../common/constants'; -import { visualizationSavedObjectType } from './saved_objects'; import { registerVisualizationsCollector } from './usage_collector'; import { capabilitiesProvider } from './capabilities_provider'; @@ -24,7 +24,8 @@ import type { } from '../../../core/server'; import type { UsageCollectionSetup } from '../../usage_collection/server'; import type { EmbeddableSetup } from '../../embeddable/server'; -import { visualizeEmbeddableFactory } from './embeddable/visualize_embeddable_factory'; +import { makeVisualizeEmbeddableFactory } from './embeddable/make_visualize_embeddable_factory'; +import { getVisualizationSavedObjectType } from './saved_objects'; export class VisualizationsPlugin implements Plugin @@ -37,11 +38,18 @@ export class VisualizationsPlugin public setup( core: CoreSetup, - plugins: { usageCollection?: UsageCollectionSetup; embeddable: EmbeddableSetup } + plugins: { + usageCollection?: UsageCollectionSetup; + embeddable: EmbeddableSetup; + data: DataPluginSetup; + } ) { this.logger.debug('visualizations: Setup'); - core.savedObjects.registerType(visualizationSavedObjectType); + const getSearchSourceMigrations = plugins.data.search.searchSource.getAllMigrations.bind( + plugins.data.search.searchSource + ); + core.savedObjects.registerType(getVisualizationSavedObjectType(getSearchSourceMigrations)); core.capabilities.registerProvider(capabilitiesProvider); core.uiSettings.register({ @@ -63,7 +71,9 @@ export class VisualizationsPlugin registerVisualizationsCollector(plugins.usageCollection); } - plugins.embeddable.registerEmbeddableFactory(visualizeEmbeddableFactory()); + plugins.embeddable.registerEmbeddableFactory( + makeVisualizeEmbeddableFactory(getSearchSourceMigrations)() + ); return {}; } diff --git a/src/plugins/visualizations/server/saved_objects/index.ts b/src/plugins/visualizations/server/saved_objects/index.ts index 08168e8c6d74d..f5e2d26acbc0c 100644 --- a/src/plugins/visualizations/server/saved_objects/index.ts +++ b/src/plugins/visualizations/server/saved_objects/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { visualizationSavedObjectType } from './visualization'; +export { getVisualizationSavedObjectType } from './visualization'; diff --git a/src/plugins/visualizations/server/saved_objects/visualization.ts b/src/plugins/visualizations/server/saved_objects/visualization.ts index 0793893f1d3d5..c27d406ab29fe 100644 --- a/src/plugins/visualizations/server/saved_objects/visualization.ts +++ b/src/plugins/visualizations/server/saved_objects/visualization.ts @@ -7,9 +7,12 @@ */ import { SavedObjectsType } from 'kibana/server'; -import { visualizationSavedObjectTypeMigrations } from '../migrations/visualization_saved_object_migrations'; +import { MigrateFunctionsObject } from 'src/plugins/kibana_utils/common'; +import { getAllMigrations } from '../migrations/visualization_saved_object_migrations'; -export const visualizationSavedObjectType: SavedObjectsType = { +export const getVisualizationSavedObjectType = ( + getSearchSourceMigrations: () => MigrateFunctionsObject +): SavedObjectsType => ({ name: 'visualization', hidden: false, namespaceType: 'multiple-isolated', @@ -41,5 +44,5 @@ export const visualizationSavedObjectType: SavedObjectsType = { visState: { type: 'text', index: false }, }, }, - migrations: visualizationSavedObjectTypeMigrations, -}; + migrations: () => getAllMigrations(getSearchSourceMigrations()), +}); diff --git a/test/common/services/index_patterns.ts b/test/common/services/index_patterns.ts index 5b6d20990b6d1..549137c79e9a2 100644 --- a/test/common/services/index_patterns.ts +++ b/test/common/services/index_patterns.ts @@ -7,7 +7,7 @@ */ import { FtrService } from '../ftr_provider_context'; -import { IndexPatternSpec } from '../../../src/plugins/data/common'; +import { DataViewSpec } from '../../../src/plugins/data/common'; export class IndexPatternsService extends FtrService { private readonly kibanaServer = this.ctx.getService('kibanaServer'); @@ -18,9 +18,9 @@ export class IndexPatternsService extends FtrService { async create( indexPattern: { title: string }, { override = false }: { override: boolean } = { override: false } - ): Promise { + ): Promise { const response = await this.kibanaServer.request<{ - index_pattern: IndexPatternSpec; + index_pattern: DataViewSpec; }>({ path: '/api/index_patterns/index_pattern', method: 'POST', diff --git a/test/functional/apps/dashboard/embeddable_data_grid.ts b/test/functional/apps/dashboard/embeddable_data_grid.ts index 66aca561383c3..5dea22f5006c5 100644 --- a/test/functional/apps/dashboard/embeddable_data_grid.ts +++ b/test/functional/apps/dashboard/embeddable_data_grid.ts @@ -36,6 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.clickNewDashboard(); await PageObjects.timePicker.setDefaultDataRange(); await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search'); + await PageObjects.header.waitUntilLoadingHasFinished(); }); it('should expand the detail row when the toggle arrow is clicked', async function () { diff --git a/test/functional/apps/discover/_shared_links.ts b/test/functional/apps/discover/_shared_links.ts index e16dcc11eae4c..3d9bf72ab0841 100644 --- a/test/functional/apps/discover/_shared_links.ts +++ b/test/functional/apps/discover/_shared_links.ts @@ -89,7 +89,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should allow for copying the snapshot URL as a short URL', async function () { - const re = new RegExp(baseUrl + '/goto/.+$'); + const re = new RegExp(baseUrl + '/app/r/s/.+$'); await PageObjects.share.checkShortenUrl(); await retry.try(async () => { const actualUrl = await PageObjects.share.getSharedUrl(); @@ -148,7 +148,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should allow for copying the snapshot URL as a short URL and should open it', async function () { - const re = new RegExp(baseUrl + '/goto/.+$'); + const re = new RegExp(baseUrl + '/app/r/s/.+$'); await PageObjects.share.checkShortenUrl(); let actualUrl: string = ''; await retry.try(async () => { @@ -172,7 +172,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it("sharing hashed url shouldn't crash the app", async () => { const currentUrl = await browser.getCurrentUrl(); - const timeBeforeReload = await PageObjects.timePicker.getTimeConfig(); await browser.clearSessionStorage(); await browser.get(currentUrl, false); await retry.waitFor('discover to open', async () => { @@ -183,10 +182,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'Unable to completely restore the URL, be sure to use the share functionality.' ); await toasts.dismissAllToasts(); - const timeAfterReload = await PageObjects.timePicker.getTimeConfig(); - expect(timeBeforeReload.start).not.to.be(timeAfterReload.start); - expect(timeBeforeReload.end).not.to.be(timeAfterReload.end); - await PageObjects.timePicker.setDefaultAbsoluteRange(); return true; }); }); diff --git a/x-pack/plugins/alerting/public/alert_api.test.ts b/x-pack/plugins/alerting/public/alert_api.test.ts index 39e2206a8539a..8e6331a29c1c5 100644 --- a/x-pack/plugins/alerting/public/alert_api.test.ts +++ b/x-pack/plugins/alerting/public/alert_api.test.ts @@ -142,7 +142,7 @@ describe('loadAlert', () => { } `); - expect(http.get).toHaveBeenCalledWith(`/api/alerting/rule/${apiRule.id}`); + expect(http.get).toHaveBeenCalledWith(`/internal/alerting/rule/${apiRule.id}`); }); }); diff --git a/x-pack/plugins/alerting/public/alert_api.ts b/x-pack/plugins/alerting/public/alert_api.ts index fdad0edcbf9e9..e64a236d5302b 100644 --- a/x-pack/plugins/alerting/public/alert_api.ts +++ b/x-pack/plugins/alerting/public/alert_api.ts @@ -6,7 +6,7 @@ */ import { HttpSetup } from 'kibana/public'; -import { BASE_ALERTING_API_PATH } from '../common'; +import { BASE_ALERTING_API_PATH, INTERNAL_BASE_ALERTING_API_PATH } from '../common'; import type { Alert, RuleType } from '../common'; import { AsApiContract } from '../../actions/common'; import { transformAlert, transformRuleType, ApiAlert } from './lib/common_transformations'; @@ -36,6 +36,6 @@ export async function loadAlert({ http: HttpSetup; alertId: string; }): Promise { - const res = await http.get(`${BASE_ALERTING_API_PATH}/rule/${alertId}`); + const res = await http.get(`${INTERNAL_BASE_ALERTING_API_PATH}/rule/${alertId}`); return transformAlert(res); } diff --git a/x-pack/plugins/alerting/server/routes/find_rules.test.ts b/x-pack/plugins/alerting/server/routes/find_rules.test.ts index 692fdca6c95ae..33791dcac1038 100644 --- a/x-pack/plugins/alerting/server/routes/find_rules.test.ts +++ b/x-pack/plugins/alerting/server/routes/find_rules.test.ts @@ -75,6 +75,7 @@ describe('findRulesRoute', () => { expect(rulesClient.find.mock.calls[0]).toMatchInlineSnapshot(` Array [ Object { + "excludeFromPublicApi": true, "options": Object { "defaultSearchOperator": "OR", "page": 1, diff --git a/x-pack/plugins/alerting/server/routes/find_rules.ts b/x-pack/plugins/alerting/server/routes/find_rules.ts index 7826e924acdc5..f8898327705ed 100644 --- a/x-pack/plugins/alerting/server/routes/find_rules.ts +++ b/x-pack/plugins/alerting/server/routes/find_rules.ts @@ -12,7 +12,12 @@ import { schema } from '@kbn/config-schema'; import { ILicenseState } from '../lib'; import { FindOptions, FindResult } from '../rules_client'; import { RewriteRequestCase, RewriteResponseCase, verifyAccessAndContext } from './lib'; -import { AlertTypeParams, AlertingRequestHandlerContext, BASE_ALERTING_API_PATH } from '../types'; +import { + AlertTypeParams, + AlertingRequestHandlerContext, + BASE_ALERTING_API_PATH, + INTERNAL_BASE_ALERTING_API_PATH, +} from '../types'; import { trackLegacyTerminology } from './lib/track_legacy_terminology'; // query definition @@ -108,14 +113,24 @@ const rewriteBodyRes: RewriteResponseCase> = ({ }; }; -export const findRulesRoute = ( - router: IRouter, - licenseState: ILicenseState, - usageCounter?: UsageCounter -) => { +interface BuildFindRulesRouteParams { + licenseState: ILicenseState; + path: string; + router: IRouter; + excludeFromPublicApi?: boolean; + usageCounter?: UsageCounter; +} + +const buildFindRulesRoute = ({ + licenseState, + path, + router, + excludeFromPublicApi = false, + usageCounter, +}: BuildFindRulesRouteParams) => { router.get( { - path: `${BASE_ALERTING_API_PATH}/rules/_find`, + path, validate: { query: querySchema, }, @@ -145,7 +160,7 @@ export const findRulesRoute = ( }); } - const findResult = await rulesClient.find({ options }); + const findResult = await rulesClient.find({ options, excludeFromPublicApi }); return res.ok({ body: rewriteBodyRes(findResult), }); @@ -154,6 +169,34 @@ export const findRulesRoute = ( ); }; +export const findRulesRoute = ( + router: IRouter, + licenseState: ILicenseState, + usageCounter?: UsageCounter +) => { + buildFindRulesRoute({ + excludeFromPublicApi: true, + licenseState, + path: `${BASE_ALERTING_API_PATH}/rules/_find`, + router, + usageCounter, + }); +}; + +export const findInternalRulesRoute = ( + router: IRouter, + licenseState: ILicenseState, + usageCounter?: UsageCounter +) => { + buildFindRulesRoute({ + excludeFromPublicApi: false, + licenseState, + path: `${INTERNAL_BASE_ALERTING_API_PATH}/rules/_find`, + router, + usageCounter, + }); +}; + function searchFieldsAsArray(searchFields: string | string[] | undefined): string[] | undefined { if (!searchFields) { return; diff --git a/x-pack/plugins/alerting/server/routes/get_rule.ts b/x-pack/plugins/alerting/server/routes/get_rule.ts index 4da9410517fe1..4c704ce9484e7 100644 --- a/x-pack/plugins/alerting/server/routes/get_rule.ts +++ b/x-pack/plugins/alerting/server/routes/get_rule.ts @@ -14,6 +14,7 @@ import { AlertTypeParams, AlertingRequestHandlerContext, BASE_ALERTING_API_PATH, + INTERNAL_BASE_ALERTING_API_PATH, SanitizedAlert, } from '../types'; @@ -60,13 +61,21 @@ const rewriteBodyRes: RewriteResponseCase> = ({ })), }); -export const getRuleRoute = ( - router: IRouter, - licenseState: ILicenseState -) => { +interface BuildGetRulesRouteParams { + licenseState: ILicenseState; + path: string; + router: IRouter; + excludeFromPublicApi?: boolean; +} +const buildGetRuleRoute = ({ + licenseState, + path, + router, + excludeFromPublicApi = false, +}: BuildGetRulesRouteParams) => { router.get( { - path: `${BASE_ALERTING_API_PATH}/rule/{id}`, + path, validate: { params: paramSchema, }, @@ -75,7 +84,7 @@ export const getRuleRoute = ( verifyAccessAndContext(licenseState, async function (context, req, res) { const rulesClient = context.alerting.getRulesClient(); const { id } = req.params; - const rule = await rulesClient.get({ id }); + const rule = await rulesClient.get({ id, excludeFromPublicApi }); return res.ok({ body: rewriteBodyRes(rule), }); @@ -83,3 +92,25 @@ export const getRuleRoute = ( ) ); }; + +export const getRuleRoute = ( + router: IRouter, + licenseState: ILicenseState +) => + buildGetRuleRoute({ + excludeFromPublicApi: true, + licenseState, + path: `${BASE_ALERTING_API_PATH}/rule/{id}`, + router, + }); + +export const getInternalRuleRoute = ( + router: IRouter, + licenseState: ILicenseState +) => + buildGetRuleRoute({ + excludeFromPublicApi: false, + licenseState, + path: `${INTERNAL_BASE_ALERTING_API_PATH}/rule/{id}`, + router, + }); diff --git a/x-pack/plugins/alerting/server/routes/index.ts b/x-pack/plugins/alerting/server/routes/index.ts index 2db52fa2c143d..f43190ec6d1c2 100644 --- a/x-pack/plugins/alerting/server/routes/index.ts +++ b/x-pack/plugins/alerting/server/routes/index.ts @@ -12,13 +12,13 @@ import { defineLegacyRoutes } from './legacy'; import { AlertingRequestHandlerContext } from '../types'; import { EncryptedSavedObjectsPluginSetup } from '../../../encrypted_saved_objects/server'; import { createRuleRoute } from './create_rule'; -import { getRuleRoute } from './get_rule'; +import { getRuleRoute, getInternalRuleRoute } from './get_rule'; import { updateRuleRoute } from './update_rule'; import { deleteRuleRoute } from './delete_rule'; import { aggregateRulesRoute } from './aggregate_rules'; import { disableRuleRoute } from './disable_rule'; import { enableRuleRoute } from './enable_rule'; -import { findRulesRoute } from './find_rules'; +import { findRulesRoute, findInternalRulesRoute } from './find_rules'; import { getRuleAlertSummaryRoute } from './get_rule_alert_summary'; import { getRuleStateRoute } from './get_rule_state'; import { healthRoute } from './health'; @@ -43,6 +43,7 @@ export function defineRoutes(opts: RouteOptions) { defineLegacyRoutes(opts); createRuleRoute(opts); getRuleRoute(router, licenseState); + getInternalRuleRoute(router, licenseState); resolveRuleRoute(router, licenseState); updateRuleRoute(router, licenseState); deleteRuleRoute(router, licenseState); @@ -50,6 +51,7 @@ export function defineRoutes(opts: RouteOptions) { disableRuleRoute(router, licenseState); enableRuleRoute(router, licenseState); findRulesRoute(router, licenseState, usageCounter); + findInternalRulesRoute(router, licenseState, usageCounter); getRuleAlertSummaryRoute(router, licenseState); getRuleStateRoute(router, licenseState); healthRoute(router, licenseState, encryptedSavedObjects); diff --git a/x-pack/plugins/alerting/server/routes/legacy/find.test.ts b/x-pack/plugins/alerting/server/routes/legacy/find.test.ts index ef346fab1e621..0d18b70a5944d 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/find.test.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/find.test.ts @@ -78,6 +78,7 @@ describe('findAlertRoute', () => { expect(rulesClient.find.mock.calls[0]).toMatchInlineSnapshot(` Array [ Object { + "excludeFromPublicApi": true, "options": Object { "defaultSearchOperator": "OR", "page": 1, diff --git a/x-pack/plugins/alerting/server/routes/legacy/find.ts b/x-pack/plugins/alerting/server/routes/legacy/find.ts index 328fade491642..fc8076343e713 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/find.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/find.ts @@ -97,7 +97,7 @@ export const findAlertRoute = ( }); } - const findResult = await rulesClient.find({ options }); + const findResult = await rulesClient.find({ options, excludeFromPublicApi: true }); return res.ok({ body: findResult, }); diff --git a/x-pack/plugins/alerting/server/routes/legacy/get.ts b/x-pack/plugins/alerting/server/routes/legacy/get.ts index 8b4c3e4441514..df8259789d53c 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get.ts @@ -38,7 +38,7 @@ export const getAlertRoute = ( const rulesClient = context.alerting.getRulesClient(); const { id } = req.params; return res.ok({ - body: await rulesClient.get({ id }), + body: await rulesClient.get({ id, excludeFromPublicApi: true }), }); }) ); diff --git a/x-pack/plugins/alerting/server/rules_client/lib/index.ts b/x-pack/plugins/alerting/server/rules_client/lib/index.ts index 1684898b2c918..3ad3e11877064 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/index.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/index.ts @@ -6,3 +6,4 @@ */ export { mapSortField } from './map_sort_field'; +export { validateOperationOnAttributes } from './validate_attributes'; diff --git a/x-pack/plugins/alerting/server/rules_client/lib/validate_attributes.test.ts b/x-pack/plugins/alerting/server/rules_client/lib/validate_attributes.test.ts new file mode 100644 index 0000000000000..652c30ff380c5 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/lib/validate_attributes.test.ts @@ -0,0 +1,115 @@ +/* + * 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 * as esKuery from '@kbn/es-query'; +import { + validateSortField, + validateSearchFields, + validateFilterKueryNode, +} from './validate_attributes'; + +describe('Validate attributes', () => { + const excludedFieldNames = ['monitoring']; + describe('validateSortField', () => { + test('should NOT throw an error, when sort field is not part of the field to exclude', () => { + expect(() => validateSortField('name.keyword', excludedFieldNames)).not.toThrow(); + }); + + test('should NOT throw an error, when sort field is not a descendant of the field to exclude', () => { + expect(() => + validateSortField('new_field.monitoring.metrics.success', excludedFieldNames) + ).not.toThrow(); + }); + + test('should throw an error, when sort field is part of the field to exclude', () => { + expect(() => + validateSortField( + 'monitoring.execution.calculated_metrics.success_ratio', + excludedFieldNames + ) + ).toThrowErrorMatchingInlineSnapshot( + `"Sort is not supported on this field monitoring.execution.calculated_metrics.success_ratio"` + ); + }); + }); + + describe('validateSearchFields', () => { + test('should NOT throw an error, when search field is not part of the field to exclude', () => { + expect(() => validateSearchFields(['name', 'tags'], excludedFieldNames)).not.toThrow(); + }); + + test('should NOT throw an error, when search field is not a descendant of the field to exclude', () => { + expect(() => + validateSearchFields( + ['name', 'tags', 'new_field.monitoring.metrics.success'], + excludedFieldNames + ) + ).not.toThrow(); + }); + + test('should throw an error, when search field is part of the field to exclude', () => { + expect(() => + validateSearchFields( + ['name', 'tags', 'monitoring.execution.calculated_metrics.success_ratio'], + excludedFieldNames + ) + ).toThrowErrorMatchingInlineSnapshot( + `"Search field monitoring.execution.calculated_metrics.success_ratio not supported"` + ); + }); + }); + + describe('validateFilterKueryNode', () => { + test('should NOT throw an error, when filter does not contain any fields to exclude', () => { + expect(() => + validateFilterKueryNode({ + astFilter: esKuery.fromKueryExpression( + 'alert.attributes.name: "Rule I" and alert.attributes.tags: "fast"' + ), + excludedFieldNames, + }) + ).not.toThrow(); + }); + + test('should NOT throw an error, when filter does not have any descendant of the field to exclude', () => { + expect(() => + validateFilterKueryNode({ + astFilter: esKuery.fromKueryExpression( + 'alert.attributes.name: "Rule I" and alert.attributes.tags: "fast" and alert.attributes.new_field.monitoring.metrics.success > 50' + ), + excludedFieldNames, + }) + ).not.toThrow(); + }); + + test('should throw an error, when filter contains the field to exclude', () => { + expect(() => + validateFilterKueryNode({ + astFilter: esKuery.fromKueryExpression( + 'alert.attributes.name: "Rule I" and alert.attributes.tags: "fast" and alert.attributes.monitoring.execution.calculated_metrics.success_ratio > 50' + ), + excludedFieldNames, + }) + ).toThrowErrorMatchingInlineSnapshot( + `"Filter is not supported on this field alert.attributes.monitoring.execution.calculated_metrics.success_ratio"` + ); + }); + + test('should throw an error, when a nested filter contains the field to exclude', () => { + expect(() => + validateFilterKueryNode({ + astFilter: esKuery.fromKueryExpression( + 'alert.attributes.name: "Rule I" and alert.attributes.tags: "fast" and alert.attributes.actions:{ group: ".server-log" }' + ), + excludedFieldNames: ['actions'], + }) + ).toThrowErrorMatchingInlineSnapshot( + `"Filter is not supported on this field alert.attributes.actions"` + ); + }); + }); +}); diff --git a/x-pack/plugins/alerting/server/rules_client/lib/validate_attributes.ts b/x-pack/plugins/alerting/server/rules_client/lib/validate_attributes.ts new file mode 100644 index 0000000000000..fa65f4c2f0999 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/lib/validate_attributes.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { KueryNode } from '@kbn/es-query'; +import { get, isEmpty } from 'lodash'; + +import mappings from '../../saved_objects/mappings.json'; + +const astFunctionType = ['is', 'range', 'nested']; + +export const validateOperationOnAttributes = ( + astFilter: KueryNode | null, + sortField: string | undefined, + searchFields: string[] | undefined, + excludedFieldNames: string[] +) => { + if (sortField) { + validateSortField(sortField, excludedFieldNames); + } + if (!isEmpty(searchFields)) { + validateSearchFields(searchFields ?? [], excludedFieldNames); + } + if (astFilter) { + validateFilterKueryNode({ astFilter, excludedFieldNames }); + } +}; + +export const validateSortField = (sortField: string, excludedFieldNames: string[]) => { + if (excludedFieldNames.filter((efn) => sortField.split('.')[0].includes(efn)).length > 0) { + throw new Error(`Sort is not supported on this field ${sortField}`); + } +}; + +export const validateSearchFields = (searchFields: string[], excludedFieldNames: string[]) => { + const excludedSearchFields = searchFields.filter( + (sf) => excludedFieldNames.filter((efn) => sf.split('.')[0].includes(efn)).length > 0 + ); + if (excludedSearchFields.length > 0) { + throw new Error(`Search field ${excludedSearchFields.join()} not supported`); + } +}; + +interface ValidateFilterKueryNodeParams { + astFilter: KueryNode; + excludedFieldNames: string[]; + hasNestedKey?: boolean; + nestedKeys?: string; + storeValue?: boolean; + path?: string; +} + +export const validateFilterKueryNode = ({ + astFilter, + excludedFieldNames, + hasNestedKey = false, + nestedKeys, + storeValue, + path = 'arguments', +}: ValidateFilterKueryNodeParams) => { + let localStoreValue = storeValue; + let localNestedKeys: string | undefined; + if (localStoreValue === undefined) { + localStoreValue = astFilter.type === 'function' && astFunctionType.includes(astFilter.function); + } + astFilter.arguments.forEach((ast: KueryNode, index: number) => { + if (hasNestedKey && ast.type === 'literal' && ast.value != null) { + localNestedKeys = ast.value; + } else if (ast.type === 'literal' && ast.value && typeof ast.value === 'string') { + const key = ast.value.replace('.attributes', ''); + const mappingKey = 'properties.' + key.split('.').join('.properties.'); + const field = get(mappings, mappingKey); + if (field != null && field.type === 'nested') { + localNestedKeys = ast.value; + } + } + + if (ast.arguments) { + const myPath = `${path}.${index}`; + validateFilterKueryNode({ + astFilter: ast, + excludedFieldNames, + storeValue: ast.type === 'function' && astFunctionType.includes(ast.function), + path: `${myPath}.arguments`, + hasNestedKey: ast.type === 'function' && ast.function === 'nested', + nestedKeys: localNestedKeys || nestedKeys, + }); + } + + if (localStoreValue && index === 0) { + const fieldName = nestedKeys != null ? `${nestedKeys}.${ast.value}` : ast.value; + const fieldNameSplit = fieldName + .split('.') + .filter((fn: string) => !['alert', 'attributes'].includes(fn)); + const firstAttribute = fieldNameSplit.length > 0 ? fieldNameSplit[0] : ''; + if (excludedFieldNames.includes(firstAttribute)) { + throw new Error(`Filter is not supported on this field ${fieldName}`); + } + } + }); +}; diff --git a/x-pack/plugins/alerting/server/rules_client/rules_client.ts b/x-pack/plugins/alerting/server/rules_client/rules_client.ts index aa017f91278c1..9100772a806e8 100644 --- a/x-pack/plugins/alerting/server/rules_client/rules_client.ts +++ b/x-pack/plugins/alerting/server/rules_client/rules_client.ts @@ -72,7 +72,7 @@ import { partiallyUpdateAlert } from '../saved_objects'; import { markApiKeyForInvalidation } from '../invalidate_pending_api_keys/mark_api_key_for_invalidation'; import { ruleAuditEvent, RuleAuditAction } from './audit_events'; import { KueryNode, nodeBuilder } from '../../../../../src/plugins/data/common'; -import { mapSortField } from './lib'; +import { mapSortField, validateOperationOnAttributes } from './lib'; import { getRuleExecutionStatusPending } from '../lib/rule_execution_status'; import { AlertInstance } from '../alert_instance'; import { EVENT_LOG_ACTIONS } from '../plugin'; @@ -248,6 +248,7 @@ export class RulesClient { private readonly kibanaVersion!: PluginInitializerContext['env']['packageInfo']['version']; private readonly auditLogger?: AuditLogger; private readonly eventLogger?: IEventLogger; + private readonly fieldsToExcludeFromPublicApi: Array = ['monitoring']; constructor({ ruleTypeRegistry, @@ -425,16 +426,20 @@ export class RulesClient { createdAlert.id, createdAlert.attributes.alertTypeId, createdAlert.attributes, - references + references, + false, + true ); } public async get({ id, includeLegacyId = false, + excludeFromPublicApi = false, }: { id: string; includeLegacyId?: boolean; + excludeFromPublicApi?: boolean; }): Promise | SanitizedRuleWithLegacyId> { const result = await this.unsecuredSavedObjectsClient.get('alert', id); try { @@ -465,7 +470,8 @@ export class RulesClient { result.attributes.alertTypeId, result.attributes, result.references, - includeLegacyId + includeLegacyId, + excludeFromPublicApi ); } @@ -608,7 +614,8 @@ export class RulesClient { public async find({ options: { fields, ...options } = {}, - }: { options?: FindOptions } = {}): Promise> { + excludeFromPublicApi = false, + }: { options?: FindOptions; excludeFromPublicApi?: boolean } = {}): Promise> { let authorizationTuple; try { authorizationTuple = await this.authorization.getFindAuthorizationFilter( @@ -625,6 +632,20 @@ export class RulesClient { throw error; } const { filter: authorizationFilter, ensureRuleTypeIsAuthorized } = authorizationTuple; + const filterKueryNode = options.filter ? esKuery.fromKueryExpression(options.filter) : null; + const sortField = mapSortField(options.sortField); + if (excludeFromPublicApi) { + try { + validateOperationOnAttributes( + filterKueryNode, + sortField, + options.searchFields, + this.fieldsToExcludeFromPublicApi + ); + } catch (error) { + throw Boom.badRequest(`Error find rules: ${error.message}`); + } + } const { page, @@ -633,13 +654,10 @@ export class RulesClient { saved_objects: data, } = await this.unsecuredSavedObjectsClient.find({ ...options, - sortField: mapSortField(options.sortField), + sortField, filter: - (authorizationFilter && options.filter - ? nodeBuilder.and([ - esKuery.fromKueryExpression(options.filter), - authorizationFilter as KueryNode, - ]) + (authorizationFilter && filterKueryNode + ? nodeBuilder.and([filterKueryNode, authorizationFilter as KueryNode]) : authorizationFilter) ?? options.filter, fields: fields ? this.includeFieldsRequiredForAuthentication(fields) : fields, type: 'alert', @@ -666,7 +684,9 @@ export class RulesClient { id, attributes.alertTypeId, fields ? (pick(attributes, fields) as RawRule) : attributes, - references + references, + false, + excludeFromPublicApi ); }); @@ -1032,7 +1052,9 @@ export class RulesClient { id, ruleType, updatedObject.attributes, - updatedObject.references + updatedObject.references, + false, + true ); } @@ -1737,7 +1759,8 @@ export class RulesClient { ruleTypeId: string, rawRule: RawRule, references: SavedObjectReference[] | undefined, - includeLegacyId: boolean = false + includeLegacyId: boolean = false, + excludeFromPublicApi: boolean = false ): Alert | AlertWithLegacyId { const ruleType = this.ruleTypeRegistry.get(ruleTypeId); // In order to support the partial update API of Saved Objects we have to support @@ -1748,7 +1771,8 @@ export class RulesClient { ruleType, rawRule, references, - includeLegacyId + includeLegacyId, + excludeFromPublicApi ); // include to result because it is for internal rules client usage if (includeLegacyId) { @@ -1775,12 +1799,13 @@ export class RulesClient { ...partialRawRule }: Partial, references: SavedObjectReference[] | undefined, - includeLegacyId: boolean = false + includeLegacyId: boolean = false, + excludeFromPublicApi: boolean = false ): PartialAlert | PartialAlertWithLegacyId { const rule = { id, notifyWhen, - ...partialRawRule, + ...omit(partialRawRule, excludeFromPublicApi ? [...this.fieldsToExcludeFromPublicApi] : ''), // we currently only support the Interval Schedule type // Once we support additional types, this type signature will likely change schedule: schedule as IntervalSchedule, @@ -1793,6 +1818,7 @@ export class RulesClient { ? { executionStatus: ruleExecutionStatusFromRaw(this.logger, id, executionStatus) } : {}), }; + return includeLegacyId ? ({ ...rule, legacyId } as PartialAlertWithLegacyId) : (rule as PartialAlert); diff --git a/x-pack/plugins/apm/public/components/app/rum_dashboard/action_menu/index.tsx b/x-pack/plugins/apm/public/components/app/rum_dashboard/action_menu/index.tsx index ae29016956fec..1215048bc55a0 100644 --- a/x-pack/plugins/apm/public/components/app/rum_dashboard/action_menu/index.tsx +++ b/x-pack/plugins/apm/public/components/app/rum_dashboard/action_menu/index.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { EuiHeaderLinks, EuiHeaderLink, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { + RECORDS_FIELD, createExploratoryViewUrl, HeaderMenuPortal, } from '../../../../../../observability/public'; @@ -52,7 +53,7 @@ export function UXActionMenu({ reportDefinitions: { [SERVICE_NAME]: serviceName ? [serviceName] : [], }, - selectedMetricField: 'Records', + selectedMetricField: RECORDS_FIELD, }, ], }, diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx index 06e0e958bf698..67dfe72b133f2 100644 --- a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx @@ -13,6 +13,11 @@ import { getRUMSettings, isRUMFormValid, } from './settings_definition/rum_settings'; +import { + TAIL_SAMPLING_ENABLED_KEY, + getTailSamplingSettings, + isTailBasedSamplingValid, +} from './settings_definition/tail_sampling_settings'; import { getTLSSettings, isTLSFormValid, @@ -32,17 +37,23 @@ export function APMPolicyForm({ isCloudPolicy, updateAPMPolicy, }: Props) { - const { apmSettings, rumSettings, tlsSettings, agentAuthorizationSettings } = - useMemo(() => { - return { - apmSettings: getApmSettings({ isCloudPolicy }), - rumSettings: getRUMSettings(), - tlsSettings: getTLSSettings(), - agentAuthorizationSettings: getAgentAuthorizationSettings({ - isCloudPolicy, - }), - }; - }, [isCloudPolicy]); + const { + apmSettings, + rumSettings, + tlsSettings, + agentAuthorizationSettings, + tailSamplingSettings, + } = useMemo(() => { + return { + apmSettings: getApmSettings({ isCloudPolicy }), + rumSettings: getRUMSettings(), + tlsSettings: getTLSSettings(), + agentAuthorizationSettings: getAgentAuthorizationSettings({ + isCloudPolicy, + }), + tailSamplingSettings: getTailSamplingSettings(), + }; + }, [isCloudPolicy]); function handleFormChange(key: string, value: any) { // Merge new key/value with the rest of fields @@ -53,7 +64,8 @@ export function APMPolicyForm({ isSettingsFormValid(apmSettings, newVars) && isRUMFormValid(newVars, rumSettings) && isTLSFormValid(newVars, tlsSettings) && - isSettingsFormValid(agentAuthorizationSettings, newVars); + isSettingsFormValid(agentAuthorizationSettings, newVars) && + isTailBasedSamplingValid(newVars, tailSamplingSettings); updateAPMPolicy(newVars, isFormValid); } @@ -103,6 +115,27 @@ export function APMPolicyForm({ ), settings: agentAuthorizationSettings, }, + ...(vars[TAIL_SAMPLING_ENABLED_KEY] + ? [ + { + id: 'tailSampling', + title: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.settings.title', + { defaultMessage: 'Tail-based sampling' } + ), + subtitle: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.settings.subtitle', + { + defaultMessage: + 'Manage tail-based sampling for services and traces.', + } + ), + settings: tailSamplingSettings, + isBeta: true, + isPlatinumLicence: true, + }, + ] + : []), ]; return ( diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.test.ts b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.test.ts new file mode 100644 index 0000000000000..cb9c72cdb59f6 --- /dev/null +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.test.ts @@ -0,0 +1,54 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + getTailSamplingSettings, + isTailBasedSamplingValid, +} from './tail_sampling_settings'; + +describe('tail_sampling_settings - isTailBasedSamplingFormValid', () => { + it('return true when tail_sampling_interval is greater than 1s', () => { + const settings = getTailSamplingSettings(); + const isValid = isTailBasedSamplingValid( + { + tail_sampling_enabled: { value: true, type: 'bool' }, + tail_sampling_interval: { value: '3s', type: 'text' }, + tail_sampling_policies: { + value: 'testValue', + type: 'yaml', + }, + }, + settings + ); + expect(isValid).toBe(true); + }); + + it('return false when tail_sampling_interval is less than 1s', () => { + const settings = getTailSamplingSettings(); + const isValid = isTailBasedSamplingValid( + { + tail_sampling_enabled: { value: true, type: 'bool' }, + tail_sampling_interval: { value: '1ms', type: 'text' }, + tail_sampling_policies: { + value: 'testValue', + type: 'yaml', + }, + }, + settings + ); + expect(isValid).toBe(false); + }); + + it('returns true when tail_sampling_enabled is disabled', () => { + const settings = getTailSamplingSettings(); + const isValid = isTailBasedSamplingValid( + { tail_sampling_enabled: { value: false, type: 'bool' } }, + settings + ); + expect(isValid).toBe(true); + }); +}); diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.ts b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.ts new file mode 100644 index 0000000000000..075e838b5d818 --- /dev/null +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.ts @@ -0,0 +1,86 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { isSettingsFormValid, OPTIONAL_LABEL } from '../settings_form/utils'; +import { PackagePolicyVars, SettingsRow } from '../typings'; +import { getDurationRt } from '../../../../../common/agent_configuration/runtime_types/duration_rt'; + +export const TAIL_SAMPLING_ENABLED_KEY = 'tail_sampling_enabled'; + +export function getTailSamplingSettings(): SettingsRow[] { + return [ + { + key: TAIL_SAMPLING_ENABLED_KEY, + rowTitle: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.tailSamplingEnabledTitle', + { defaultMessage: 'Enable tail-based sampling' } + ), + rowDescription: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.enableTailSamplingDescription', + { defaultMessage: 'Enable tail-based sampling.' } + ), + type: 'boolean', + settings: [ + { + key: 'tail_sampling_interval', + type: 'duration', + label: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.tailSamplingInterval', + { + defaultMessage: 'Tail sampling interval', + } + ), + rowTitle: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.tailSamplingIntervalTitle', + { defaultMessage: 'Interval' } + ), + rowDescription: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.tailSamplingIntervalDescription', + { + defaultMessage: + 'Interval for synchronization between multiple APM Servers. Should be in the order of tens of seconds or low minutes.', + } + ), + labelAppend: OPTIONAL_LABEL, + required: false, + validation: getDurationRt({ min: '1s' }), + }, + { + key: 'tail_sampling_policies', + type: 'yaml', + label: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.tailSamplingPolicies', + { defaultMessage: 'Tail sampling policies' } + ), + rowTitle: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.tailSamplingPoliciesTitle', + { defaultMessage: 'Policies' } + ), + rowDescription: i18n.translate( + 'xpack.apm.fleet_integration.settings.tailSampling.tailSamplingPoliciesDescription', + { + defaultMessage: + 'Policies map trace events to a sample rate. Each policy must specify a sample rate. Trace events are matched to policies in the order specified. All policy conditions must be true for a trace event to match. Each policy list should conclude with a policy that only specifies a sample rate. This final policy is used to catch remaining trace events that donā€™t match a stricter policy.', + } + ), + required: true, + }, + ], + }, + ]; +} + +export function isTailBasedSamplingValid( + newVars: PackagePolicyVars, + tailSamplingSettings: SettingsRow[] +) { + // only validates TBS when its flag is enabled + return ( + !newVars[TAIL_SAMPLING_ENABLED_KEY].value || + isSettingsFormValid(tailSamplingSettings, newVars) + ); +} diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx index 6b3d0ed776dcd..321440eeaeab7 100644 --- a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx @@ -15,8 +15,14 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; +import styled from 'styled-components'; import { FormRowOnChange } from './'; import { SettingsRow } from '../typings'; +import { CodeEditor } from '../../../../../../../../src/plugins/kibana_react/public'; + +const FixedHeightDiv = styled.div` + height: 300px; +`; interface Props { row: SettingsRow; @@ -106,6 +112,37 @@ export function FormRowSetting({ row, value, onChange }: Props) { /> ); } + case 'yaml': { + return ( + + { + onChange(row.key, val); + }} + options={{ + ariaLabel: i18n.translate( + 'xpack.apm.fleet_integration.settings.yamlCodeEditor', + { + defaultMessage: 'YAML Code Editor', + } + ), + wordWrap: 'off', + tabSize: 2, + // To avoid left margin + lineNumbers: 'off', + lineNumbersMinChars: 0, + folding: false, + lineDecorationsWidth: 0, + overviewRulerBorder: false, + }} + /> + + ); + } default: throw new Error(`Unknown type "${row.type}"`); } diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx index af78e885e85d2..506d5bbb5128c 100644 --- a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx @@ -14,6 +14,7 @@ import { EuiPanel, EuiText, EuiTitle, + EuiBetaBadge, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; @@ -86,6 +87,8 @@ export interface SettingsSection { title: string; subtitle?: string; settings: SettingsRow[]; + isBeta?: boolean; + isPlatinumLicence?: boolean; } interface Props { @@ -95,13 +98,58 @@ interface Props { } export function SettingsForm({ settingsSection, vars, onChange }: Props) { - const { title, subtitle, settings } = settingsSection; + const { title, subtitle, settings, isBeta, isPlatinumLicence } = + settingsSection; return ( -

{title}

+

+ {title}   + {isPlatinumLicence && ( + + )} +   + {isBeta && ( + + )} +

{subtitle && ( diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts index 4f741ceb46f49..d1283e0fede17 100644 --- a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts @@ -35,7 +35,8 @@ export interface BasicSettingRow { | 'boolean' | 'integer' | 'bytes' - | 'duration'; + | 'duration' + | 'yaml'; key: string; rowTitle?: string; rowDescription?: string; diff --git a/x-pack/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts b/x-pack/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts index 939feb7c9e22f..352ff8eb9cca5 100644 --- a/x-pack/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts +++ b/x-pack/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts @@ -279,4 +279,16 @@ export const apmConfigMapping: Record< name: 'anonymous_rate_limit_event_limit', type: 'integer', }, + 'apm-server.sampling.tail.enabled': { + name: 'tail_sampling_enabled', + type: 'bool', + }, + 'apm-server.sampling.tail.interval': { + name: 'tail_sampling_interval', + type: 'text', + }, + 'apm-server.sampling.tail.policies': { + name: 'tail_sampling_policies', + type: 'yaml', + }, }; diff --git a/x-pack/plugins/cases/README.md b/x-pack/plugins/cases/README.md index e43d3c8f47087..86e81d78f69fd 100644 --- a/x-pack/plugins/cases/README.md +++ b/x-pack/plugins/cases/README.md @@ -154,4 +154,4 @@ UI component: [all-cases-modal-img]: images/all_cases_selector_modal.png [recent-cases-img]: images/recent_cases.png [case-view-img]: images/case_view.png -[cases-client-api-docs]: docs/cases_client/cases_client_api.md +[cases-client-api-docs]: docs/cases_client/README.md diff --git a/x-pack/plugins/cases/docs/README.md b/x-pack/plugins/cases/docs/README.md index 16e9311958763..03f089280bc57 100644 --- a/x-pack/plugins/cases/docs/README.md +++ b/x-pack/plugins/cases/docs/README.md @@ -7,19 +7,24 @@ or parameters are added. ## TypeDoc Info See more info at: -and: for the markdown plugin +markdown plugin: +missing exports plugin: ## Install dependencies +Ensure that your global typescript version is the same as kibana's + +You can run `npx tsc --version` to find the global compiler version and then check the version under `node_modules/typescript/lib`. + ```bash -yarn global add typedoc typedoc-plugin-markdown +yarn global add typedoc typedoc-plugin-markdown typedoc-plugin-missing-exports ``` ## Generate the docs ```bash cd x-pack/plugins/cases/docs -npx typedoc --gitRemote upstream --options cases_client_typedoc.json +npx typedoc --options cases_client_typedoc.json ``` After running the above commands the files in the `server` directory will be updated to match the new tsdocs. diff --git a/x-pack/plugins/cases/docs/cases_client/.nojekyll b/x-pack/plugins/cases/docs/cases_client/.nojekyll new file mode 100644 index 0000000000000..e2ac6616addc2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/cases_client/cases_client_api.md b/x-pack/plugins/cases/docs/cases_client/README.md similarity index 66% rename from x-pack/plugins/cases/docs/cases_client/cases_client_api.md rename to x-pack/plugins/cases/docs/cases_client/README.md index d7e75af3142e6..c3fa291458cca 100644 --- a/x-pack/plugins/cases/docs/cases_client/cases_client_api.md +++ b/x-pack/plugins/cases/docs/cases_client/README.md @@ -6,17 +6,13 @@ Cases Client API Interface ### Modules -- [attachments/add](modules/attachments_add.md) - [attachments/client](modules/attachments_client.md) -- [attachments/delete](modules/attachments_delete.md) -- [attachments/get](modules/attachments_get.md) -- [attachments/update](modules/attachments_update.md) - [cases/client](modules/cases_client.md) - [cases/get](modules/cases_get.md) - [cases/push](modules/cases_push.md) - [client](modules/client.md) - [configure/client](modules/configure_client.md) +- [metrics/client](modules/metrics_client.md) - [stats/client](modules/stats_client.md) -- [sub\_cases/client](modules/sub_cases_client.md) - [typedoc\_interfaces](modules/typedoc_interfaces.md) - [user\_actions/client](modules/user_actions_client.md) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionExecutor.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionExecutor.md new file mode 100644 index 0000000000000..720db77a77e7e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionExecutor.md @@ -0,0 +1,153 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionExecutor + +# Class: ActionExecutor + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionExecutor + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ActionExecutor.md#constructor) + +### Properties + +- [actionExecutorContext](client._internal_namespace.ActionExecutor.md#actionexecutorcontext) +- [actionInfo](client._internal_namespace.ActionExecutor.md#actioninfo) +- [isESOCanEncrypt](client._internal_namespace.ActionExecutor.md#isesocanencrypt) +- [isInitialized](client._internal_namespace.ActionExecutor.md#isinitialized) + +### Methods + +- [execute](client._internal_namespace.ActionExecutor.md#execute) +- [initialize](client._internal_namespace.ActionExecutor.md#initialize) +- [logCancellation](client._internal_namespace.ActionExecutor.md#logcancellation) + +## Constructors + +### constructor + +ā€¢ **new ActionExecutor**(`__namedParameters`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.isESOCanEncrypt` | `boolean` | + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:40 + +## Properties + +### actionExecutorContext + +ā€¢ `Private` `Optional` **actionExecutorContext**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:37 + +___ + +### actionInfo + +ā€¢ `Private` **actionInfo**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:39 + +___ + +### isESOCanEncrypt + +ā€¢ `Private` `Readonly` **isESOCanEncrypt**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:38 + +___ + +### isInitialized + +ā€¢ `Private` **isInitialized**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:36 + +## Methods + +### execute + +ā–ø **execute**(`__namedParameters`): `Promise`<[`ActionTypeExecutorResult`](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md)<`unknown`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`ExecuteOptions`](../interfaces/client._internal_namespace.ExecuteOptions.md)<`unknown`\> | + +#### Returns + +`Promise`<[`ActionTypeExecutorResult`](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md)<`unknown`\>\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:44 + +___ + +### initialize + +ā–ø **initialize**(`actionExecutorContext`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionExecutorContext` | [`ActionExecutorContext`](../interfaces/client._internal_namespace.ActionExecutorContext.md) | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:43 + +___ + +### logCancellation + +ā–ø **logCancellation**<`Source`\>(`__namedParameters`): `Promise`<`void`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Source` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.actionId` | `string` | +| `__namedParameters.executionId?` | `string` | +| `__namedParameters.relatedSavedObjects` | `Readonly`<{ `namespace?`: `string` ; `typeId?`: `string` } & { `id`: `string` ; `type`: `string` }\>[] | +| `__namedParameters.request` | [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | +| `__namedParameters.source?` | [`ActionExecutionSource`](../interfaces/client._internal_namespace.ActionExecutionSource.md)<`Source`\> | +| `__namedParameters.taskInfo?` | [`TaskInfo`](../interfaces/client._internal_namespace.TaskInfo.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:45 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionTypeRegistry.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionTypeRegistry.md new file mode 100644 index 0000000000000..b801bdf26a158 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionTypeRegistry.md @@ -0,0 +1,288 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionTypeRegistry + +# Class: ActionTypeRegistry + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionTypeRegistry + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ActionTypeRegistry.md#constructor) + +### Properties + +- [actionTypes](client._internal_namespace.ActionTypeRegistry.md#actiontypes) +- [actionsConfigUtils](client._internal_namespace.ActionTypeRegistry.md#actionsconfigutils) +- [licenseState](client._internal_namespace.ActionTypeRegistry.md#licensestate) +- [licensing](client._internal_namespace.ActionTypeRegistry.md#licensing) +- [preconfiguredActions](client._internal_namespace.ActionTypeRegistry.md#preconfiguredactions) +- [taskManager](client._internal_namespace.ActionTypeRegistry.md#taskmanager) +- [taskRunnerFactory](client._internal_namespace.ActionTypeRegistry.md#taskrunnerfactory) + +### Methods + +- [ensureActionTypeEnabled](client._internal_namespace.ActionTypeRegistry.md#ensureactiontypeenabled) +- [get](client._internal_namespace.ActionTypeRegistry.md#get) +- [has](client._internal_namespace.ActionTypeRegistry.md#has) +- [isActionExecutable](client._internal_namespace.ActionTypeRegistry.md#isactionexecutable) +- [isActionTypeEnabled](client._internal_namespace.ActionTypeRegistry.md#isactiontypeenabled) +- [list](client._internal_namespace.ActionTypeRegistry.md#list) +- [register](client._internal_namespace.ActionTypeRegistry.md#register) + +## Constructors + +### constructor + +ā€¢ **new ActionTypeRegistry**(`constructorParams`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `constructorParams` | [`ActionTypeRegistryOpts`](../interfaces/client._internal_namespace.ActionTypeRegistryOpts.md) | + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:23 + +## Properties + +### actionTypes + +ā€¢ `Private` `Readonly` **actionTypes**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:17 + +___ + +### actionsConfigUtils + +ā€¢ `Private` `Readonly` **actionsConfigUtils**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:19 + +___ + +### licenseState + +ā€¢ `Private` `Readonly` **licenseState**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:20 + +___ + +### licensing + +ā€¢ `Private` `Readonly` **licensing**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:22 + +___ + +### preconfiguredActions + +ā€¢ `Private` `Readonly` **preconfiguredActions**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:21 + +___ + +### taskManager + +ā€¢ `Private` `Readonly` **taskManager**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:16 + +___ + +### taskRunnerFactory + +ā€¢ `Private` `Readonly` **taskRunnerFactory**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:18 + +## Methods + +### ensureActionTypeEnabled + +ā–ø **ensureActionTypeEnabled**(`id`): `void` + +Throws error if action type is not enabled. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:31 + +___ + +### get + +ā–ø **get**<`Config`, `Secrets`, `Params`, `ExecutorResultData`\>(`id`): [`ActionType`](../interfaces/client._internal_namespace.ActionType-1.md)<`Config`, `Secrets`, `Params`, `ExecutorResultData`\> + +Returns an action type, throws if not registered + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Config` | extends [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) = [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) | +| `Secrets` | extends [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) = [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) | +| `Params` | extends [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams) = [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams) | +| `ExecutorResultData` | `void` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +[`ActionType`](../interfaces/client._internal_namespace.ActionType-1.md)<`Config`, `Secrets`, `Params`, `ExecutorResultData`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:51 + +___ + +### has + +ā–ø **has**(`id`): `boolean` + +Returns if the action type registry has the given action type registered + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:27 + +___ + +### isActionExecutable + +ā–ø **isActionExecutable**(`actionId`, `actionTypeId`, `options?`): `boolean` + +Returns true if action type is enabled or it is a preconfigured action type. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionId` | `string` | +| `actionTypeId` | `string` | +| `options?` | `Object` | +| `options.notifyUsage` | `boolean` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:41 + +___ + +### isActionTypeEnabled + +ā–ø **isActionTypeEnabled**(`id`, `options?`): `boolean` + +Returns true if action type is enabled in the config and a valid license is used. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `options?` | `Object` | +| `options.notifyUsage` | `boolean` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:35 + +___ + +### list + +ā–ø **list**(): [`ActionType`](../interfaces/client._internal_namespace.ActionType.md)[] + +Returns a list of registered action types [{ id, name, enabled }] + +#### Returns + +[`ActionType`](../interfaces/client._internal_namespace.ActionType.md)[] + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:55 + +___ + +### register + +ā–ø **register**<`Config`, `Secrets`, `Params`, `ExecutorResultData`\>(`actionType`): `void` + +Registers an action type to the action type registry + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Config` | extends [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) = [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) | +| `Secrets` | extends [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) = [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) | +| `Params` | extends [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams) = [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams) | +| `ExecutorResultData` | `void` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionType` | [`ActionType`](../interfaces/client._internal_namespace.ActionType-1.md)<`Config`, `Secrets`, `Params`, `ExecutorResultData`\> | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:47 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.Actions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.Actions.md new file mode 100644 index 0000000000000..c05dbe40c3657 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.Actions.md @@ -0,0 +1,144 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Actions + +# Class: Actions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Actions + +Actions are used to create the "actions" that are associated with Elasticsearch's +application privileges, and are used to perform the authorization checks implemented +by the various `checkPrivilegesWithRequest` derivatives. + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.Actions.md#constructor) + +### Properties + +- [alerting](client._internal_namespace.Actions.md#alerting) +- [api](client._internal_namespace.Actions.md#api) +- [app](client._internal_namespace.Actions.md#app) +- [cases](client._internal_namespace.Actions.md#cases) +- [login](client._internal_namespace.Actions.md#login) +- [savedObject](client._internal_namespace.Actions.md#savedobject) +- [space](client._internal_namespace.Actions.md#space) +- [ui](client._internal_namespace.Actions.md#ui) +- [version](client._internal_namespace.Actions.md#version) +- [versionNumber](client._internal_namespace.Actions.md#versionnumber) + +## Constructors + +### constructor + +ā€¢ **new Actions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:23 + +## Properties + +### alerting + +ā€¢ `Readonly` **alerting**: [`AlertingActions`](client._internal_namespace.AlertingActions.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:19 + +___ + +### api + +ā€¢ `Readonly` **api**: [`ApiActions`](client._internal_namespace.ApiActions.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:14 + +___ + +### app + +ā€¢ `Readonly` **app**: [`AppActions`](client._internal_namespace.AppActions.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:15 + +___ + +### cases + +ā€¢ `Readonly` **cases**: [`CasesActions`](client._internal_namespace.CasesActions.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:16 + +___ + +### login + +ā€¢ `Readonly` **login**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:17 + +___ + +### savedObject + +ā€¢ `Readonly` **savedObject**: [`SavedObjectActions`](client._internal_namespace.SavedObjectActions.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:18 + +___ + +### space + +ā€¢ `Readonly` **space**: [`SpaceActions`](client._internal_namespace.SpaceActions.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:20 + +___ + +### ui + +ā€¢ `Readonly` **ui**: [`UIActions`](client._internal_namespace.UIActions.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:21 + +___ + +### version + +ā€¢ `Readonly` **version**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:22 + +___ + +### versionNumber + +ā€¢ `Private` `Readonly` **versionNumber**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/actions.d.ts:13 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionsAuthorization.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionsAuthorization.md new file mode 100644 index 0000000000000..eb1403431969d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionsAuthorization.md @@ -0,0 +1,99 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionsAuthorization + +# Class: ActionsAuthorization + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionsAuthorization + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ActionsAuthorization.md#constructor) + +### Properties + +- [authorization](client._internal_namespace.ActionsAuthorization.md#authorization) +- [authorizationMode](client._internal_namespace.ActionsAuthorization.md#authorizationmode) +- [isOperationExemptDueToLegacyRbac](client._internal_namespace.ActionsAuthorization.md#isoperationexemptduetolegacyrbac) +- [request](client._internal_namespace.ActionsAuthorization.md#request) + +### Methods + +- [ensureAuthorized](client._internal_namespace.ActionsAuthorization.md#ensureauthorized) + +## Constructors + +### constructor + +ā€¢ **new ActionsAuthorization**(`__namedParameters`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`ConstructorOptions`](../interfaces/client._internal_namespace.ConstructorOptions-1.md) | + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:14 + +## Properties + +### authorization + +ā€¢ `Private` `Optional` `Readonly` **authorization**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:12 + +___ + +### authorizationMode + +ā€¢ `Private` `Readonly` **authorizationMode**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:13 + +___ + +### isOperationExemptDueToLegacyRbac + +ā€¢ `Private` **isOperationExemptDueToLegacyRbac**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:16 + +___ + +### request + +ā€¢ `Private` `Readonly` **request**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:11 + +## Methods + +### ensureAuthorized + +ā–ø **ensureAuthorized**(`operation`, `actionTypeId?`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `operation` | `string` | +| `actionTypeId?` | `string` | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:15 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionsClient.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionsClient.md new file mode 100644 index 0000000000000..a566950c5fa21 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ActionsClient.md @@ -0,0 +1,432 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionsClient + +# Class: ActionsClient + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionsClient + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ActionsClient.md#constructor) + +### Properties + +- [actionExecutor](client._internal_namespace.ActionsClient.md#actionexecutor) +- [actionTypeRegistry](client._internal_namespace.ActionsClient.md#actiontyperegistry) +- [auditLogger](client._internal_namespace.ActionsClient.md#auditlogger) +- [authorization](client._internal_namespace.ActionsClient.md#authorization) +- [connectorTokenClient](client._internal_namespace.ActionsClient.md#connectortokenclient) +- [defaultKibanaIndex](client._internal_namespace.ActionsClient.md#defaultkibanaindex) +- [ephemeralExecutionEnqueuer](client._internal_namespace.ActionsClient.md#ephemeralexecutionenqueuer) +- [executionEnqueuer](client._internal_namespace.ActionsClient.md#executionenqueuer) +- [preconfiguredActions](client._internal_namespace.ActionsClient.md#preconfiguredactions) +- [request](client._internal_namespace.ActionsClient.md#request) +- [scopedClusterClient](client._internal_namespace.ActionsClient.md#scopedclusterclient) +- [unsecuredSavedObjectsClient](client._internal_namespace.ActionsClient.md#unsecuredsavedobjectsclient) +- [usageCounter](client._internal_namespace.ActionsClient.md#usagecounter) + +### Methods + +- [create](client._internal_namespace.ActionsClient.md#create) +- [delete](client._internal_namespace.ActionsClient.md#delete) +- [enqueueExecution](client._internal_namespace.ActionsClient.md#enqueueexecution) +- [ephemeralEnqueuedExecution](client._internal_namespace.ActionsClient.md#ephemeralenqueuedexecution) +- [execute](client._internal_namespace.ActionsClient.md#execute) +- [get](client._internal_namespace.ActionsClient.md#get) +- [getAll](client._internal_namespace.ActionsClient.md#getall) +- [getBulk](client._internal_namespace.ActionsClient.md#getbulk) +- [isActionTypeEnabled](client._internal_namespace.ActionsClient.md#isactiontypeenabled) +- [isPreconfigured](client._internal_namespace.ActionsClient.md#ispreconfigured) +- [listTypes](client._internal_namespace.ActionsClient.md#listtypes) +- [update](client._internal_namespace.ActionsClient.md#update) + +## Constructors + +### constructor + +ā€¢ **new ActionsClient**(`__namedParameters`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`ConstructorOptions`](../interfaces/client._internal_namespace.ConstructorOptions.md) | + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:57 + +## Properties + +### actionExecutor + +ā€¢ `Private` `Readonly` **actionExecutor**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:49 + +___ + +### actionTypeRegistry + +ā€¢ `Private` `Readonly` **actionTypeRegistry**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:47 + +___ + +### auditLogger + +ā€¢ `Private` `Optional` `Readonly` **auditLogger**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:54 + +___ + +### authorization + +ā€¢ `Private` `Readonly` **authorization**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:51 + +___ + +### connectorTokenClient + +ā€¢ `Private` `Readonly` **connectorTokenClient**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:56 + +___ + +### defaultKibanaIndex + +ā€¢ `Private` `Readonly` **defaultKibanaIndex**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:44 + +___ + +### ephemeralExecutionEnqueuer + +ā€¢ `Private` `Readonly` **ephemeralExecutionEnqueuer**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:53 + +___ + +### executionEnqueuer + +ā€¢ `Private` `Readonly` **executionEnqueuer**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:52 + +___ + +### preconfiguredActions + +ā€¢ `Private` `Readonly` **preconfiguredActions**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:48 + +___ + +### request + +ā€¢ `Private` `Readonly` **request**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:50 + +___ + +### scopedClusterClient + +ā€¢ `Private` `Readonly` **scopedClusterClient**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:45 + +___ + +### unsecuredSavedObjectsClient + +ā€¢ `Private` `Readonly` **unsecuredSavedObjectsClient**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:46 + +___ + +### usageCounter + +ā€¢ `Private` `Optional` `Readonly` **usageCounter**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:55 + +## Methods + +### create + +ā–ø **create**(`__namedParameters`): `Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>\> + +Create an action + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CreateOptions`](../interfaces/client._internal_namespace.CreateOptions.md) | + +#### Returns + +`Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:61 + +___ + +### delete + +ā–ø **delete**(`__namedParameters`): `Promise`<{}\> + +Delete action + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.id` | `string` | + +#### Returns + +`Promise`<{}\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:83 + +___ + +### enqueueExecution + +ā–ø **enqueueExecution**(`options`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`ExecuteOptions`](../interfaces/client._internal_namespace.ExecuteOptions-1.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:87 + +___ + +### ephemeralEnqueuedExecution + +ā–ø **ephemeralEnqueuedExecution**(`options`): `Promise`<[`RunNowResult`](../interfaces/client._internal_namespace.RunNowResult.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`ExecuteOptions`](../interfaces/client._internal_namespace.ExecuteOptions-1.md) | + +#### Returns + +`Promise`<[`RunNowResult`](../interfaces/client._internal_namespace.RunNowResult.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:88 + +___ + +### execute + +ā–ø **execute**(`__namedParameters`): `Promise`<[`ActionTypeExecutorResult`](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md)<`unknown`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Omit`<[`ExecuteOptions`](../interfaces/client._internal_namespace.ExecuteOptions.md)<`unknown`\>, ``"request"``\> | + +#### Returns + +`Promise`<[`ActionTypeExecutorResult`](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md)<`unknown`\>\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:86 + +___ + +### get + +ā–ø **get**(`__namedParameters`): `Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>\> + +Get an action + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.id` | `string` | + +#### Returns + +`Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:69 + +___ + +### getAll + +ā–ø **getAll**(): `Promise`<[`FindActionResult`](../interfaces/client._internal_namespace.FindActionResult.md)[]\> + +Get all actions with preconfigured list + +#### Returns + +`Promise`<[`FindActionResult`](../interfaces/client._internal_namespace.FindActionResult.md)[]\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:75 + +___ + +### getBulk + +ā–ø **getBulk**(`ids`): `Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>[]\> + +Get bulk actions with preconfigured list + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `ids` | `string`[] | + +#### Returns + +`Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>[]\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:79 + +___ + +### isActionTypeEnabled + +ā–ø **isActionTypeEnabled**(`actionTypeId`, `options?`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionTypeId` | `string` | +| `options?` | `Object` | +| `options.notifyUsage` | `boolean` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:90 + +___ + +### isPreconfigured + +ā–ø **isPreconfigured**(`connectorId`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `connectorId` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:93 + +___ + +### listTypes + +ā–ø **listTypes**(): `Promise`<[`ActionType`](../interfaces/client._internal_namespace.ActionType.md)[]\> + +#### Returns + +`Promise`<[`ActionType`](../interfaces/client._internal_namespace.ActionType.md)[]\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:89 + +___ + +### update + +ā–ø **update**(`__namedParameters`): `Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>\> + +Update action + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`UpdateOptions`](../interfaces/client._internal_namespace.UpdateOptions.md) | + +#### Returns + +`Promise`<[`ActionResult`](../interfaces/client._internal_namespace.ActionResult.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig)\>\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:65 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AlertService.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AlertService.md new file mode 100644 index 0000000000000..b231fddac4c61 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AlertService.md @@ -0,0 +1,206 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AlertService + +# Class: AlertService + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AlertService + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.AlertService.md#constructor) + +### Methods + +- [bucketAlertsByIndexAndStatus](client._internal_namespace.AlertService.md#bucketalertsbyindexandstatus) +- [executeAggregations](client._internal_namespace.AlertService.md#executeaggregations) +- [getAlerts](client._internal_namespace.AlertService.md#getalerts) +- [translateStatus](client._internal_namespace.AlertService.md#translatestatus) +- [updateAlertsStatus](client._internal_namespace.AlertService.md#updatealertsstatus) +- [updateByQuery](client._internal_namespace.AlertService.md#updatebyquery) +- [getUniqueIdsIndices](client._internal_namespace.AlertService.md#getuniqueidsindices) +- [isEmptyAlert](client._internal_namespace.AlertService.md#isemptyalert) + +## Constructors + +### constructor + +ā€¢ **new AlertService**(`scopedClusterClient`, `logger`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `scopedClusterClient` | [`ElasticsearchClient`](../modules/client._internal_namespace.md#elasticsearchclient) | +| `logger` | `Logger` | + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:24](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L24) + +## Methods + +### bucketAlertsByIndexAndStatus + +ā–ø `Private` **bucketAlertsByIndexAndStatus**(`alerts`): `Map`<`string`, `Map`<`STATUS_VALUES`, [`TranslatedUpdateAlertRequest`](../interfaces/client._internal_namespace.TranslatedUpdateAlertRequest.md)[]\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alerts` | [`UpdateAlertRequest`](../interfaces/client._internal_namespace.UpdateAlertRequest.md)[] | + +#### Returns + +`Map`<`string`, `Map`<`STATUS_VALUES`, [`TranslatedUpdateAlertRequest`](../interfaces/client._internal_namespace.TranslatedUpdateAlertRequest.md)[]\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:98](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L98) + +___ + +### executeAggregations + +ā–ø **executeAggregations**(`__namedParameters`): `Promise`<[`AggregationResponse`](../modules/client._internal_namespace.md#aggregationresponse)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.aggregationBuilders` | [`AggregationBuilder`](../interfaces/client._internal_namespace.AggregationBuilder.md)[] | +| `__namedParameters.alerts` | [`AlertIdIndex`](../interfaces/client._internal_namespace.AlertIdIndex.md)[] | + +#### Returns + +`Promise`<[`AggregationResponse`](../modules/client._internal_namespace.md#aggregationresponse)\> + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:29](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L29) + +___ + +### getAlerts + +ā–ø **getAlerts**(`alertsInfo`): `Promise`<`undefined` \| [`AlertsResponse`](../interfaces/client._internal_namespace.AlertsResponse.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alertsInfo` | [`AlertInfo`](../interfaces/client._internal_namespace.AlertInfo.md)[] | + +#### Returns + +`Promise`<`undefined` \| [`AlertsResponse`](../interfaces/client._internal_namespace.AlertsResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:182](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L182) + +___ + +### translateStatus + +ā–ø `Private` **translateStatus**(`alert`): `STATUS_VALUES` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alert` | [`UpdateAlertRequest`](../interfaces/client._internal_namespace.UpdateAlertRequest.md) | + +#### Returns + +`STATUS_VALUES` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:133](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L133) + +___ + +### updateAlertsStatus + +ā–ø **updateAlertsStatus**(`alerts`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alerts` | [`UpdateAlertRequest`](../interfaces/client._internal_namespace.UpdateAlertRequest.md)[] | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:78](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L78) + +___ + +### updateByQuery + +ā–ø `Private` **updateByQuery**(`__namedParameters`): `Promise`<`TransportResult`<`UpdateByQueryResponse`, `unknown`\>[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`string`, `Map`<`STATUS_VALUES`, [`TranslatedUpdateAlertRequest`](../interfaces/client._internal_namespace.TranslatedUpdateAlertRequest.md)[]\>] | + +#### Returns + +`Promise`<`TransportResult`<`UpdateByQueryResponse`, `unknown`\>[]\> + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:151](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L151) + +___ + +### getUniqueIdsIndices + +ā–ø `Static` `Private` **getUniqueIdsIndices**(`alerts`): `Object` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alerts` | [`AlertIdIndex`](../interfaces/client._internal_namespace.AlertIdIndex.md)[] | + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `ids` | `string`[] | +| `indices` | `string`[] | + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:62](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L62) + +___ + +### isEmptyAlert + +ā–ø `Static` `Private` **isEmptyAlert**(`alert`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alert` | [`AlertInfo`](../interfaces/client._internal_namespace.AlertInfo.md) | + +#### Returns + +`boolean` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:129](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L129) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AlertingActions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AlertingActions.md new file mode 100644 index 0000000000000..6b45ea9b28110 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AlertingActions.md @@ -0,0 +1,68 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AlertingActions + +# Class: AlertingActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AlertingActions + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.AlertingActions.md#constructor) + +### Properties + +- [prefix](client._internal_namespace.AlertingActions.md#prefix) + +### Methods + +- [get](client._internal_namespace.AlertingActions.md#get) + +## Constructors + +### constructor + +ā€¢ **new AlertingActions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/alerting.d.ts:3 + +## Properties + +### prefix + +ā€¢ `Private` `Readonly` **prefix**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/alerting.d.ts:2 + +## Methods + +### get + +ā–ø **get**(`ruleTypeId`, `consumer`, `alertingEntity`, `operation`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `ruleTypeId` | `string` | +| `consumer` | `string` | +| `alertingEntity` | `string` | +| `operation` | `string` | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/alerting.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ApiActions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ApiActions.md new file mode 100644 index 0000000000000..a7e6c51d4a649 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ApiActions.md @@ -0,0 +1,65 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ApiActions + +# Class: ApiActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ApiActions + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ApiActions.md#constructor) + +### Properties + +- [prefix](client._internal_namespace.ApiActions.md#prefix) + +### Methods + +- [get](client._internal_namespace.ApiActions.md#get) + +## Constructors + +### constructor + +ā€¢ **new ApiActions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/api.d.ts:3 + +## Properties + +### prefix + +ā€¢ `Private` `Readonly` **prefix**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/api.d.ts:2 + +## Methods + +### get + +ā–ø **get**(`operation`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `operation` | `string` | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/api.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AppActions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AppActions.md new file mode 100644 index 0000000000000..76fbfc84021c5 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AppActions.md @@ -0,0 +1,65 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AppActions + +# Class: AppActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AppActions + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.AppActions.md#constructor) + +### Properties + +- [prefix](client._internal_namespace.AppActions.md#prefix) + +### Methods + +- [get](client._internal_namespace.AppActions.md#get) + +## Constructors + +### constructor + +ā€¢ **new AppActions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/app.d.ts:3 + +## Properties + +### prefix + +ā€¢ `Private` `Readonly` **prefix**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/app.d.ts:2 + +## Methods + +### get + +ā–ø **get**(`appId`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `appId` | `string` | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/app.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AttachmentService.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AttachmentService.md new file mode 100644 index 0000000000000..064f9cf9567b3 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AttachmentService.md @@ -0,0 +1,217 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AttachmentService + +# Class: AttachmentService + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AttachmentService + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.AttachmentService.md#constructor) + +### Methods + +- [buildCountAlertsAggs](client._internal_namespace.AttachmentService.md#buildcountalertsaggs) +- [bulkUpdate](client._internal_namespace.AttachmentService.md#bulkupdate) +- [countAlertsAttachedToCase](client._internal_namespace.AttachmentService.md#countalertsattachedtocase) +- [create](client._internal_namespace.AttachmentService.md#create) +- [delete](client._internal_namespace.AttachmentService.md#delete) +- [executeCaseActionsAggregations](client._internal_namespace.AttachmentService.md#executecaseactionsaggregations) +- [get](client._internal_namespace.AttachmentService.md#get) +- [getAllAlertsAttachToCase](client._internal_namespace.AttachmentService.md#getallalertsattachtocase) +- [update](client._internal_namespace.AttachmentService.md#update) + +## Constructors + +### constructor + +ā€¢ **new AttachmentService**(`log`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `log` | `Logger` | + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:66](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L66) + +## Methods + +### buildCountAlertsAggs + +ā–ø `Private` **buildCountAlertsAggs**(): `Record`<`string`, `AggregationsAggregationContainer`\> + +#### Returns + +`Record`<`string`, `AggregationsAggregationContainer`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:104](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L104) + +___ + +### bulkUpdate + +ā–ø **bulkUpdate**(`__namedParameters`): `Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`BulkUpdateAttachmentArgs`](../interfaces/client._internal_namespace.BulkUpdateAttachmentArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:262](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L262) + +___ + +### countAlertsAttachedToCase + +ā–ø **countAlertsAttachedToCase**(`__namedParameters`): `Promise`<`undefined` \| `number`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`AttachedToCaseArgs`](../interfaces/client._internal_namespace.AttachedToCaseArgs.md) | + +#### Returns + +`Promise`<`undefined` \| `number`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:68](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L68) + +___ + +### create + +ā–ø **create**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CreateAttachmentArgs`](../interfaces/client._internal_namespace.CreateAttachmentArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:220](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L220) + +___ + +### delete + +ā–ø **delete**(`__namedParameters`): `Promise`<{}\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetAttachmentArgs`](../interfaces/client._internal_namespace.GetAttachmentArgs.md) | + +#### Returns + +`Promise`<{}\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:210](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L210) + +___ + +### executeCaseActionsAggregations + +ā–ø **executeCaseActionsAggregations**(`__namedParameters`): `Promise`<[`AggregationResponse`](../modules/client._internal_namespace.md#aggregationresponse)\> + +Executes the aggregations against the actions attached to a case. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CountActionsAttachedToCaseArgs`](../interfaces/client._internal_namespace.CountActionsAttachedToCaseArgs.md) | + +#### Returns + +`Promise`<[`AggregationResponse`](../modules/client._internal_namespace.md#aggregationresponse)\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:157](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L157) + +___ + +### get + +ā–ø **get**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetAttachmentArgs`](../interfaces/client._internal_namespace.GetAttachmentArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:194](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L194) + +___ + +### getAllAlertsAttachToCase + +ā–ø **getAllAlertsAttachToCase**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>[]\> + +Retrieves all the alerts attached to a case. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`AttachedToCaseArgs`](../interfaces/client._internal_namespace.AttachedToCaseArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>[]\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:117](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L117) + +___ + +### update + +ā–ø **update**(`__namedParameters`): `Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`UpdateAttachmentArgs`](../modules/client._internal_namespace.md#updateattachmentargs) | + +#### Returns + +`Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:242](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L242) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.Authorization.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.Authorization.md new file mode 100644 index 0000000000000..7c09e59f2216a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.Authorization.md @@ -0,0 +1,241 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Authorization + +# Class: Authorization + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Authorization + +This class handles ensuring that the user making a request has the correct permissions +for the API request. + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.Authorization.md#constructor) + +### Properties + +- [auditLogger](client._internal_namespace.Authorization.md#auditlogger) +- [featureCaseOwners](client._internal_namespace.Authorization.md#featurecaseowners) +- [request](client._internal_namespace.Authorization.md#request) +- [securityAuth](client._internal_namespace.Authorization.md#securityauth) + +### Methods + +- [\_ensureAuthorized](client._internal_namespace.Authorization.md#_ensureauthorized) +- [\_getAuthorizationFilter](client._internal_namespace.Authorization.md#_getauthorizationfilter) +- [ensureAuthorized](client._internal_namespace.Authorization.md#ensureauthorized) +- [getAuthorizationFilter](client._internal_namespace.Authorization.md#getauthorizationfilter) +- [getAuthorizedOwners](client._internal_namespace.Authorization.md#getauthorizedowners) +- [shouldCheckAuthorization](client._internal_namespace.Authorization.md#shouldcheckauthorization) +- [create](client._internal_namespace.Authorization.md#create) + +## Constructors + +### constructor + +ā€¢ `Private` **new Authorization**(`__namedParameters`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.auditLogger` | [`AuthorizationAuditLogger`](client._internal_namespace.AuthorizationAuditLogger.md) | +| `__namedParameters.caseOwners` | `Set`<`string`\> | +| `__namedParameters.request` | [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | +| `__namedParameters.securityAuth?` | [`AuthorizationServiceSetup`](../interfaces/client._internal_namespace.AuthorizationServiceSetup.md) | + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:27](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L27) + +## Properties + +### auditLogger + +ā€¢ `Private` `Readonly` **auditLogger**: [`AuthorizationAuditLogger`](client._internal_namespace.AuthorizationAuditLogger.md) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L25) + +___ + +### featureCaseOwners + +ā€¢ `Private` `Readonly` **featureCaseOwners**: `Set`<`string`\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:24](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L24) + +___ + +### request + +ā€¢ `Private` `Readonly` **request**: [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:22](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L22) + +___ + +### securityAuth + +ā€¢ `Private` `Readonly` **securityAuth**: `undefined` \| [`AuthorizationServiceSetup`](../interfaces/client._internal_namespace.AuthorizationServiceSetup.md) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:23](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L23) + +## Methods + +### \_ensureAuthorized + +ā–ø `Private` **_ensureAuthorized**(`owners`, `operation`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `owners` | `string`[] | +| `operation` | [`OperationDetails`](../interfaces/client._internal_namespace.OperationDetails.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:135](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L135) + +___ + +### \_getAuthorizationFilter + +ā–ø `Private` **_getAuthorizationFilter**(`operation`): `Promise`<[`AuthFilterHelpers`](../interfaces/client._internal_namespace.AuthFilterHelpers.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `operation` | [`OperationDetails`](../interfaces/client._internal_namespace.OperationDetails.md) | + +#### Returns + +`Promise`<[`AuthFilterHelpers`](../interfaces/client._internal_namespace.AuthFilterHelpers.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:170](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L170) + +___ + +### ensureAuthorized + +ā–ø **ensureAuthorized**(`__namedParameters`): `Promise`<`void`\> + +Checks that the user making the request for the passed in owners and operation has the correct authorization. This +function will throw if the user is not authorized for the requested operation and owners. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.entities` | [`OwnerEntity`](../interfaces/client._internal_namespace.OwnerEntity.md)[] | +| `__namedParameters.operation` | [`OperationDetails`](../interfaces/client._internal_namespace.OperationDetails.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:97](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L97) + +___ + +### getAuthorizationFilter + +ā–ø **getAuthorizationFilter**(`operation`): `Promise`<[`AuthFilterHelpers`](../interfaces/client._internal_namespace.AuthFilterHelpers.md)\> + +Returns an object to filter the saved object find request to the authorized owners of an entity. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `operation` | [`OperationDetails`](../interfaces/client._internal_namespace.OperationDetails.md) | + +#### Returns + +`Promise`<[`AuthFilterHelpers`](../interfaces/client._internal_namespace.AuthFilterHelpers.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:126](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L126) + +___ + +### getAuthorizedOwners + +ā–ø `Private` **getAuthorizedOwners**(`operations`): `Promise`<{ `authorizedOwners`: `string`[] ; `hasAllRequested`: `boolean` ; `username?`: `string` }\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `operations` | [`OperationDetails`](../interfaces/client._internal_namespace.OperationDetails.md)[] | + +#### Returns + +`Promise`<{ `authorizedOwners`: `string`[] ; `hasAllRequested`: `boolean` ; `username?`: `string` }\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:207](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L207) + +___ + +### shouldCheckAuthorization + +ā–ø `Private` **shouldCheckAuthorization**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:85](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L85) + +___ + +### create + +ā–ø `Static` **create**(`__namedParameters`): `Promise`<[`Authorization`](client._internal_namespace.Authorization.md)\> + +Creates an Authorization object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.auditLogger` | [`AuthorizationAuditLogger`](client._internal_namespace.AuthorizationAuditLogger.md) | +| `__namedParameters.features` | [`PluginStartContract`](../interfaces/client._internal_namespace.PluginStartContract.md) | +| `__namedParameters.getSpace` | [`GetSpaceFn`](../modules/client._internal_namespace.md#getspacefn) | +| `__namedParameters.logger` | `Logger` | +| `__namedParameters.request` | [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | +| `__namedParameters.securityAuth?` | [`AuthorizationServiceSetup`](../interfaces/client._internal_namespace.AuthorizationServiceSetup.md) | + +#### Returns + +`Promise`<[`Authorization`](client._internal_namespace.Authorization.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/authorization.ts:47](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/authorization.ts#L47) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AuthorizationAuditLogger.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AuthorizationAuditLogger.md new file mode 100644 index 0000000000000..5f80d4d21f4b2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.AuthorizationAuditLogger.md @@ -0,0 +1,117 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuthorizationAuditLogger + +# Class: AuthorizationAuditLogger + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuthorizationAuditLogger + +Audit logger for authorization operations + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.AuthorizationAuditLogger.md#constructor) + +### Properties + +- [auditLogger](client._internal_namespace.AuthorizationAuditLogger.md#auditlogger) + +### Methods + +- [log](client._internal_namespace.AuthorizationAuditLogger.md#log) +- [createAuditMsg](client._internal_namespace.AuthorizationAuditLogger.md#createauditmsg) +- [createFailureMessage](client._internal_namespace.AuthorizationAuditLogger.md#createfailuremessage) + +## Constructors + +### constructor + +ā€¢ **new AuthorizationAuditLogger**(`logger?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `logger?` | [`AuditLogger`](../interfaces/client._internal_namespace.AuditLogger.md) | + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L25) + +## Properties + +### auditLogger + +ā€¢ `Private` `Optional` `Readonly` **auditLogger**: [`AuditLogger`](../interfaces/client._internal_namespace.AuditLogger.md) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:23](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L23) + +## Methods + +### log + +ā–ø **log**(`auditMsgParams`): `void` + +Logs an audit event based on the status of an operation. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `auditMsgParams` | [`CreateAuditMsgParams`](../interfaces/client._internal_namespace.CreateAuditMsgParams.md) | + +#### Returns + +`void` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:98](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L98) + +___ + +### createAuditMsg + +ā–ø `Static` `Private` **createAuditMsg**(`__namedParameters`): [`AuditEvent`](../interfaces/client._internal_namespace.AuditEvent.md) + +Creates an AuditEvent describing the state of a request. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CreateAuditMsgParams`](../interfaces/client._internal_namespace.CreateAuditMsgParams.md) | + +#### Returns + +[`AuditEvent`](../interfaces/client._internal_namespace.AuditEvent.md) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:32](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L32) + +___ + +### createFailureMessage + +ā–ø `Static` **createFailureMessage**(`__namedParameters`): `string` + +Creates a message to be passed to an Error or Boom. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.operation` | [`OperationDetails`](../interfaces/client._internal_namespace.OperationDetails.md) | +| `__namedParameters.owners` | `string`[] | + +#### Returns + +`string` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L79) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.BasePath.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.BasePath.md new file mode 100644 index 0000000000000..50d50b457bfea --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.BasePath.md @@ -0,0 +1,189 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BasePath + +# Class: BasePath + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BasePath + +Access or manipulate the Kibana base path + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.BasePath.md#constructor) + +### Properties + +- [basePathCache](client._internal_namespace.BasePath.md#basepathcache) +- [get](client._internal_namespace.BasePath.md#get) +- [prepend](client._internal_namespace.BasePath.md#prepend) +- [publicBaseUrl](client._internal_namespace.BasePath.md#publicbaseurl) +- [remove](client._internal_namespace.BasePath.md#remove) +- [serverBasePath](client._internal_namespace.BasePath.md#serverbasepath) +- [set](client._internal_namespace.BasePath.md#set) + +## Constructors + +### constructor + +ā€¢ **new BasePath**(`serverBasePath?`, `publicBaseUrl?`) + +**`internal`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `serverBasePath?` | `string` | +| `publicBaseUrl?` | `string` | + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:24 + +## Properties + +### basePathCache + +ā€¢ `Private` `Readonly` **basePathCache**: `any` + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:8 + +___ + +### get + +ā€¢ **get**: (`request`: [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\>) => `string` + +#### Type declaration + +ā–ø (`request`): `string` + +returns `basePath` value, specific for an incoming request. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | + +##### Returns + +`string` + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:28 + +___ + +### prepend + +ā€¢ **prepend**: (`path`: `string`) => `string` + +#### Type declaration + +ā–ø (`path`): `string` + +Prepends `path` with the basePath. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | + +##### Returns + +`string` + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:38 + +___ + +### publicBaseUrl + +ā€¢ `Optional` `Readonly` **publicBaseUrl**: `string` + +The server's publicly exposed base URL, if configured. Includes protocol, host, port (optional) and the +[BasePath.serverBasePath](client._internal_namespace.BasePath.md#serverbasepath). + +**`remarks`** +Should be used for generating external URL links back to this Kibana instance. + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:22 + +___ + +### remove + +ā€¢ **remove**: (`path`: `string`) => `string` + +#### Type declaration + +ā–ø (`path`): `string` + +Removes the prepended basePath from the `path`. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | + +##### Returns + +`string` + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:42 + +___ + +### serverBasePath + +ā€¢ `Readonly` **serverBasePath**: `string` + +returns the server's basePath + +See [BasePath.get](client._internal_namespace.BasePath.md#get) for getting the basePath value for a specific request + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:14 + +___ + +### set + +ā€¢ **set**: (`request`: [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\>, `requestSpecificBasePath`: `string`) => `void` + +#### Type declaration + +ā–ø (`request`, `requestSpecificBasePath`): `void` + +sets `basePath` value, specific for an incoming request. + +**`privateremarks`** should work only for KibanaRequest as soon as spaces migrate to NP + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | +| `requestSpecificBasePath` | `string` | + +##### Returns + +`void` + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:34 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.BuilderFactory.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.BuilderFactory.md new file mode 100644 index 0000000000000..a6f48bc77918b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.BuilderFactory.md @@ -0,0 +1,47 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BuilderFactory + +# Class: BuilderFactory + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BuilderFactory + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.BuilderFactory.md#constructor) + +### Methods + +- [getBuilder](client._internal_namespace.BuilderFactory.md#getbuilder) + +## Constructors + +### constructor + +ā€¢ **new BuilderFactory**() + +## Methods + +### getBuilder + +ā–ø **getBuilder**<`T`\>(`type`): `undefined` \| [`UserActionBuilder`](client._internal_namespace.UserActionBuilder.md) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends ``"description"`` \| ``"tags"`` \| ``"title"`` \| ``"connector"`` \| ``"settings"`` \| ``"status"`` \| ``"comment"`` \| ``"pushed"`` \| ``"create_case"`` \| ``"delete_case"`` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `T` | + +#### Returns + +`undefined` \| [`UserActionBuilder`](client._internal_namespace.UserActionBuilder.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/builder_factory.ts:35](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/builder_factory.ts#L35) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CaseConfigureService.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CaseConfigureService.md new file mode 100644 index 0000000000000..bf61548e826ce --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CaseConfigureService.md @@ -0,0 +1,135 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CaseConfigureService + +# Class: CaseConfigureService + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CaseConfigureService + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.CaseConfigureService.md#constructor) + +### Methods + +- [delete](client._internal_namespace.CaseConfigureService.md#delete) +- [find](client._internal_namespace.CaseConfigureService.md#find) +- [get](client._internal_namespace.CaseConfigureService.md#get) +- [patch](client._internal_namespace.CaseConfigureService.md#patch) +- [post](client._internal_namespace.CaseConfigureService.md#post) + +## Constructors + +### constructor + +ā€¢ **new CaseConfigureService**(`log`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `log` | `Logger` | + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:52](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L52) + +## Methods + +### delete + +ā–ø **delete**(`__namedParameters`): `Promise`<{}\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCaseConfigureArgs`](../interfaces/client._internal_namespace.GetCaseConfigureArgs.md) | + +#### Returns + +`Promise`<{}\> + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:54](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L54) + +___ + +### find + +ā–ø **find**(`__namedParameters`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`FindCaseConfigureArgs`](../interfaces/client._internal_namespace.FindCaseConfigureArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:82](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L82) + +___ + +### get + +ā–ø **get**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCaseConfigureArgs`](../interfaces/client._internal_namespace.GetCaseConfigureArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:64](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L64) + +___ + +### patch + +ā–ø **patch**(`__namedParameters`): `Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `closure_type`: `undefined` \| ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: `undefined` \| { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = CaseConnectorRt } & { `version`: `string` = rt.string }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`PatchCaseConfigureArgs`](../interfaces/client._internal_namespace.PatchCaseConfigureArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `closure_type`: `undefined` \| ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: `undefined` \| { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = CaseConnectorRt } & { `version`: `string` = rt.string }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:125](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L125) + +___ + +### post + +ā–ø **post**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`PostCaseConfigureArgs`](../interfaces/client._internal_namespace.PostCaseConfigureArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:104](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L104) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CaseUserActionService.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CaseUserActionService.md new file mode 100644 index 0000000000000..ed34d0f5389b7 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CaseUserActionService.md @@ -0,0 +1,304 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CaseUserActionService + +# Class: CaseUserActionService + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CaseUserActionService + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.CaseUserActionService.md#constructor) + +### Properties + +- [builderFactory](client._internal_namespace.CaseUserActionService.md#builderfactory) +- [userActionFieldsAllowed](client._internal_namespace.CaseUserActionService.md#useractionfieldsallowed) + +### Methods + +- [buildCountConnectorsAggs](client._internal_namespace.CaseUserActionService.md#buildcountconnectorsaggs) +- [bulkCreate](client._internal_namespace.CaseUserActionService.md#bulkcreate) +- [bulkCreateAttachmentDeletion](client._internal_namespace.CaseUserActionService.md#bulkcreateattachmentdeletion) +- [bulkCreateCaseDeletion](client._internal_namespace.CaseUserActionService.md#bulkcreatecasedeletion) +- [bulkCreateUpdateCase](client._internal_namespace.CaseUserActionService.md#bulkcreateupdatecase) +- [create](client._internal_namespace.CaseUserActionService.md#create) +- [createUserAction](client._internal_namespace.CaseUserActionService.md#createuseraction) +- [findStatusChanges](client._internal_namespace.CaseUserActionService.md#findstatuschanges) +- [getAll](client._internal_namespace.CaseUserActionService.md#getall) +- [getUniqueConnectors](client._internal_namespace.CaseUserActionService.md#getuniqueconnectors) +- [getUserActionItemByDifference](client._internal_namespace.CaseUserActionService.md#getuseractionitembydifference) + +## Constructors + +### constructor + +ā€¢ **new CaseUserActionService**(`log`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `log` | `Logger` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:106](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L106) + +## Properties + +### builderFactory + +ā€¢ `Private` `Readonly` **builderFactory**: [`BuilderFactory`](client._internal_namespace.BuilderFactory.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:104](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L104) + +___ + +### userActionFieldsAllowed + +ā–Ŗ `Static` `Private` `Readonly` **userActionFieldsAllowed**: `Set`<`string`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:102](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L102) + +## Methods + +### buildCountConnectorsAggs + +ā–ø `Private` **buildCountConnectorsAggs**(`size?`): `Record`<`string`, `AggregationsAggregationContainer`\> + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `size` | `number` | `100` | + +#### Returns + +`Record`<`string`, `AggregationsAggregationContainer`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:470](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L470) + +___ + +### bulkCreate + +ā–ø **bulkCreate**(`__namedParameters`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`PostCaseUserActionArgs`](../interfaces/client._internal_namespace.PostCaseUserActionArgs.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:352](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L352) + +___ + +### bulkCreateAttachmentDeletion + +ā–ø **bulkCreateAttachmentDeletion**(`__namedParameters`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`BulkCreateAttachmentDeletionUserAction`](../interfaces/client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:244](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L244) + +___ + +### bulkCreateCaseDeletion + +ā–ø **bulkCreateCaseDeletion**(`__namedParameters`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`BulkCreateCaseDeletionUserAction`](../interfaces/client._internal_namespace.BulkCreateCaseDeletionUserAction.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:171](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L171) + +___ + +### bulkCreateUpdateCase + +ā–ø **bulkCreateUpdateCase**(`__namedParameters`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`BulkCreateBulkUpdateCaseUserActions`](../interfaces/client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md) | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:198](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L198) + +___ + +### create + +ā–ø **create**<`T`\>(`__namedParameters`): `Promise`<`void`\> + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CreateUserActionES`](../interfaces/client._internal_namespace.CreateUserActionES.md)<`T`\> | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:335](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L335) + +___ + +### createUserAction + +ā–ø **createUserAction**<`T`\>(`__namedParameters`): `Promise`<`void`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends keyof [`BuilderParameters`](../interfaces/client._internal_namespace.BuilderParameters.md) | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CreateUserActionClient`](../modules/client._internal_namespace.md#createuseractionclient)<`T`\> | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:275](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L275) + +___ + +### findStatusChanges + +ā–ø **findStatusChanges**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `payload`: { description: string; } = DescriptionUserActionPayloadRt; `type`: ``"description"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { comment: { comment: string; type: CommentType.user; owner: string; } \| { type: CommentType.alert; alertId: string \| string[]; index: string \| string[]; rule: { id: string \| null; name: string \| null; }; owner: string; } \| { ...; }; } = CommentUserActionPayloadRt; `type`: ``"comment"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { tags: string[]; } = TagsUserActionPayloadRt; `type`: ``"tags"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { title: string; } = TitleUserActionPayloadRt; `type`: ``"title"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { settings: { syncAlerts: boolean; }; } = SettingsUserActionPayloadRt; `type`: ``"settings"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { status: CaseStatuses; } = StatusUserActionPayloadRt; `type`: ``"status"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `type`: ``"create_case"`` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } & { description: string; status: string; tags: string[]; title: string; settings: { syncAlerts: boolean; }; owner: string; } } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } = ConnectorUserActionPayloadRt; `type`: ``"connector"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { externalService: { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| ... 1 more ... \| undefined; username: string \| ... 1 more ... \| undefined; }; }; } = PushedUserActionPayloadRt; `type`: ``"pushed"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: {} ; `type`: ``"delete_case"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` }\>[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.caseId` | `string` | +| `__namedParameters.filter?` | `KueryNode` | +| `__namedParameters.unsecuredSavedObjectsClient` | [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `payload`: { description: string; } = DescriptionUserActionPayloadRt; `type`: ``"description"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { comment: { comment: string; type: CommentType.user; owner: string; } \| { type: CommentType.alert; alertId: string \| string[]; index: string \| string[]; rule: { id: string \| null; name: string \| null; }; owner: string; } \| { ...; }; } = CommentUserActionPayloadRt; `type`: ``"comment"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { tags: string[]; } = TagsUserActionPayloadRt; `type`: ``"tags"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { title: string; } = TitleUserActionPayloadRt; `type`: ``"title"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { settings: { syncAlerts: boolean; }; } = SettingsUserActionPayloadRt; `type`: ``"settings"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { status: CaseStatuses; } = StatusUserActionPayloadRt; `type`: ``"status"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `type`: ``"create_case"`` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } & { description: string; status: string; tags: string[]; title: string; settings: { syncAlerts: boolean; }; owner: string; } } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } = ConnectorUserActionPayloadRt; `type`: ``"connector"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { externalService: { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| ... 1 more ... \| undefined; username: string \| ... 1 more ... \| undefined; }; }; } = PushedUserActionPayloadRt; `type`: ``"pushed"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: {} ; `type`: ``"delete_case"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` }\>[]\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:372](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L372) + +___ + +### getAll + +ā–ø **getAll**(`__namedParameters`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `payload`: { description: string; } = DescriptionUserActionPayloadRt; `type`: ``"description"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { comment: { comment: string; type: CommentType.user; owner: string; } \| { type: CommentType.alert; alertId: string \| string[]; index: string \| string[]; rule: { id: string \| null; name: string \| null; }; owner: string; } \| { ...; }; } = CommentUserActionPayloadRt; `type`: ``"comment"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { tags: string[]; } = TagsUserActionPayloadRt; `type`: ``"tags"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { title: string; } = TitleUserActionPayloadRt; `type`: ``"title"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { settings: { syncAlerts: boolean; }; } = SettingsUserActionPayloadRt; `type`: ``"settings"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { status: CaseStatuses; } = StatusUserActionPayloadRt; `type`: ``"status"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `type`: ``"create_case"`` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } & { description: string; status: string; tags: string[]; title: string; settings: { syncAlerts: boolean; }; owner: string; } } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } = ConnectorUserActionPayloadRt; `type`: ``"connector"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { externalService: { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| ... 1 more ... \| undefined; username: string \| ... 1 more ... \| undefined; }; }; } = PushedUserActionPayloadRt; `type`: ``"pushed"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: {} ; `type`: ``"delete_case"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` }, `unknown`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCaseUserActionArgs`](../interfaces/client._internal_namespace.GetCaseUserActionArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `payload`: { description: string; } = DescriptionUserActionPayloadRt; `type`: ``"description"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { comment: { comment: string; type: CommentType.user; owner: string; } \| { type: CommentType.alert; alertId: string \| string[]; index: string \| string[]; rule: { id: string \| null; name: string \| null; }; owner: string; } \| { ...; }; } = CommentUserActionPayloadRt; `type`: ``"comment"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { tags: string[]; } = TagsUserActionPayloadRt; `type`: ``"tags"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { title: string; } = TitleUserActionPayloadRt; `type`: ``"title"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { settings: { syncAlerts: boolean; }; } = SettingsUserActionPayloadRt; `type`: ``"settings"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { status: CaseStatuses; } = StatusUserActionPayloadRt; `type`: ``"status"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `type`: ``"create_case"`` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } & { description: string; status: string; tags: string[]; title: string; settings: { syncAlerts: boolean; }; owner: string; } } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; }) \| ... 4 more ... \| ({ ...; } & { ...; })); } = ConnectorUserActionPayloadRt; `type`: ``"connector"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: { externalService: { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| ... 1 more ... \| undefined; username: string \| ... 1 more ... \| undefined; }; }; } = PushedUserActionPayloadRt; `type`: ``"pushed"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` } & { `payload`: {} ; `type`: ``"delete_case"`` } & { `action`: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` = ActionsRt; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string } & { `action_id`: `string` = rt.string; `case_id`: `string` = rt.string; `comment_id`: ``null`` \| `string` }, `unknown`\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:310](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L310) + +___ + +### getUniqueConnectors + +ā–ø **getUniqueConnectors**(`__namedParameters`): `Promise`<{ `id`: `string` }[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.caseId` | `string` | +| `__namedParameters.filter?` | `KueryNode` | +| `__namedParameters.unsecuredSavedObjectsClient` | [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) | + +#### Returns + +`Promise`<{ `id`: `string` }[]\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:426](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L426) + +___ + +### getUserActionItemByDifference + +ā–ø `Private` **getUserActionItemByDifference**(`__namedParameters`): [`BuilderReturnValue`](../interfaces/client._internal_namespace.BuilderReturnValue.md)[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetUserActionItemByDifference`](../interfaces/client._internal_namespace.GetUserActionItemByDifference.md) | + +#### Returns + +[`BuilderReturnValue`](../interfaces/client._internal_namespace.BuilderReturnValue.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:108](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L108) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesActions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesActions.md new file mode 100644 index 0000000000000..40c474c66fc37 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesActions.md @@ -0,0 +1,66 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CasesActions + +# Class: CasesActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CasesActions + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.CasesActions.md#constructor) + +### Properties + +- [prefix](client._internal_namespace.CasesActions.md#prefix) + +### Methods + +- [get](client._internal_namespace.CasesActions.md#get) + +## Constructors + +### constructor + +ā€¢ **new CasesActions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/cases.d.ts:3 + +## Properties + +### prefix + +ā€¢ `Private` `Readonly` **prefix**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/cases.d.ts:2 + +## Methods + +### get + +ā–ø **get**(`owner`, `operation`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `owner` | `string` | +| `operation` | `string` | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/cases.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesClientInternal.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesClientInternal.md new file mode 100644 index 0000000000000..9a7fe6f6c11d5 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesClientInternal.md @@ -0,0 +1,59 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CasesClientInternal + +# Class: CasesClientInternal + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CasesClientInternal + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.CasesClientInternal.md#constructor) + +### Properties + +- [\_configuration](client._internal_namespace.CasesClientInternal.md#_configuration) + +### Accessors + +- [configuration](client._internal_namespace.CasesClientInternal.md#configuration) + +## Constructors + +### constructor + +ā€¢ **new CasesClientInternal**(`args`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `args` | [`CasesClientArgs`](../interfaces/client._internal_namespace.CasesClientArgs.md) | + +#### Defined in + +[x-pack/plugins/cases/server/client/client_internal.ts:17](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client_internal.ts#L17) + +## Properties + +### \_configuration + +ā€¢ `Private` `Readonly` **\_configuration**: `InternalConfigureSubClient` + +#### Defined in + +[x-pack/plugins/cases/server/client/client_internal.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client_internal.ts#L15) + +## Accessors + +### configuration + +ā€¢ `get` **configuration**(): `InternalConfigureSubClient` + +#### Returns + +`InternalConfigureSubClient` + +#### Defined in + +[x-pack/plugins/cases/server/client/client_internal.ts:21](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client_internal.ts#L21) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesService.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesService.md new file mode 100644 index 0000000000000..eb31fa2722c15 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.CasesService.md @@ -0,0 +1,470 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CasesService + +# Class: CasesService + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CasesService + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.CasesService.md#constructor) + +### Methods + +- [asArray](client._internal_namespace.CasesService.md#asarray) +- [buildCaseIdsAggs](client._internal_namespace.CasesService.md#buildcaseidsaggs) +- [deleteCase](client._internal_namespace.CasesService.md#deletecase) +- [findCaseStatusStats](client._internal_namespace.CasesService.md#findcasestatusstats) +- [findCases](client._internal_namespace.CasesService.md#findcases) +- [findCasesGroupedByID](client._internal_namespace.CasesService.md#findcasesgroupedbyid) +- [getAllCaseComments](client._internal_namespace.CasesService.md#getallcasecomments) +- [getAllComments](client._internal_namespace.CasesService.md#getallcomments) +- [getCase](client._internal_namespace.CasesService.md#getcase) +- [getCaseCommentStats](client._internal_namespace.CasesService.md#getcasecommentstats) +- [getCaseIdsByAlertId](client._internal_namespace.CasesService.md#getcaseidsbyalertid) +- [getCases](client._internal_namespace.CasesService.md#getcases) +- [getReporters](client._internal_namespace.CasesService.md#getreporters) +- [getResolveCase](client._internal_namespace.CasesService.md#getresolvecase) +- [getTags](client._internal_namespace.CasesService.md#gettags) +- [getUser](client._internal_namespace.CasesService.md#getuser) +- [patchCase](client._internal_namespace.CasesService.md#patchcase) +- [patchCases](client._internal_namespace.CasesService.md#patchcases) +- [postNewCase](client._internal_namespace.CasesService.md#postnewcase) +- [getCaseIDsFromAlertAggs](client._internal_namespace.CasesService.md#getcaseidsfromalertaggs) + +## Constructors + +### constructor + +ā€¢ **new CasesService**(`log`, `authentication?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `log` | `Logger` | +| `authentication?` | `Object` | +| `authentication.getCurrentUser` | (`request`: [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\>) => ``null`` \| [`AuthenticatedUser`](../interfaces/client._internal_namespace.AuthenticatedUser.md) | + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:138](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L138) + +## Methods + +### asArray + +ā–ø `Private` **asArray**(`id`): `string`[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `undefined` \| `string` \| `string`[] | + +#### Returns + +`string`[] + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:413](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L413) + +___ + +### buildCaseIdsAggs + +ā–ø `Private` **buildCaseIdsAggs**(`size?`): `Record`<`string`, `AggregationsAggregationContainer`\> + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `size` | `number` | `100` | + +#### Returns + +`Record`<`string`, `AggregationsAggregationContainer`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:143](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L143) + +___ + +### deleteCase + +ā–ø **deleteCase**(`__namedParameters`): `Promise`<{}\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCaseArgs`](../interfaces/client._internal_namespace.GetCaseArgs.md) | + +#### Returns + +`Promise`<{}\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:332](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L332) + +___ + +### findCaseStatusStats + +ā–ø **findCaseStatusStats**(`__namedParameters`): `Promise`<`number`\> + +Retrieves the number of cases that exist with a given status (open, closed, etc). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.caseOptions` | [`SavedObjectFindOptionsKueryNode`](../modules/client._internal_namespace.md#savedobjectfindoptionskuerynode) | +| `__namedParameters.ensureSavedObjectsAreAuthorized` | [`EnsureSOAuthCallback`](../modules/client._internal_namespace.md#ensuresoauthcallback) | +| `__namedParameters.unsecuredSavedObjectsClient` | [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) | + +#### Returns + +`Promise`<`number`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:251](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L251) + +___ + +### findCases + +ā–ø **findCases**(`__namedParameters`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`FindCasesArgs`](../interfaces/client._internal_namespace.FindCasesArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:395](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L395) + +___ + +### findCasesGroupedByID + +ā–ø **findCasesGroupedByID**(`__namedParameters`): `Promise`<[`CasesMapWithPageInfo`](../interfaces/client._internal_namespace.CasesMapWithPageInfo.md)\> + +Returns a map of all cases. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.caseOptions` | [`FindCaseOptions`](../modules/client._internal_namespace.md#findcaseoptions) | +| `__namedParameters.unsecuredSavedObjectsClient` | [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) | + +#### Returns + +`Promise`<[`CasesMapWithPageInfo`](../interfaces/client._internal_namespace.CasesMapWithPageInfo.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:206](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L206) + +___ + +### getAllCaseComments + +ā–ø **getAllCaseComments**(`__namedParameters`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +Default behavior is to retrieve all comments that adhere to a given filter (if one is included). +to override this pass in the either the page or perPage options. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`FindCaseCommentsArgs`](../interfaces/client._internal_namespace.FindCaseCommentsArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:455](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L455) + +___ + +### getAllComments + +ā–ø `Private` **getAllComments**(`__namedParameters`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`FindCommentsArgs`](../interfaces/client._internal_namespace.FindCommentsArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, `unknown`\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:423](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L423) + +___ + +### getCase + +ā–ø **getCase**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCaseArgs`](../interfaces/client._internal_namespace.GetCaseArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:342](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L342) + +___ + +### getCaseCommentStats + +ā–ø **getCaseCommentStats**(`__namedParameters`): `Promise`<[`CaseCommentStats`](../interfaces/client._internal_namespace.CaseCommentStats.md)\> + +Returns the number of total comments and alerts for a case + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.ids` | `string`[] | +| `__namedParameters.unsecuredSavedObjectsClient` | [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) | + +#### Returns + +`Promise`<[`CaseCommentStats`](../interfaces/client._internal_namespace.CaseCommentStats.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:280](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L280) + +___ + +### getCaseIdsByAlertId + +ā–ø **getCaseIdsByAlertId**(`__namedParameters`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, { `references`: { doc\_count: number; caseIds: { buckets: { key: string; }[]; }; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCaseIdsByAlertIdArgs`](../interfaces/client._internal_namespace.GetCaseIdsByAlertIdArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, { `references`: { doc\_count: number; caseIds: { buckets: { key: string; }[]; }; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:161](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L161) + +___ + +### getCases + +ā–ø **getCases**(`__namedParameters`): `Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCasesArgs`](../interfaces/client._internal_namespace.GetCasesArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:379](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L379) + +___ + +### getReporters + +ā–ø **getReporters**(`__namedParameters`): `Promise`<{ `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` }[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetReportersArgs`](../interfaces/client._internal_namespace.GetReportersArgs.md) | + +#### Returns + +`Promise`<{ `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` }[]\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:488](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L488) + +___ + +### getResolveCase + +ā–ø **getResolveCase**(`__namedParameters`): `Promise`<[`SavedObjectsResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsResolveResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetCaseArgs`](../interfaces/client._internal_namespace.GetCaseArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsResolveResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:359](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L359) + +___ + +### getTags + +ā–ø **getTags**(`__namedParameters`): `Promise`<`string`[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetTagsArgs`](../interfaces/client._internal_namespace.GetTagsArgs.md) | + +#### Returns + +`Promise`<`string`[]\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:552](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L552) + +___ + +### getUser + +ā–ø **getUser**(`__namedParameters`): [`AuthenticatedUser`](../interfaces/client._internal_namespace.AuthenticatedUser.md) \| { `email`: ``null`` = null; `full_name`: ``null`` = null; `username`: ``null`` = null } + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetUserArgs`](../interfaces/client._internal_namespace.GetUserArgs.md) | + +#### Returns + +[`AuthenticatedUser`](../interfaces/client._internal_namespace.AuthenticatedUser.md) \| { `email`: ``null`` = null; `full_name`: ``null`` = null; `username`: ``null`` = null } + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:582](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L582) + +___ + +### patchCase + +ā–ø **patchCase**(`__namedParameters`): `Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`PatchCaseArgs`](../modules/client._internal_namespace.md#patchcaseargs) | + +#### Returns + +`Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:627](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L627) + +___ + +### patchCases + +ā–ø **patchCases**(`__namedParameters`): `Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`PatchCasesArgs`](../interfaces/client._internal_namespace.PatchCasesArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:655](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L655) + +___ + +### postNewCase + +ā–ø **postNewCase**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`PostCaseArgs`](../interfaces/client._internal_namespace.PostCaseArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:607](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L607) + +___ + +### getCaseIDsFromAlertAggs + +ā–ø `Static` **getCaseIDsFromAlertAggs**(`result`): `string`[] + +Extracts the case IDs from the alert aggregation + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result` | [`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }, { `references`: { doc\_count: number; caseIds: { buckets: { key: string; }[]; }; } }\> | + +#### Returns + +`string`[] + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:197](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L197) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ConnectorMappingsService.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ConnectorMappingsService.md new file mode 100644 index 0000000000000..2b6649eca4111 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ConnectorMappingsService.md @@ -0,0 +1,93 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ConnectorMappingsService + +# Class: ConnectorMappingsService + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ConnectorMappingsService + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ConnectorMappingsService.md#constructor) + +### Methods + +- [find](client._internal_namespace.ConnectorMappingsService.md#find) +- [post](client._internal_namespace.ConnectorMappingsService.md#post) +- [update](client._internal_namespace.ConnectorMappingsService.md#update) + +## Constructors + +### constructor + +ā€¢ **new ConnectorMappingsService**(`log`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `log` | `Logger` | + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:33](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L33) + +## Methods + +### find + +ā–ø **find**(`__namedParameters`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `mappings`: { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] ; `owner`: `string` = rt.string }, `unknown`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`FindConnectorMappingsArgs`](../interfaces/client._internal_namespace.FindConnectorMappingsArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<{ `mappings`: { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] ; `owner`: `string` = rt.string }, `unknown`\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:35](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L35) + +___ + +### post + +ā–ø **post**(`__namedParameters`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `mappings`: { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] ; `owner`: `string` = rt.string }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`PostConnectorMappingsArgs`](../interfaces/client._internal_namespace.PostConnectorMappingsArgs.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<{ `mappings`: { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] ; `owner`: `string` = rt.string }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:48](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L48) + +___ + +### update + +ā–ø **update**(`__namedParameters`): `Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `mappings`: { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] ; `owner`: `string` = rt.string }\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`UpdateConnectorMappingsArgs`](../interfaces/client._internal_namespace.UpdateConnectorMappingsArgs.md) | + +#### Returns + +`Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `mappings`: { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] ; `owner`: `string` = rt.string }\>\> + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:68](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L68) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ConnectorTokenClient.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ConnectorTokenClient.md new file mode 100644 index 0000000000000..7e2a19e11efbe --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ConnectorTokenClient.md @@ -0,0 +1,162 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ConnectorTokenClient + +# Class: ConnectorTokenClient + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ConnectorTokenClient + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ConnectorTokenClient.md#constructor) + +### Properties + +- [encryptedSavedObjectsClient](client._internal_namespace.ConnectorTokenClient.md#encryptedsavedobjectsclient) +- [logger](client._internal_namespace.ConnectorTokenClient.md#logger) +- [unsecuredSavedObjectsClient](client._internal_namespace.ConnectorTokenClient.md#unsecuredsavedobjectsclient) + +### Methods + +- [create](client._internal_namespace.ConnectorTokenClient.md#create) +- [deleteConnectorTokens](client._internal_namespace.ConnectorTokenClient.md#deleteconnectortokens) +- [get](client._internal_namespace.ConnectorTokenClient.md#get) +- [update](client._internal_namespace.ConnectorTokenClient.md#update) + +## Constructors + +### constructor + +ā€¢ **new ConnectorTokenClient**(`__namedParameters`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`ConstructorOptions`](../interfaces/client._internal_namespace.ConstructorOptions-2.md) | + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:26 + +## Properties + +### encryptedSavedObjectsClient + +ā€¢ `Private` `Readonly` **encryptedSavedObjectsClient**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:25 + +___ + +### logger + +ā€¢ `Private` `Readonly` **logger**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:23 + +___ + +### unsecuredSavedObjectsClient + +ā€¢ `Private` `Readonly` **unsecuredSavedObjectsClient**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:24 + +## Methods + +### create + +ā–ø **create**(`__namedParameters`): `Promise`<[`ConnectorToken`](../interfaces/client._internal_namespace.ConnectorToken.md)\> + +Create new token for connector + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CreateOptions`](../interfaces/client._internal_namespace.CreateOptions-1.md) | + +#### Returns + +`Promise`<[`ConnectorToken`](../interfaces/client._internal_namespace.ConnectorToken.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:30 + +___ + +### deleteConnectorTokens + +ā–ø **deleteConnectorTokens**(`__namedParameters`): `Promise`<{}[]\> + +Delete all connector tokens + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.connectorId` | `string` | +| `__namedParameters.tokenType?` | `string` | + +#### Returns + +`Promise`<{}[]\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:48 + +___ + +### get + +ā–ø **get**(`__namedParameters`): `Promise`<{ `connectorToken`: ``null`` \| [`ConnectorToken`](../interfaces/client._internal_namespace.ConnectorToken.md) ; `hasErrors`: `boolean` }\> + +Get connector token + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.connectorId` | `string` | +| `__namedParameters.tokenType?` | `string` | + +#### Returns + +`Promise`<{ `connectorToken`: ``null`` \| [`ConnectorToken`](../interfaces/client._internal_namespace.ConnectorToken.md) ; `hasErrors`: `boolean` }\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:38 + +___ + +### update + +ā–ø **update**(`__namedParameters`): `Promise`<``null`` \| [`ConnectorToken`](../interfaces/client._internal_namespace.ConnectorToken.md)\> + +Update connector token + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`UpdateOptions`](../interfaces/client._internal_namespace.UpdateOptions-1.md) | + +#### Returns + +`Promise`<``null`` \| [`ConnectorToken`](../interfaces/client._internal_namespace.ConnectorToken.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:34 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ElasticsearchFeature.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ElasticsearchFeature.md new file mode 100644 index 0000000000000..95ffabe03d983 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.ElasticsearchFeature.md @@ -0,0 +1,122 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ElasticsearchFeature + +# Class: ElasticsearchFeature + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ElasticsearchFeature + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.ElasticsearchFeature.md#constructor) + +### Properties + +- [config](client._internal_namespace.ElasticsearchFeature.md#config) + +### Accessors + +- [catalogue](client._internal_namespace.ElasticsearchFeature.md#catalogue) +- [id](client._internal_namespace.ElasticsearchFeature.md#id) +- [management](client._internal_namespace.ElasticsearchFeature.md#management) +- [privileges](client._internal_namespace.ElasticsearchFeature.md#privileges) + +### Methods + +- [toRaw](client._internal_namespace.ElasticsearchFeature.md#toraw) + +## Constructors + +### constructor + +ā€¢ **new ElasticsearchFeature**(`config`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | `Readonly`<{ `catalogue?`: `RecursiveReadonlyArray`<`string`\> ; `id`: `string` ; `management?`: `Readonly`<{ [x: string]: RecursiveReadonlyArray; }\> ; `privileges`: `RecursiveReadonlyArray`<[`FeatureElasticsearchPrivileges`](../interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md)\> }\> | + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:54 + +## Properties + +### config + +ā€¢ `Protected` `Readonly` **config**: `Readonly`<{ `catalogue?`: `RecursiveReadonlyArray`<`string`\> ; `id`: `string` ; `management?`: `Readonly`<{ [x: string]: RecursiveReadonlyArray; }\> ; `privileges`: `RecursiveReadonlyArray`<[`FeatureElasticsearchPrivileges`](../interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md)\> }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:53 + +## Accessors + +### catalogue + +ā€¢ `get` **catalogue**(): `undefined` \| `RecursiveReadonlyArray`<`string`\> + +#### Returns + +`undefined` \| `RecursiveReadonlyArray`<`string`\> + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:56 + +___ + +### id + +ā€¢ `get` **id**(): `string` + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:55 + +___ + +### management + +ā€¢ `get` **management**(): `undefined` \| `Readonly`<{ [x: string]: `RecursiveReadonlyArray`; }\> + +#### Returns + +`undefined` \| `Readonly`<{ [x: string]: `RecursiveReadonlyArray`; }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:57 + +___ + +### privileges + +ā€¢ `get` **privileges**(): `RecursiveReadonlyArray`<[`FeatureElasticsearchPrivileges`](../interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md)\> + +#### Returns + +`RecursiveReadonlyArray`<[`FeatureElasticsearchPrivileges`](../interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md)\> + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:60 + +## Methods + +### toRaw + +ā–ø **toRaw**(): [`ElasticsearchFeatureConfig`](../interfaces/client._internal_namespace.ElasticsearchFeatureConfig.md) + +#### Returns + +[`ElasticsearchFeatureConfig`](../interfaces/client._internal_namespace.ElasticsearchFeatureConfig.md) + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:61 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaFeature.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaFeature.md new file mode 100644 index 0000000000000..88e1f958de6dc --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaFeature.md @@ -0,0 +1,268 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / KibanaFeature + +# Class: KibanaFeature + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).KibanaFeature + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.KibanaFeature.md#constructor) + +### Properties + +- [config](client._internal_namespace.KibanaFeature.md#config) +- [subFeatures](client._internal_namespace.KibanaFeature.md#subfeatures) + +### Accessors + +- [alerting](client._internal_namespace.KibanaFeature.md#alerting) +- [app](client._internal_namespace.KibanaFeature.md#app) +- [cases](client._internal_namespace.KibanaFeature.md#cases) +- [catalogue](client._internal_namespace.KibanaFeature.md#catalogue) +- [category](client._internal_namespace.KibanaFeature.md#category) +- [excludeFromBasePrivileges](client._internal_namespace.KibanaFeature.md#excludefrombaseprivileges) +- [id](client._internal_namespace.KibanaFeature.md#id) +- [management](client._internal_namespace.KibanaFeature.md#management) +- [minimumLicense](client._internal_namespace.KibanaFeature.md#minimumlicense) +- [name](client._internal_namespace.KibanaFeature.md#name) +- [order](client._internal_namespace.KibanaFeature.md#order) +- [privileges](client._internal_namespace.KibanaFeature.md#privileges) +- [reserved](client._internal_namespace.KibanaFeature.md#reserved) + +### Methods + +- [toRaw](client._internal_namespace.KibanaFeature.md#toraw) + +## Constructors + +### constructor + +ā€¢ **new KibanaFeature**(`config`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | `Readonly`<{ `alerting?`: readonly `string`[] ; `app`: readonly `string`[] ; `cases?`: readonly `string`[] ; `catalogue?`: readonly `string`[] ; `category`: `Readonly`<{ id: string; label: string; ariaLabel?: string \| undefined; order?: number \| undefined; euiIconType?: string \| undefined; }\> ; `excludeFromBasePrivileges?`: `boolean` ; `id`: `string` ; `management?`: `Readonly`<{ [x: string]: readonly string[]; }\> ; `minimumLicense?`: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` ; `name`: `string` ; `order?`: `number` ; `privileges`: ``null`` \| `Readonly`<{ all: Readonly<{ excludeFromBasePrivileges?: boolean \| undefined; requireAllSpaces?: boolean \| undefined; disabled?: boolean \| undefined; management?: Readonly<{ [x: string]: readonly string[]; }\> \| undefined; ... 6 more ...; ui: readonly string[]; }\>; read: Readonly<...\>; }\> ; `privilegesTooltip?`: `string` ; `reserved?`: `Readonly`<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean \| undefined; requireAllSpaces?: boolean \| undefined; disabled?: boolean \| undefined; ... 7 more ...; ui: readonly string[]; }\>; }\>[]; }\> ; `subFeatures?`: readonly `Readonly`<{ name: string; privilegeGroups: readonly Readonly<{ groupType: SubFeaturePrivilegeGroupType; privileges: readonly Readonly<{ id: string; name: string; includeIn: "all" \| "none" \| "read"; ... 10 more ...; ui: readonly string[]; }\>[]; }\>[]; }\>[] }\> | + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:123 + +## Properties + +### config + +ā€¢ `Protected` `Readonly` **config**: `Readonly`<{ `alerting?`: readonly `string`[] ; `app`: readonly `string`[] ; `cases?`: readonly `string`[] ; `catalogue?`: readonly `string`[] ; `category`: `Readonly`<{ id: string; label: string; ariaLabel?: string \| undefined; order?: number \| undefined; euiIconType?: string \| undefined; }\> ; `excludeFromBasePrivileges?`: `boolean` ; `id`: `string` ; `management?`: `Readonly`<{ [x: string]: readonly string[]; }\> ; `minimumLicense?`: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` ; `name`: `string` ; `order?`: `number` ; `privileges`: ``null`` \| `Readonly`<{ all: Readonly<{ excludeFromBasePrivileges?: boolean \| undefined; requireAllSpaces?: boolean \| undefined; disabled?: boolean \| undefined; management?: Readonly<{ [x: string]: readonly string[]; }\> \| undefined; ... 6 more ...; ui: readonly string[]; }\>; read: Readonly<...\>; }\> ; `privilegesTooltip?`: `string` ; `reserved?`: `Readonly`<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean \| undefined; requireAllSpaces?: boolean \| undefined; disabled?: boolean \| undefined; ... 7 more ...; ui: readonly string[]; }\>; }\>[]; }\> ; `subFeatures?`: readonly `Readonly`<{ name: string; privilegeGroups: readonly Readonly<{ groupType: SubFeaturePrivilegeGroupType; privileges: readonly Readonly<{ id: string; name: string; includeIn: "all" \| "none" \| "read"; ... 10 more ...; ui: readonly string[]; }\>[]; }\>[]; }\>[] }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:121 + +___ + +### subFeatures + +ā€¢ `Readonly` **subFeatures**: [`SubFeature`](client._internal_namespace.SubFeature.md)[] + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:122 + +## Accessors + +### alerting + +ā€¢ `get` **alerting**(): `undefined` \| readonly `string`[] + +#### Returns + +`undefined` \| readonly `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:202 + +___ + +### app + +ā€¢ `get` **app**(): readonly `string`[] + +#### Returns + +readonly `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:134 + +___ + +### cases + +ā€¢ `get` **cases**(): `undefined` \| readonly `string`[] + +#### Returns + +`undefined` \| readonly `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:203 + +___ + +### catalogue + +ā€¢ `get` **catalogue**(): `undefined` \| readonly `string`[] + +#### Returns + +`undefined` \| readonly `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:135 + +___ + +### category + +ā€¢ `get` **category**(): `Readonly`<{ `ariaLabel?`: `string` ; `euiIconType?`: `string` ; `id`: `string` ; `label`: `string` ; `order?`: `number` }\> + +#### Returns + +`Readonly`<{ `ariaLabel?`: `string` ; `euiIconType?`: `string` ; `id`: `string` ; `label`: `string` ; `order?`: `number` }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:127 + +___ + +### excludeFromBasePrivileges + +ā€¢ `get` **excludeFromBasePrivileges**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:204 + +___ + +### id + +ā€¢ `get` **id**(): `string` + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:124 + +___ + +### management + +ā€¢ `get` **management**(): `undefined` \| `Readonly`<{ [x: string]: readonly `string`[]; }\> + +#### Returns + +`undefined` \| `Readonly`<{ [x: string]: readonly `string`[]; }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:136 + +___ + +### minimumLicense + +ā€¢ `get` **minimumLicense**(): `undefined` \| ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +#### Returns + +`undefined` \| ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:139 + +___ + +### name + +ā€¢ `get` **name**(): `string` + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:125 + +___ + +### order + +ā€¢ `get` **order**(): `undefined` \| `number` + +#### Returns + +`undefined` \| `number` + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:126 + +___ + +### privileges + +ā€¢ `get` **privileges**(): ``null`` \| `Readonly`<{ `all`: `Readonly`<{ `alerting?`: `Readonly`<{ `alert?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `rule?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> }\> ; `api?`: readonly `string`[] ; `app?`: readonly `string`[] ; `cases?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `catalogue?`: readonly `string`[] ; `disabled?`: `boolean` ; `excludeFromBasePrivileges?`: `boolean` ; `management?`: `Readonly`<{ [x: string]: readonly `string`[]; }\> ; `requireAllSpaces?`: `boolean` ; `savedObject`: `Readonly`<{ `all`: readonly `string`[] ; `read`: readonly `string`[] }\> ; `ui`: readonly `string`[] }\> ; `read`: `Readonly`<{ `alerting?`: `Readonly`<{ `alert?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `rule?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> }\> ; `api?`: readonly `string`[] ; `app?`: readonly `string`[] ; `cases?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `catalogue?`: readonly `string`[] ; `disabled?`: `boolean` ; `excludeFromBasePrivileges?`: `boolean` ; `management?`: `Readonly`<{ [x: string]: readonly `string`[]; }\> ; `requireAllSpaces?`: `boolean` ; `savedObject`: `Readonly`<{ `all`: readonly `string`[] ; `read`: readonly `string`[] }\> ; `ui`: readonly `string`[] }\> }\> + +#### Returns + +``null`` \| `Readonly`<{ `all`: `Readonly`<{ `alerting?`: `Readonly`<{ `alert?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `rule?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> }\> ; `api?`: readonly `string`[] ; `app?`: readonly `string`[] ; `cases?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `catalogue?`: readonly `string`[] ; `disabled?`: `boolean` ; `excludeFromBasePrivileges?`: `boolean` ; `management?`: `Readonly`<{ [x: string]: readonly `string`[]; }\> ; `requireAllSpaces?`: `boolean` ; `savedObject`: `Readonly`<{ `all`: readonly `string`[] ; `read`: readonly `string`[] }\> ; `ui`: readonly `string`[] }\> ; `read`: `Readonly`<{ `alerting?`: `Readonly`<{ `alert?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `rule?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> }\> ; `api?`: readonly `string`[] ; `app?`: readonly `string`[] ; `cases?`: `Readonly`<{ `all?`: readonly `string`[] ; `read?`: readonly `string`[] }\> ; `catalogue?`: readonly `string`[] ; `disabled?`: `boolean` ; `excludeFromBasePrivileges?`: `boolean` ; `management?`: `Readonly`<{ [x: string]: readonly `string`[]; }\> ; `requireAllSpaces?`: `boolean` ; `savedObject`: `Readonly`<{ `all`: readonly `string`[] ; `read`: readonly `string`[] }\> ; `ui`: readonly `string`[] }\> }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:140 + +___ + +### reserved + +ā€¢ `get` **reserved**(): `undefined` \| `Readonly`<{ `description`: `string` ; `privileges`: readonly `Readonly`<{ `id`: `string` ; `privilege`: `Readonly`<{ `alerting?`: `Readonly`<{ `alert?`: `Readonly`<{ `all?`: readonly string[] ; `read?`: readonly string[] }\> ; `rule?`: `Readonly`<{ `all?`: readonly string[] ; `read?`: readonly string[] }\> }\> ; `api?`: readonly string[] ; `app?`: readonly string[] ; `cases?`: `Readonly`<{ `all?`: readonly string[] ; `read?`: readonly string[] }\> ; `catalogue?`: readonly string[] ; `disabled?`: `boolean` ; `excludeFromBasePrivileges?`: `boolean` ; `management?`: `Readonly`<{ [x: string]: readonly `string`[]; }\> ; `requireAllSpaces?`: `boolean` ; `savedObject`: `Readonly`<{ `all`: readonly string[] ; `read`: readonly string[] }\> ; `ui`: readonly string[] }\> }\>[] }\> + +#### Returns + +`undefined` \| `Readonly`<{ `description`: `string` ; `privileges`: readonly `Readonly`<{ `id`: `string` ; `privilege`: `Readonly`<{ `alerting?`: `Readonly`<{ `alert?`: `Readonly`<{ `all?`: readonly string[] ; `read?`: readonly string[] }\> ; `rule?`: `Readonly`<{ `all?`: readonly string[] ; `read?`: readonly string[] }\> }\> ; `api?`: readonly string[] ; `app?`: readonly string[] ; `cases?`: `Readonly`<{ `all?`: readonly string[] ; `read?`: readonly string[] }\> ; `catalogue?`: readonly string[] ; `disabled?`: `boolean` ; `excludeFromBasePrivileges?`: `boolean` ; `management?`: `Readonly`<{ [x: string]: readonly `string`[]; }\> ; `requireAllSpaces?`: `boolean` ; `savedObject`: `Readonly`<{ `all`: readonly string[] ; `read`: readonly string[] }\> ; `ui`: readonly string[] }\> }\>[] }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:205 + +## Methods + +### toRaw + +ā–ø **toRaw**(): [`KibanaFeatureConfig`](../interfaces/client._internal_namespace.KibanaFeatureConfig.md) + +#### Returns + +[`KibanaFeatureConfig`](../interfaces/client._internal_namespace.KibanaFeatureConfig.md) + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:241 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaMigrator.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaMigrator.md new file mode 100644 index 0000000000000..a26089d3ed6f4 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaMigrator.md @@ -0,0 +1,286 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / KibanaMigrator + +# Class: KibanaMigrator + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).KibanaMigrator + +Manages the shape of mappings and documents in the Kibana index. + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.KibanaMigrator.md#constructor) + +### Properties + +- [activeMappings](client._internal_namespace.KibanaMigrator.md#activemappings) +- [client](client._internal_namespace.KibanaMigrator.md#client) +- [documentMigrator](client._internal_namespace.KibanaMigrator.md#documentmigrator) +- [kibanaIndex](client._internal_namespace.KibanaMigrator.md#kibanaindex) +- [kibanaVersion](client._internal_namespace.KibanaMigrator.md#kibanaversion) +- [log](client._internal_namespace.KibanaMigrator.md#log) +- [mappingProperties](client._internal_namespace.KibanaMigrator.md#mappingproperties) +- [migrationResult](client._internal_namespace.KibanaMigrator.md#migrationresult) +- [runMigrationsInternal](client._internal_namespace.KibanaMigrator.md#runmigrationsinternal) +- [serializer](client._internal_namespace.KibanaMigrator.md#serializer) +- [soMigrationsConfig](client._internal_namespace.KibanaMigrator.md#somigrationsconfig) +- [status$](client._internal_namespace.KibanaMigrator.md#status$) +- [typeRegistry](client._internal_namespace.KibanaMigrator.md#typeregistry) + +### Methods + +- [getActiveMappings](client._internal_namespace.KibanaMigrator.md#getactivemappings) +- [getStatus$](client._internal_namespace.KibanaMigrator.md#getstatus$) +- [migrateDocument](client._internal_namespace.KibanaMigrator.md#migratedocument) +- [prepareMigrations](client._internal_namespace.KibanaMigrator.md#preparemigrations) +- [runMigrations](client._internal_namespace.KibanaMigrator.md#runmigrations) + +## Constructors + +### constructor + +ā€¢ **new KibanaMigrator**(`__namedParameters`) + +Creates an instance of KibanaMigrator. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`KibanaMigratorOptions`](../interfaces/client._internal_namespace.KibanaMigratorOptions.md) | + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:42 + +## Properties + +### activeMappings + +ā€¢ `Private` `Readonly` **activeMappings**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:36 + +___ + +### client + +ā€¢ `Private` `Readonly` **client**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:27 + +___ + +### documentMigrator + +ā€¢ `Private` `Readonly` **documentMigrator**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:28 + +___ + +### kibanaIndex + +ā€¢ `Private` `Readonly` **kibanaIndex**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:29 + +___ + +### kibanaVersion + +ā€¢ `Readonly` **kibanaVersion**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:38 + +___ + +### log + +ā€¢ `Private` `Readonly` **log**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:30 + +___ + +### mappingProperties + +ā€¢ `Private` `Readonly` **mappingProperties**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:31 + +___ + +### migrationResult + +ā€¢ `Private` `Optional` **migrationResult**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:34 + +___ + +### runMigrationsInternal + +ā€¢ `Private` **runMigrationsInternal**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:68 + +___ + +### serializer + +ā€¢ `Private` `Readonly` **serializer**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:33 + +___ + +### soMigrationsConfig + +ā€¢ `Private` `Readonly` **soMigrationsConfig**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:37 + +___ + +### status$ + +ā€¢ `Private` `Readonly` **status$**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:35 + +___ + +### typeRegistry + +ā€¢ `Private` `Readonly` **typeRegistry**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:32 + +## Methods + +### getActiveMappings + +ā–ø **getActiveMappings**(): [`IndexMapping`](../interfaces/client._internal_namespace.IndexMapping.md) + +Gets all the index mappings defined by Kibana's enabled plugins. + +#### Returns + +[`IndexMapping`](../interfaces/client._internal_namespace.IndexMapping.md) + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:73 + +___ + +### getStatus$ + +ā–ø **getStatus$**(): `Observable`<[`KibanaMigratorStatus`](../interfaces/client._internal_namespace.KibanaMigratorStatus.md)\> + +#### Returns + +`Observable`<[`KibanaMigratorStatus`](../interfaces/client._internal_namespace.KibanaMigratorStatus.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:67 + +___ + +### migrateDocument + +ā–ø **migrateDocument**(`doc`): [`SavedObjectUnsanitizedDoc`](../modules/client._internal_namespace.md#savedobjectunsanitizeddoc)<`unknown`\> + +Migrates an individual doc to the latest version, as defined by the plugin migrations. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `doc` | [`SavedObjectUnsanitizedDoc`](../modules/client._internal_namespace.md#savedobjectunsanitizeddoc)<`unknown`\> | The saved object to migrate | + +#### Returns + +[`SavedObjectUnsanitizedDoc`](../modules/client._internal_namespace.md#savedobjectunsanitizeddoc)<`unknown`\> + +`doc` with all registered migrations applied. + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:80 + +___ + +### prepareMigrations + +ā–ø **prepareMigrations**(): `void` + +#### Returns + +`void` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:66 + +___ + +### runMigrations + +ā–ø **runMigrations**(`rerun?`): `Promise`<{ `status`: `string` }[]\> + +Migrates the mappings and documents in the Kibana index. By default, this will run only +once and subsequent calls will return the result of the original call. + +**`remarks`** When the `rerun` parameter is set to true, no checks are performed to ensure that no migration +is currently running. Chained or concurrent calls to `runMigrations({ rerun: true })` can lead to +multiple migrations running at the same time. When calling with this parameter, it's expected that the calling +code should ensure that the initial call resolves before calling the function again. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `rerun?` | `Object` | If true, method will run a new migration when called again instead of returning the result of the initial migration. This should only be used when factors external to Kibana itself alter the kibana index causing the saved objects mappings or data to change after the Kibana server performed the initial migration. | +| `rerun.rerun?` | `boolean` | - | + +#### Returns + +`Promise`<{ `status`: `string` }[]\> + +- A promise which resolves once all migrations have been applied. + The promise resolves with an array of migration statuses, one for each + elasticsearch index which was migrated. + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:61 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaRequest.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaRequest.md new file mode 100644 index 0000000000000..e0aae4835d6b7 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.KibanaRequest.md @@ -0,0 +1,347 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / KibanaRequest + +# Class: KibanaRequest + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).KibanaRequest + +Kibana specific abstraction for an incoming request. + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Params` | `unknown` | +| `Query` | `unknown` | +| `Body` | `unknown` | +| `Method` | extends [`RouteMethod`](../modules/client._internal_namespace.md#routemethod) = `any` | + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.KibanaRequest.md#constructor) + +### Properties + +- [[requestSymbol]](client._internal_namespace.KibanaRequest.md#[requestsymbol]) +- [auth](client._internal_namespace.KibanaRequest.md#auth) +- [body](client._internal_namespace.KibanaRequest.md#body) +- [events](client._internal_namespace.KibanaRequest.md#events) +- [getAuthRequired](client._internal_namespace.KibanaRequest.md#getauthrequired) +- [getEvents](client._internal_namespace.KibanaRequest.md#getevents) +- [getRouteInfo](client._internal_namespace.KibanaRequest.md#getrouteinfo) +- [headers](client._internal_namespace.KibanaRequest.md#headers) +- [id](client._internal_namespace.KibanaRequest.md#id) +- [isSystemRequest](client._internal_namespace.KibanaRequest.md#issystemrequest) +- [params](client._internal_namespace.KibanaRequest.md#params) +- [query](client._internal_namespace.KibanaRequest.md#query) +- [rewrittenUrl](client._internal_namespace.KibanaRequest.md#rewrittenurl) +- [route](client._internal_namespace.KibanaRequest.md#route) +- [socket](client._internal_namespace.KibanaRequest.md#socket) +- [url](client._internal_namespace.KibanaRequest.md#url) +- [uuid](client._internal_namespace.KibanaRequest.md#uuid) +- [withoutSecretHeaders](client._internal_namespace.KibanaRequest.md#withoutsecretheaders) +- [validate](client._internal_namespace.KibanaRequest.md#validate) + +### Methods + +- [from](client._internal_namespace.KibanaRequest.md#from) + +## Constructors + +### constructor + +ā€¢ **new KibanaRequest**<`Params`, `Query`, `Body`, `Method`\>(`request`, `params`, `query`, `body`, `withoutSecretHeaders`) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Params` | `unknown` | +| `Query` | `unknown` | +| `Body` | `unknown` | +| `Method` | extends [`RouteMethod`](../modules/client._internal_namespace.md#routemethod) = `any` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | `Request` | +| `params` | `Params` | +| `query` | `Query` | +| `body` | `Body` | +| `withoutSecretHeaders` | `boolean` | + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:126 + +## Properties + +### [requestSymbol] + +ā€¢ `Protected` `Readonly` **[requestSymbol]**: `Request` + +**`internal`** + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:125 + +___ + +### auth + +ā€¢ `Readonly` **auth**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `isAuthenticated` | `boolean` | + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:117 + +___ + +### body + +ā€¢ `Readonly` **body**: `Body` + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:66 + +___ + +### events + +ā€¢ `Readonly` **events**: [`KibanaRequestEvents`](../interfaces/client._internal_namespace.KibanaRequestEvents.md) + +Request events [KibanaRequestEvents](../interfaces/client._internal_namespace.KibanaRequestEvents.md) + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:116 + +___ + +### getAuthRequired + +ā€¢ `Private` **getAuthRequired**: `any` + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:129 + +___ + +### getEvents + +ā€¢ `Private` **getEvents**: `any` + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:127 + +___ + +### getRouteInfo + +ā€¢ `Private` **getRouteInfo**: `any` + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:128 + +___ + +### headers + +ā€¢ `Readonly` **headers**: [`Headers`](../modules/client._internal_namespace.md#headers) + +Readonly copy of incoming request headers. + +**`remarks`** +This property will contain a `filtered` copy of request headers. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:107 + +___ + +### id + +ā€¢ `Readonly` **id**: `string` + +A identifier to identify this request. + +**`remarks`** +Depending on the user's configuration, this value may be sourced from the +incoming request's `X-Opaque-Id` header which is not guaranteed to be unique +per request. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:89 + +___ + +### isSystemRequest + +ā€¢ `Readonly` **isSystemRequest**: `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. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:112 + +___ + +### params + +ā€¢ `Readonly` **params**: `Params` + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:64 + +___ + +### query + +ā€¢ `Readonly` **query**: `Query` + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:65 + +___ + +### rewrittenUrl + +ā€¢ `Optional` `Readonly` **rewrittenUrl**: `URL` + +URL rewritten in onPreRouting request interceptor. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:123 + +___ + +### route + +ā€¢ `Readonly` **route**: `Readonly`<{ `method`: `RecursiveReadonly`<`Method`\> ; `options`: `RecursiveReadonly`<[`KibanaRequestRouteOptions`](../modules/client._internal_namespace.md#kibanarequestrouteoptions)<`Method`\>\> ; `path`: `string` }\> + +matched route details + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:101 + +___ + +### socket + +ā€¢ `Readonly` **socket**: [`IKibanaSocket`](../interfaces/client._internal_namespace.IKibanaSocket.md) + +[IKibanaSocket](../interfaces/client._internal_namespace.IKibanaSocket.md) + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:114 + +___ + +### url + +ā€¢ `Readonly` **url**: `URL` + +a WHATWG URL standard object. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:99 + +___ + +### uuid + +ā€¢ `Readonly` **uuid**: `string` + +A UUID to identify this request. + +**`remarks`** +This value is NOT sourced from the incoming request's `X-Opaque-Id` header. it +is always a UUID uniquely identifying the request. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:97 + +___ + +### withoutSecretHeaders + +ā€¢ `Private` `Readonly` **withoutSecretHeaders**: `any` + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:67 + +___ + +### validate + +ā–Ŗ `Static` `Private` **validate**: `any` + +Validates the different parts of a request based on the schemas defined for +the route. Builds up the actual params, query and body object that will be +received in the route handler. + +**`internal`** + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:80 + +## Methods + +### from + +ā–ø `Static` **from**<`P`, `Q`, `B`\>(`req`, `routeSchemas?`, `withoutSecretHeaders?`): [`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`P`, `Q`, `B`, `any`\> + +Factory for creating requests. Validates the request before creating an +instance of a KibanaRequest. + +**`internal`** + +#### Type parameters + +| Name | +| :------ | +| `P` | +| `Q` | +| `B` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `req` | `Request` | +| `routeSchemas?` | [`RouteValidator`](client._internal_namespace.RouteValidator.md)<`P`, `Q`, `B`\> \| [`RouteValidatorFullConfig`](../modules/client._internal_namespace.md#routevalidatorfullconfig)<`P`, `Q`, `B`\> | +| `withoutSecretHeaders?` | `boolean` | + +#### Returns + +[`KibanaRequest`](client._internal_namespace.KibanaRequest.md)<`P`, `Q`, `B`, `any`\> + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:73 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.LicenseState.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.LicenseState.md new file mode 100644 index 0000000000000..9b8af11cd73cf --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.LicenseState.md @@ -0,0 +1,215 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / LicenseState + +# Class: LicenseState + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).LicenseState + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.LicenseState.md#constructor) + +### Properties + +- [\_notifyUsage](client._internal_namespace.LicenseState.md#_notifyusage) +- [license](client._internal_namespace.LicenseState.md#license) +- [licenseInformation](client._internal_namespace.LicenseState.md#licenseinformation) +- [notifyUsage](client._internal_namespace.LicenseState.md#notifyusage) +- [subscription](client._internal_namespace.LicenseState.md#subscription) +- [updateInformation](client._internal_namespace.LicenseState.md#updateinformation) + +### Methods + +- [checkLicense](client._internal_namespace.LicenseState.md#checklicense) +- [clean](client._internal_namespace.LicenseState.md#clean) +- [ensureLicenseForActionType](client._internal_namespace.LicenseState.md#ensurelicenseforactiontype) +- [getLicenseInformation](client._internal_namespace.LicenseState.md#getlicenseinformation) +- [isLicenseValidForActionType](client._internal_namespace.LicenseState.md#islicensevalidforactiontype) +- [setNotifyUsage](client._internal_namespace.LicenseState.md#setnotifyusage) + +## Constructors + +### constructor + +ā€¢ **new LicenseState**(`license$`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `license$` | `Observable`<[`ILicense`](../interfaces/client._internal_namespace.ILicense.md)\> | + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:17 + +## Properties + +### \_notifyUsage + +ā€¢ `Private` **\_notifyUsage**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:16 + +___ + +### license + +ā€¢ `Private` `Optional` **license**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:15 + +___ + +### licenseInformation + +ā€¢ `Private` **licenseInformation**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:13 + +___ + +### notifyUsage + +ā€¢ `Private` **notifyUsage**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:30 + +___ + +### subscription + +ā€¢ `Private` **subscription**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:14 + +___ + +### updateInformation + +ā€¢ `Private` **updateInformation**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:18 + +## Methods + +### checkLicense + +ā–ø **checkLicense**(`license`): [`ActionsLicenseInformation`](../interfaces/client._internal_namespace.ActionsLicenseInformation.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `license` | `undefined` \| [`ILicense`](../interfaces/client._internal_namespace.ILicense.md) | + +#### Returns + +[`ActionsLicenseInformation`](../interfaces/client._internal_namespace.ActionsLicenseInformation.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:32 + +___ + +### clean + +ā–ø **clean**(): `void` + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:20 + +___ + +### ensureLicenseForActionType + +ā–ø **ensureLicenseForActionType**(`actionType`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionType` | [`ActionType`](../interfaces/client._internal_namespace.ActionType-1.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig), [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets), [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams), `void`\> | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:31 + +___ + +### getLicenseInformation + +ā–ø **getLicenseInformation**(): [`ActionsLicenseInformation`](../interfaces/client._internal_namespace.ActionsLicenseInformation.md) + +#### Returns + +[`ActionsLicenseInformation`](../interfaces/client._internal_namespace.ActionsLicenseInformation.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:21 + +___ + +### isLicenseValidForActionType + +ā–ø **isLicenseValidForActionType**(`actionType`, `__namedParameters?`): { `isValid`: ``true`` } \| { `isValid`: ``false`` ; `reason`: ``"unavailable"`` \| ``"expired"`` \| ``"invalid"`` } + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionType` | [`ActionType`](../interfaces/client._internal_namespace.ActionType-1.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig), [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets), [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams), `void`\> | +| `__namedParameters?` | `Object` | +| `__namedParameters.notifyUsage` | `boolean` | + +#### Returns + +{ `isValid`: ``true`` } \| { `isValid`: ``false`` ; `reason`: ``"unavailable"`` \| ``"expired"`` \| ``"invalid"`` } + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:22 + +___ + +### setNotifyUsage + +ā–ø **setNotifyUsage**(`notifyUsage`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `notifyUsage` | (`featureName`: `string`, `usedAt?`: `number` \| `Date`) => `void` | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:19 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.RouteValidationError.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.RouteValidationError.md new file mode 100644 index 0000000000000..a9fcf909bd74a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.RouteValidationError.md @@ -0,0 +1,40 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RouteValidationError + +# Class: RouteValidationError + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RouteValidationError + +Error to return when the validation is not successful. + +## Hierarchy + +- `SchemaTypeError` + + ā†³ **`RouteValidationError`** + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.RouteValidationError.md#constructor) + +## Constructors + +### constructor + +ā€¢ **new RouteValidationError**(`error`, `path?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `string` \| `Error` | +| `path?` | `string`[] | + +#### Overrides + +SchemaTypeError.constructor + +#### Defined in + +src/core/target/types/server/http/router/validator/validator_error.d.ts:7 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.RouteValidator.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.RouteValidator.md new file mode 100644 index 0000000000000..bf73fbda85719 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.RouteValidator.md @@ -0,0 +1,272 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RouteValidator + +# Class: RouteValidator + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RouteValidator + +Route validator class to define the validation logic for each new route. + +**`internal`** + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `P` | {} | +| `Q` | {} | +| `B` | {} | + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.RouteValidator.md#constructor) + +### Properties + +- [config](client._internal_namespace.RouteValidator.md#config) +- [customValidation](client._internal_namespace.RouteValidator.md#customvalidation) +- [options](client._internal_namespace.RouteValidator.md#options) +- [preValidateSchema](client._internal_namespace.RouteValidator.md#prevalidateschema) +- [safetyPostchecks](client._internal_namespace.RouteValidator.md#safetypostchecks) +- [safetyPrechecks](client._internal_namespace.RouteValidator.md#safetyprechecks) +- [validate](client._internal_namespace.RouteValidator.md#validate) +- [validateFunction](client._internal_namespace.RouteValidator.md#validatefunction) +- [ResultFactory](client._internal_namespace.RouteValidator.md#resultfactory) + +### Methods + +- [getBody](client._internal_namespace.RouteValidator.md#getbody) +- [getParams](client._internal_namespace.RouteValidator.md#getparams) +- [getQuery](client._internal_namespace.RouteValidator.md#getquery) +- [hasBody](client._internal_namespace.RouteValidator.md#hasbody) +- [from](client._internal_namespace.RouteValidator.md#from) + +## Constructors + +### constructor + +ā€¢ `Private` **new RouteValidator**<`P`, `Q`, `B`\>() + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `P` | {} | +| `Q` | {} | +| `B` | {} | + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:112 + +## Properties + +### config + +ā€¢ `Private` `Readonly` **config**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:108 + +___ + +### customValidation + +ā€¢ `Private` **customValidation**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:136 + +___ + +### options + +ā€¢ `Private` `Readonly` **options**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:109 + +___ + +### preValidateSchema + +ā€¢ `Private` **preValidateSchema**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:138 + +___ + +### safetyPostchecks + +ā€¢ `Private` **safetyPostchecks**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:135 + +___ + +### safetyPrechecks + +ā€¢ `Private` **safetyPrechecks**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:134 + +___ + +### validate + +ā€¢ `Private` **validate**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:133 + +___ + +### validateFunction + +ā€¢ `Private` **validateFunction**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:137 + +___ + +### ResultFactory + +ā–Ŗ `Static` `Private` **ResultFactory**: `any` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:111 + +## Methods + +### getBody + +ā–ø **getBody**(`data`, `namespace?`): `Readonly`<`B`\> + +Get validated body + +**`internal`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `unknown` | +| `namespace?` | `string` | + +#### Returns + +`Readonly`<`B`\> + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:127 + +___ + +### getParams + +ā–ø **getParams**(`data`, `namespace?`): `Readonly`<`P`\> + +Get validated URL params + +**`internal`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `unknown` | +| `namespace?` | `string` | + +#### Returns + +`Readonly`<`P`\> + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:117 + +___ + +### getQuery + +ā–ø **getQuery**(`data`, `namespace?`): `Readonly`<`Q`\> + +Get validated query params + +**`internal`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `unknown` | +| `namespace?` | `string` | + +#### Returns + +`Readonly`<`Q`\> + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:122 + +___ + +### hasBody + +ā–ø **hasBody**(): `boolean` + +Has body validation + +**`internal`** + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:132 + +___ + +### from + +ā–ø `Static` **from**<`_P`, `_Q`, `_B`\>(`opts`): [`RouteValidator`](client._internal_namespace.RouteValidator.md)<`_P`, `_Q`, `_B`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `_P` | {} | +| `_Q` | {} | +| `_B` | {} | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts` | [`RouteValidator`](client._internal_namespace.RouteValidator.md)<`_P`, `_Q`, `_B`\> \| [`RouteValidatorFullConfig`](../modules/client._internal_namespace.md#routevalidatorfullconfig)<`_P`, `_Q`, `_B`\> | + +#### Returns + +[`RouteValidator`](client._internal_namespace.RouteValidator.md)<`_P`, `_Q`, `_B`\> + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:110 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectActions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectActions.md new file mode 100644 index 0000000000000..cced678be25cc --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectActions.md @@ -0,0 +1,66 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectActions + +# Class: SavedObjectActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectActions + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.SavedObjectActions.md#constructor) + +### Properties + +- [prefix](client._internal_namespace.SavedObjectActions.md#prefix) + +### Methods + +- [get](client._internal_namespace.SavedObjectActions.md#get) + +## Constructors + +### constructor + +ā€¢ **new SavedObjectActions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/saved_object.d.ts:3 + +## Properties + +### prefix + +ā€¢ `Private` `Readonly` **prefix**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/saved_object.d.ts:2 + +## Methods + +### get + +ā–ø **get**(`type`, `operation`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `operation` | `string` | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/saved_object.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectTypeRegistry.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectTypeRegistry.md new file mode 100644 index 0000000000000..bc38c9d6773b1 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectTypeRegistry.md @@ -0,0 +1,306 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectTypeRegistry + +# Class: SavedObjectTypeRegistry + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectTypeRegistry + +Registry holding information about all the registered [saved object types](../interfaces/client._internal_namespace.SavedObjectsType.md). + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.SavedObjectTypeRegistry.md#constructor) + +### Properties + +- [types](client._internal_namespace.SavedObjectTypeRegistry.md#types) + +### Methods + +- [getAllTypes](client._internal_namespace.SavedObjectTypeRegistry.md#getalltypes) +- [getImportableAndExportableTypes](client._internal_namespace.SavedObjectTypeRegistry.md#getimportableandexportabletypes) +- [getIndex](client._internal_namespace.SavedObjectTypeRegistry.md#getindex) +- [getType](client._internal_namespace.SavedObjectTypeRegistry.md#gettype) +- [getVisibleTypes](client._internal_namespace.SavedObjectTypeRegistry.md#getvisibletypes) +- [isHidden](client._internal_namespace.SavedObjectTypeRegistry.md#ishidden) +- [isImportableAndExportable](client._internal_namespace.SavedObjectTypeRegistry.md#isimportableandexportable) +- [isMultiNamespace](client._internal_namespace.SavedObjectTypeRegistry.md#ismultinamespace) +- [isNamespaceAgnostic](client._internal_namespace.SavedObjectTypeRegistry.md#isnamespaceagnostic) +- [isShareable](client._internal_namespace.SavedObjectTypeRegistry.md#isshareable) +- [isSingleNamespace](client._internal_namespace.SavedObjectTypeRegistry.md#issinglenamespace) +- [registerType](client._internal_namespace.SavedObjectTypeRegistry.md#registertype) + +## Constructors + +### constructor + +ā€¢ **new SavedObjectTypeRegistry**() + +## Properties + +### types + +ā€¢ `Private` `Readonly` **types**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:14 + +## Methods + +### getAllTypes + +ā–ø **getAllTypes**(): [`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\>[] + +Return all [types](../interfaces/client._internal_namespace.SavedObjectsType.md) currently registered, including the hidden ones. + +To only get the visible types (which is the most common use case), use `getVisibleTypes` instead. + +#### Returns + +[`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\>[] + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:35 + +___ + +### getImportableAndExportableTypes + +ā–ø **getImportableAndExportableTypes**(): [`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\>[] + +Return all [types](../interfaces/client._internal_namespace.SavedObjectsType.md) currently registered that are importable/exportable. + +#### Returns + +[`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\>[] + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:39 + +___ + +### getIndex + +ā–ø **getIndex**(`type`): `undefined` \| `string` + +Returns the `indexPattern` property for given type, or `undefined` if +the type is not registered. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`undefined` \| `string` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:69 + +___ + +### getType + +ā–ø **getType**(`type`): `undefined` \| [`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\> + +Return the [type](../interfaces/client._internal_namespace.SavedObjectsType.md) definition for given type name. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`undefined` \| [`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\> + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:23 + +___ + +### getVisibleTypes + +ā–ø **getVisibleTypes**(): [`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\>[] + +Returns all visible [types](../interfaces/client._internal_namespace.SavedObjectsType.md). + +A visible type is a type that doesn't explicitly define `hidden=true` during registration. + +#### Returns + +[`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\>[] + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:29 + +___ + +### isHidden + +ā–ø **isHidden**(`type`): `boolean` + +Returns the `hidden` property for given type, or `false` if +the type is not registered. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:64 + +___ + +### isImportableAndExportable + +ā–ø **isImportableAndExportable**(`type`): `boolean` + +Returns the `management.importableAndExportable` property for given type, or +`false` if the type is not registered or does not define a management section. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:74 + +___ + +### isMultiNamespace + +ā–ø **isMultiNamespace**(`type`): `boolean` + +Returns whether the type is multi-namespace (shareable *or* isolated); +resolves to `false` if the type is not registered + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:54 + +___ + +### isNamespaceAgnostic + +ā–ø **isNamespaceAgnostic**(`type`): `boolean` + +Returns whether the type is namespace-agnostic (global); +resolves to `false` if the type is not registered + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:44 + +___ + +### isShareable + +ā–ø **isShareable**(`type`): `boolean` + +Returns whether the type is multi-namespace (shareable); +resolves to `false` if the type is not registered + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:59 + +___ + +### isSingleNamespace + +ā–ø **isSingleNamespace**(`type`): `boolean` + +Returns whether the type is single-namespace (isolated); +resolves to `true` if the type is not registered + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:49 + +___ + +### registerType + +ā–ø **registerType**(`type`): `void` + +Register a [type](../interfaces/client._internal_namespace.SavedObjectsType.md) inside the registry. +A type can only be registered once. subsequent calls with the same type name will throw an error. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`SavedObjectsType`](../interfaces/client._internal_namespace.SavedObjectsType.md)<`any`\> | + +#### Returns + +`void` + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:19 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsClient.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsClient.md new file mode 100644 index 0000000000000..1d97deadff81a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsClient.md @@ -0,0 +1,617 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsClient + +# Class: SavedObjectsClient + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsClient + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.SavedObjectsClient.md#constructor) + +### Properties + +- [\_repository](client._internal_namespace.SavedObjectsClient.md#_repository) +- [errors](client._internal_namespace.SavedObjectsClient.md#errors) +- [errors](client._internal_namespace.SavedObjectsClient.md#errors) + +### Methods + +- [bulkCreate](client._internal_namespace.SavedObjectsClient.md#bulkcreate) +- [bulkGet](client._internal_namespace.SavedObjectsClient.md#bulkget) +- [bulkResolve](client._internal_namespace.SavedObjectsClient.md#bulkresolve) +- [bulkUpdate](client._internal_namespace.SavedObjectsClient.md#bulkupdate) +- [checkConflicts](client._internal_namespace.SavedObjectsClient.md#checkconflicts) +- [closePointInTime](client._internal_namespace.SavedObjectsClient.md#closepointintime) +- [collectMultiNamespaceReferences](client._internal_namespace.SavedObjectsClient.md#collectmultinamespacereferences) +- [create](client._internal_namespace.SavedObjectsClient.md#create) +- [createPointInTimeFinder](client._internal_namespace.SavedObjectsClient.md#createpointintimefinder) +- [delete](client._internal_namespace.SavedObjectsClient.md#delete) +- [find](client._internal_namespace.SavedObjectsClient.md#find) +- [get](client._internal_namespace.SavedObjectsClient.md#get) +- [openPointInTimeForType](client._internal_namespace.SavedObjectsClient.md#openpointintimefortype) +- [removeReferencesTo](client._internal_namespace.SavedObjectsClient.md#removereferencesto) +- [resolve](client._internal_namespace.SavedObjectsClient.md#resolve) +- [update](client._internal_namespace.SavedObjectsClient.md#update) +- [updateObjectsSpaces](client._internal_namespace.SavedObjectsClient.md#updateobjectsspaces) + +## Constructors + +### constructor + +ā€¢ **new SavedObjectsClient**(`repository`) + +**`internal`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `repository` | [`ISavedObjectsRepository`](../modules/client._internal_namespace.md#isavedobjectsrepository) | + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:371 + +## Properties + +### \_repository + +ā€¢ `Private` **\_repository**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:369 + +___ + +### errors + +ā€¢ **errors**: typeof [`SavedObjectsErrorHelpers`](client._internal_namespace.SavedObjectsErrorHelpers.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:368 + +___ + +### errors + +ā–Ŗ `Static` **errors**: typeof [`SavedObjectsErrorHelpers`](client._internal_namespace.SavedObjectsErrorHelpers.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:367 + +## Methods + +### bulkCreate + +ā–ø **bulkCreate**<`T`\>(`objects`, `options?`): `Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +Persists multiple documents batched together as a single request + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `objects` | [`SavedObjectsBulkCreateObject`](../interfaces/client._internal_namespace.SavedObjectsBulkCreateObject.md)<`T`\>[] | +| `options?` | [`SavedObjectsCreateOptions`](../interfaces/client._internal_namespace.SavedObjectsCreateOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:386 + +___ + +### bulkGet + +ā–ø **bulkGet**<`T`\>(`objects?`, `options?`): `Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +Returns an array of objects by id + +**`example`** + +bulkGet([ + { id: 'one', type: 'config' }, + { id: 'foo', type: 'index-pattern' } +]) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `objects?` | [`SavedObjectsBulkGetObject`](../interfaces/client._internal_namespace.SavedObjectsBulkGetObject.md)[] | an array of ids, or an array of objects containing id, type and optionally fields | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | - | + +#### Returns + +`Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:420 + +___ + +### bulkResolve + +ā–ø **bulkResolve**<`T`\>(`objects`, `options?`): `Promise`<[`SavedObjectsBulkResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md)<`T`\>\> + +Resolves an array of objects by id, using any legacy URL aliases if they exist + +**`example`** + +bulkResolve([ + { id: 'one', type: 'config' }, + { id: 'foo', type: 'index-pattern' } +]) + +**`note`** Saved objects that Kibana fails to find are replaced with an error object and an "exactMatch" outcome. The rationale behind the +outcome is that "exactMatch" is the default outcome, and the outcome only changes if an alias is found. This behavior is unique to +`bulkResolve`; the regular `resolve` API will throw an error instead. + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `objects` | [`SavedObjectsBulkResolveObject`](../interfaces/client._internal_namespace.SavedObjectsBulkResolveObject.md)[] | an array of objects containing id, type | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | - | + +#### Returns + +`Promise`<[`SavedObjectsBulkResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:444 + +___ + +### bulkUpdate + +ā–ø **bulkUpdate**<`T`\>(`objects`, `options?`): `Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<`T`\>\> + +Bulk Updates multiple SavedObject at once + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `objects` | [`SavedObjectsBulkUpdateObject`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateObject.md)<`T`\>[] | +| `options?` | [`SavedObjectsBulkUpdateOptions`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:466 + +___ + +### checkConflicts + +ā–ø **checkConflicts**(`objects?`, `options?`): `Promise`<[`SavedObjectsCheckConflictsResponse`](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md)\> + +Check what conflicts will result when creating a given array of saved objects. This includes "unresolvable conflicts", which are +multi-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `objects?` | [`SavedObjectsCheckConflictsObject`](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsObject.md)[] | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsCheckConflictsResponse`](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:394 + +___ + +### closePointInTime + +ā–ø **closePointInTime**(`id`, `options?`): `Promise`<[`SavedObjectsClosePointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md)\> + +Closes a Point In Time (PIT) by ID. This simply proxies the request to ES via the +Elasticsearch client, and is included in the Saved Objects Client as a convenience +for consumers who are using [SavedObjectsClient.openPointInTimeForType](client._internal_namespace.SavedObjectsClient.md#openpointintimefortype). + +Only use this API if you have an advanced use case that's not solved by the +[SavedObjectsClient.createPointInTimeFinder](client._internal_namespace.SavedObjectsClient.md#createpointintimefinder) method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsClosePointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:488 + +___ + +### collectMultiNamespaceReferences + +ā–ø **collectMultiNamespaceReferences**(`objects`, `options?`): `Promise`<[`SavedObjectsCollectMultiNamespaceReferencesResponse`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md)\> + +Gets all references and transitive references of the listed objects. Ignores any object that is not a multi-namespace type. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `objects` | [`SavedObjectsCollectMultiNamespaceReferencesObject`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md)[] | +| `options?` | [`SavedObjectsCollectMultiNamespaceReferencesOptions`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsCollectMultiNamespaceReferencesResponse`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:541 + +___ + +### create + +ā–ø **create**<`T`\>(`type`, `attributes`, `options?`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +Persists a SavedObject + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `attributes` | `T` | +| `options?` | [`SavedObjectsCreateOptions`](../interfaces/client._internal_namespace.SavedObjectsCreateOptions.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:379 + +___ + +### createPointInTimeFinder + +ā–ø **createPointInTimeFinder**<`T`, `A`\>(`findOptions`, `dependencies?`): [`ISavedObjectsPointInTimeFinder`](../interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md)<`T`, `A`\> + +Returns a [ISavedObjectsPointInTimeFinder](../interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md) to help page through +large sets of saved objects. We strongly recommend using this API for +any `find` queries that might return more than 1000 saved objects, +however this API is only intended for use in server-side "batch" +processing of objects where you are collecting all objects in memory +or streaming them back to the client. + +Do NOT use this API in a route handler to facilitate paging through +saved objects on the client-side unless you are streaming all of the +results back to the client at once. Because the returned generator is +stateful, you cannot rely on subsequent http requests retrieving new +pages from the same Kibana server in multi-instance deployments. + +The generator wraps calls to [SavedObjectsClient.find](client._internal_namespace.SavedObjectsClient.md#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`. + +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. + +**`example`** +```ts +const findOptions: SavedObjectsCreatePointInTimeFinderOptions = { + type: 'visualization', + search: 'foo*', + perPage: 100, +}; + +const finder = savedObjectsClient.createPointInTimeFinder(findOptions); + +const responses: SavedObjectFindResponse[] = []; +for await (const response of finder.find()) { + responses.push(...response); + if (doneSearching) { + await finder.close(); + } +} +``` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | +| `A` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `findOptions` | [`SavedObjectsCreatePointInTimeFinderOptions`](../modules/client._internal_namespace.md#savedobjectscreatepointintimefinderoptions) | +| `dependencies?` | [`SavedObjectsCreatePointInTimeFinderDependencies`](../interfaces/client._internal_namespace.SavedObjectsCreatePointInTimeFinderDependencies.md) | + +#### Returns + +[`ISavedObjectsPointInTimeFinder`](../interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md)<`T`, `A`\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:534 + +___ + +### delete + +ā–ø **delete**(`type`, `id`, `options?`): `Promise`<{}\> + +Deletes a SavedObject + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `options?` | [`SavedObjectsDeleteOptions`](../interfaces/client._internal_namespace.SavedObjectsDeleteOptions.md) | + +#### Returns + +`Promise`<{}\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:402 + +___ + +### find + +ā–ø **find**<`T`, `A`\>(`options`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<`T`, `A`\>\> + +Find all SavedObjects matching the search query + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | +| `A` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`SavedObjectsFindOptions`](../interfaces/client._internal_namespace.SavedObjectsFindOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<`T`, `A`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:408 + +___ + +### get + +ā–ø **get**<`T`\>(`type`, `id`, `options?`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +Retrieves a single object + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `type` | `string` | The type of SavedObject to retrieve | +| `id` | `string` | The ID of the SavedObject to retrieve | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:428 + +___ + +### openPointInTimeForType + +ā–ø **openPointInTimeForType**(`type`, `options?`): `Promise`<[`SavedObjectsOpenPointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md)\> + +Opens a Point In Time (PIT) against the indices for the specified Saved Object types. +The returned `id` can then be passed to [SavedObjectsClient.find](client._internal_namespace.SavedObjectsClient.md#find) to search +against that PIT. + +Only use this API if you have an advanced use case that's not solved by the +[SavedObjectsClient.createPointInTimeFinder](client._internal_namespace.SavedObjectsClient.md#createpointintimefinder) method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` \| `string`[] | +| `options?` | [`SavedObjectsOpenPointInTimeOptions`](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsOpenPointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:479 + +___ + +### removeReferencesTo + +ā–ø **removeReferencesTo**(`type`, `id`, `options?`): `Promise`<[`SavedObjectsRemoveReferencesToResponse`](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md)\> + +Updates all objects containing a reference to the given {type, id} tuple to remove the said reference. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `options?` | [`SavedObjectsRemoveReferencesToOptions`](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsRemoveReferencesToResponse`](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:470 + +___ + +### resolve + +ā–ø **resolve**<`T`\>(`type`, `id`, `options?`): `Promise`<[`SavedObjectsResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsResolveResponse.md)<`T`\>\> + +Resolves a single object, using any legacy URL alias if it exists + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `type` | `string` | The type of SavedObject to retrieve | +| `id` | `string` | The ID of the SavedObject to retrieve | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | | + +#### Returns + +`Promise`<[`SavedObjectsResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsResolveResponse.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:452 + +___ + +### update + +ā–ø **update**<`T`\>(`type`, `id`, `attributes`, `options?`): `Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<`T`\>\> + +Updates an SavedObject + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `attributes` | `Partial`<`T`\> | +| `options?` | [`SavedObjectsUpdateOptions`](../interfaces/client._internal_namespace.SavedObjectsUpdateOptions.md)<`T`\> | + +#### Returns + +`Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:460 + +___ + +### updateObjectsSpaces + +ā–ø **updateObjectsSpaces**(`objects`, `spacesToAdd`, `spacesToRemove`, `options?`): `Promise`<[`SavedObjectsUpdateObjectsSpacesResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md)\> + +Updates one or more objects to add and/or remove them from specified spaces. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `objects` | [`SavedObjectsUpdateObjectsSpacesObject`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md)[] | +| `spacesToAdd` | `string`[] | +| `spacesToRemove` | `string`[] | +| `options?` | [`SavedObjectsUpdateObjectsSpacesOptions`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsUpdateObjectsSpacesResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:550 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsErrorHelpers.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsErrorHelpers.md new file mode 100644 index 0000000000000..c428ccb237f1b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsErrorHelpers.md @@ -0,0 +1,665 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsErrorHelpers + +# Class: SavedObjectsErrorHelpers + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsErrorHelpers + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.SavedObjectsErrorHelpers.md#constructor) + +### Methods + +- [createBadRequestError](client._internal_namespace.SavedObjectsErrorHelpers.md#createbadrequesterror) +- [createConflictError](client._internal_namespace.SavedObjectsErrorHelpers.md#createconflicterror) +- [createGenericNotFoundError](client._internal_namespace.SavedObjectsErrorHelpers.md#creategenericnotfounderror) +- [createGenericNotFoundEsUnavailableError](client._internal_namespace.SavedObjectsErrorHelpers.md#creategenericnotfoundesunavailableerror) +- [createIndexAliasNotFoundError](client._internal_namespace.SavedObjectsErrorHelpers.md#createindexaliasnotfounderror) +- [createInvalidVersionError](client._internal_namespace.SavedObjectsErrorHelpers.md#createinvalidversionerror) +- [createTooManyRequestsError](client._internal_namespace.SavedObjectsErrorHelpers.md#createtoomanyrequestserror) +- [createUnsupportedTypeError](client._internal_namespace.SavedObjectsErrorHelpers.md#createunsupportedtypeerror) +- [decorateBadRequestError](client._internal_namespace.SavedObjectsErrorHelpers.md#decoratebadrequesterror) +- [decorateConflictError](client._internal_namespace.SavedObjectsErrorHelpers.md#decorateconflicterror) +- [decorateEsCannotExecuteScriptError](client._internal_namespace.SavedObjectsErrorHelpers.md#decorateescannotexecutescripterror) +- [decorateEsUnavailableError](client._internal_namespace.SavedObjectsErrorHelpers.md#decorateesunavailableerror) +- [decorateForbiddenError](client._internal_namespace.SavedObjectsErrorHelpers.md#decorateforbiddenerror) +- [decorateGeneralError](client._internal_namespace.SavedObjectsErrorHelpers.md#decorategeneralerror) +- [decorateIndexAliasNotFoundError](client._internal_namespace.SavedObjectsErrorHelpers.md#decorateindexaliasnotfounderror) +- [decorateNotAuthorizedError](client._internal_namespace.SavedObjectsErrorHelpers.md#decoratenotauthorizederror) +- [decorateRequestEntityTooLargeError](client._internal_namespace.SavedObjectsErrorHelpers.md#decoraterequestentitytoolargeerror) +- [decorateTooManyRequestsError](client._internal_namespace.SavedObjectsErrorHelpers.md#decoratetoomanyrequestserror) +- [isBadRequestError](client._internal_namespace.SavedObjectsErrorHelpers.md#isbadrequesterror) +- [isConflictError](client._internal_namespace.SavedObjectsErrorHelpers.md#isconflicterror) +- [isEsCannotExecuteScriptError](client._internal_namespace.SavedObjectsErrorHelpers.md#isescannotexecutescripterror) +- [isEsUnavailableError](client._internal_namespace.SavedObjectsErrorHelpers.md#isesunavailableerror) +- [isForbiddenError](client._internal_namespace.SavedObjectsErrorHelpers.md#isforbiddenerror) +- [isGeneralError](client._internal_namespace.SavedObjectsErrorHelpers.md#isgeneralerror) +- [isInvalidVersionError](client._internal_namespace.SavedObjectsErrorHelpers.md#isinvalidversionerror) +- [isNotAuthorizedError](client._internal_namespace.SavedObjectsErrorHelpers.md#isnotauthorizederror) +- [isNotFoundError](client._internal_namespace.SavedObjectsErrorHelpers.md#isnotfounderror) +- [isRequestEntityTooLargeError](client._internal_namespace.SavedObjectsErrorHelpers.md#isrequestentitytoolargeerror) +- [isSavedObjectsClientError](client._internal_namespace.SavedObjectsErrorHelpers.md#issavedobjectsclienterror) +- [isTooManyRequestsError](client._internal_namespace.SavedObjectsErrorHelpers.md#istoomanyrequestserror) + +## Constructors + +### constructor + +ā€¢ **new SavedObjectsErrorHelpers**() + +## Methods + +### createBadRequestError + +ā–ø `Static` **createBadRequestError**(`reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:12 + +___ + +### createConflictError + +ā–ø `Static` **createConflictError**(`type`, `id`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:28 + +___ + +### createGenericNotFoundError + +ā–ø `Static` **createGenericNotFoundError**(`type?`, `id?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type?` | ``null`` \| `string` | +| `id?` | ``null`` \| `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:23 + +___ + +### createGenericNotFoundEsUnavailableError + +ā–ø `Static` **createGenericNotFoundEsUnavailableError**(`type?`, `id?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type?` | ``null`` \| `string` | +| `id?` | ``null`` \| `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:39 + +___ + +### createIndexAliasNotFoundError + +ā–ø `Static` **createIndexAliasNotFoundError**(`alias`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alias` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:24 + +___ + +### createInvalidVersionError + +ā–ø `Static` **createInvalidVersionError**(`versionInput?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionInput?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:15 + +___ + +### createTooManyRequestsError + +ā–ø `Static` **createTooManyRequestsError**(`type`, `id`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:31 + +___ + +### createUnsupportedTypeError + +ā–ø `Static` **createUnsupportedTypeError**(`type`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:13 + +___ + +### decorateBadRequestError + +ā–ø `Static` **decorateBadRequestError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:11 + +___ + +### decorateConflictError + +ā–ø `Static` **decorateConflictError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:27 + +___ + +### decorateEsCannotExecuteScriptError + +ā–ø `Static` **decorateEsCannotExecuteScriptError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:33 + +___ + +### decorateEsUnavailableError + +ā–ø `Static` **decorateEsUnavailableError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:35 + +___ + +### decorateForbiddenError + +ā–ø `Static` **decorateForbiddenError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:19 + +___ + +### decorateGeneralError + +ā–ø `Static` **decorateGeneralError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:37 + +___ + +### decorateIndexAliasNotFoundError + +ā–ø `Static` **decorateIndexAliasNotFoundError**(`error`, `alias`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `alias` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:25 + +___ + +### decorateNotAuthorizedError + +ā–ø `Static` **decorateNotAuthorizedError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:17 + +___ + +### decorateRequestEntityTooLargeError + +ā–ø `Static` **decorateRequestEntityTooLargeError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:21 + +___ + +### decorateTooManyRequestsError + +ā–ø `Static` **decorateTooManyRequestsError**(`error`, `reason?`): [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | +| `reason?` | `string` | + +#### Returns + +[`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:30 + +___ + +### isBadRequestError + +ā–ø `Static` **isBadRequestError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:14 + +___ + +### isConflictError + +ā–ø `Static` **isConflictError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:29 + +___ + +### isEsCannotExecuteScriptError + +ā–ø `Static` **isEsCannotExecuteScriptError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:34 + +___ + +### isEsUnavailableError + +ā–ø `Static` **isEsUnavailableError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:36 + +___ + +### isForbiddenError + +ā–ø `Static` **isForbiddenError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:20 + +___ + +### isGeneralError + +ā–ø `Static` **isGeneralError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:38 + +___ + +### isInvalidVersionError + +ā–ø `Static` **isInvalidVersionError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:16 + +___ + +### isNotAuthorizedError + +ā–ø `Static` **isNotAuthorizedError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:18 + +___ + +### isNotFoundError + +ā–ø `Static` **isNotFoundError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:26 + +___ + +### isRequestEntityTooLargeError + +ā–ø `Static` **isRequestEntityTooLargeError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:22 + +___ + +### isSavedObjectsClientError + +ā–ø `Static` **isSavedObjectsClientError**(`error`): error is DecoratedError + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `any` | + +#### Returns + +error is DecoratedError + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:10 + +___ + +### isTooManyRequestsError + +ā–ø `Static` **isTooManyRequestsError**(`error`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`DecoratedError`](../interfaces/client._internal_namespace.DecoratedError.md) \| `Error` | + +#### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:32 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsRepository.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsRepository.md new file mode 100644 index 0000000000000..967fa67b35640 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SavedObjectsRepository.md @@ -0,0 +1,1082 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsRepository + +# Class: SavedObjectsRepository + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsRepository + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.SavedObjectsRepository.md#constructor) + +### Properties + +- [\_allowedTypes](client._internal_namespace.SavedObjectsRepository.md#_allowedtypes) +- [\_index](client._internal_namespace.SavedObjectsRepository.md#_index) +- [\_logger](client._internal_namespace.SavedObjectsRepository.md#_logger) +- [\_mappings](client._internal_namespace.SavedObjectsRepository.md#_mappings) +- [\_migrator](client._internal_namespace.SavedObjectsRepository.md#_migrator) +- [\_rawToSavedObject](client._internal_namespace.SavedObjectsRepository.md#_rawtosavedobject) +- [\_registry](client._internal_namespace.SavedObjectsRepository.md#_registry) +- [\_serializer](client._internal_namespace.SavedObjectsRepository.md#_serializer) +- [client](client._internal_namespace.SavedObjectsRepository.md#client) +- [getIndexForType](client._internal_namespace.SavedObjectsRepository.md#getindexfortype) +- [getIndicesForTypes](client._internal_namespace.SavedObjectsRepository.md#getindicesfortypes) +- [incrementCounterInternal](client._internal_namespace.SavedObjectsRepository.md#incrementcounterinternal) +- [preflightCheckForUpsertAliasConflict](client._internal_namespace.SavedObjectsRepository.md#preflightcheckforupsertaliasconflict) +- [preflightCheckNamespaces](client._internal_namespace.SavedObjectsRepository.md#preflightchecknamespaces) +- [rawDocExistsInNamespace](client._internal_namespace.SavedObjectsRepository.md#rawdocexistsinnamespace) +- [rawDocExistsInNamespaces](client._internal_namespace.SavedObjectsRepository.md#rawdocexistsinnamespaces) +- [validateInitialNamespaces](client._internal_namespace.SavedObjectsRepository.md#validateinitialnamespaces) +- [validateObjectAttributes](client._internal_namespace.SavedObjectsRepository.md#validateobjectattributes) +- [validateObjectNamespaces](client._internal_namespace.SavedObjectsRepository.md#validateobjectnamespaces) + +### Methods + +- [bulkCreate](client._internal_namespace.SavedObjectsRepository.md#bulkcreate) +- [bulkGet](client._internal_namespace.SavedObjectsRepository.md#bulkget) +- [bulkResolve](client._internal_namespace.SavedObjectsRepository.md#bulkresolve) +- [bulkUpdate](client._internal_namespace.SavedObjectsRepository.md#bulkupdate) +- [checkConflicts](client._internal_namespace.SavedObjectsRepository.md#checkconflicts) +- [closePointInTime](client._internal_namespace.SavedObjectsRepository.md#closepointintime) +- [collectMultiNamespaceReferences](client._internal_namespace.SavedObjectsRepository.md#collectmultinamespacereferences) +- [create](client._internal_namespace.SavedObjectsRepository.md#create) +- [createPointInTimeFinder](client._internal_namespace.SavedObjectsRepository.md#createpointintimefinder) +- [delete](client._internal_namespace.SavedObjectsRepository.md#delete) +- [deleteByNamespace](client._internal_namespace.SavedObjectsRepository.md#deletebynamespace) +- [find](client._internal_namespace.SavedObjectsRepository.md#find) +- [get](client._internal_namespace.SavedObjectsRepository.md#get) +- [incrementCounter](client._internal_namespace.SavedObjectsRepository.md#incrementcounter) +- [openPointInTimeForType](client._internal_namespace.SavedObjectsRepository.md#openpointintimefortype) +- [removeReferencesTo](client._internal_namespace.SavedObjectsRepository.md#removereferencesto) +- [resolve](client._internal_namespace.SavedObjectsRepository.md#resolve) +- [update](client._internal_namespace.SavedObjectsRepository.md#update) +- [updateObjectsSpaces](client._internal_namespace.SavedObjectsRepository.md#updateobjectsspaces) +- [createRepository](client._internal_namespace.SavedObjectsRepository.md#createrepository) + +## Constructors + +### constructor + +ā€¢ `Private` **new SavedObjectsRepository**() + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:88 + +## Properties + +### \_allowedTypes + +ā€¢ `Private` **\_allowedTypes**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:75 + +___ + +### \_index + +ā€¢ `Private` **\_index**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:72 + +___ + +### \_logger + +ā€¢ `Private` **\_logger**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:78 + +___ + +### \_mappings + +ā€¢ `Private` **\_mappings**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:73 + +___ + +### \_migrator + +ā€¢ `Private` **\_migrator**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:71 + +___ + +### \_rawToSavedObject + +ā€¢ `Private` **\_rawToSavedObject**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:445 + +___ + +### \_registry + +ā€¢ `Private` **\_registry**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:74 + +___ + +### \_serializer + +ā€¢ `Private` **\_serializer**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:77 + +___ + +### client + +ā€¢ `Private` `Readonly` **client**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:76 + +___ + +### getIndexForType + +ā€¢ `Private` **getIndexForType**: `any` + +Returns index specified by the given type or the default index + +**`param`** the type + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:436 + +___ + +### getIndicesForTypes + +ā€¢ `Private` **getIndicesForTypes**: `any` + +Returns an array of indices as specified in `this._registry` for each of the +given `types`. If any of the types don't have an associated index, the +default index `this._index` will be included. + +**`param`** The types whose indices should be retrieved + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:444 + +___ + +### incrementCounterInternal + +ā€¢ `Private` **incrementCounterInternal**: `any` + +**`internal`** incrementCounter function that is used internally and bypasses validation checks. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:305 + +___ + +### preflightCheckForUpsertAliasConflict + +ā€¢ `Private` **preflightCheckForUpsertAliasConflict**: `any` + +Pre-flight check to ensure that an upsert which would create a new object does not result in an alias conflict. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:455 + +___ + +### preflightCheckNamespaces + +ā€¢ `Private` **preflightCheckNamespaces**: `any` + +Pre-flight check to ensure that a multi-namespace object exists in the current namespace. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:451 + +___ + +### rawDocExistsInNamespace + +ā€¢ `Private` **rawDocExistsInNamespace**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:447 + +___ + +### rawDocExistsInNamespaces + +ā€¢ `Private` **rawDocExistsInNamespaces**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:446 + +___ + +### validateInitialNamespaces + +ā€¢ `Private` **validateInitialNamespaces**: `any` + +The `initialNamespaces` field (create, bulkCreate) is used to create an object in an initial set of spaces. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:457 + +___ + +### validateObjectAttributes + +ā€¢ `Private` **validateObjectAttributes**: `any` + +Validate a migrated doc against the registered saved object type's schema. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:461 + +___ + +### validateObjectNamespaces + +ā€¢ `Private` **validateObjectNamespaces**: `any` + +The object-specific `namespaces` field (bulkGet) is used to check if an object exists in any of a given number of spaces. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:459 + +## Methods + +### bulkCreate + +ā–ø **bulkCreate**<`T`\>(`objects`, `options?`): `Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +Creates multiple documents at once + +**`property`** {boolean} [options.overwrite=false] - overwrites existing documents + +**`property`** {string} [options.namespace] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `objects` | [`SavedObjectsBulkCreateObject`](../interfaces/client._internal_namespace.SavedObjectsBulkCreateObject.md)<`T`\>[] | [{ type, id, attributes, references, migrationVersion }] | +| `options?` | [`SavedObjectsCreateOptions`](../interfaces/client._internal_namespace.SavedObjectsCreateOptions.md) | - | + +#### Returns + +`Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +- {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]} + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:112 + +___ + +### bulkGet + +ā–ø **bulkGet**<`T`\>(`objects?`, `options?`): `Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +Returns an array of objects by id + +**`property`** {string} [options.namespace] + +**`example`** + +bulkGet([ + { id: 'one', type: 'config' }, + { id: 'foo', type: 'index-pattern' } +]) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `objects?` | [`SavedObjectsBulkGetObject`](../interfaces/client._internal_namespace.SavedObjectsBulkGetObject.md)[] | an array of objects containing id, type and optionally fields | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | - | + +#### Returns + +`Promise`<[`SavedObjectsBulkResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md)<`T`\>\> + +- { saved_objects: [{ id, type, version, attributes }] } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:169 + +___ + +### bulkResolve + +ā–ø **bulkResolve**<`T`\>(`objects`, `options?`): `Promise`<[`SavedObjectsBulkResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md)<`T`\>\> + +Resolves an array of objects by id, using any legacy URL aliases if they exist + +**`property`** {string} [options.namespace] + +**`example`** + +bulkResolve([ + { id: 'one', type: 'config' }, + { id: 'foo', type: 'index-pattern' } +]) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `objects` | [`SavedObjectsBulkResolveObject`](../interfaces/client._internal_namespace.SavedObjectsBulkResolveObject.md)[] | an array of objects containing id, type | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | - | + +#### Returns + +`Promise`<[`SavedObjectsBulkResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md)<`T`\>\> + +- { resolved_objects: [{ saved_object, outcome }] } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:184 + +___ + +### bulkUpdate + +ā–ø **bulkUpdate**<`T`\>(`objects`, `options?`): `Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<`T`\>\> + +Updates multiple objects in bulk + +**`property`** {string} options.version - ensures version matches that of persisted object + +**`property`** {string} [options.namespace] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `objects` | [`SavedObjectsBulkUpdateObject`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateObject.md)<`T`\>[] | [{ type, id, attributes, options: { version, namespace } references }] | +| `options?` | [`SavedObjectsBulkUpdateOptions`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateOptions.md) | - | + +#### Returns + +`Promise`<[`SavedObjectsBulkUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md)<`T`\>\> + +- {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]} + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:241 + +___ + +### checkConflicts + +ā–ø **checkConflicts**(`objects?`, `options?`): `Promise`<[`SavedObjectsCheckConflictsResponse`](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md)\> + +Check what conflicts will result when creating a given array of saved objects. This includes "unresolvable conflicts", which are +multi-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `objects?` | [`SavedObjectsCheckConflictsObject`](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsObject.md)[] | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsCheckConflictsResponse`](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:117 + +___ + +### closePointInTime + +ā–ø **closePointInTime**(`id`, `options?`): `Promise`<[`SavedObjectsClosePointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md)\> + +Closes a Point In Time (PIT) by ID. This simply proxies the request to ES +via the Elasticsearch client, and is included in the Saved Objects Client +as a convenience for consumers who are using `openPointInTimeForType`. + +Only use this API if you have an advanced use case that's not solved by the +[SavedObjectsRepository.createPointInTimeFinder](client._internal_namespace.SavedObjectsRepository.md#createpointintimefinder) method. + +**`remarks`** +While the `keepAlive` that is provided will cause a PIT to automatically close, +it is highly recommended to explicitly close a PIT when you are done with it +in order to avoid consuming unneeded resources in Elasticsearch. + +**`example`** +```ts +const repository = coreStart.savedObjects.createInternalRepository(); + +const { id } = await repository.openPointInTimeForType( + type: 'index-pattern', + { keepAlive: '2m' }, +); + +const response = await repository.find({ + type: 'index-pattern', + search: 'foo*', + sortField: 'name', + sortOrder: 'desc', + pit: { + id: 'abc123', + keepAlive: '2m', + }, + searchAfter: [1234, 'abcd'], +}); + +await repository.closePointInTime(response.pit_id); +``` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsClosePointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md)\> + +- [SavedObjectsClosePointInTimeResponse](../interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:384 + +___ + +### collectMultiNamespaceReferences + +ā–ø **collectMultiNamespaceReferences**(`objects`, `options?`): `Promise`<[`SavedObjectsCollectMultiNamespaceReferencesResponse`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md)\> + +Gets all references and transitive references of the given objects. Ignores any object and/or reference that is not a multi-namespace +type. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `objects` | [`SavedObjectsCollectMultiNamespaceReferencesObject`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md)[] | The objects to get the references for. | +| `options?` | [`SavedObjectsCollectMultiNamespaceReferencesOptions`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md) | - | + +#### Returns + +`Promise`<[`SavedObjectsCollectMultiNamespaceReferencesResponse`](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:223 + +___ + +### create + +ā–ø **create**<`T`\>(`type`, `attributes`, `options?`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +Persists an object + +**`property`** {string} [options.id] - force id on creation, not recommended + +**`property`** {boolean} [options.overwrite=false] + +**`property`** {object} [options.migrationVersion=undefined] + +**`property`** {string} [options.namespace] + +**`property`** {array} [options.references=[]] - [{ name, type, id }] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `attributes` | `T` | +| `options?` | [`SavedObjectsCreateOptions`](../interfaces/client._internal_namespace.SavedObjectsCreateOptions.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +- { id, type, version, attributes } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:102 + +___ + +### createPointInTimeFinder + +ā–ø **createPointInTimeFinder**<`T`, `A`\>(`findOptions`, `dependencies?`): [`ISavedObjectsPointInTimeFinder`](../interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md)<`T`, `A`\> + +Returns a [ISavedObjectsPointInTimeFinder](../interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md) to help page through +large sets of saved objects. We strongly recommend using this API for +any `find` queries that might return more than 1000 saved objects, +however this API is only intended for use in server-side "batch" +processing of objects where you are collecting all objects in memory +or streaming them back to the client. + +Do NOT use this API in a route handler to facilitate paging through +saved objects on the client-side unless you are streaming all of the +results back to the client at once. Because the returned generator is +stateful, you cannot rely on subsequent http requests retrieving new +pages from the same Kibana server in multi-instance deployments. + +This generator wraps calls to [SavedObjectsRepository.find](client._internal_namespace.SavedObjectsRepository.md#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`. + +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. + +**`example`** +```ts +const findOptions: SavedObjectsCreatePointInTimeFinderOptions = { + type: 'visualization', + search: 'foo*', + perPage: 100, +}; + +const finder = savedObjectsClient.createPointInTimeFinder(findOptions); + +const responses: SavedObjectFindResponse[] = []; +for await (const response of finder.find()) { + responses.push(...response); + if (doneSearching) { + await finder.close(); + } +} +``` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | +| `A` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `findOptions` | [`SavedObjectsCreatePointInTimeFinderOptions`](../modules/client._internal_namespace.md#savedobjectscreatepointintimefinderoptions) | +| `dependencies?` | [`SavedObjectsCreatePointInTimeFinderDependencies`](../interfaces/client._internal_namespace.SavedObjectsCreatePointInTimeFinderDependencies.md) | + +#### Returns + +[`ISavedObjectsPointInTimeFinder`](../interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md)<`T`, `A`\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:430 + +___ + +### delete + +ā–ø **delete**(`type`, `id`, `options?`): `Promise`<{}\> + +Deletes an object + +**`property`** {string} [options.namespace] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `options?` | [`SavedObjectsDeleteOptions`](../interfaces/client._internal_namespace.SavedObjectsDeleteOptions.md) | + +#### Returns + +`Promise`<{}\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:127 + +___ + +### deleteByNamespace + +ā–ø **deleteByNamespace**(`namespace`, `options?`): `Promise`<`any`\> + +Deletes all objects from the provided namespace. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `namespace` | `string` | +| `options?` | [`SavedObjectsDeleteByNamespaceOptions`](../interfaces/client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md) | + +#### Returns + +`Promise`<`any`\> + +- { took, timed_out, total, deleted, batches, version_conflicts, noops, retries, failures } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:134 + +___ + +### find + +ā–ø **find**<`T`, `A`\>(`options`): `Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<`T`, `A`\>\> + +**`property`** {(string|Array)} [options.type] + +**`property`** {string} [options.search] + +**`property`** {string} [options.defaultSearchOperator] + +**`property`** {Array} [options.searchFields] - see Elasticsearch Simple Query String + Query field argument for more information + +**`property`** {integer} [options.page=1] + +**`property`** {integer} [options.perPage=20] + +**`property`** {Array} [options.searchAfter] + +**`property`** {string} [options.sortField] + +**`property`** {string} [options.sortOrder] + +**`property`** {Array} [options.fields] + +**`property`** {string} [options.namespace] + +**`property`** {object} [options.hasReference] - { type, id } + +**`property`** {string} [options.pit] + +**`property`** {string} [options.preference] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | +| `A` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`SavedObjectsFindOptions`](../interfaces/client._internal_namespace.SavedObjectsFindOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsFindResponse`](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md)<`T`, `A`\>\> + +- { saved_objects: [{ id, type, version, attributes }], total, per_page, page } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:154 + +___ + +### get + +ā–ø **get**<`T`\>(`type`, `id`, `options?`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +Gets a single object + +**`property`** {string} [options.namespace] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +- { id, type, version, attributes } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:194 + +___ + +### incrementCounter + +ā–ø **incrementCounter**<`T`\>(`type`, `id`, `counterFields`, `options?`): `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +Increments all the specified counter fields (by one by default). Creates the document +if one doesn't exist for the given id. + +**`remarks`** +When supplying a field name like `stats.api.counter` the field name will +be used as-is to create a document like: + `{attributes: {'stats.api.counter': 1}}` +It will not create a nested structure like: + `{attributes: {stats: {api: {counter: 1}}}}` + +When using incrementCounter for collecting usage data, you need to ensure +that usage collection happens on a best-effort basis and doesn't +negatively affect your plugin or users. See https://github.com/elastic/kibana/blob/main/src/plugins/usage_collection/README.mdx#tracking-interactions-with-incrementcounter) + +**`example`** +```ts +const repository = coreStart.savedObjects.createInternalRepository(); + +// Initialize all fields to 0 +repository + .incrementCounter('dashboard_counter_type', 'counter_id', [ + 'stats.apiCalls', + 'stats.sampleDataInstalled', + ], {initialize: true}); + +// Increment the apiCalls field counter +repository + .incrementCounter('dashboard_counter_type', 'counter_id', [ + 'stats.apiCalls', + ]) + +// Increment the apiCalls field counter by 4 +repository + .incrementCounter('dashboard_counter_type', 'counter_id', [ + { fieldName: 'stats.apiCalls' incrementBy: 4 }, + ]) + +// Initialize the document with arbitrary fields if not present +repository.incrementCounter<{ appId: string }>( + 'dashboard_counter_type', + 'counter_id', + [ 'stats.apiCalls'], + { upsertAttributes: { appId: 'myId' } } +) +``` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `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` | (`string` \| [`SavedObjectsIncrementCounterField`](../interfaces/client._internal_namespace.SavedObjectsIncrementCounterField.md))[] | An array of field names to increment or an array of [SavedObjectsIncrementCounterField](../interfaces/client._internal_namespace.SavedObjectsIncrementCounterField.md) | +| `options?` | [`SavedObjectsIncrementCounterOptions`](../interfaces/client._internal_namespace.SavedObjectsIncrementCounterOptions.md)<`T`\> | [SavedObjectsIncrementCounterOptions](../interfaces/client._internal_namespace.SavedObjectsIncrementCounterOptions.md) | + +#### Returns + +`Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>\> + +The saved object after the specified fields were incremented + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:303 + +___ + +### openPointInTimeForType + +ā–ø **openPointInTimeForType**(`type`, `[options]?`): `Promise`<[`SavedObjectsOpenPointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md)\> + +Opens a Point In Time (PIT) against the indices for the specified Saved Object types. +The returned `id` can then be passed to `SavedObjects.find` to search against that PIT. + +Only use this API if you have an advanced use case that's not solved by the +[SavedObjectsRepository.createPointInTimeFinder](client._internal_namespace.SavedObjectsRepository.md#createpointintimefinder) method. + +**`example`** +```ts +const { id } = await savedObjectsClient.openPointInTimeForType( + type: 'visualization', + { keepAlive: '5m' }, +); +const page1 = await savedObjectsClient.find({ + type: 'visualization', + sortField: 'updated_at', + sortOrder: 'asc', + pit: { id, keepAlive: '2m' }, +}); +const lastHit = page1.saved_objects[page1.saved_objects.length - 1]; +const page2 = await savedObjectsClient.find({ + type: 'visualization', + sortField: 'updated_at', + sortOrder: 'asc', + pit: { id: page1.pit_id }, + searchAfter: lastHit.sort, +}); +await savedObjectsClient.closePointInTime(page2.pit_id); +``` + +**`property`** {string} [options.keepAlive] + +**`property`** {string} [options.preference] + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `type` | `string` \| `string`[] | | +| `[options]?` | [`SavedObjectsOpenPointInTimeOptions`](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md) | [SavedObjectsOpenPointInTimeOptions](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsOpenPointInTimeResponse`](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md)\> + +- { id: string } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:342 + +___ + +### removeReferencesTo + +ā–ø **removeReferencesTo**(`type`, `id`, `options?`): `Promise`<[`SavedObjectsRemoveReferencesToResponse`](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md)\> + +Updates all objects containing a reference to the given {type, id} tuple to remove the said reference. + +**`remarks`** Will throw a conflict error if the `update_by_query` operation returns any failure. In that case + some references might have been removed, and some were not. It is the caller's responsibility + to handle and fix this situation if it was to happen. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `options?` | [`SavedObjectsRemoveReferencesToOptions`](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsRemoveReferencesToResponse`](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:249 + +___ + +### resolve + +ā–ø **resolve**<`T`\>(`type`, `id`, `options?`): `Promise`<[`SavedObjectsResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsResolveResponse.md)<`T`\>\> + +Resolves a single object, using any legacy URL alias if it exists + +**`property`** {string} [options.namespace] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `options?` | [`SavedObjectsBaseOptions`](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsResolveResponse`](../interfaces/client._internal_namespace.SavedObjectsResolveResponse.md)<`T`\>\> + +- { saved_object, outcome } + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:204 + +___ + +### update + +ā–ø **update**<`T`\>(`type`, `id`, `attributes`, `options?`): `Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<`T`\>\> + +Updates an object + +**`property`** {string} options.version - ensures version matches that of persisted object + +**`property`** {string} [options.namespace] + +**`property`** {array} [options.references] - [{ name, type, id }] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `attributes` | `Partial`<`T`\> | +| `options?` | [`SavedObjectsUpdateOptions`](../interfaces/client._internal_namespace.SavedObjectsUpdateOptions.md)<`T`\> | + +#### Returns + +`Promise`<[`SavedObjectsUpdateResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md)<`T`\>\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:216 + +___ + +### updateObjectsSpaces + +ā–ø **updateObjectsSpaces**(`objects`, `spacesToAdd`, `spacesToRemove`, `options?`): `Promise`<[`SavedObjectsUpdateObjectsSpacesResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md)\> + +Updates one or more objects to add and/or remove them from specified spaces. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `objects` | [`SavedObjectsUpdateObjectsSpacesObject`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md)[] | +| `spacesToAdd` | `string`[] | +| `spacesToRemove` | `string`[] | +| `options?` | [`SavedObjectsUpdateObjectsSpacesOptions`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md) | + +#### Returns + +`Promise`<[`SavedObjectsUpdateObjectsSpacesResponse`](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:232 + +___ + +### createRepository + +ā–ø `Static` **createRepository**(`migrator`, `typeRegistry`, `indexName`, `client`, `logger`, `includedHiddenTypes?`, `injectedConstructor?`): [`ISavedObjectsRepository`](../modules/client._internal_namespace.md#isavedobjectsrepository) + +A factory function for creating SavedObjectRepository instances. + +**`internalremarks`** +Tests are located in ./repository_create_repository.test.ts + +**`internal`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `migrator` | [`IKibanaMigrator`](../modules/client._internal_namespace.md#ikibanamigrator) | +| `typeRegistry` | [`ISavedObjectTypeRegistry`](../modules/client._internal_namespace.md#isavedobjecttyperegistry) | +| `indexName` | `string` | +| `client` | [`ElasticsearchClient`](../modules/client._internal_namespace.md#elasticsearchclient) | +| `logger` | `Logger` | +| `includedHiddenTypes?` | `string`[] | +| `injectedConstructor?` | `any` | + +#### Returns + +[`ISavedObjectsRepository`](../modules/client._internal_namespace.md#isavedobjectsrepository) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:87 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SpaceActions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SpaceActions.md new file mode 100644 index 0000000000000..b39329e27b8ba --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SpaceActions.md @@ -0,0 +1,59 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SpaceActions + +# Class: SpaceActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SpaceActions + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.SpaceActions.md#constructor) + +### Properties + +- [prefix](client._internal_namespace.SpaceActions.md#prefix) + +### Accessors + +- [manage](client._internal_namespace.SpaceActions.md#manage) + +## Constructors + +### constructor + +ā€¢ **new SpaceActions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/space.d.ts:3 + +## Properties + +### prefix + +ā€¢ `Private` `Readonly` **prefix**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/space.d.ts:2 + +## Accessors + +### manage + +ā€¢ `get` **manage**(): `string` + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/space.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SubFeature.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SubFeature.md new file mode 100644 index 0000000000000..4e300b2231285 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.SubFeature.md @@ -0,0 +1,97 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SubFeature + +# Class: SubFeature + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SubFeature + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.SubFeature.md#constructor) + +### Properties + +- [config](client._internal_namespace.SubFeature.md#config) + +### Accessors + +- [name](client._internal_namespace.SubFeature.md#name) +- [privilegeGroups](client._internal_namespace.SubFeature.md#privilegegroups) + +### Methods + +- [toRaw](client._internal_namespace.SubFeature.md#toraw) + +## Constructors + +### constructor + +ā€¢ **new SubFeature**(`config`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | `Readonly`<{ `name`: `string` ; `privilegeGroups`: readonly `Readonly`<{ groupType: SubFeaturePrivilegeGroupType; privileges: readonly Readonly<{ id: string; name: string; includeIn: "all" \| "none" \| "read"; minimumLicense?: "basic" \| "standard" \| ... 4 more ... \| undefined; ... 9 more ...; ui: readonly string[]; }\>[]; }\>[] }\> | + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:66 + +## Properties + +### config + +ā€¢ `Protected` `Readonly` **config**: `Readonly`<{ `name`: `string` ; `privilegeGroups`: readonly `Readonly`<{ groupType: SubFeaturePrivilegeGroupType; privileges: readonly Readonly<{ id: string; name: string; includeIn: "all" \| "none" \| "read"; minimumLicense?: "basic" \| "standard" \| ... 4 more ... \| undefined; ... 9 more ...; ui: readonly string[]; }\>[]; }\>[] }\> + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:65 + +## Accessors + +### name + +ā€¢ `get` **name**(): `string` + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:67 + +___ + +### privilegeGroups + +ā€¢ `get` **privilegeGroups**(): readonly `Readonly`<{ `groupType`: [`SubFeaturePrivilegeGroupType`](../modules/client._internal_namespace.md#subfeatureprivilegegrouptype) ; `privileges`: readonly Readonly<{ id: string; name: string; includeIn: "all" \| "none" \| "read"; minimumLicense?: "basic" \| "standard" \| "gold" \| "platinum" \| "enterprise" \| "trial" \| undefined; management?: Readonly<{ [x: string]: readonly string[]; }\> \| undefined; ... 8 more ...; savedObject: Readonly<...\>; }\>[] }\>[] + +#### Returns + +readonly `Readonly`<{ `groupType`: [`SubFeaturePrivilegeGroupType`](../modules/client._internal_namespace.md#subfeatureprivilegegrouptype) ; `privileges`: readonly Readonly<{ id: string; name: string; includeIn: "all" \| "none" \| "read"; minimumLicense?: "basic" \| "standard" \| "gold" \| "platinum" \| "enterprise" \| "trial" \| undefined; management?: Readonly<{ [x: string]: readonly string[]; }\> \| undefined; ... 8 more ...; savedObject: Readonly<...\>; }\>[] }\>[] + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:68 + +## Methods + +### toRaw + +ā–ø **toRaw**(): `Object` + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `name` | `string` | +| `privilegeGroups` | readonly `Readonly`<{ `groupType`: [`SubFeaturePrivilegeGroupType`](../modules/client._internal_namespace.md#subfeatureprivilegegrouptype) ; `privileges`: readonly Readonly<{ id: string; name: string; includeIn: "all" \| "none" \| "read"; minimumLicense?: "basic" \| "standard" \| "gold" \| "platinum" \| "enterprise" \| "trial" \| undefined; management?: Readonly<{ [x: string]: readonly string[]; }\> \| undefined; ... 8 more ...; savedObject: Readonly<...\>; }\>[] }\>[] | + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:104 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.TaskRunnerFactory.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.TaskRunnerFactory.md new file mode 100644 index 0000000000000..7aed74f96c698 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.TaskRunnerFactory.md @@ -0,0 +1,114 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TaskRunnerFactory + +# Class: TaskRunnerFactory + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TaskRunnerFactory + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.TaskRunnerFactory.md#constructor) + +### Properties + +- [actionExecutor](client._internal_namespace.TaskRunnerFactory.md#actionexecutor) +- [isInitialized](client._internal_namespace.TaskRunnerFactory.md#isinitialized) +- [taskRunnerContext](client._internal_namespace.TaskRunnerFactory.md#taskrunnercontext) + +### Methods + +- [create](client._internal_namespace.TaskRunnerFactory.md#create) +- [initialize](client._internal_namespace.TaskRunnerFactory.md#initialize) + +## Constructors + +### constructor + +ā€¢ **new TaskRunnerFactory**(`actionExecutor`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionExecutor` | [`ActionExecutorContract`](../modules/client._internal_namespace.md#actionexecutorcontract) | + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:18 + +## Properties + +### actionExecutor + +ā€¢ `Private` `Readonly` **actionExecutor**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:17 + +___ + +### isInitialized + +ā€¢ `Private` **isInitialized**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:15 + +___ + +### taskRunnerContext + +ā€¢ `Private` `Optional` **taskRunnerContext**: `any` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:16 + +## Methods + +### create + +ā–ø **create**(`__namedParameters`, `maxAttempts?`): `Object` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`RunContext`](../interfaces/client._internal_namespace.RunContext.md) | +| `maxAttempts?` | `number` | + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `cancel` | () => `Promise`<{ `state`: {} }\> | +| `run` | () => `Promise`<`void`\> | + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:20 + +___ + +### initialize + +ā–ø **initialize**(`taskRunnerContext`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `taskRunnerContext` | [`TaskRunnerContext`](../interfaces/client._internal_namespace.TaskRunnerContext.md) | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:19 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.UIActions.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.UIActions.md new file mode 100644 index 0000000000000..8f74b5fff8806 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.UIActions.md @@ -0,0 +1,66 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UIActions + +# Class: UIActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UIActions + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.UIActions.md#constructor) + +### Properties + +- [prefix](client._internal_namespace.UIActions.md#prefix) + +### Methods + +- [get](client._internal_namespace.UIActions.md#get) + +## Constructors + +### constructor + +ā€¢ **new UIActions**(`versionNumber`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `versionNumber` | `string` | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/ui.d.ts:4 + +## Properties + +### prefix + +ā€¢ `Private` `Readonly` **prefix**: `any` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/ui.d.ts:3 + +## Methods + +### get + +ā–ø **get**(`featureId`, ...`uiCapabilityParts`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `featureId` | keyof [`Capabilities`](../interfaces/client._internal_namespace.Capabilities.md) | +| `...uiCapabilityParts` | `string`[] | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/actions/ui.d.ts:5 diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.UserActionBuilder.md b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.UserActionBuilder.md new file mode 100644 index 0000000000000..361d5e50fd923 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/classes/client._internal_namespace.UserActionBuilder.md @@ -0,0 +1,251 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UserActionBuilder + +# Class: UserActionBuilder + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UserActionBuilder + +## Table of contents + +### Constructors + +- [constructor](client._internal_namespace.UserActionBuilder.md#constructor) + +### Methods + +- [build](client._internal_namespace.UserActionBuilder.md#build) +- [buildCommonUserAction](client._internal_namespace.UserActionBuilder.md#buildcommonuseraction) +- [createActionReference](client._internal_namespace.UserActionBuilder.md#createactionreference) +- [createCaseReferences](client._internal_namespace.UserActionBuilder.md#createcasereferences) +- [createCommentReferences](client._internal_namespace.UserActionBuilder.md#createcommentreferences) +- [createConnectorPushReference](client._internal_namespace.UserActionBuilder.md#createconnectorpushreference) +- [createConnectorReference](client._internal_namespace.UserActionBuilder.md#createconnectorreference) +- [extractConnectorId](client._internal_namespace.UserActionBuilder.md#extractconnectorid) +- [extractConnectorIdFromExternalService](client._internal_namespace.UserActionBuilder.md#extractconnectoridfromexternalservice) +- [getCommonUserActionAttributes](client._internal_namespace.UserActionBuilder.md#getcommonuseractionattributes) + +## Constructors + +### constructor + +ā€¢ **new UserActionBuilder**() + +## Methods + +### build + +ā–ø `Abstract` **build**<`T`\>(`args`): [`BuilderReturnValue`](../interfaces/client._internal_namespace.BuilderReturnValue.md) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends keyof [`BuilderParameters`](../interfaces/client._internal_namespace.BuilderParameters.md) | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `args` | [`UserActionParameters`](../modules/client._internal_namespace.md#useractionparameters)<`T`\> | + +#### Returns + +[`BuilderReturnValue`](../interfaces/client._internal_namespace.BuilderReturnValue.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:119](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L119) + +___ + +### buildCommonUserAction + +ā–ø `Protected` **buildCommonUserAction**(`__namedParameters`): [`BuilderReturnValue`](../interfaces/client._internal_namespace.BuilderReturnValue.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CommonBuilderArguments`](../modules/client._internal_namespace.md#commonbuilderarguments) | + +#### Returns + +[`BuilderReturnValue`](../interfaces/client._internal_namespace.BuilderReturnValue.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:88](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L88) + +___ + +### createActionReference + +ā–ø `Protected` **createActionReference**(`id`, `name`): [`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | ``null`` \| `string` | +| `name` | `string` | + +#### Returns + +[`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:55](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L55) + +___ + +### createCaseReferences + +ā–ø `Protected` **createCaseReferences**(`caseId`): [`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `caseId` | `string` | + +#### Returns + +[`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:45](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L45) + +___ + +### createCommentReferences + +ā–ø `Protected` **createCommentReferences**(`id`): [`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | ``null`` \| `string` | + +#### Returns + +[`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:61](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L61) + +___ + +### createConnectorPushReference + +ā–ø `Protected` **createConnectorPushReference**(`id`): [`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | ``null`` \| `string` | + +#### Returns + +[`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:77](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L77) + +___ + +### createConnectorReference + +ā–ø `Protected` **createConnectorReference**(`id`): [`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | ``null`` \| `string` | + +#### Returns + +[`SavedObjectReference`](../interfaces/client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:73](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L73) + +___ + +### extractConnectorId + +ā–ø `Protected` **extractConnectorId**(`connector`): `Omit`<{ `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string }, ``"id"``\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `connector` | { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } | + +#### Returns + +`Omit`<{ `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string }, ``"id"``\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:40](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L40) + +___ + +### extractConnectorIdFromExternalService + +ā–ø `Protected` **extractConnectorIdFromExternalService**(`externalService`): `Omit`<{ `connector_id`: `string` = rt.string } & { `connector_name`: `string` = rt.string; `external_id`: `string` = rt.string; `external_title`: `string` = rt.string; `external_url`: `string` = rt.string; `pushed_at`: `string` = rt.string; `pushed_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT }, ``"connector_id"``\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `externalService` | { `connector_id`: `string` = rt.string } & { `connector_name`: `string` = rt.string; `external_id`: `string` = rt.string; `external_title`: `string` = rt.string; `external_url`: `string` = rt.string; `pushed_at`: `string` = rt.string; `pushed_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT } | + +#### Returns + +`Omit`<{ `connector_id`: `string` = rt.string } & { `connector_name`: `string` = rt.string; `external_id`: `string` = rt.string; `external_title`: `string` = rt.string; `external_url`: `string` = rt.string; `pushed_at`: `string` = rt.string; `pushed_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT }, ``"connector_id"``\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:81](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L81) + +___ + +### getCommonUserActionAttributes + +ā–ø `Protected` **getCommonUserActionAttributes**(`__namedParameters`): `Object` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.owner` | `string` | +| `__namedParameters.user` | `Object` | +| `__namedParameters.user.email` | `undefined` \| ``null`` \| `string` | +| `__namedParameters.user.full_name` | `undefined` \| ``null`` \| `string` | +| `__namedParameters.user.username` | `undefined` \| ``null`` \| `string` | + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `created_at` | `string` | +| `created_by` | `Object` | +| `created_by.email` | `undefined` \| ``null`` \| `string` | +| `created_by.full_name` | `undefined` \| ``null`` \| `string` | +| `created_by.username` | `undefined` \| ``null`` \| `string` | +| `owner` | `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts:32](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/abstract_builder.ts#L32) diff --git a/x-pack/plugins/cases/docs/cases_client/classes/client.casesclient.md b/x-pack/plugins/cases/docs/cases_client/classes/client.casesclient.md index b3bef7b36b571..d00f9f0edcd88 100644 --- a/x-pack/plugins/cases/docs/cases_client/classes/client.casesclient.md +++ b/x-pack/plugins/cases/docs/cases_client/classes/client.casesclient.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [client](../modules/client.md) / CasesClient +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / CasesClient # Class: CasesClient @@ -10,169 +10,205 @@ Client wrapper that contains accessor methods for individual entities within the ### Constructors -- [constructor](client.casesclient.md#constructor) +- [constructor](client.CasesClient.md#constructor) ### Properties -- [\_attachments](client.casesclient.md#_attachments) -- [\_cases](client.casesclient.md#_cases) -- [\_casesClientInternal](client.casesclient.md#_casesclientinternal) -- [\_configure](client.casesclient.md#_configure) -- [\_stats](client.casesclient.md#_stats) -- [\_subCases](client.casesclient.md#_subcases) -- [\_userActions](client.casesclient.md#_useractions) +- [\_attachments](client.CasesClient.md#_attachments) +- [\_cases](client.CasesClient.md#_cases) +- [\_casesClientInternal](client.CasesClient.md#_casesclientinternal) +- [\_configure](client.CasesClient.md#_configure) +- [\_metrics](client.CasesClient.md#_metrics) +- [\_stats](client.CasesClient.md#_stats) +- [\_userActions](client.CasesClient.md#_useractions) ### Accessors -- [attachments](client.casesclient.md#attachments) -- [cases](client.casesclient.md#cases) -- [configure](client.casesclient.md#configure) -- [stats](client.casesclient.md#stats) -- [subCases](client.casesclient.md#subcases) -- [userActions](client.casesclient.md#useractions) +- [attachments](client.CasesClient.md#attachments) +- [cases](client.CasesClient.md#cases) +- [configure](client.CasesClient.md#configure) +- [metrics](client.CasesClient.md#metrics) +- [stats](client.CasesClient.md#stats) +- [userActions](client.CasesClient.md#useractions) ## Constructors ### constructor -\+ **new CasesClient**(`args`: CasesClientArgs): [*CasesClient*](client.casesclient.md) +ā€¢ **new CasesClient**(`args`) #### Parameters | Name | Type | | :------ | :------ | -| `args` | CasesClientArgs | +| `args` | [`CasesClientArgs`](../interfaces/client._internal_namespace.CasesClientArgs.md) | -**Returns:** [*CasesClient*](client.casesclient.md) +#### Defined in -Defined in: [client.ts:28](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L28) +[x-pack/plugins/cases/server/client/client.ts:29](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L29) ## Properties ### \_attachments -ā€¢ `Private` `Readonly` **\_attachments**: [*AttachmentsSubClient*](../interfaces/attachments_client.attachmentssubclient.md) +ā€¢ `Private` `Readonly` **\_attachments**: [`AttachmentsSubClient`](../interfaces/attachments_client.AttachmentsSubClient.md) -Defined in: [client.ts:24](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L24) +#### Defined in + +[x-pack/plugins/cases/server/client/client.ts:23](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L23) ___ ### \_cases -ā€¢ `Private` `Readonly` **\_cases**: [*CasesSubClient*](../interfaces/cases_client.casessubclient.md) +ā€¢ `Private` `Readonly` **\_cases**: [`CasesSubClient`](../interfaces/cases_client.CasesSubClient.md) + +#### Defined in -Defined in: [client.ts:23](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L23) +[x-pack/plugins/cases/server/client/client.ts:22](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L22) ___ ### \_casesClientInternal -ā€¢ `Private` `Readonly` **\_casesClientInternal**: *CasesClientInternal* +ā€¢ `Private` `Readonly` **\_casesClientInternal**: [`CasesClientInternal`](client._internal_namespace.CasesClientInternal.md) + +#### Defined in -Defined in: [client.ts:22](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L22) +[x-pack/plugins/cases/server/client/client.ts:21](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L21) ___ ### \_configure -ā€¢ `Private` `Readonly` **\_configure**: [*ConfigureSubClient*](../interfaces/configure_client.configuresubclient.md) +ā€¢ `Private` `Readonly` **\_configure**: [`ConfigureSubClient`](../interfaces/configure_client.ConfigureSubClient.md) -Defined in: [client.ts:27](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L27) +#### Defined in + +[x-pack/plugins/cases/server/client/client.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L25) ___ -### \_stats +### \_metrics + +ā€¢ `Private` `Readonly` **\_metrics**: [`MetricsSubClient`](../interfaces/metrics_client.MetricsSubClient.md) -ā€¢ `Private` `Readonly` **\_stats**: [*StatsSubClient*](../interfaces/stats_client.statssubclient.md) +#### Defined in -Defined in: [client.ts:28](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L28) +[x-pack/plugins/cases/server/client/client.ts:27](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L27) ___ -### \_subCases +### \_stats + +ā€¢ `Private` `Readonly` **\_stats**: [`StatsSubClient`](../interfaces/stats_client.StatsSubClient.md) -ā€¢ `Private` `Readonly` **\_subCases**: [*SubCasesClient*](../interfaces/sub_cases_client.subcasesclient.md) +#### Defined in -Defined in: [client.ts:26](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L26) +[x-pack/plugins/cases/server/client/client.ts:26](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L26) ___ ### \_userActions -ā€¢ `Private` `Readonly` **\_userActions**: [*UserActionsSubClient*](../interfaces/user_actions_client.useractionssubclient.md) +ā€¢ `Private` `Readonly` **\_userActions**: [`UserActionsSubClient`](../interfaces/user_actions_client.UserActionsSubClient.md) + +#### Defined in -Defined in: [client.ts:25](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L25) +[x-pack/plugins/cases/server/client/client.ts:24](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L24) ## Accessors ### attachments -ā€¢ get **attachments**(): [*AttachmentsSubClient*](../interfaces/attachments_client.attachmentssubclient.md) +ā€¢ `get` **attachments**(): [`AttachmentsSubClient`](../interfaces/attachments_client.AttachmentsSubClient.md) Retrieves an interface for interacting with attachments (comments) entities. -**Returns:** [*AttachmentsSubClient*](../interfaces/attachments_client.attachmentssubclient.md) +#### Returns -Defined in: [client.ts:50](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L50) +[`AttachmentsSubClient`](../interfaces/attachments_client.AttachmentsSubClient.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/client.ts:49](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L49) ___ ### cases -ā€¢ get **cases**(): [*CasesSubClient*](../interfaces/cases_client.casessubclient.md) +ā€¢ `get` **cases**(): [`CasesSubClient`](../interfaces/cases_client.CasesSubClient.md) Retrieves an interface for interacting with cases entities. -**Returns:** [*CasesSubClient*](../interfaces/cases_client.casessubclient.md) +#### Returns + +[`CasesSubClient`](../interfaces/cases_client.CasesSubClient.md) -Defined in: [client.ts:43](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L43) +#### Defined in + +[x-pack/plugins/cases/server/client/client.ts:42](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L42) ___ ### configure -ā€¢ get **configure**(): [*ConfigureSubClient*](../interfaces/configure_client.configuresubclient.md) +ā€¢ `get` **configure**(): [`ConfigureSubClient`](../interfaces/configure_client.ConfigureSubClient.md) Retrieves an interface for interacting with the configuration of external connectors for the plugin entities. -**Returns:** [*ConfigureSubClient*](../interfaces/configure_client.configuresubclient.md) +#### Returns + +[`ConfigureSubClient`](../interfaces/configure_client.ConfigureSubClient.md) + +#### Defined in -Defined in: [client.ts:76](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L76) +[x-pack/plugins/cases/server/client/client.ts:63](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L63) ___ -### stats +### metrics -ā€¢ get **stats**(): [*StatsSubClient*](../interfaces/stats_client.statssubclient.md) +ā€¢ `get` **metrics**(): [`MetricsSubClient`](../interfaces/metrics_client.MetricsSubClient.md) -Retrieves an interface for retrieving statistics related to the cases entities. +Retrieves an interface for retrieving metrics related to the cases entities. + +#### Returns -**Returns:** [*StatsSubClient*](../interfaces/stats_client.statssubclient.md) +[`MetricsSubClient`](../interfaces/metrics_client.MetricsSubClient.md) -Defined in: [client.ts:83](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L83) +#### Defined in + +[x-pack/plugins/cases/server/client/client.ts:77](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L77) ___ -### subCases +### stats + +ā€¢ `get` **stats**(): [`StatsSubClient`](../interfaces/stats_client.StatsSubClient.md) -ā€¢ get **subCases**(): [*SubCasesClient*](../interfaces/sub_cases_client.subcasesclient.md) +Retrieves an interface for retrieving statistics related to the cases entities. -Retrieves an interface for interacting with the case as a connector entities. +#### Returns -Currently this functionality is disabled and will throw an error if this function is called. +[`StatsSubClient`](../interfaces/stats_client.StatsSubClient.md) -**Returns:** [*SubCasesClient*](../interfaces/sub_cases_client.subcasesclient.md) +#### Defined in -Defined in: [client.ts:66](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L66) +[x-pack/plugins/cases/server/client/client.ts:70](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L70) ___ ### userActions -ā€¢ get **userActions**(): [*UserActionsSubClient*](../interfaces/user_actions_client.useractionssubclient.md) +ā€¢ `get` **userActions**(): [`UserActionsSubClient`](../interfaces/user_actions_client.UserActionsSubClient.md) Retrieves an interface for interacting with the user actions associated with the plugin entities. -**Returns:** [*UserActionsSubClient*](../interfaces/user_actions_client.useractionssubclient.md) +#### Returns + +[`UserActionsSubClient`](../interfaces/user_actions_client.UserActionsSubClient.md) + +#### Defined in -Defined in: [client.ts:57](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/client.ts#L57) +[x-pack/plugins/cases/server/client/client.ts:56](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/client.ts#L56) diff --git a/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.ActionExecutionSourceType.md b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.ActionExecutionSourceType.md new file mode 100644 index 0000000000000..9d4fbc639a26c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.ActionExecutionSourceType.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionExecutionSourceType + +# Enumeration: ActionExecutionSourceType + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionExecutionSourceType + +## Table of contents + +### Enumeration members + +- [HTTP\_REQUEST](client._internal_namespace.ActionExecutionSourceType.md#http_request) +- [SAVED\_OBJECT](client._internal_namespace.ActionExecutionSourceType.md#saved_object) + +## Enumeration members + +### HTTP\_REQUEST + +ā€¢ **HTTP\_REQUEST** = `"HTTP_REQUEST"` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_execution_source.d.ts:4 + +___ + +### SAVED\_OBJECT + +ā€¢ **SAVED\_OBJECT** = `"SAVED_OBJECT"` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_execution_source.d.ts:3 diff --git a/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.AuthorizationMode.md b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.AuthorizationMode.md new file mode 100644 index 0000000000000..f1dc071f463d6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.AuthorizationMode.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuthorizationMode + +# Enumeration: AuthorizationMode + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuthorizationMode + +## Table of contents + +### Enumeration members + +- [Legacy](client._internal_namespace.AuthorizationMode.md#legacy) +- [RBAC](client._internal_namespace.AuthorizationMode.md#rbac) + +## Enumeration members + +### Legacy + +ā€¢ **Legacy** = `0` + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/get_authorization_mode_by_source.d.ts:4 + +___ + +### RBAC + +ā€¢ **RBAC** = `1` + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/get_authorization_mode_by_source.d.ts:5 diff --git a/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.CaseStatuses.md b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.CaseStatuses.md new file mode 100644 index 0000000000000..48d5689a52400 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.CaseStatuses.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CaseStatuses + +# Enumeration: CaseStatuses + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CaseStatuses + +## Table of contents + +### Enumeration members + +- [closed](client._internal_namespace.CaseStatuses.md#closed) +- [in-progress](client._internal_namespace.CaseStatuses.md#in-progress) +- [open](client._internal_namespace.CaseStatuses.md#open) + +## Enumeration members + +### closed + +ā€¢ **closed** = `"closed"` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/status.ts:13](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/status.ts#L13) + +___ + +### in-progress + +ā€¢ **in-progress** = `"in-progress"` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/status.ts:12](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/status.ts#L12) + +___ + +### open + +ā€¢ **open** = `"open"` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/status.ts:11](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/status.ts#L11) diff --git a/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.TaskStatus.md b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.TaskStatus.md new file mode 100644 index 0000000000000..a92a96681e137 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.TaskStatus.md @@ -0,0 +1,65 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TaskStatus + +# Enumeration: TaskStatus + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TaskStatus + +## Table of contents + +### Enumeration members + +- [Claiming](client._internal_namespace.TaskStatus.md#claiming) +- [Failed](client._internal_namespace.TaskStatus.md#failed) +- [Idle](client._internal_namespace.TaskStatus.md#idle) +- [Running](client._internal_namespace.TaskStatus.md#running) +- [Unrecognized](client._internal_namespace.TaskStatus.md#unrecognized) + +## Enumeration members + +### Claiming + +ā€¢ **Claiming** = `"claiming"` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:124 + +___ + +### Failed + +ā€¢ **Failed** = `"failed"` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:126 + +___ + +### Idle + +ā€¢ **Idle** = `"idle"` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:123 + +___ + +### Running + +ā€¢ **Running** = `"running"` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:125 + +___ + +### Unrecognized + +ā€¢ **Unrecognized** = `"unrecognized"` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:127 diff --git a/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.ViewMode.md b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.ViewMode.md new file mode 100644 index 0000000000000..c00d063ffc864 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/enums/client._internal_namespace.ViewMode.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ViewMode + +# Enumeration: ViewMode + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ViewMode + +## Table of contents + +### Enumeration members + +- [EDIT](client._internal_namespace.ViewMode.md#edit) +- [PREVIEW](client._internal_namespace.ViewMode.md#preview) +- [PRINT](client._internal_namespace.ViewMode.md#print) +- [VIEW](client._internal_namespace.ViewMode.md#view) + +## Enumeration members + +### EDIT + +ā€¢ **EDIT** = `"edit"` + +#### Defined in + +src/plugins/embeddable/target/types/common/types.d.ts:5 + +___ + +### PREVIEW + +ā€¢ **PREVIEW** = `"preview"` + +#### Defined in + +src/plugins/embeddable/target/types/common/types.d.ts:6 + +___ + +### PRINT + +ā€¢ **PRINT** = `"print"` + +#### Defined in + +src/plugins/embeddable/target/types/common/types.d.ts:7 + +___ + +### VIEW + +ā€¢ **VIEW** = `"view"` + +#### Defined in + +src/plugins/embeddable/target/types/common/types.d.ts:8 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_add.addargs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_add.addargs.md deleted file mode 100644 index 0fafb377bcc41..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_add.addargs.md +++ /dev/null @@ -1,34 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/add](../modules/attachments_add.md) / AddArgs - -# Interface: AddArgs - -[attachments/add](../modules/attachments_add.md).AddArgs - -The arguments needed for creating a new attachment to a case. - -## Table of contents - -### Properties - -- [caseId](attachments_add.addargs.md#caseid) -- [comment](attachments_add.addargs.md#comment) - -## Properties - -### caseId - -ā€¢ **caseId**: *string* - -The case ID that this attachment will be associated with - -Defined in: [attachments/add.ts:305](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/add.ts#L305) - -___ - -### comment - -ā€¢ **comment**: { `comment`: *string* ; `owner`: *string* ; `type`: user } \| { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } - -The attachment values. - -Defined in: [attachments/add.ts:309](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/add.ts#L309) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.AddArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.AddArgs.md new file mode 100644 index 0000000000000..b1a96017c439b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.AddArgs.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / AddArgs + +# Interface: AddArgs + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).AddArgs + +The arguments needed for creating a new attachment to a case. + +## Table of contents + +### Properties + +- [caseId](attachments_client._internal_namespace.AddArgs.md#caseid) +- [comment](attachments_client._internal_namespace.AddArgs.md#comment) + +## Properties + +### caseId + +ā€¢ **caseId**: `string` + +The case ID that this attachment will be associated with + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/add.ts:77](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/add.ts#L77) + +___ + +### comment + +ā€¢ **comment**: { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } + +The attachment values. + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/add.ts:81](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/add.ts#L81) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.DeleteAllArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.DeleteAllArgs.md new file mode 100644 index 0000000000000..d2f34ab040eb3 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.DeleteAllArgs.md @@ -0,0 +1,25 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / DeleteAllArgs + +# Interface: DeleteAllArgs + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).DeleteAllArgs + +Parameters for deleting all comments of a case. + +## Table of contents + +### Properties + +- [caseID](attachments_client._internal_namespace.DeleteAllArgs.md#caseid) + +## Properties + +### caseID + +ā€¢ **caseID**: `string` + +The case ID to delete all attachments for + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/delete.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/delete.ts#L25) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.DeleteArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.DeleteArgs.md new file mode 100644 index 0000000000000..0bee9af6c4f24 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.DeleteArgs.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / DeleteArgs + +# Interface: DeleteArgs + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).DeleteArgs + +Parameters for deleting a single attachment of a case. + +## Table of contents + +### Properties + +- [attachmentID](attachments_client._internal_namespace.DeleteArgs.md#attachmentid) +- [caseID](attachments_client._internal_namespace.DeleteArgs.md#caseid) + +## Properties + +### attachmentID + +ā€¢ **attachmentID**: `string` + +The attachment ID to delete + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/delete.ts:39](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/delete.ts#L39) + +___ + +### caseID + +ā€¢ **caseID**: `string` + +The case ID to delete an attachment from + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/delete.ts:35](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/delete.ts#L35) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.FindArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.FindArgs.md new file mode 100644 index 0000000000000..2fd5a356bc6f5 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.FindArgs.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / FindArgs + +# Interface: FindArgs + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).FindArgs + +Parameters for finding attachments of a case + +## Table of contents + +### Properties + +- [caseID](attachments_client._internal_namespace.FindArgs.md#caseid) +- [queryParams](attachments_client._internal_namespace.FindArgs.md#queryparams) + +## Properties + +### caseID + +ā€¢ **caseID**: `string` + +The case ID for finding associated attachments + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/get.ts:42](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/get.ts#L42) + +___ + +### queryParams + +ā€¢ `Optional` **queryParams**: `Object` + +Optional parameters for filtering the returned attachments + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `defaultSearchOperator` | `undefined` \| ``"AND"`` \| ``"OR"`` | +| `fields` | `undefined` \| `string`[] | +| `filter` | `undefined` \| `string` | +| `hasReference` | `undefined` \| { `id`: `string` = rt.string; `type`: `string` = rt.string } \| { `id`: `string` = rt.string; `type`: `string` = rt.string }[] | +| `hasReferenceOperator` | `undefined` \| ``"AND"`` \| ``"OR"`` | +| `page` | `undefined` \| `number` | +| `perPage` | `undefined` \| `number` | +| `search` | `undefined` \| `string` | +| `searchFields` | `undefined` \| `string`[] | +| `sortField` | `undefined` \| `string` | +| `sortOrder` | `undefined` \| ``"desc"`` \| ``"asc"`` | + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/get.ts:46](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/get.ts#L46) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetAllAlertsAttachToCase.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetAllAlertsAttachToCase.md new file mode 100644 index 0000000000000..d45019010a3d6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetAllAlertsAttachToCase.md @@ -0,0 +1,23 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / GetAllAlertsAttachToCase + +# Interface: GetAllAlertsAttachToCase + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).GetAllAlertsAttachToCase + +## Table of contents + +### Properties + +- [caseId](attachments_client._internal_namespace.GetAllAlertsAttachToCase.md#caseid) + +## Properties + +### caseId + +ā€¢ **caseId**: `string` + +The ID of the case to retrieve the alerts from + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/get.ts:74](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/get.ts#L74) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetAllArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetAllArgs.md new file mode 100644 index 0000000000000..f5ebbd40a2d08 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetAllArgs.md @@ -0,0 +1,25 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / GetAllArgs + +# Interface: GetAllArgs + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).GetAllArgs + +Parameters for retrieving all attachments of a case + +## Table of contents + +### Properties + +- [caseID](attachments_client._internal_namespace.GetAllArgs.md#caseid) + +## Properties + +### caseID + +ā€¢ **caseID**: `string` + +The case ID to retrieve all attachments for + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/get.ts:56](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/get.ts#L56) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetArgs.md new file mode 100644 index 0000000000000..8c36ea3ab2f12 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.GetArgs.md @@ -0,0 +1,36 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / GetArgs + +# Interface: GetArgs + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).GetArgs + +## Table of contents + +### Properties + +- [attachmentID](attachments_client._internal_namespace.GetArgs.md#attachmentid) +- [caseID](attachments_client._internal_namespace.GetArgs.md#caseid) + +## Properties + +### attachmentID + +ā€¢ **attachmentID**: `string` + +The ID of the attachment to retrieve + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/get.ts:67](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/get.ts#L67) + +___ + +### caseID + +ā€¢ **caseID**: `string` + +The ID of the case to retrieve an attachment from + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/get.ts:63](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/get.ts#L63) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.UpdateArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.UpdateArgs.md new file mode 100644 index 0000000000000..75650928ba124 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client._internal_namespace.UpdateArgs.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / [\_internal\_namespace](../modules/attachments_client._internal_namespace.md) / UpdateArgs + +# Interface: UpdateArgs + +[attachments/client](../modules/attachments_client.md).[_internal_namespace](../modules/attachments_client._internal_namespace.md).UpdateArgs + +Parameters for updating a single attachment + +## Table of contents + +### Properties + +- [caseID](attachments_client._internal_namespace.UpdateArgs.md#caseid) +- [updateRequest](attachments_client._internal_namespace.UpdateArgs.md#updaterequest) + +## Properties + +### caseID + +ā€¢ **caseID**: `string` + +The ID of the case that is associated with this attachment + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/update.ts:28](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/update.ts#L28) + +___ + +### updateRequest + +ā€¢ **updateRequest**: { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `id`: `string` = rt.string; `version`: `string` = rt.string } + +The full attachment request with the fields updated with appropriate values + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/update.ts:32](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/update.ts#L32) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client.attachmentssubclient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client.attachmentssubclient.md index ff9744583cfaf..04b77c2141ed8 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client.attachmentssubclient.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_client.attachmentssubclient.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/client](../modules/attachments_client.md) / AttachmentsSubClient +[Cases Client API Interface](../README.md) / [attachments/client](../modules/attachments_client.md) / AttachmentsSubClient # Interface: AttachmentsSubClient @@ -10,20 +10,20 @@ API for interacting with the attachments to a case. ### Methods -- [add](attachments_client.attachmentssubclient.md#add) -- [delete](attachments_client.attachmentssubclient.md#delete) -- [deleteAll](attachments_client.attachmentssubclient.md#deleteall) -- [find](attachments_client.attachmentssubclient.md#find) -- [get](attachments_client.attachmentssubclient.md#get) -- [getAll](attachments_client.attachmentssubclient.md#getall) -- [getAllAlertsAttachToCase](attachments_client.attachmentssubclient.md#getallalertsattachtocase) -- [update](attachments_client.attachmentssubclient.md#update) +- [add](attachments_client.AttachmentsSubClient.md#add) +- [delete](attachments_client.AttachmentsSubClient.md#delete) +- [deleteAll](attachments_client.AttachmentsSubClient.md#deleteall) +- [find](attachments_client.AttachmentsSubClient.md#find) +- [get](attachments_client.AttachmentsSubClient.md#get) +- [getAll](attachments_client.AttachmentsSubClient.md#getall) +- [getAllAlertsAttachToCase](attachments_client.AttachmentsSubClient.md#getallalertsattachtocase) +- [update](attachments_client.AttachmentsSubClient.md#update) ## Methods ### add -ā–ø **add**(`params`: [*AddArgs*](attachments_add.addargs.md)): *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +ā–ø **add**(`params`): `Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> Adds an attachment to a case. @@ -31,17 +31,21 @@ Adds an attachment to a case. | Name | Type | | :------ | :------ | -| `params` | [*AddArgs*](attachments_add.addargs.md) | +| `params` | [`AddArgs`](attachments_client._internal_namespace.AddArgs.md) | -**Returns:** *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +#### Returns -Defined in: [attachments/client.ts:35](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L35) +`Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/client.ts:35](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L35) ___ ### delete -ā–ø **delete**(`deleteArgs`: [*DeleteArgs*](attachments_delete.deleteargs.md)): *Promise* +ā–ø **delete**(`deleteArgs`): `Promise`<`void`\> Deletes a single attachment for a specific case. @@ -49,17 +53,21 @@ Deletes a single attachment for a specific case. | Name | Type | | :------ | :------ | -| `deleteArgs` | [*DeleteArgs*](attachments_delete.deleteargs.md) | +| `deleteArgs` | [`DeleteArgs`](attachments_client._internal_namespace.DeleteArgs.md) | + +#### Returns + +`Promise`<`void`\> -**Returns:** *Promise* +#### Defined in -Defined in: [attachments/client.ts:43](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L43) +[x-pack/plugins/cases/server/client/attachments/client.ts:43](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L43) ___ ### deleteAll -ā–ø **deleteAll**(`deleteAllArgs`: [*DeleteAllArgs*](attachments_delete.deleteallargs.md)): *Promise* +ā–ø **deleteAll**(`deleteAllArgs`): `Promise`<`void`\> Deletes all attachments associated with a single case. @@ -67,17 +75,21 @@ Deletes all attachments associated with a single case. | Name | Type | | :------ | :------ | -| `deleteAllArgs` | [*DeleteAllArgs*](attachments_delete.deleteallargs.md) | +| `deleteAllArgs` | [`DeleteAllArgs`](attachments_client._internal_namespace.DeleteAllArgs.md) | -**Returns:** *Promise* +#### Returns -Defined in: [attachments/client.ts:39](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L39) +`Promise`<`void`\> + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/client.ts:39](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L39) ___ ### find -ā–ø **find**(`findArgs`: [*FindArgs*](attachments_get.findargs.md)): *Promise*<[*ICommentsResponse*](typedoc_interfaces.icommentsresponse.md)\> +ā–ø **find**(`findArgs`): `Promise`<[`ICommentsResponse`](typedoc_interfaces.ICommentsResponse.md)\> Retrieves all comments matching the search criteria. @@ -85,17 +97,21 @@ Retrieves all comments matching the search criteria. | Name | Type | | :------ | :------ | -| `findArgs` | [*FindArgs*](attachments_get.findargs.md) | +| `findArgs` | [`FindArgs`](attachments_client._internal_namespace.FindArgs.md) | + +#### Returns + +`Promise`<[`ICommentsResponse`](typedoc_interfaces.ICommentsResponse.md)\> -**Returns:** *Promise*<[*ICommentsResponse*](typedoc_interfaces.icommentsresponse.md)\> +#### Defined in -Defined in: [attachments/client.ts:47](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L47) +[x-pack/plugins/cases/server/client/attachments/client.ts:47](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L47) ___ ### get -ā–ø **get**(`getArgs`: [*GetArgs*](attachments_get.getargs.md)): *Promise*<{ `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }\> +ā–ø **get**(`getArgs`): `Promise`<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string }\> Retrieves a single attachment for a case. @@ -103,17 +119,21 @@ Retrieves a single attachment for a case. | Name | Type | | :------ | :------ | -| `getArgs` | [*GetArgs*](attachments_get.getargs.md) | +| `getArgs` | [`GetArgs`](attachments_client._internal_namespace.GetArgs.md) | -**Returns:** *Promise*<{ `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }\> +#### Returns -Defined in: [attachments/client.ts:59](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L59) +`Promise`<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string }\> + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/client.ts:59](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L59) ___ ### getAll -ā–ø **getAll**(`getAllArgs`: [*GetAllArgs*](attachments_get.getallargs.md)): *Promise*<[*IAllCommentsResponse*](typedoc_interfaces.iallcommentsresponse.md)\> +ā–ø **getAll**(`getAllArgs`): `Promise`<[`IAllCommentsResponse`](typedoc_interfaces.IAllCommentsResponse.md)\> Gets all attachments for a single case. @@ -121,17 +141,21 @@ Gets all attachments for a single case. | Name | Type | | :------ | :------ | -| `getAllArgs` | [*GetAllArgs*](attachments_get.getallargs.md) | +| `getAllArgs` | [`GetAllArgs`](attachments_client._internal_namespace.GetAllArgs.md) | + +#### Returns + +`Promise`<[`IAllCommentsResponse`](typedoc_interfaces.IAllCommentsResponse.md)\> -**Returns:** *Promise*<[*IAllCommentsResponse*](typedoc_interfaces.iallcommentsresponse.md)\> +#### Defined in -Defined in: [attachments/client.ts:55](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L55) +[x-pack/plugins/cases/server/client/attachments/client.ts:55](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L55) ___ ### getAllAlertsAttachToCase -ā–ø **getAllAlertsAttachToCase**(`params`: [*GetAllAlertsAttachToCase*](attachments_get.getallalertsattachtocase.md)): *Promise*<{ `attached_at`: *string* ; `id`: *string* ; `index`: *string* }[]\> +ā–ø **getAllAlertsAttachToCase**(`params`): `Promise`<{ `attached_at`: `string` = rt.string; `id`: `string` = rt.string; `index`: `string` = rt.string }[]\> Retrieves all alerts attach to a case given a single case ID @@ -139,17 +163,21 @@ Retrieves all alerts attach to a case given a single case ID | Name | Type | | :------ | :------ | -| `params` | [*GetAllAlertsAttachToCase*](attachments_get.getallalertsattachtocase.md) | +| `params` | [`GetAllAlertsAttachToCase`](attachments_client._internal_namespace.GetAllAlertsAttachToCase.md) | -**Returns:** *Promise*<{ `attached_at`: *string* ; `id`: *string* ; `index`: *string* }[]\> +#### Returns -Defined in: [attachments/client.ts:51](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L51) +`Promise`<{ `attached_at`: `string` = rt.string; `id`: `string` = rt.string; `index`: `string` = rt.string }[]\> + +#### Defined in + +[x-pack/plugins/cases/server/client/attachments/client.ts:51](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L51) ___ ### update -ā–ø **update**(`updateArgs`: [*UpdateArgs*](attachments_update.updateargs.md)): *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +ā–ø **update**(`updateArgs`): `Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> Updates a specific attachment. @@ -159,8 +187,12 @@ The request must include all fields for the attachment. Even the fields that are | Name | Type | | :------ | :------ | -| `updateArgs` | [*UpdateArgs*](attachments_update.updateargs.md) | +| `updateArgs` | [`UpdateArgs`](attachments_client._internal_namespace.UpdateArgs.md) | + +#### Returns + +`Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> -**Returns:** *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +#### Defined in -Defined in: [attachments/client.ts:65](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/client.ts#L65) +[x-pack/plugins/cases/server/client/attachments/client.ts:65](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/attachments/client.ts#L65) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_delete.deleteallargs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_delete.deleteallargs.md deleted file mode 100644 index 39c72e81a9935..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_delete.deleteallargs.md +++ /dev/null @@ -1,34 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/delete](../modules/attachments_delete.md) / DeleteAllArgs - -# Interface: DeleteAllArgs - -[attachments/delete](../modules/attachments_delete.md).DeleteAllArgs - -Parameters for deleting all comments of a case or sub case. - -## Table of contents - -### Properties - -- [caseID](attachments_delete.deleteallargs.md#caseid) -- [subCaseID](attachments_delete.deleteallargs.md#subcaseid) - -## Properties - -### caseID - -ā€¢ **caseID**: *string* - -The case ID to delete all attachments for - -Defined in: [attachments/delete.ts:31](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/delete.ts#L31) - -___ - -### subCaseID - -ā€¢ `Optional` **subCaseID**: *string* - -If specified the caseID will be ignored and this value will be used to find a sub case for deleting all the attachments - -Defined in: [attachments/delete.ts:35](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/delete.ts#L35) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_delete.deleteargs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_delete.deleteargs.md deleted file mode 100644 index fb7e61fa1521f..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_delete.deleteargs.md +++ /dev/null @@ -1,45 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/delete](../modules/attachments_delete.md) / DeleteArgs - -# Interface: DeleteArgs - -[attachments/delete](../modules/attachments_delete.md).DeleteArgs - -Parameters for deleting a single attachment of a case or sub case. - -## Table of contents - -### Properties - -- [attachmentID](attachments_delete.deleteargs.md#attachmentid) -- [caseID](attachments_delete.deleteargs.md#caseid) -- [subCaseID](attachments_delete.deleteargs.md#subcaseid) - -## Properties - -### attachmentID - -ā€¢ **attachmentID**: *string* - -The attachment ID to delete - -Defined in: [attachments/delete.ts:49](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/delete.ts#L49) - -___ - -### caseID - -ā€¢ **caseID**: *string* - -The case ID to delete an attachment from - -Defined in: [attachments/delete.ts:45](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/delete.ts#L45) - -___ - -### subCaseID - -ā€¢ `Optional` **subCaseID**: *string* - -If specified the caseID will be ignored and this value will be used to find a sub case for deleting the attachment - -Defined in: [attachments/delete.ts:53](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/delete.ts#L53) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.findargs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.findargs.md deleted file mode 100644 index 826a05f5865ab..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.findargs.md +++ /dev/null @@ -1,51 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/get](../modules/attachments_get.md) / FindArgs - -# Interface: FindArgs - -[attachments/get](../modules/attachments_get.md).FindArgs - -Parameters for finding attachments of a case - -## Table of contents - -### Properties - -- [caseID](attachments_get.findargs.md#caseid) -- [queryParams](attachments_get.findargs.md#queryparams) - -## Properties - -### caseID - -ā€¢ **caseID**: *string* - -The case ID for finding associated attachments - -Defined in: [attachments/get.ts:47](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L47) - -___ - -### queryParams - -ā€¢ `Optional` **queryParams**: *object* - -Optional parameters for filtering the returned attachments - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `defaultSearchOperator` | *undefined* \| ``"AND"`` \| ``"OR"`` | -| `fields` | *undefined* \| *string*[] | -| `filter` | *undefined* \| *string* | -| `hasReference` | *undefined* \| { `id`: *string* ; `type`: *string* } \| { `id`: *string* ; `type`: *string* }[] | -| `hasReferenceOperator` | *undefined* \| ``"AND"`` \| ``"OR"`` | -| `page` | *undefined* \| *number* | -| `perPage` | *undefined* \| *number* | -| `search` | *undefined* \| *string* | -| `searchFields` | *undefined* \| *string*[] | -| `sortField` | *undefined* \| *string* | -| `sortOrder` | *undefined* \| ``"desc"`` \| ``"asc"`` | -| `subCaseId` | *undefined* \| *string* | - -Defined in: [attachments/get.ts:51](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L51) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getallalertsattachtocase.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getallalertsattachtocase.md deleted file mode 100644 index abeeaca19b23e..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getallalertsattachtocase.md +++ /dev/null @@ -1,21 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/get](../modules/attachments_get.md) / GetAllAlertsAttachToCase - -# Interface: GetAllAlertsAttachToCase - -[attachments/get](../modules/attachments_get.md).GetAllAlertsAttachToCase - -## Table of contents - -### Properties - -- [caseId](attachments_get.getallalertsattachtocase.md#caseid) - -## Properties - -### caseId - -ā€¢ **caseId**: *string* - -The ID of the case to retrieve the alerts from - -Defined in: [attachments/get.ts:87](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L87) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getallargs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getallargs.md deleted file mode 100644 index 9ea29437d5c2c..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getallargs.md +++ /dev/null @@ -1,45 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/get](../modules/attachments_get.md) / GetAllArgs - -# Interface: GetAllArgs - -[attachments/get](../modules/attachments_get.md).GetAllArgs - -Parameters for retrieving all attachments of a case - -## Table of contents - -### Properties - -- [caseID](attachments_get.getallargs.md#caseid) -- [includeSubCaseComments](attachments_get.getallargs.md#includesubcasecomments) -- [subCaseID](attachments_get.getallargs.md#subcaseid) - -## Properties - -### caseID - -ā€¢ **caseID**: *string* - -The case ID to retrieve all attachments for - -Defined in: [attachments/get.ts:61](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L61) - -___ - -### includeSubCaseComments - -ā€¢ `Optional` **includeSubCaseComments**: *boolean* - -Optionally include the attachments associated with a sub case - -Defined in: [attachments/get.ts:65](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L65) - -___ - -### subCaseID - -ā€¢ `Optional` **subCaseID**: *string* - -If included the case ID will be ignored and the attachments will be retrieved from the specified ID of the sub case - -Defined in: [attachments/get.ts:69](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L69) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getargs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getargs.md deleted file mode 100644 index e46d83d795f48..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_get.getargs.md +++ /dev/null @@ -1,32 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/get](../modules/attachments_get.md) / GetArgs - -# Interface: GetArgs - -[attachments/get](../modules/attachments_get.md).GetArgs - -## Table of contents - -### Properties - -- [attachmentID](attachments_get.getargs.md#attachmentid) -- [caseID](attachments_get.getargs.md#caseid) - -## Properties - -### attachmentID - -ā€¢ **attachmentID**: *string* - -The ID of the attachment to retrieve - -Defined in: [attachments/get.ts:80](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L80) - -___ - -### caseID - -ā€¢ **caseID**: *string* - -The ID of the case to retrieve an attachment from - -Defined in: [attachments/get.ts:76](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/get.ts#L76) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_update.updateargs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_update.updateargs.md deleted file mode 100644 index 23d7c88c9c864..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/attachments_update.updateargs.md +++ /dev/null @@ -1,45 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [attachments/update](../modules/attachments_update.md) / UpdateArgs - -# Interface: UpdateArgs - -[attachments/update](../modules/attachments_update.md).UpdateArgs - -Parameters for updating a single attachment - -## Table of contents - -### Properties - -- [caseID](attachments_update.updateargs.md#caseid) -- [subCaseID](attachments_update.updateargs.md#subcaseid) -- [updateRequest](attachments_update.updateargs.md#updaterequest) - -## Properties - -### caseID - -ā€¢ **caseID**: *string* - -The ID of the case that is associated with this attachment - -Defined in: [attachments/update.ts:32](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/update.ts#L32) - -___ - -### subCaseID - -ā€¢ `Optional` **subCaseID**: *string* - -The ID of a sub case, if specified a sub case will be searched for to perform the attachment update instead of on a case - -Defined in: [attachments/update.ts:40](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/update.ts#L40) - -___ - -### updateRequest - -ā€¢ **updateRequest**: { `comment`: *string* ; `owner`: *string* ; `type`: user } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `id`: *string* ; `version`: *string* } - -The full attachment request with the fields updated with appropriate values - -Defined in: [attachments/update.ts:36](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/attachments/update.ts#L36) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_client.casessubclient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_client.casessubclient.md index 45285066b4608..df4d1bdf7966f 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_client.casessubclient.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_client.casessubclient.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [cases/client](../modules/cases_client.md) / CasesSubClient +[Cases Client API Interface](../README.md) / [cases/client](../modules/cases_client.md) / CasesSubClient # Interface: CasesSubClient @@ -10,21 +10,22 @@ API for interacting with the cases entities. ### Methods -- [create](cases_client.casessubclient.md#create) -- [delete](cases_client.casessubclient.md#delete) -- [find](cases_client.casessubclient.md#find) -- [get](cases_client.casessubclient.md#get) -- [getCasesByAlertID](cases_client.casessubclient.md#getcasesbyalertid) -- [getReporters](cases_client.casessubclient.md#getreporters) -- [getTags](cases_client.casessubclient.md#gettags) -- [push](cases_client.casessubclient.md#push) -- [update](cases_client.casessubclient.md#update) +- [create](cases_client.CasesSubClient.md#create) +- [delete](cases_client.CasesSubClient.md#delete) +- [find](cases_client.CasesSubClient.md#find) +- [get](cases_client.CasesSubClient.md#get) +- [getCasesByAlertID](cases_client.CasesSubClient.md#getcasesbyalertid) +- [getReporters](cases_client.CasesSubClient.md#getreporters) +- [getTags](cases_client.CasesSubClient.md#gettags) +- [push](cases_client.CasesSubClient.md#push) +- [resolve](cases_client.CasesSubClient.md#resolve) +- [update](cases_client.CasesSubClient.md#update) ## Methods ### create -ā–ø **create**(`data`: [*ICasePostRequest*](typedoc_interfaces.icasepostrequest.md)): *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +ā–ø **create**(`data`): `Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> Creates a case. @@ -32,17 +33,21 @@ Creates a case. | Name | Type | | :------ | :------ | -| `data` | [*ICasePostRequest*](typedoc_interfaces.icasepostrequest.md) | +| `data` | [`ICasePostRequest`](typedoc_interfaces.ICasePostRequest.md) | -**Returns:** *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +#### Returns -Defined in: [cases/client.ts:49](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L49) +`Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/cases/client.ts:51](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L51) ___ ### delete -ā–ø **delete**(`ids`: *string*[]): *Promise* +ā–ø **delete**(`ids`): `Promise`<`void`\> Delete a case and all its comments. @@ -52,17 +57,21 @@ Delete a case and all its comments. | Name | Type | | :------ | :------ | -| `ids` | *string*[] | +| `ids` | `string`[] | + +#### Returns + +`Promise`<`void`\> -**Returns:** *Promise* +#### Defined in -Defined in: [cases/client.ts:73](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L73) +[x-pack/plugins/cases/server/client/cases/client.ts:80](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L80) ___ ### find -ā–ø **find**(`params`: [*ICasesFindRequest*](typedoc_interfaces.icasesfindrequest.md)): *Promise*<[*ICasesFindResponse*](typedoc_interfaces.icasesfindresponse.md)\> +ā–ø **find**(`params`): `Promise`<[`ICasesFindResponse`](typedoc_interfaces.ICasesFindResponse.md)\> Returns cases that match the search criteria. @@ -72,17 +81,21 @@ If the `owner` field is left empty then all the cases that the user has access t | Name | Type | | :------ | :------ | -| `params` | [*ICasesFindRequest*](typedoc_interfaces.icasesfindrequest.md) | +| `params` | [`ICasesFindRequest`](typedoc_interfaces.ICasesFindRequest.md) | -**Returns:** *Promise*<[*ICasesFindResponse*](typedoc_interfaces.icasesfindresponse.md)\> +#### Returns -Defined in: [cases/client.ts:55](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L55) +`Promise`<[`ICasesFindResponse`](typedoc_interfaces.ICasesFindResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/cases/client.ts:57](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L57) ___ ### get -ā–ø **get**(`params`: [*GetParams*](cases_get.getparams.md)): *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +ā–ø **get**(`params`): `Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> Retrieves a single case with the specified ID. @@ -90,17 +103,21 @@ Retrieves a single case with the specified ID. | Name | Type | | :------ | :------ | -| `params` | [*GetParams*](cases_get.getparams.md) | +| `params` | [`GetParams`](cases_get.GetParams.md) | + +#### Returns + +`Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> -**Returns:** *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +#### Defined in -Defined in: [cases/client.ts:59](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L59) +[x-pack/plugins/cases/server/client/cases/client.ts:61](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L61) ___ ### getCasesByAlertID -ā–ø **getCasesByAlertID**(`params`: [*CasesByAlertIDParams*](cases_get.casesbyalertidparams.md)): *Promise*<{ `id`: *string* ; `title`: *string* }[]\> +ā–ø **getCasesByAlertID**(`params`): `Promise`<{ `id`: `string` = rt.string; `title`: `string` = rt.string }[]\> Retrieves the cases ID and title that have the requested alert attached to them @@ -108,17 +125,21 @@ Retrieves the cases ID and title that have the requested alert attached to them | Name | Type | | :------ | :------ | -| `params` | [*CasesByAlertIDParams*](cases_get.casesbyalertidparams.md) | +| `params` | [`CasesByAlertIDParams`](cases_get.CasesByAlertIDParams.md) | -**Returns:** *Promise*<{ `id`: *string* ; `title`: *string* }[]\> +#### Returns -Defined in: [cases/client.ts:85](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L85) +`Promise`<{ `id`: `string` = rt.string; `title`: `string` = rt.string }[]\> + +#### Defined in + +[x-pack/plugins/cases/server/client/cases/client.ts:92](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L92) ___ ### getReporters -ā–ø **getReporters**(`params`: { `owner`: *undefined* \| *string* \| *string*[] }): *Promise*<{ `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* }[]\> +ā–ø **getReporters**(`params`): `Promise`<{ `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` }[]\> Retrieves all the reporters across all accessible cases. @@ -126,18 +147,22 @@ Retrieves all the reporters across all accessible cases. | Name | Type | | :------ | :------ | -| `params` | *object* | -| `params.owner` | *undefined* \| *string* \| *string*[] | +| `params` | `Object` | +| `params.owner` | `undefined` \| `string` \| `string`[] | + +#### Returns + +`Promise`<{ `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` }[]\> -**Returns:** *Promise*<{ `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* }[]\> +#### Defined in -Defined in: [cases/client.ts:81](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L81) +[x-pack/plugins/cases/server/client/cases/client.ts:88](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L88) ___ ### getTags -ā–ø **getTags**(`params`: { `owner`: *undefined* \| *string* \| *string*[] }): *Promise* +ā–ø **getTags**(`params`): `Promise`<`string`[]\> Retrieves all the tags across all cases the user making the request has access to. @@ -145,18 +170,22 @@ Retrieves all the tags across all cases the user making the request has access t | Name | Type | | :------ | :------ | -| `params` | *object* | -| `params.owner` | *undefined* \| *string* \| *string*[] | +| `params` | `Object` | +| `params.owner` | `undefined` \| `string` \| `string`[] | -**Returns:** *Promise* +#### Returns -Defined in: [cases/client.ts:77](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L77) +`Promise`<`string`[]\> + +#### Defined in + +[x-pack/plugins/cases/server/client/cases/client.ts:84](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L84) ___ ### push -ā–ø **push**(`args`: [*PushParams*](cases_push.pushparams.md)): *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +ā–ø **push**(`args`): `Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> Pushes a specific case to an external system. @@ -164,17 +193,44 @@ Pushes a specific case to an external system. | Name | Type | | :------ | :------ | -| `args` | [*PushParams*](cases_push.pushparams.md) | +| `args` | [`PushParams`](cases_push.PushParams.md) | + +#### Returns + +`Promise`<[`ICaseResponse`](typedoc_interfaces.ICaseResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/cases/client.ts:70](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L70) + +___ + +### resolve + +ā–ø **resolve**(`params`): `Promise`<[`ICaseResolveResponse`](typedoc_interfaces.ICaseResolveResponse.md)\> + +**`experimental`** +Retrieves a single case resolving the specified ID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`GetParams`](cases_get.GetParams.md) | -**Returns:** *Promise*<[*ICaseResponse*](typedoc_interfaces.icaseresponse.md)\> +#### Returns -Defined in: [cases/client.ts:63](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L63) +`Promise`<[`ICaseResolveResponse`](typedoc_interfaces.ICaseResolveResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/cases/client.ts:66](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L66) ___ ### update -ā–ø **update**(`cases`: [*ICasesPatchRequest*](typedoc_interfaces.icasespatchrequest.md)): *Promise*<[*ICasesResponse*](typedoc_interfaces.icasesresponse.md)\> +ā–ø **update**(`cases`): `Promise`<[`ICasesResponse`](typedoc_interfaces.ICasesResponse.md)\> Update the specified cases with the passed in values. @@ -182,8 +238,12 @@ Update the specified cases with the passed in values. | Name | Type | | :------ | :------ | -| `cases` | [*ICasesPatchRequest*](typedoc_interfaces.icasespatchrequest.md) | +| `cases` | [`ICasesPatchRequest`](typedoc_interfaces.ICasesPatchRequest.md) | + +#### Returns + +`Promise`<[`ICasesResponse`](typedoc_interfaces.ICasesResponse.md)\> -**Returns:** *Promise*<[*ICasesResponse*](typedoc_interfaces.icasesresponse.md)\> +#### Defined in -Defined in: [cases/client.ts:67](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/client.ts#L67) +[x-pack/plugins/cases/server/client/cases/client.ts:74](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/client.ts#L74) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.casesbyalertidparams.md b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.casesbyalertidparams.md index 257269ca64566..2e0cf957be8e3 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.casesbyalertidparams.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.casesbyalertidparams.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [cases/get](../modules/cases_get.md) / CasesByAlertIDParams +[Cases Client API Interface](../README.md) / [cases/get](../modules/cases_get.md) / CasesByAlertIDParams # Interface: CasesByAlertIDParams @@ -10,24 +10,26 @@ Parameters for finding cases IDs using an alert ID ### Properties -- [alertID](cases_get.casesbyalertidparams.md#alertid) -- [options](cases_get.casesbyalertidparams.md#options) +- [alertID](cases_get.CasesByAlertIDParams.md#alertid) +- [options](cases_get.CasesByAlertIDParams.md#options) ## Properties ### alertID -ā€¢ **alertID**: *string* +ā€¢ **alertID**: `string` The alert ID to search for -Defined in: [cases/get.ts:44](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/get.ts#L44) +#### Defined in + +[x-pack/plugins/cases/server/client/cases/get.ts:45](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/get.ts#L45) ___ ### options -ā€¢ **options**: *object* +ā€¢ **options**: `Object` The filtering options when searching for associated cases. @@ -35,6 +37,8 @@ The filtering options when searching for associated cases. | Name | Type | | :------ | :------ | -| `owner` | *undefined* \| *string* \| *string*[] | +| `owner` | `undefined` \| `string` \| `string`[] | + +#### Defined in -Defined in: [cases/get.ts:48](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/get.ts#L48) +[x-pack/plugins/cases/server/client/cases/get.ts:49](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/get.ts#L49) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.getparams.md b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.getparams.md index 16cc952746818..ccd09fd4db48c 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.getparams.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_get.getparams.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [cases/get](../modules/cases_get.md) / GetParams +[Cases Client API Interface](../README.md) / [cases/get](../modules/cases_get.md) / GetParams # Interface: GetParams @@ -10,36 +10,29 @@ The parameters for retrieving a case ### Properties -- [id](cases_get.getparams.md#id) -- [includeComments](cases_get.getparams.md#includecomments) -- [includeSubCaseComments](cases_get.getparams.md#includesubcasecomments) +- [id](cases_get.GetParams.md#id) +- [includeComments](cases_get.GetParams.md#includecomments) ## Properties ### id -ā€¢ **id**: *string* +ā€¢ **id**: `string` Case ID -Defined in: [cases/get.ts:145](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/get.ts#L145) +#### Defined in + +[x-pack/plugins/cases/server/client/cases/get.ts:144](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/get.ts#L144) ___ ### includeComments -ā€¢ `Optional` **includeComments**: *boolean* +ā€¢ `Optional` **includeComments**: `boolean` Whether to include the attachments for a case in the response -Defined in: [cases/get.ts:149](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/get.ts#L149) - -___ - -### includeSubCaseComments - -ā€¢ `Optional` **includeSubCaseComments**: *boolean* - -Whether to include the attachments for all children of a case in the response +#### Defined in -Defined in: [cases/get.ts:153](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/get.ts#L153) +[x-pack/plugins/cases/server/client/cases/get.ts:148](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/get.ts#L148) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_push.pushparams.md b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_push.pushparams.md index 3aa6ee77941a8..436850a7b64fd 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/cases_push.pushparams.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/cases_push.pushparams.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [cases/push](../modules/cases_push.md) / PushParams +[Cases Client API Interface](../README.md) / [cases/push](../modules/cases_push.md) / PushParams # Interface: PushParams @@ -10,25 +10,29 @@ Parameters for pushing a case to an external system ### Properties -- [caseId](cases_push.pushparams.md#caseid) -- [connectorId](cases_push.pushparams.md#connectorid) +- [caseId](cases_push.PushParams.md#caseid) +- [connectorId](cases_push.PushParams.md#connectorid) ## Properties ### caseId -ā€¢ **caseId**: *string* +ā€¢ **caseId**: `string` The ID of a case -Defined in: [cases/push.ts:53](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/push.ts#L53) +#### Defined in + +[x-pack/plugins/cases/server/client/cases/push.ts:48](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/push.ts#L48) ___ ### connectorId -ā€¢ **connectorId**: *string* +ā€¢ **connectorId**: `string` The ID of an external system to push to -Defined in: [cases/push.ts:57](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/push.ts#L57) +#### Defined in + +[x-pack/plugins/cases/server/client/cases/push.ts:52](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/push.ts#L52) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Action.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Action.md new file mode 100644 index 0000000000000..7f8e04653acf6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Action.md @@ -0,0 +1,72 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Action + +# Interface: Action + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Action + +## Hierarchy + +- [`ActionUpdate`](client._internal_namespace.ActionUpdate.md) + + ā†³ **`Action`** + +## Table of contents + +### Properties + +- [actionTypeId](client._internal_namespace.Action.md#actiontypeid) +- [config](client._internal_namespace.Action.md#config) +- [name](client._internal_namespace.Action.md#name) +- [secrets](client._internal_namespace.Action.md#secrets) + +## Properties + +### actionTypeId + +ā€¢ **actionTypeId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:19 + +___ + +### config + +ā€¢ **config**: [`SavedObjectAttributes`](client._internal_namespace.SavedObjectAttributes.md) + +#### Inherited from + +[ActionUpdate](client._internal_namespace.ActionUpdate.md).[config](client._internal_namespace.ActionUpdate.md#config) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:15 + +___ + +### name + +ā€¢ **name**: `string` + +#### Inherited from + +[ActionUpdate](client._internal_namespace.ActionUpdate.md).[name](client._internal_namespace.ActionUpdate.md#name) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:14 + +___ + +### secrets + +ā€¢ **secrets**: [`SavedObjectAttributes`](client._internal_namespace.SavedObjectAttributes.md) + +#### Inherited from + +[ActionUpdate](client._internal_namespace.ActionUpdate.md).[secrets](client._internal_namespace.ActionUpdate.md#secrets) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:16 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionExecutionSource.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionExecutionSource.md new file mode 100644 index 0000000000000..1b7033f5805c8 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionExecutionSource.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionExecutionSource + +# Interface: ActionExecutionSource + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionExecutionSource + +## Type parameters + +| Name | +| :------ | +| `T` | + +## Table of contents + +### Properties + +- [source](client._internal_namespace.ActionExecutionSource.md#source) +- [type](client._internal_namespace.ActionExecutionSource.md#type) + +## Properties + +### source + +ā€¢ **source**: `T` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_execution_source.d.ts:8 + +___ + +### type + +ā€¢ **type**: [`ActionExecutionSourceType`](../enums/client._internal_namespace.ActionExecutionSourceType.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_execution_source.d.ts:7 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionExecutorContext.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionExecutorContext.md new file mode 100644 index 0000000000000..093b2933ddfac --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionExecutorContext.md @@ -0,0 +1,112 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionExecutorContext + +# Interface: ActionExecutorContext + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionExecutorContext + +## Table of contents + +### Properties + +- [actionTypeRegistry](client._internal_namespace.ActionExecutorContext.md#actiontyperegistry) +- [encryptedSavedObjectsClient](client._internal_namespace.ActionExecutorContext.md#encryptedsavedobjectsclient) +- [eventLogger](client._internal_namespace.ActionExecutorContext.md#eventlogger) +- [getServices](client._internal_namespace.ActionExecutorContext.md#getservices) +- [logger](client._internal_namespace.ActionExecutorContext.md#logger) +- [preconfiguredActions](client._internal_namespace.ActionExecutorContext.md#preconfiguredactions) +- [spaces](client._internal_namespace.ActionExecutorContext.md#spaces) + +### Methods + +- [getActionsClientWithRequest](client._internal_namespace.ActionExecutorContext.md#getactionsclientwithrequest) + +## Properties + +### actionTypeRegistry + +ā€¢ **actionTypeRegistry**: [`ActionTypeRegistryContract`](../modules/client._internal_namespace.md#actiontyperegistrycontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:16 + +___ + +### encryptedSavedObjectsClient + +ā€¢ **encryptedSavedObjectsClient**: [`EncryptedSavedObjectsClient`](client._internal_namespace.EncryptedSavedObjectsClient.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:15 + +___ + +### eventLogger + +ā€¢ **eventLogger**: [`IEventLogger`](client._internal_namespace.IEventLogger.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:17 + +___ + +### getServices + +ā€¢ **getServices**: [`GetServicesFunction`](../modules/client._internal_namespace.md#getservicesfunction) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:13 + +___ + +### logger + +ā€¢ **logger**: `Logger` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:11 + +___ + +### preconfiguredActions + +ā€¢ **preconfiguredActions**: [`PreConfiguredAction`](client._internal_namespace.PreConfiguredAction.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig), [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets)\>[] + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:18 + +___ + +### spaces + +ā€¢ `Optional` **spaces**: [`SpacesServiceStart`](client._internal_namespace.SpacesServiceStart.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:12 + +## Methods + +### getActionsClientWithRequest + +ā–ø **getActionsClientWithRequest**(`request`, `authorizationContext?`): `Promise`<`PublicMethodsOf`<[`ActionsClient`](../classes/client._internal_namespace.ActionsClient.md)\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | +| `authorizationContext?` | [`ActionExecutionSource`](client._internal_namespace.ActionExecutionSource.md)<`unknown`\> | + +#### Returns + +`Promise`<`PublicMethodsOf`<[`ActionsClient`](../classes/client._internal_namespace.ActionsClient.md)\>\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:14 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionResult.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionResult.md new file mode 100644 index 0000000000000..7a303e0216b3a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionResult.md @@ -0,0 +1,90 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionResult + +# Interface: ActionResult + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionResult + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Config` | extends [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) = [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) | + +## Hierarchy + +- **`ActionResult`** + + ā†³ [`FindActionResult`](client._internal_namespace.FindActionResult.md) + + ā†³ [`PreConfiguredAction`](client._internal_namespace.PreConfiguredAction.md) + +## Table of contents + +### Properties + +- [actionTypeId](client._internal_namespace.ActionResult.md#actiontypeid) +- [config](client._internal_namespace.ActionResult.md#config) +- [id](client._internal_namespace.ActionResult.md#id) +- [isMissingSecrets](client._internal_namespace.ActionResult.md#ismissingsecrets) +- [isPreconfigured](client._internal_namespace.ActionResult.md#ispreconfigured) +- [name](client._internal_namespace.ActionResult.md#name) + +## Properties + +### actionTypeId + +ā€¢ **actionTypeId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:50 + +___ + +### config + +ā€¢ `Optional` **config**: `Config` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:53 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:49 + +___ + +### isMissingSecrets + +ā€¢ `Optional` **isMissingSecrets**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:52 + +___ + +### isPreconfigured + +ā€¢ **isPreconfigured**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:54 + +___ + +### name + +ā€¢ **name**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:51 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionType-1.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionType-1.md new file mode 100644 index 0000000000000..ac0b15f74c84d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionType-1.md @@ -0,0 +1,120 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionType + +# Interface: ActionType + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionType + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Config` | extends [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) = [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) | +| `Secrets` | extends [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) = [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) | +| `Params` | extends [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams) = [`ActionTypeParams`](../modules/client._internal_namespace.md#actiontypeparams) | +| `ExecutorResultData` | `void` | + +## Table of contents + +### Properties + +- [executor](client._internal_namespace.ActionType-1.md#executor) +- [id](client._internal_namespace.ActionType-1.md#id) +- [maxAttempts](client._internal_namespace.ActionType-1.md#maxattempts) +- [minimumLicenseRequired](client._internal_namespace.ActionType-1.md#minimumlicenserequired) +- [name](client._internal_namespace.ActionType-1.md#name) +- [validate](client._internal_namespace.ActionType-1.md#validate) + +### Methods + +- [renderParameterTemplates](client._internal_namespace.ActionType-1.md#renderparametertemplates) + +## Properties + +### executor + +ā€¢ **executor**: [`ExecutorType`](../modules/client._internal_namespace.md#executortype)<`Config`, `Secrets`, `Params`, `ExecutorResultData`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:82 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:71 + +___ + +### maxAttempts + +ā€¢ `Optional` **maxAttempts**: `number` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:73 + +___ + +### minimumLicenseRequired + +ā€¢ **minimumLicenseRequired**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:74 + +___ + +### name + +ā€¢ **name**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:72 + +___ + +### validate + +ā€¢ `Optional` **validate**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `config?` | [`ValidatorType`](client._internal_namespace.ValidatorType.md)<`Config`\> | +| `params?` | [`ValidatorType`](client._internal_namespace.ValidatorType.md)<`Params`\> | +| `secrets?` | [`ValidatorType`](client._internal_namespace.ValidatorType.md)<`Secrets`\> | +| `connector?` | (`config`: `Config`, `secrets`: `Secrets`) => ``null`` \| `string` | + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:75 + +## Methods + +### renderParameterTemplates + +ā–ø `Optional` **renderParameterTemplates**(`params`, `variables`, `actionId?`): `Params` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | `Params` | +| `variables` | `Record`<`string`, `unknown`\> | +| `actionId?` | `string` | + +#### Returns + +`Params` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:81 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionType.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionType.md new file mode 100644 index 0000000000000..286e699d5c2f7 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionType.md @@ -0,0 +1,76 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionType + +# Interface: ActionType + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionType + +## Table of contents + +### Properties + +- [enabled](client._internal_namespace.ActionType.md#enabled) +- [enabledInConfig](client._internal_namespace.ActionType.md#enabledinconfig) +- [enabledInLicense](client._internal_namespace.ActionType.md#enabledinlicense) +- [id](client._internal_namespace.ActionType.md#id) +- [minimumLicenseRequired](client._internal_namespace.ActionType.md#minimumlicenserequired) +- [name](client._internal_namespace.ActionType.md#name) + +## Properties + +### enabled + +ā€¢ **enabled**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:5 + +___ + +### enabledInConfig + +ā€¢ **enabledInConfig**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:6 + +___ + +### enabledInLicense + +ā€¢ **enabledInLicense**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:7 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:3 + +___ + +### minimumLicenseRequired + +ā€¢ **minimumLicenseRequired**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:8 + +___ + +### name + +ā€¢ **name**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeExecutorOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeExecutorOptions.md new file mode 100644 index 0000000000000..9c06e78c9c199 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeExecutorOptions.md @@ -0,0 +1,95 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionTypeExecutorOptions + +# Interface: ActionTypeExecutorOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionTypeExecutorOptions + +## Type parameters + +| Name | +| :------ | +| `Config` | +| `Secrets` | +| `Params` | + +## Table of contents + +### Properties + +- [actionId](client._internal_namespace.ActionTypeExecutorOptions.md#actionid) +- [config](client._internal_namespace.ActionTypeExecutorOptions.md#config) +- [isEphemeral](client._internal_namespace.ActionTypeExecutorOptions.md#isephemeral) +- [params](client._internal_namespace.ActionTypeExecutorOptions.md#params) +- [secrets](client._internal_namespace.ActionTypeExecutorOptions.md#secrets) +- [services](client._internal_namespace.ActionTypeExecutorOptions.md#services) +- [taskInfo](client._internal_namespace.ActionTypeExecutorOptions.md#taskinfo) + +## Properties + +### actionId + +ā€¢ **actionId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:40 + +___ + +### config + +ā€¢ **config**: `Config` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:42 + +___ + +### isEphemeral + +ā€¢ `Optional` **isEphemeral**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:45 + +___ + +### params + +ā€¢ **params**: `Params` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:44 + +___ + +### secrets + +ā€¢ **secrets**: `Secrets` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:43 + +___ + +### services + +ā€¢ **services**: [`Services`](client._internal_namespace.Services.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:41 + +___ + +### taskInfo + +ā€¢ `Optional` **taskInfo**: [`TaskInfo`](client._internal_namespace.TaskInfo.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:46 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeExecutorResult.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeExecutorResult.md new file mode 100644 index 0000000000000..039de06431a7c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeExecutorResult.md @@ -0,0 +1,82 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionTypeExecutorResult + +# Interface: ActionTypeExecutorResult + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionTypeExecutorResult + +## Type parameters + +| Name | +| :------ | +| `Data` | + +## Table of contents + +### Properties + +- [actionId](client._internal_namespace.ActionTypeExecutorResult.md#actionid) +- [data](client._internal_namespace.ActionTypeExecutorResult.md#data) +- [message](client._internal_namespace.ActionTypeExecutorResult.md#message) +- [retry](client._internal_namespace.ActionTypeExecutorResult.md#retry) +- [serviceMessage](client._internal_namespace.ActionTypeExecutorResult.md#servicemessage) +- [status](client._internal_namespace.ActionTypeExecutorResult.md#status) + +## Properties + +### actionId + +ā€¢ **actionId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:20 + +___ + +### data + +ā€¢ `Optional` **data**: `Data` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:24 + +___ + +### message + +ā€¢ `Optional` **message**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:22 + +___ + +### retry + +ā€¢ `Optional` **retry**: ``null`` \| `boolean` \| `Date` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:25 + +___ + +### serviceMessage + +ā€¢ `Optional` **serviceMessage**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:23 + +___ + +### status + +ā€¢ **status**: ``"error"`` \| ``"ok"`` + +#### Defined in + +x-pack/plugins/actions/target/types/common/types.d.ts:21 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeRegistryOpts.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeRegistryOpts.md new file mode 100644 index 0000000000000..2f83edd5720f0 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionTypeRegistryOpts.md @@ -0,0 +1,76 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionTypeRegistryOpts + +# Interface: ActionTypeRegistryOpts + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionTypeRegistryOpts + +## Table of contents + +### Properties + +- [actionsConfigUtils](client._internal_namespace.ActionTypeRegistryOpts.md#actionsconfigutils) +- [licenseState](client._internal_namespace.ActionTypeRegistryOpts.md#licensestate) +- [licensing](client._internal_namespace.ActionTypeRegistryOpts.md#licensing) +- [preconfiguredActions](client._internal_namespace.ActionTypeRegistryOpts.md#preconfiguredactions) +- [taskManager](client._internal_namespace.ActionTypeRegistryOpts.md#taskmanager) +- [taskRunnerFactory](client._internal_namespace.ActionTypeRegistryOpts.md#taskrunnerfactory) + +## Properties + +### actionsConfigUtils + +ā€¢ **actionsConfigUtils**: [`ActionsConfigurationUtilities`](client._internal_namespace.ActionsConfigurationUtilities.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:11 + +___ + +### licenseState + +ā€¢ **licenseState**: [`ILicenseState`](../modules/client._internal_namespace.md#ilicensestate) + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:12 + +___ + +### licensing + +ā€¢ **licensing**: [`LicensingPluginSetup`](client._internal_namespace.LicensingPluginSetup.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:8 + +___ + +### preconfiguredActions + +ā€¢ **preconfiguredActions**: [`PreConfiguredAction`](client._internal_namespace.PreConfiguredAction.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig), [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets)\>[] + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:13 + +___ + +### taskManager + +ā€¢ **taskManager**: [`TaskManagerSetupContract`](client._internal_namespace.TaskManagerSetupContract.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:9 + +___ + +### taskRunnerFactory + +ā€¢ **taskRunnerFactory**: [`TaskRunnerFactory`](../classes/client._internal_namespace.TaskRunnerFactory.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/action_type_registry.d.ts:10 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionUpdate.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionUpdate.md new file mode 100644 index 0000000000000..1326f4f3b3361 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionUpdate.md @@ -0,0 +1,51 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionUpdate + +# Interface: ActionUpdate + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionUpdate + +## Hierarchy + +- [`SavedObjectAttributes`](client._internal_namespace.SavedObjectAttributes.md) + + ā†³ **`ActionUpdate`** + + ā†³ā†³ [`Action`](client._internal_namespace.Action.md) + +## Table of contents + +### Properties + +- [config](client._internal_namespace.ActionUpdate.md#config) +- [name](client._internal_namespace.ActionUpdate.md#name) +- [secrets](client._internal_namespace.ActionUpdate.md#secrets) + +## Properties + +### config + +ā€¢ **config**: [`SavedObjectAttributes`](client._internal_namespace.SavedObjectAttributes.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:15 + +___ + +### name + +ā€¢ **name**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:14 + +___ + +### secrets + +ā€¢ **secrets**: [`SavedObjectAttributes`](client._internal_namespace.SavedObjectAttributes.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:16 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionsConfigurationUtilities.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionsConfigurationUtilities.md new file mode 100644 index 0000000000000..f2562a697f255 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionsConfigurationUtilities.md @@ -0,0 +1,217 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionsConfigurationUtilities + +# Interface: ActionsConfigurationUtilities + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionsConfigurationUtilities + +## Table of contents + +### Methods + +- [ensureActionTypeEnabled](client._internal_namespace.ActionsConfigurationUtilities.md#ensureactiontypeenabled) +- [ensureHostnameAllowed](client._internal_namespace.ActionsConfigurationUtilities.md#ensurehostnameallowed) +- [ensureUriAllowed](client._internal_namespace.ActionsConfigurationUtilities.md#ensureuriallowed) +- [getCustomHostSettings](client._internal_namespace.ActionsConfigurationUtilities.md#getcustomhostsettings) +- [getMicrosoftGraphApiUrl](client._internal_namespace.ActionsConfigurationUtilities.md#getmicrosoftgraphapiurl) +- [getProxySettings](client._internal_namespace.ActionsConfigurationUtilities.md#getproxysettings) +- [getResponseSettings](client._internal_namespace.ActionsConfigurationUtilities.md#getresponsesettings) +- [getSSLSettings](client._internal_namespace.ActionsConfigurationUtilities.md#getsslsettings) +- [isActionTypeEnabled](client._internal_namespace.ActionsConfigurationUtilities.md#isactiontypeenabled) +- [isHostnameAllowed](client._internal_namespace.ActionsConfigurationUtilities.md#ishostnameallowed) +- [isUriAllowed](client._internal_namespace.ActionsConfigurationUtilities.md#isuriallowed) + +## Methods + +### ensureActionTypeEnabled + +ā–ø **ensureActionTypeEnabled**(`actionType`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionType` | `string` | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:10 + +___ + +### ensureHostnameAllowed + +ā–ø **ensureHostnameAllowed**(`hostname`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `hostname` | `string` | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:8 + +___ + +### ensureUriAllowed + +ā–ø **ensureUriAllowed**(`uri`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `uri` | `string` | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:9 + +___ + +### getCustomHostSettings + +ā–ø **getCustomHostSettings**(`targetUrl`): `undefined` \| `Readonly`<{ `smtp?`: `Readonly`<{ `ignoreTLS?`: `boolean` ; `requireTLS?`: `boolean` }\> ; `ssl?`: `Readonly`<{ `certificateAuthoritiesData?`: `string` ; `certificateAuthoritiesFiles?`: `string` \| `string`[] ; `rejectUnauthorized?`: `boolean` ; `verificationMode?`: ``"none"`` \| ``"certificate"`` \| ``"full"`` }\> } & { `url`: `string` }\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `targetUrl` | `string` | + +#### Returns + +`undefined` \| `Readonly`<{ `smtp?`: `Readonly`<{ `ignoreTLS?`: `boolean` ; `requireTLS?`: `boolean` }\> ; `ssl?`: `Readonly`<{ `certificateAuthoritiesData?`: `string` ; `certificateAuthoritiesFiles?`: `string` \| `string`[] ; `rejectUnauthorized?`: `boolean` ; `verificationMode?`: ``"none"`` \| ``"certificate"`` \| ``"full"`` }\> } & { `url`: `string` }\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:14 + +___ + +### getMicrosoftGraphApiUrl + +ā–ø **getMicrosoftGraphApiUrl**(): `undefined` \| `string` + +#### Returns + +`undefined` \| `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:15 + +___ + +### getProxySettings + +ā–ø **getProxySettings**(): `undefined` \| [`ProxySettings`](client._internal_namespace.ProxySettings.md) + +#### Returns + +`undefined` \| [`ProxySettings`](client._internal_namespace.ProxySettings.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:12 + +___ + +### getResponseSettings + +ā–ø **getResponseSettings**(): [`ResponseSettings`](client._internal_namespace.ResponseSettings.md) + +#### Returns + +[`ResponseSettings`](client._internal_namespace.ResponseSettings.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:13 + +___ + +### getSSLSettings + +ā–ø **getSSLSettings**(): [`SSLSettings`](client._internal_namespace.SSLSettings.md) + +#### Returns + +[`SSLSettings`](client._internal_namespace.SSLSettings.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:11 + +___ + +### isActionTypeEnabled + +ā–ø **isActionTypeEnabled**(`actionType`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `actionType` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:7 + +___ + +### isHostnameAllowed + +ā–ø **isHostnameAllowed**(`hostname`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `hostname` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:5 + +___ + +### isUriAllowed + +ā–ø **isUriAllowed**(`uri`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `uri` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_config.d.ts:6 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionsLicenseInformation.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionsLicenseInformation.md new file mode 100644 index 0000000000000..c7ab568b57c35 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ActionsLicenseInformation.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ActionsLicenseInformation + +# Interface: ActionsLicenseInformation + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ActionsLicenseInformation + +## Table of contents + +### Properties + +- [enableAppLink](client._internal_namespace.ActionsLicenseInformation.md#enableapplink) +- [message](client._internal_namespace.ActionsLicenseInformation.md#message) +- [showAppLink](client._internal_namespace.ActionsLicenseInformation.md#showapplink) + +## Properties + +### enableAppLink + +ā€¢ **enableAppLink**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:9 + +___ + +### message + +ā€¢ **message**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:10 + +___ + +### showAppLink + +ā€¢ **showAppLink**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:8 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AggregationBuilder.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AggregationBuilder.md new file mode 100644 index 0000000000000..9790711e77193 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AggregationBuilder.md @@ -0,0 +1,68 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AggregationBuilder + +# Interface: AggregationBuilder + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AggregationBuilder + +## Table of contents + +### Methods + +- [build](client._internal_namespace.AggregationBuilder.md#build) +- [formatResponse](client._internal_namespace.AggregationBuilder.md#formatresponse) +- [getName](client._internal_namespace.AggregationBuilder.md#getname) + +## Methods + +### build + +ā–ø **build**(): `Record`<`string`, `AggregationsAggregationContainer`\> + +#### Returns + +`Record`<`string`, `AggregationsAggregationContainer`\> + +#### Defined in + +[x-pack/plugins/cases/server/client/metrics/types.ts:20](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/metrics/types.ts#L20) + +___ + +### formatResponse + +ā–ø **formatResponse**(`aggregations`): `Object` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `aggregations` | [`AggregationResponse`](../modules/client._internal_namespace.md#aggregationresponse) | + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `actions` | `undefined` \| { isolateHost?: { isolate: { total: number; }; unisolate: { total: number; }; } \| undefined; } | +| `alerts` | `undefined` \| { count?: number \| undefined; hosts?: { total: number; values: { name: string \| undefined; id: string; count: number; }[]; } \| undefined; users?: { total: number; values: { name: string; count: number; }[]; } \| undefined; } | +| `connectors` | `undefined` \| { `total`: `number` = rt.number } | +| `lifespan` | `undefined` \| { `closeDate`: ``null`` \| `string` ; `creationDate`: `string` = rt.string; `statusInfo`: { openDuration: number; inProgressDuration: number; reopenDates: string[]; } = StatusInfoRt } | + +#### Defined in + +[x-pack/plugins/cases/server/client/metrics/types.ts:21](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/metrics/types.ts#L21) + +___ + +### getName + +ā–ø **getName**(): `string` + +#### Returns + +`string` + +#### Defined in + +[x-pack/plugins/cases/server/client/metrics/types.ts:22](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/metrics/types.ts#L22) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Alert.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Alert.md new file mode 100644 index 0000000000000..71ae71dd5cfaf --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Alert.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Alert + +# Interface: Alert + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Alert + +## Table of contents + +### Properties + +- [\_id](client._internal_namespace.Alert.md#_id) +- [\_index](client._internal_namespace.Alert.md#_index) +- [\_source](client._internal_namespace.Alert.md#_source) + +## Properties + +### \_id + +ā€¢ **\_id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:233](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L233) + +___ + +### \_index + +ā€¢ **\_index**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:234](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L234) + +___ + +### \_source + +ā€¢ **\_source**: `Record`<`string`, `unknown`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:235](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L235) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertIdIndex.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertIdIndex.md new file mode 100644 index 0000000000000..b9a09536ed21c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertIdIndex.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AlertIdIndex + +# Interface: AlertIdIndex + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AlertIdIndex + +## Table of contents + +### Properties + +- [id](client._internal_namespace.AlertIdIndex.md#id) +- [index](client._internal_namespace.AlertIdIndex.md#index) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:243](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L243) + +___ + +### index + +ā€¢ **index**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:244](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L244) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertInfo.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertInfo.md new file mode 100644 index 0000000000000..acf8e3b09b74f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertInfo.md @@ -0,0 +1,34 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AlertInfo + +# Interface: AlertInfo + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AlertInfo + +This structure holds the alert ID and index from an alert comment + +## Table of contents + +### Properties + +- [id](client._internal_namespace.AlertInfo.md#id) +- [index](client._internal_namespace.AlertInfo.md#index) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/common/types.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/common/types.ts#L15) + +___ + +### index + +ā€¢ **index**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/common/types.ts:16](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/common/types.ts#L16) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertsResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertsResponse.md new file mode 100644 index 0000000000000..aae855d5d0d4a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AlertsResponse.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AlertsResponse + +# Interface: AlertsResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AlertsResponse + +## Table of contents + +### Properties + +- [docs](client._internal_namespace.AlertsResponse.md#docs) + +## Properties + +### docs + +ā€¢ **docs**: [`Alert`](client._internal_namespace.Alert.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:239](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L239) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AppCategory.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AppCategory.md new file mode 100644 index 0000000000000..7ab9c4c95ff66 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AppCategory.md @@ -0,0 +1,83 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AppCategory + +# Interface: AppCategory + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AppCategory + +A category definition for nav links to know where to sort them in the left hand nav + +## Table of contents + +### Properties + +- [ariaLabel](client._internal_namespace.AppCategory.md#arialabel) +- [euiIconType](client._internal_namespace.AppCategory.md#euiicontype) +- [id](client._internal_namespace.AppCategory.md#id) +- [label](client._internal_namespace.AppCategory.md#label) +- [order](client._internal_namespace.AppCategory.md#order) + +## Properties + +### ariaLabel + +ā€¢ `Optional` **ariaLabel**: `string` + +If the visual label isn't appropriate for screen readers, +can override it here + +#### Defined in + +src/core/target/types/types/app_category.d.ts:20 + +___ + +### euiIconType + +ā€¢ `Optional` **euiIconType**: `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 + +#### Defined in + +src/core/target/types/types/app_category.d.ts:32 + +___ + +### id + +ā€¢ **id**: `string` + +Unique identifier for the categories + +#### Defined in + +src/core/target/types/types/app_category.d.ts:10 + +___ + +### label + +ā€¢ **label**: `string` + +Label used for category name. +Also used as aria-label if one isn't set. + +#### Defined in + +src/core/target/types/types/app_category.d.ts:15 + +___ + +### order + +ā€¢ `Optional` **order**: `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) + +#### Defined in + +src/core/target/types/types/app_category.d.ts:26 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AttachedToCaseArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AttachedToCaseArgs.md new file mode 100644 index 0000000000000..86ea1605c1374 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AttachedToCaseArgs.md @@ -0,0 +1,55 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AttachedToCaseArgs + +# Interface: AttachedToCaseArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AttachedToCaseArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`AttachedToCaseArgs`** + + ā†³ā†³ [`CountActionsAttachedToCaseArgs`](client._internal_namespace.CountActionsAttachedToCaseArgs.md) + +## Table of contents + +### Properties + +- [caseId](client._internal_namespace.AttachedToCaseArgs.md#caseid) +- [filter](client._internal_namespace.AttachedToCaseArgs.md#filter) +- [unsecuredSavedObjectsClient](client._internal_namespace.AttachedToCaseArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### caseId + +ā€¢ **caseId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:33](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L33) + +___ + +### filter + +ā€¢ `Optional` **filter**: `KueryNode` + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:34](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L34) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Attributes.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Attributes.md new file mode 100644 index 0000000000000..fd8a32f7afb6b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Attributes.md @@ -0,0 +1,84 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Attributes + +# Interface: Attributes + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Attributes + +## Table of contents + +### Properties + +- [action](client._internal_namespace.Attributes.md#action) +- [created\_at](client._internal_namespace.Attributes.md#created_at) +- [created\_by](client._internal_namespace.Attributes.md#created_by) +- [owner](client._internal_namespace.Attributes.md#owner) +- [payload](client._internal_namespace.Attributes.md#payload) +- [type](client._internal_namespace.Attributes.md#type) + +## Properties + +### action + +ā€¢ **action**: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:84](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L84) + +___ + +### created\_at + +ā€¢ **created\_at**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:85](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L85) + +___ + +### created\_by + +ā€¢ **created\_by**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:86](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L86) + +___ + +### owner + +ā€¢ **owner**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:87](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L87) + +___ + +### payload + +ā€¢ **payload**: `Record`<`string`, `unknown`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:89](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L89) + +___ + +### type + +ā€¢ **type**: ``"description"`` \| ``"tags"`` \| ``"title"`` \| ``"connector"`` \| ``"settings"`` \| ``"status"`` \| ``"comment"`` \| ``"pushed"`` \| ``"create_case"`` \| ``"delete_case"`` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:88](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L88) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuditEvent.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuditEvent.md new file mode 100644 index 0000000000000..d0bbaabfc416b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuditEvent.md @@ -0,0 +1,59 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuditEvent + +# Interface: AuditEvent + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuditEvent + +Audit event schema using ECS format: https://www.elastic.co/guide/en/ecs/1.12/index.html + +If you add additional fields to the schema ensure you update the Kibana Filebeat module: +https://github.com/elastic/beats/tree/master/filebeat/module/kibana + +## Hierarchy + +- `LogMeta` + + ā†³ **`AuditEvent`** + +## Table of contents + +### Properties + +- [kibana](client._internal_namespace.AuditEvent.md#kibana) +- [message](client._internal_namespace.AuditEvent.md#message) + +## Properties + +### kibana + +ā€¢ `Optional` **kibana**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `add_to_spaces?` | readonly `string`[] | Set of space IDs that a saved object was shared to. | +| `authentication_provider?` | `string` | Name of authentication provider associated with a login event. | +| `authentication_realm?` | `string` | Name of Elasticsearch realm that has authenticated the user. | +| `authentication_type?` | `string` | Type of authentication provider associated with a login event. | +| `delete_from_spaces?` | readonly `string`[] | Set of space IDs that a saved object was removed from. | +| `lookup_realm?` | `string` | Name of Elasticsearch realm where the user details were retrieved from. | +| `saved_object?` | `Object` | Saved object that was created, changed, deleted or accessed as part of this event. | +| `saved_object.id` | `string` | - | +| `saved_object.type` | `string` | - | +| `session_id?` | `string` | The ID of the user session associated with this event. Each login attempt results in a unique session id. | +| `space_id?` | `string` | The ID of the space associated with this event. | + +#### Defined in + +x-pack/plugins/security/target/types/server/audit/audit_events.d.ts:14 + +___ + +### message + +ā€¢ **message**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/server/audit/audit_events.d.ts:13 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuditLogger.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuditLogger.md new file mode 100644 index 0000000000000..c4caafd67c08d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuditLogger.md @@ -0,0 +1,52 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuditLogger + +# Interface: AuditLogger + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuditLogger + +## Table of contents + +### Methods + +- [log](client._internal_namespace.AuditLogger.md#log) + +## Methods + +### log + +ā–ø **log**(`event`): `void` + +Logs an [AuditEvent](client._internal_namespace.AuditEvent.md) and automatically adds meta data about the +current user, space and correlation id. + +Guidelines around what events should be logged and how they should be +structured can be found in: `/x-pack/plugins/security/README.md` + +**`example`** +```typescript +const auditLogger = securitySetup.audit.asScoped(request); +auditLogger.log({ + message: 'User is updating dashboard [id=123]', + event: { + action: 'saved_object_update', + outcome: 'unknown' + }, + kibana: { + saved_object: { type: 'dashboard', id: '123' } + }, +}); +``` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `undefined` \| [`AuditEvent`](client._internal_namespace.AuditEvent.md) | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/security/target/types/server/audit/audit_service.d.ts:32 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthFilterHelpers.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthFilterHelpers.md new file mode 100644 index 0000000000000..c4117202317cc --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthFilterHelpers.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuthFilterHelpers + +# Interface: AuthFilterHelpers + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuthFilterHelpers + +Defines the helper methods and necessary information for authorizing the find API's request. + +## Table of contents + +### Properties + +- [ensureSavedObjectsAreAuthorized](client._internal_namespace.AuthFilterHelpers.md#ensuresavedobjectsareauthorized) +- [filter](client._internal_namespace.AuthFilterHelpers.md#filter) + +## Properties + +### ensureSavedObjectsAreAuthorized + +ā€¢ **ensureSavedObjectsAreAuthorized**: [`EnsureSOAuthCallback`](../modules/client._internal_namespace.md#ensuresoauthcallback) + +Utility function for checking that the returned entities are in fact authorized for the user making the request + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:123](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L123) + +___ + +### filter + +ā€¢ `Optional` **filter**: `KueryNode` + +The owner filter to pass to the saved object client's find operation that is scoped to the authorized owners + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:119](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L119) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthenticatedUser.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthenticatedUser.md new file mode 100644 index 0000000000000..69dc207747edf --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthenticatedUser.md @@ -0,0 +1,170 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuthenticatedUser + +# Interface: AuthenticatedUser + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuthenticatedUser + +Represents the currently authenticated user. + +## Hierarchy + +- [`User`](client._internal_namespace.User.md) + + ā†³ **`AuthenticatedUser`** + +## Table of contents + +### Properties + +- [authentication\_provider](client._internal_namespace.AuthenticatedUser.md#authentication_provider) +- [authentication\_realm](client._internal_namespace.AuthenticatedUser.md#authentication_realm) +- [authentication\_type](client._internal_namespace.AuthenticatedUser.md#authentication_type) +- [email](client._internal_namespace.AuthenticatedUser.md#email) +- [enabled](client._internal_namespace.AuthenticatedUser.md#enabled) +- [full\_name](client._internal_namespace.AuthenticatedUser.md#full_name) +- [lookup\_realm](client._internal_namespace.AuthenticatedUser.md#lookup_realm) +- [metadata](client._internal_namespace.AuthenticatedUser.md#metadata) +- [roles](client._internal_namespace.AuthenticatedUser.md#roles) +- [username](client._internal_namespace.AuthenticatedUser.md#username) + +## Properties + +### authentication\_provider + +ā€¢ **authentication\_provider**: [`AuthenticationProvider`](client._internal_namespace.AuthenticationProvider.md) + +The authentication provider that used to authenticate user. + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authenticated_user.d.ts:22 + +___ + +### authentication\_realm + +ā€¢ **authentication\_realm**: [`UserRealm`](client._internal_namespace.UserRealm.md) + +The name and type of the Realm that has authenticated the user. + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authenticated_user.d.ts:14 + +___ + +### authentication\_type + +ā€¢ **authentication\_type**: `string` + +The AuthenticationType used by ES to authenticate the user. + +**`example`** "realm" | "api_key" | "token" | "anonymous" | "internal" + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authenticated_user.d.ts:28 + +___ + +### email + +ā€¢ `Optional` **email**: `string` + +#### Inherited from + +[User](client._internal_namespace.User.md).[email](client._internal_namespace.User.md#email) + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:3 + +___ + +### enabled + +ā€¢ **enabled**: `boolean` + +#### Inherited from + +[User](client._internal_namespace.User.md).[enabled](client._internal_namespace.User.md#enabled) + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:6 + +___ + +### full\_name + +ā€¢ `Optional` **full\_name**: `string` + +#### Inherited from + +[User](client._internal_namespace.User.md).[full_name](client._internal_namespace.User.md#full_name) + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:4 + +___ + +### lookup\_realm + +ā€¢ **lookup\_realm**: [`UserRealm`](client._internal_namespace.UserRealm.md) + +The name and type of the Realm where the user information were retrieved from. + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authenticated_user.d.ts:18 + +___ + +### metadata + +ā€¢ `Optional` **metadata**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `_deprecated?` | `boolean` | +| `_deprecated_reason?` | `string` | +| `_reserved` | `boolean` | + +#### Inherited from + +[User](client._internal_namespace.User.md).[metadata](client._internal_namespace.User.md#metadata) + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:7 + +___ + +### roles + +ā€¢ **roles**: readonly `string`[] + +#### Inherited from + +[User](client._internal_namespace.User.md).[roles](client._internal_namespace.User.md#roles) + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:5 + +___ + +### username + +ā€¢ **username**: `string` + +#### Inherited from + +[User](client._internal_namespace.User.md).[username](client._internal_namespace.User.md#username) + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:2 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthenticationProvider.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthenticationProvider.md new file mode 100644 index 0000000000000..a10edc042b528 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthenticationProvider.md @@ -0,0 +1,34 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuthenticationProvider + +# Interface: AuthenticationProvider + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuthenticationProvider + +Type and name tuple to identify provider used to authenticate user. + +## Table of contents + +### Properties + +- [name](client._internal_namespace.AuthenticationProvider.md#name) +- [type](client._internal_namespace.AuthenticationProvider.md#type) + +## Properties + +### name + +ā€¢ **name**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authentication_provider.d.ts:6 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authentication_provider.d.ts:5 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthorizationMode-1.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthorizationMode-1.md new file mode 100644 index 0000000000000..ff75cd19e524c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthorizationMode-1.md @@ -0,0 +1,31 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuthorizationMode + +# Interface: AuthorizationMode + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuthorizationMode + +## Table of contents + +### Methods + +- [useRbacForRequest](client._internal_namespace.AuthorizationMode-1.md#userbacforrequest) + +## Methods + +### useRbacForRequest + +ā–ø **useRbacForRequest**(`request`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/mode.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthorizationServiceSetup.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthorizationServiceSetup.md new file mode 100644 index 0000000000000..5011fe972f36e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.AuthorizationServiceSetup.md @@ -0,0 +1,71 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / AuthorizationServiceSetup + +# Interface: AuthorizationServiceSetup + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).AuthorizationServiceSetup + +Authorization services available on the setup contract of the security plugin. + +## Table of contents + +### Properties + +- [actions](client._internal_namespace.AuthorizationServiceSetup.md#actions) +- [checkPrivilegesDynamicallyWithRequest](client._internal_namespace.AuthorizationServiceSetup.md#checkprivilegesdynamicallywithrequest) +- [checkPrivilegesWithRequest](client._internal_namespace.AuthorizationServiceSetup.md#checkprivilegeswithrequest) +- [checkSavedObjectsPrivilegesWithRequest](client._internal_namespace.AuthorizationServiceSetup.md#checksavedobjectsprivilegeswithrequest) +- [mode](client._internal_namespace.AuthorizationServiceSetup.md#mode) + +## Properties + +### actions + +ā€¢ **actions**: [`Actions`](../classes/client._internal_namespace.Actions.md) + +Actions are used to create the "actions" that are associated with Elasticsearch's +application privileges, and are used to perform the authorization checks implemented +by the various `checkPrivilegesWithRequest` derivatives. + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/authorization_service.d.ts:52 + +___ + +### checkPrivilegesDynamicallyWithRequest + +ā€¢ **checkPrivilegesDynamicallyWithRequest**: [`CheckPrivilegesDynamicallyWithRequest`](../modules/client._internal_namespace.md#checkprivilegesdynamicallywithrequest) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/authorization_service.d.ts:54 + +___ + +### checkPrivilegesWithRequest + +ā€¢ **checkPrivilegesWithRequest**: [`CheckPrivilegesWithRequest`](../modules/client._internal_namespace.md#checkprivilegeswithrequest) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/authorization_service.d.ts:53 + +___ + +### checkSavedObjectsPrivilegesWithRequest + +ā€¢ **checkSavedObjectsPrivilegesWithRequest**: [`CheckSavedObjectsPrivilegesWithRequest`](../modules/client._internal_namespace.md#checksavedobjectsprivilegeswithrequest) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/authorization_service.d.ts:55 + +___ + +### mode + +ā€¢ **mode**: [`AuthorizationMode`](client._internal_namespace.AuthorizationMode-1.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/authorization_service.d.ts:56 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BeforeSaveContext.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BeforeSaveContext.md new file mode 100644 index 0000000000000..6e52bf637eada --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BeforeSaveContext.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BeforeSaveContext + +# Interface: BeforeSaveContext + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BeforeSaveContext + +## Table of contents + +### Properties + +- [taskInstance](client._internal_namespace.BeforeSaveContext.md#taskinstance) + +## Properties + +### taskInstance + +ā€¢ **taskInstance**: [`TaskInstance`](client._internal_namespace.TaskInstance.md) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/lib/middleware.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BuilderParameters.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BuilderParameters.md new file mode 100644 index 0000000000000..c91716f5b2248 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BuilderParameters.md @@ -0,0 +1,205 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BuilderParameters + +# Interface: BuilderParameters + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BuilderParameters + +## Table of contents + +### Properties + +- [comment](client._internal_namespace.BuilderParameters.md#comment) +- [connector](client._internal_namespace.BuilderParameters.md#connector) +- [create\_case](client._internal_namespace.BuilderParameters.md#create_case) +- [delete\_case](client._internal_namespace.BuilderParameters.md#delete_case) +- [description](client._internal_namespace.BuilderParameters.md#description) +- [pushed](client._internal_namespace.BuilderParameters.md#pushed) +- [settings](client._internal_namespace.BuilderParameters.md#settings) +- [status](client._internal_namespace.BuilderParameters.md#status) +- [tags](client._internal_namespace.BuilderParameters.md#tags) +- [title](client._internal_namespace.BuilderParameters.md#title) + +## Properties + +### comment + +ā€¢ **comment**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.attachment` | { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:44](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L44) + +___ + +### connector + +ā€¢ **connector**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.connector` | { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:49](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L49) + +___ + +### create\_case + +ā€¢ **create\_case**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.connector` | { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } | +| `parameters.payload.description` | `string` | +| `parameters.payload.owner` | `string` | +| `parameters.payload.settings` | { syncAlerts: boolean; } | +| `parameters.payload.tags` | `string`[] | +| `parameters.payload.title` | `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:56](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L56) + +___ + +### delete\_case + +ā€¢ **delete\_case**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:61](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L61) + +___ + +### description + +ā€¢ **description**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.description` | `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L25) + +___ + +### pushed + +ā€¢ **pushed**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.externalService` | { `connector_id`: `string` = rt.string } & { `connector_name`: `string` = rt.string; `external_id`: `string` = rt.string; `external_title`: `string` = rt.string; `external_url`: `string` = rt.string; `pushed_at`: `string` = rt.string; `pushed_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT } | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:34](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L34) + +___ + +### settings + +ā€¢ **settings**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.settings` | `Object` | +| `parameters.payload.settings.syncAlerts` | `boolean` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:41](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L41) + +___ + +### status + +ā€¢ **status**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.status` | [`CaseStatuses`](../enums/client._internal_namespace.CaseStatuses.md) | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:28](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L28) + +___ + +### tags + +ā€¢ **tags**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.tags` | `string`[] | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:31](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L31) + +___ + +### title + +ā€¢ **title**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `parameters` | `Object` | +| `parameters.payload` | `Object` | +| `parameters.payload.title` | `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:22](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L22) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BuilderReturnValue.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BuilderReturnValue.md new file mode 100644 index 0000000000000..ab7e6bdade21e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BuilderReturnValue.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BuilderReturnValue + +# Interface: BuilderReturnValue + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BuilderReturnValue + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.BuilderReturnValue.md#attributes) +- [references](client._internal_namespace.BuilderReturnValue.md#references) + +## Properties + +### attributes + +ā€¢ **attributes**: [`Attributes`](client._internal_namespace.Attributes.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:93](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L93) + +___ + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:94](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L94) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md new file mode 100644 index 0000000000000..ac16ce838e615 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md @@ -0,0 +1,125 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BulkCreateAttachmentDeletionUserAction + +# Interface: BulkCreateAttachmentDeletionUserAction + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BulkCreateAttachmentDeletionUserAction + +## Hierarchy + +- `Omit`<[`CommonUserActionArgs`](../modules/client._internal_namespace.md#commonuseractionargs), ``"owner"``\> + + ā†³ **`BulkCreateAttachmentDeletionUserAction`** + +## Table of contents + +### Properties + +- [action](client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md#action) +- [attachmentId](client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md#attachmentid) +- [attachments](client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md#attachments) +- [caseId](client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md#caseid) +- [connectorId](client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md#connectorid) +- [unsecuredSavedObjectsClient](client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md#unsecuredsavedobjectsclient) +- [user](client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md#user) + +## Properties + +### action + +ā€¢ `Optional` **action**: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` + +#### Inherited from + +Omit.action + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:80](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L80) + +___ + +### attachmentId + +ā€¢ `Optional` **attachmentId**: `string` + +#### Inherited from + +Omit.attachmentId + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:78](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L78) + +___ + +### attachments + +ā€¢ **attachments**: { `attachment`: { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } ; `id`: `string` ; `owner`: `string` }[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:95](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L95) + +___ + +### caseId + +ā€¢ **caseId**: `string` + +#### Inherited from + +Omit.caseId + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:76](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L76) + +___ + +### connectorId + +ā€¢ `Optional` **connectorId**: `string` + +#### Inherited from + +Omit.connectorId + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L79) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +Omit.unsecuredSavedObjectsClient + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) + +___ + +### user + +ā€¢ **user**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Inherited from + +Omit.user + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:75](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L75) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md new file mode 100644 index 0000000000000..5acc559d72638 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md @@ -0,0 +1,72 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BulkCreateBulkUpdateCaseUserActions + +# Interface: BulkCreateBulkUpdateCaseUserActions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BulkCreateBulkUpdateCaseUserActions + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`BulkCreateBulkUpdateCaseUserActions`** + +## Table of contents + +### Properties + +- [originalCases](client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md#originalcases) +- [unsecuredSavedObjectsClient](client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md#unsecuredsavedobjectsclient) +- [updatedCases](client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md#updatedcases) +- [user](client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md#user) + +## Properties + +### originalCases + +ā€¢ **originalCases**: [`SavedObject`](client._internal_namespace.SavedObject.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:89](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L89) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) + +___ + +### updatedCases + +ā€¢ **updatedCases**: [`SavedObjectsUpdateResponse`](client._internal_namespace.SavedObjectsUpdateResponse.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\>[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:90](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L90) + +___ + +### user + +ā€¢ **user**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:91](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L91) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateCaseDeletionUserAction.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateCaseDeletionUserAction.md new file mode 100644 index 0000000000000..d925395547e55 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkCreateCaseDeletionUserAction.md @@ -0,0 +1,61 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BulkCreateCaseDeletionUserAction + +# Interface: BulkCreateCaseDeletionUserAction + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BulkCreateCaseDeletionUserAction + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`BulkCreateCaseDeletionUserAction`** + +## Table of contents + +### Properties + +- [cases](client._internal_namespace.BulkCreateCaseDeletionUserAction.md#cases) +- [unsecuredSavedObjectsClient](client._internal_namespace.BulkCreateCaseDeletionUserAction.md#unsecuredsavedobjectsclient) +- [user](client._internal_namespace.BulkCreateCaseDeletionUserAction.md#user) + +## Properties + +### cases + +ā€¢ **cases**: { `connectorId`: `string` ; `id`: `string` ; `owner`: `string` }[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:78](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L78) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) + +___ + +### user + +ā€¢ **user**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L79) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkUpdateAttachmentArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkUpdateAttachmentArgs.md new file mode 100644 index 0000000000000..ecaf5f4b535f7 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.BulkUpdateAttachmentArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / BulkUpdateAttachmentArgs + +# Interface: BulkUpdateAttachmentArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).BulkUpdateAttachmentArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`BulkUpdateAttachmentArgs`** + +## Table of contents + +### Properties + +- [comments](client._internal_namespace.BulkUpdateAttachmentArgs.md#comments) +- [unsecuredSavedObjectsClient](client._internal_namespace.BulkUpdateAttachmentArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### comments + +ā€¢ **comments**: [`UpdateArgs`](client._internal_namespace.UpdateArgs.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:62](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L62) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CancellableTask.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CancellableTask.md new file mode 100644 index 0000000000000..f7a6457695400 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CancellableTask.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CancellableTask + +# Interface: CancellableTask + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CancellableTask + +## Table of contents + +### Properties + +- [cancel](client._internal_namespace.CancellableTask.md#cancel) +- [run](client._internal_namespace.CancellableTask.md#run) + +## Properties + +### cancel + +ā€¢ `Optional` **cancel**: [`CancelFunction`](../modules/client._internal_namespace.md#cancelfunction) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:68 + +___ + +### run + +ā€¢ **run**: [`RunFunction`](../modules/client._internal_namespace.md#runfunction) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:67 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Capabilities.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Capabilities.md new file mode 100644 index 0000000000000..b9cddb8df9faf --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Capabilities.md @@ -0,0 +1,63 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Capabilities + +# Interface: Capabilities + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Capabilities + +The read-only set of capabilities available for the current UI session. +Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, +and the boolean is a flag indicating if the capability is enabled or disabled. + +## Indexable + +ā–Ŗ [key: `string`]: `Record`<`string`, `boolean` \| `Record`<`string`, `boolean`\>\> + +Custom capabilities, registered by plugins. + +## Table of contents + +### Properties + +- [catalogue](client._internal_namespace.Capabilities.md#catalogue) +- [management](client._internal_namespace.Capabilities.md#management) +- [navLinks](client._internal_namespace.Capabilities.md#navlinks) + +## Properties + +### catalogue + +ā€¢ **catalogue**: `Record`<`string`, `boolean`\> + +Catalogue capabilities. Catalogue entries drive the visibility of the Kibana homepage options. + +#### Defined in + +src/core/target/types/types/capabilities.d.ts:16 + +___ + +### management + +ā€¢ **management**: `Object` + +Management section capabilities. + +#### Index signature + +ā–Ŗ [sectionId: `string`]: `Record`<`string`, `boolean`\> + +#### Defined in + +src/core/target/types/types/capabilities.d.ts:12 + +___ + +### navLinks + +ā€¢ **navLinks**: `Record`<`string`, `boolean`\> + +Navigation link capabilities. + +#### Defined in + +src/core/target/types/types/capabilities.d.ts:10 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CaseCommentStats.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CaseCommentStats.md new file mode 100644 index 0000000000000..e4596ea3eacc1 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CaseCommentStats.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CaseCommentStats + +# Interface: CaseCommentStats + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CaseCommentStats + +## Table of contents + +### Properties + +- [alertTotals](client._internal_namespace.CaseCommentStats.md#alerttotals) +- [commentTotals](client._internal_namespace.CaseCommentStats.md#commenttotals) + +## Properties + +### alertTotals + +ā€¢ **alertTotals**: `Map`<`string`, `number`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:115](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L115) + +___ + +### commentTotals + +ā€¢ **commentTotals**: `Map`<`string`, `number`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:114](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L114) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CasesClientArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CasesClientArgs.md new file mode 100644 index 0000000000000..9ec38679b26d0 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CasesClientArgs.md @@ -0,0 +1,160 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CasesClientArgs + +# Interface: CasesClientArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CasesClientArgs + +Parameters for initializing a cases client + +## Table of contents + +### Properties + +- [actionsClient](client._internal_namespace.CasesClientArgs.md#actionsclient) +- [alertsService](client._internal_namespace.CasesClientArgs.md#alertsservice) +- [attachmentService](client._internal_namespace.CasesClientArgs.md#attachmentservice) +- [authorization](client._internal_namespace.CasesClientArgs.md#authorization) +- [caseConfigureService](client._internal_namespace.CasesClientArgs.md#caseconfigureservice) +- [caseService](client._internal_namespace.CasesClientArgs.md#caseservice) +- [connectorMappingsService](client._internal_namespace.CasesClientArgs.md#connectormappingsservice) +- [lensEmbeddableFactory](client._internal_namespace.CasesClientArgs.md#lensembeddablefactory) +- [logger](client._internal_namespace.CasesClientArgs.md#logger) +- [unsecuredSavedObjectsClient](client._internal_namespace.CasesClientArgs.md#unsecuredsavedobjectsclient) +- [user](client._internal_namespace.CasesClientArgs.md#user) +- [userActionService](client._internal_namespace.CasesClientArgs.md#useractionservice) + +## Properties + +### actionsClient + +ā€¢ `Readonly` **actionsClient**: `PublicMethodsOf`<[`ActionsClient`](../modules/client._internal_namespace.md#actionsclient)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:38](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L38) + +___ + +### alertsService + +ā€¢ `Readonly` **alertsService**: [`AlertService`](../classes/client._internal_namespace.AlertService.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:33](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L33) + +___ + +### attachmentService + +ā€¢ `Readonly` **attachmentService**: [`AttachmentService`](../classes/client._internal_namespace.AttachmentService.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:34](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L34) + +___ + +### authorization + +ā€¢ `Readonly` **authorization**: `PublicMethodsOf`<[`Authorization`](../classes/client._internal_namespace.Authorization.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:37](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L37) + +___ + +### caseConfigureService + +ā€¢ `Readonly` **caseConfigureService**: [`CaseConfigureService`](../classes/client._internal_namespace.CaseConfigureService.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:27](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L27) + +___ + +### caseService + +ā€¢ `Readonly` **caseService**: [`CasesService`](../classes/client._internal_namespace.CasesService.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:28](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L28) + +___ + +### connectorMappingsService + +ā€¢ `Readonly` **connectorMappingsService**: [`ConnectorMappingsService`](../classes/client._internal_namespace.ConnectorMappingsService.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:29](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L29) + +___ + +### lensEmbeddableFactory + +ā€¢ `Readonly` **lensEmbeddableFactory**: () => [`EmbeddableRegistryDefinition`](client._internal_namespace.EmbeddableRegistryDefinition.md)<[`EmbeddableStateWithType`](../modules/client._internal_namespace.md#embeddablestatewithtype)\> + +#### Type declaration + +ā–ø (): [`EmbeddableRegistryDefinition`](client._internal_namespace.EmbeddableRegistryDefinition.md)<[`EmbeddableStateWithType`](../modules/client._internal_namespace.md#embeddablestatewithtype)\> + +##### Returns + +[`EmbeddableRegistryDefinition`](client._internal_namespace.EmbeddableRegistryDefinition.md)<[`EmbeddableStateWithType`](../modules/client._internal_namespace.md#embeddablestatewithtype)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:36](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L36) + +___ + +### logger + +ā€¢ `Readonly` **logger**: `Logger` + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:35](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L35) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ `Readonly` **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:31](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L31) + +___ + +### user + +ā€¢ `Readonly` **user**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L30) + +___ + +### userActionService + +ā€¢ `Readonly` **userActionService**: [`CaseUserActionService`](../classes/client._internal_namespace.CaseUserActionService.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/types.ts:32](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/types.ts#L32) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CasesMapWithPageInfo.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CasesMapWithPageInfo.md new file mode 100644 index 0000000000000..a39f560b084af --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CasesMapWithPageInfo.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CasesMapWithPageInfo + +# Interface: CasesMapWithPageInfo + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CasesMapWithPageInfo + +## Table of contents + +### Properties + +- [casesMap](client._internal_namespace.CasesMapWithPageInfo.md#casesmap) +- [page](client._internal_namespace.CasesMapWithPageInfo.md#page) +- [perPage](client._internal_namespace.CasesMapWithPageInfo.md#perpage) +- [total](client._internal_namespace.CasesMapWithPageInfo.md#total) + +## Properties + +### casesMap + +ā€¢ **casesMap**: `Map`<`string`, { `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `totalAlerts`: `number` = rt.number; `totalComment`: `number` = rt.number; `version`: `string` = rt.string } & { `comments`: `undefined` \| { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string }[] }\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:119](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L119) + +___ + +### page + +ā€¢ **page**: `number` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:120](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L120) + +___ + +### perPage + +ā€¢ **perPage**: `number` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:121](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L121) + +___ + +### total + +ā€¢ **total**: `number` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:122](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L122) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivileges.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivileges.md new file mode 100644 index 0000000000000..6cf7583198177 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivileges.md @@ -0,0 +1,78 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CheckPrivileges + +# Interface: CheckPrivileges + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CheckPrivileges + +## Table of contents + +### Methods + +- [atSpace](client._internal_namespace.CheckPrivileges.md#atspace) +- [atSpaces](client._internal_namespace.CheckPrivileges.md#atspaces) +- [globally](client._internal_namespace.CheckPrivileges.md#globally) + +## Methods + +### atSpace + +ā–ø **atSpace**(`spaceId`, `privileges`, `options?`): `Promise`<[`CheckPrivilegesResponse`](client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `spaceId` | `string` | +| `privileges` | [`CheckPrivilegesPayload`](client._internal_namespace.CheckPrivilegesPayload.md) | +| `options?` | [`CheckPrivilegesOptions`](client._internal_namespace.CheckPrivilegesOptions.md) | + +#### Returns + +`Promise`<[`CheckPrivilegesResponse`](client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:61 + +___ + +### atSpaces + +ā–ø **atSpaces**(`spaceIds`, `privileges`, `options?`): `Promise`<[`CheckPrivilegesResponse`](client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `spaceIds` | `string`[] | +| `privileges` | [`CheckPrivilegesPayload`](client._internal_namespace.CheckPrivilegesPayload.md) | +| `options?` | [`CheckPrivilegesOptions`](client._internal_namespace.CheckPrivilegesOptions.md) | + +#### Returns + +`Promise`<[`CheckPrivilegesResponse`](client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:62 + +___ + +### globally + +ā–ø **globally**(`privileges`, `options?`): `Promise`<[`CheckPrivilegesResponse`](client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `privileges` | [`CheckPrivilegesPayload`](client._internal_namespace.CheckPrivilegesPayload.md) | +| `options?` | [`CheckPrivilegesOptions`](client._internal_namespace.CheckPrivilegesOptions.md) | + +#### Returns + +`Promise`<[`CheckPrivilegesResponse`](client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:63 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesOptions.md new file mode 100644 index 0000000000000..85caefaa3b490 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesOptions.md @@ -0,0 +1,27 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CheckPrivilegesOptions + +# Interface: CheckPrivilegesOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CheckPrivilegesOptions + +Options to influce the privilege checks. + +## Table of contents + +### Properties + +- [requireLoginAction](client._internal_namespace.CheckPrivilegesOptions.md#requireloginaction) + +## Properties + +### requireLoginAction + +ā€¢ `Optional` **requireLoginAction**: `boolean` + +Whether or not the `login` action should be required (default: true). +Setting this to false is not advised except for special circumstances, when you do not require +the request to belong to a user capable of logging into Kibana. + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:31 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesPayload.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesPayload.md new file mode 100644 index 0000000000000..29242fb43dbab --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesPayload.md @@ -0,0 +1,39 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CheckPrivilegesPayload + +# Interface: CheckPrivilegesPayload + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CheckPrivilegesPayload + +## Table of contents + +### Properties + +- [elasticsearch](client._internal_namespace.CheckPrivilegesPayload.md#elasticsearch) +- [kibana](client._internal_namespace.CheckPrivilegesPayload.md#kibana) + +## Properties + +### elasticsearch + +ā€¢ `Optional` **elasticsearch**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `cluster` | `string`[] | +| `index` | `Record`<`string`, `string`[]\> | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:67 + +___ + +### kibana + +ā€¢ `Optional` **kibana**: `string` \| `string`[] + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:66 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesResponse.md new file mode 100644 index 0000000000000..8e4ce4ae9c815 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CheckPrivilegesResponse.md @@ -0,0 +1,52 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CheckPrivilegesResponse + +# Interface: CheckPrivilegesResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CheckPrivilegesResponse + +## Table of contents + +### Properties + +- [hasAllRequested](client._internal_namespace.CheckPrivilegesResponse.md#hasallrequested) +- [privileges](client._internal_namespace.CheckPrivilegesResponse.md#privileges) +- [username](client._internal_namespace.CheckPrivilegesResponse.md#username) + +## Properties + +### hasAllRequested + +ā€¢ **hasAllRequested**: `boolean` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:34 + +___ + +### privileges + +ā€¢ **privileges**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `elasticsearch` | `Object` | +| `elasticsearch.cluster` | { `authorized`: `boolean` ; `privilege`: `string` }[] | +| `elasticsearch.index` | `Object` | +| `kibana` | { `authorized`: `boolean` ; `privilege`: `string` ; `resource?`: `string` }[] | + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:36 + +___ + +### username + +ā€¢ **username**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:35 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs-1.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs-1.md new file mode 100644 index 0000000000000..ded25fa2ce105 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs-1.md @@ -0,0 +1,55 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ClientArgs + +# Interface: ClientArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ClientArgs + +## Hierarchy + +- **`ClientArgs`** + + ā†³ [`GetCaseIdsByAlertIdArgs`](client._internal_namespace.GetCaseIdsByAlertIdArgs.md) + + ā†³ [`GetCaseArgs`](client._internal_namespace.GetCaseArgs.md) + + ā†³ [`GetCasesArgs`](client._internal_namespace.GetCasesArgs.md) + + ā†³ [`FindCasesArgs`](client._internal_namespace.FindCasesArgs.md) + + ā†³ [`PostCaseArgs`](client._internal_namespace.PostCaseArgs.md) + + ā†³ [`PatchCasesArgs`](client._internal_namespace.PatchCasesArgs.md) + + ā†³ [`BulkCreateCaseDeletionUserAction`](client._internal_namespace.BulkCreateCaseDeletionUserAction.md) + + ā†³ [`BulkCreateBulkUpdateCaseUserActions`](client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md) + + ā†³ [`GetCaseUserActionArgs`](client._internal_namespace.GetCaseUserActionArgs.md) + + ā†³ [`CreateUserActionES`](client._internal_namespace.CreateUserActionES.md) + + ā†³ [`PostCaseUserActionArgs`](client._internal_namespace.PostCaseUserActionArgs.md) + + ā†³ [`AttachedToCaseArgs`](client._internal_namespace.AttachedToCaseArgs.md) + + ā†³ [`GetAttachmentArgs`](client._internal_namespace.GetAttachmentArgs.md) + + ā†³ [`CreateAttachmentArgs`](client._internal_namespace.CreateAttachmentArgs.md) + + ā†³ [`BulkUpdateAttachmentArgs`](client._internal_namespace.BulkUpdateAttachmentArgs.md) + +## Table of contents + +### Properties + +- [unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +## Properties + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs-2.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs-2.md new file mode 100644 index 0000000000000..78bc19f876c89 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs-2.md @@ -0,0 +1,31 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ClientArgs + +# Interface: ClientArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ClientArgs + +## Hierarchy + +- **`ClientArgs`** + + ā†³ [`FindConnectorMappingsArgs`](client._internal_namespace.FindConnectorMappingsArgs.md) + + ā†³ [`PostConnectorMappingsArgs`](client._internal_namespace.PostConnectorMappingsArgs.md) + + ā†³ [`UpdateConnectorMappingsArgs`](client._internal_namespace.UpdateConnectorMappingsArgs.md) + +## Table of contents + +### Properties + +- [unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-2.md#unsecuredsavedobjectsclient) + +## Properties + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L15) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs.md new file mode 100644 index 0000000000000..9e5709a8b99ba --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ClientArgs.md @@ -0,0 +1,33 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ClientArgs + +# Interface: ClientArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ClientArgs + +## Hierarchy + +- **`ClientArgs`** + + ā†³ [`GetCaseConfigureArgs`](client._internal_namespace.GetCaseConfigureArgs.md) + + ā†³ [`FindCaseConfigureArgs`](client._internal_namespace.FindCaseConfigureArgs.md) + + ā†³ [`PostCaseConfigureArgs`](client._internal_namespace.PostCaseConfigureArgs.md) + + ā†³ [`PatchCaseConfigureArgs`](client._internal_namespace.PatchCaseConfigureArgs.md) + +## Table of contents + +### Properties + +- [unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L30) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CommonArguments.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CommonArguments.md new file mode 100644 index 0000000000000..ed1bb0d81f42a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CommonArguments.md @@ -0,0 +1,84 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CommonArguments + +# Interface: CommonArguments + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CommonArguments + +## Table of contents + +### Properties + +- [action](client._internal_namespace.CommonArguments.md#action) +- [attachmentId](client._internal_namespace.CommonArguments.md#attachmentid) +- [caseId](client._internal_namespace.CommonArguments.md#caseid) +- [connectorId](client._internal_namespace.CommonArguments.md#connectorid) +- [owner](client._internal_namespace.CommonArguments.md#owner) +- [user](client._internal_namespace.CommonArguments.md#user) + +## Properties + +### action + +ā€¢ `Optional` **action**: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:80](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L80) + +___ + +### attachmentId + +ā€¢ `Optional` **attachmentId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:78](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L78) + +___ + +### caseId + +ā€¢ **caseId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:76](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L76) + +___ + +### connectorId + +ā€¢ `Optional` **connectorId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L79) + +___ + +### owner + +ā€¢ **owner**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:77](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L77) + +___ + +### user + +ā€¢ **user**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:75](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L75) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConcreteTaskInstance.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConcreteTaskInstance.md new file mode 100644 index 0000000000000..db3d362c3dbc3 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConcreteTaskInstance.md @@ -0,0 +1,291 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ConcreteTaskInstance + +# Interface: ConcreteTaskInstance + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ConcreteTaskInstance + +A task instance that has an id and is ready for storage. + +## Hierarchy + +- [`TaskInstance`](client._internal_namespace.TaskInstance.md) + + ā†³ **`ConcreteTaskInstance`** + +## Table of contents + +### Properties + +- [attempts](client._internal_namespace.ConcreteTaskInstance.md#attempts) +- [id](client._internal_namespace.ConcreteTaskInstance.md#id) +- [ownerId](client._internal_namespace.ConcreteTaskInstance.md#ownerid) +- [params](client._internal_namespace.ConcreteTaskInstance.md#params) +- [retryAt](client._internal_namespace.ConcreteTaskInstance.md#retryat) +- [runAt](client._internal_namespace.ConcreteTaskInstance.md#runat) +- [schedule](client._internal_namespace.ConcreteTaskInstance.md#schedule) +- [scheduledAt](client._internal_namespace.ConcreteTaskInstance.md#scheduledat) +- [scope](client._internal_namespace.ConcreteTaskInstance.md#scope) +- [startedAt](client._internal_namespace.ConcreteTaskInstance.md#startedat) +- [state](client._internal_namespace.ConcreteTaskInstance.md#state) +- [status](client._internal_namespace.ConcreteTaskInstance.md#status) +- [taskType](client._internal_namespace.ConcreteTaskInstance.md#tasktype) +- [traceparent](client._internal_namespace.ConcreteTaskInstance.md#traceparent) +- [user](client._internal_namespace.ConcreteTaskInstance.md#user) +- [version](client._internal_namespace.ConcreteTaskInstance.md#version) + +## Properties + +### attempts + +ā€¢ **attempts**: `number` + +The number of unsuccessful attempts since the last successful run. This +will be zeroed out after a successful run. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:244 + +___ + +### id + +ā€¢ **id**: `string` + +The id of the Elastic document that stores this instance's data. This can +be passed by the caller when scheduling the task. + +#### Overrides + +[TaskInstance](client._internal_namespace.TaskInstance.md).[id](client._internal_namespace.TaskInstance.md#id) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:230 + +___ + +### ownerId + +ā€¢ **ownerId**: ``null`` \| `string` + +The random uuid of the Kibana instance which claimed ownership of the task last + +#### Overrides + +[TaskInstance](client._internal_namespace.TaskInstance.md).[ownerId](client._internal_namespace.TaskInstance.md#ownerid) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:274 + +___ + +### params + +ā€¢ **params**: `Record`<`string`, `any`\> + +A task-specific set of parameters, used by the task's run function to tailor +its work. This is generally user-input, such as { sms: '333-444-2222' }. + +#### Inherited from + +[TaskInstance](client._internal_namespace.TaskInstance.md).[params](client._internal_namespace.TaskInstance.md#params) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:182 + +___ + +### retryAt + +ā€¢ **retryAt**: ``null`` \| `Date` + +The date and time that this task should re-execute if stuck in "running" / timeout +status. This value is only set when status is set to "running". + +#### Overrides + +[TaskInstance](client._internal_namespace.TaskInstance.md).[retryAt](client._internal_namespace.TaskInstance.md#retryat) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:264 + +___ + +### runAt + +ā€¢ **runAt**: `Date` + +The date and time that this task is scheduled to be run. It is not guaranteed +to run at this time, but it is guaranteed not to run earlier than this. + +#### Overrides + +[TaskInstance](client._internal_namespace.TaskInstance.md).[runAt](client._internal_namespace.TaskInstance.md#runat) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:253 + +___ + +### schedule + +ā€¢ `Optional` **schedule**: [`IntervalSchedule`](client._internal_namespace.IntervalSchedule.md) + +A TaskSchedule string, which specifies this as a recurring task. + +Currently, this supports a single format: an interval in minutes or seconds (e.g. '5m', '30s'). + +#### Inherited from + +[TaskInstance](client._internal_namespace.TaskInstance.md).[schedule](client._internal_namespace.TaskInstance.md#schedule) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:177 + +___ + +### scheduledAt + +ā€¢ **scheduledAt**: `Date` + +The date and time that this task was originally scheduled. This is used +for convenience to task run functions, and for troubleshooting. + +#### Overrides + +[TaskInstance](client._internal_namespace.TaskInstance.md).[scheduledAt](client._internal_namespace.TaskInstance.md#scheduledat) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:239 + +___ + +### scope + +ā€¢ `Optional` **scope**: `string`[] + +Used to group tasks for querying. So, reporting might schedule tasks with a scope of 'reporting', +and then query such tasks to provide a glimpse at only reporting tasks, rather than at all tasks. + +#### Inherited from + +[TaskInstance](client._internal_namespace.TaskInstance.md).[scope](client._internal_namespace.TaskInstance.md#scope) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:201 + +___ + +### startedAt + +ā€¢ **startedAt**: ``null`` \| `Date` + +The date and time that this task started execution. This is used to determine +the "real" runAt that ended up running the task. This value is only set +when status is set to "running". + +#### Overrides + +[TaskInstance](client._internal_namespace.TaskInstance.md).[startedAt](client._internal_namespace.TaskInstance.md#startedat) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:259 + +___ + +### state + +ā€¢ **state**: `Record`<`string`, `any`\> + +The state passed into the task's run function, and returned by the previous +run. If there was no previous run, or if the previous run did not return +any state, this will be the empy object: {} + +#### Overrides + +[TaskInstance](client._internal_namespace.TaskInstance.md).[state](client._internal_namespace.TaskInstance.md#state) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:270 + +___ + +### status + +ā€¢ **status**: [`TaskStatus`](../enums/client._internal_namespace.TaskStatus.md) + +Indicates whether or not the task is currently running. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:248 + +___ + +### taskType + +ā€¢ **taskType**: `string` + +The task definition type whose run function will execute this instance. + +#### Inherited from + +[TaskInstance](client._internal_namespace.TaskInstance.md).[taskType](client._internal_namespace.TaskInstance.md#tasktype) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:149 + +___ + +### traceparent + +ā€¢ `Optional` **traceparent**: `string` + +The serialized traceparent string of the current APM transaction or span. + +#### Inherited from + +[TaskInstance](client._internal_namespace.TaskInstance.md).[traceparent](client._internal_namespace.TaskInstance.md#traceparent) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:192 + +___ + +### user + +ā€¢ `Optional` **user**: `string` + +The id of the user who scheduled this task. + +#### Inherited from + +[TaskInstance](client._internal_namespace.TaskInstance.md).[user](client._internal_namespace.TaskInstance.md#user) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:196 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +The saved object version from the Elaticsearch document. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:234 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConnectorToken.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConnectorToken.md new file mode 100644 index 0000000000000..c60e9bca79a7f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConnectorToken.md @@ -0,0 +1,82 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ConnectorToken + +# Interface: ConnectorToken + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ConnectorToken + +## Hierarchy + +- [`SavedObjectAttributes`](client._internal_namespace.SavedObjectAttributes.md) + + ā†³ **`ConnectorToken`** + +## Table of contents + +### Properties + +- [connectorId](client._internal_namespace.ConnectorToken.md#connectorid) +- [createdAt](client._internal_namespace.ConnectorToken.md#createdat) +- [expiresAt](client._internal_namespace.ConnectorToken.md#expiresat) +- [token](client._internal_namespace.ConnectorToken.md#token) +- [tokenType](client._internal_namespace.ConnectorToken.md#tokentype) +- [updatedAt](client._internal_namespace.ConnectorToken.md#updatedat) + +## Properties + +### connectorId + +ā€¢ **connectorId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:123 + +___ + +### createdAt + +ā€¢ **createdAt**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:127 + +___ + +### expiresAt + +ā€¢ **expiresAt**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:126 + +___ + +### token + +ā€¢ **token**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:125 + +___ + +### tokenType + +ā€¢ **tokenType**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:124 + +___ + +### updatedAt + +ā€¢ `Optional` **updatedAt**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:128 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions-1.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions-1.md new file mode 100644 index 0000000000000..1f7901ac983f1 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions-1.md @@ -0,0 +1,60 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ConstructorOptions + +# Interface: ConstructorOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ConstructorOptions + +## Table of contents + +### Properties + +- [authentication](client._internal_namespace.ConstructorOptions-1.md#authentication) +- [authorization](client._internal_namespace.ConstructorOptions-1.md#authorization) +- [authorizationMode](client._internal_namespace.ConstructorOptions-1.md#authorizationmode) +- [request](client._internal_namespace.ConstructorOptions-1.md#request) + +## Properties + +### authentication + +ā€¢ `Optional` **authentication**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `getCurrentUser` | (`request`: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\>) => ``null`` \| [`AuthenticatedUser`](client._internal_namespace.AuthenticatedUser.md) | + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:7 + +___ + +### authorization + +ā€¢ `Optional` **authorization**: [`AuthorizationServiceSetup`](client._internal_namespace.AuthorizationServiceSetup.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:6 + +___ + +### authorizationMode + +ā€¢ `Optional` **authorizationMode**: [`AuthorizationMode`](../enums/client._internal_namespace.AuthorizationMode.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:8 + +___ + +### request + +ā€¢ **request**: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/authorization/actions_authorization.d.ts:5 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions-2.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions-2.md new file mode 100644 index 0000000000000..fed308c053049 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions-2.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ConstructorOptions + +# Interface: ConstructorOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ConstructorOptions + +## Table of contents + +### Properties + +- [encryptedSavedObjectsClient](client._internal_namespace.ConstructorOptions-2.md#encryptedsavedobjectsclient) +- [logger](client._internal_namespace.ConstructorOptions-2.md#logger) +- [unsecuredSavedObjectsClient](client._internal_namespace.ConstructorOptions-2.md#unsecuredsavedobjectsclient) + +## Properties + +### encryptedSavedObjectsClient + +ā€¢ **encryptedSavedObjectsClient**: [`EncryptedSavedObjectsClient`](client._internal_namespace.EncryptedSavedObjectsClient.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:6 + +___ + +### logger + +ā€¢ **logger**: `Logger` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:8 + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:7 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions.md new file mode 100644 index 0000000000000..67923b89864f8 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ConstructorOptions.md @@ -0,0 +1,153 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ConstructorOptions + +# Interface: ConstructorOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ConstructorOptions + +## Table of contents + +### Properties + +- [actionExecutor](client._internal_namespace.ConstructorOptions.md#actionexecutor) +- [actionTypeRegistry](client._internal_namespace.ConstructorOptions.md#actiontyperegistry) +- [auditLogger](client._internal_namespace.ConstructorOptions.md#auditlogger) +- [authorization](client._internal_namespace.ConstructorOptions.md#authorization) +- [connectorTokenClient](client._internal_namespace.ConstructorOptions.md#connectortokenclient) +- [defaultKibanaIndex](client._internal_namespace.ConstructorOptions.md#defaultkibanaindex) +- [ephemeralExecutionEnqueuer](client._internal_namespace.ConstructorOptions.md#ephemeralexecutionenqueuer) +- [executionEnqueuer](client._internal_namespace.ConstructorOptions.md#executionenqueuer) +- [preconfiguredActions](client._internal_namespace.ConstructorOptions.md#preconfiguredactions) +- [request](client._internal_namespace.ConstructorOptions.md#request) +- [scopedClusterClient](client._internal_namespace.ConstructorOptions.md#scopedclusterclient) +- [unsecuredSavedObjectsClient](client._internal_namespace.ConstructorOptions.md#unsecuredsavedobjectsclient) +- [usageCounter](client._internal_namespace.ConstructorOptions.md#usagecounter) + +## Properties + +### actionExecutor + +ā€¢ **actionExecutor**: [`ActionExecutorContract`](../modules/client._internal_namespace.md#actionexecutorcontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:30 + +___ + +### actionTypeRegistry + +ā€¢ **actionTypeRegistry**: [`ActionTypeRegistry`](../classes/client._internal_namespace.ActionTypeRegistry.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:27 + +___ + +### auditLogger + +ā€¢ `Optional` **auditLogger**: [`AuditLogger`](client._internal_namespace.AuditLogger.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:35 + +___ + +### authorization + +ā€¢ **authorization**: [`ActionsAuthorization`](../classes/client._internal_namespace.ActionsAuthorization.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:34 + +___ + +### connectorTokenClient + +ā€¢ **connectorTokenClient**: [`ConnectorTokenClientContract`](../modules/client._internal_namespace.md#connectortokenclientcontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:37 + +___ + +### defaultKibanaIndex + +ā€¢ **defaultKibanaIndex**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:25 + +___ + +### ephemeralExecutionEnqueuer + +ā€¢ **ephemeralExecutionEnqueuer**: [`ExecutionEnqueuer`](../modules/client._internal_namespace.md#executionenqueuer)<[`RunNowResult`](client._internal_namespace.RunNowResult.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:32 + +___ + +### executionEnqueuer + +ā€¢ **executionEnqueuer**: [`ExecutionEnqueuer`](../modules/client._internal_namespace.md#executionenqueuer)<`void`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:31 + +___ + +### preconfiguredActions + +ā€¢ **preconfiguredActions**: [`PreConfiguredAction`](client._internal_namespace.PreConfiguredAction.md)<[`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig), [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets)\>[] + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:29 + +___ + +### request + +ā€¢ **request**: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:33 + +___ + +### scopedClusterClient + +ā€¢ **scopedClusterClient**: [`IScopedClusterClient`](client._internal_namespace.IScopedClusterClient.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:26 + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:28 + +___ + +### usageCounter + +ā€¢ `Optional` **usageCounter**: [`IUsageCounter`](client._internal_namespace.IUsageCounter.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:36 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CountActionsAttachedToCaseArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CountActionsAttachedToCaseArgs.md new file mode 100644 index 0000000000000..a71324b5543ff --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CountActionsAttachedToCaseArgs.md @@ -0,0 +1,72 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CountActionsAttachedToCaseArgs + +# Interface: CountActionsAttachedToCaseArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CountActionsAttachedToCaseArgs + +## Hierarchy + +- [`AttachedToCaseArgs`](client._internal_namespace.AttachedToCaseArgs.md) + + ā†³ **`CountActionsAttachedToCaseArgs`** + +## Table of contents + +### Properties + +- [aggregations](client._internal_namespace.CountActionsAttachedToCaseArgs.md#aggregations) +- [caseId](client._internal_namespace.CountActionsAttachedToCaseArgs.md#caseid) +- [filter](client._internal_namespace.CountActionsAttachedToCaseArgs.md#filter) +- [unsecuredSavedObjectsClient](client._internal_namespace.CountActionsAttachedToCaseArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### aggregations + +ā€¢ **aggregations**: `Record`<`string`, `AggregationsAggregationContainer`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:40](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L40) + +___ + +### caseId + +ā€¢ **caseId**: `string` + +#### Inherited from + +[AttachedToCaseArgs](client._internal_namespace.AttachedToCaseArgs.md).[caseId](client._internal_namespace.AttachedToCaseArgs.md#caseid) + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:33](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L33) + +___ + +### filter + +ā€¢ `Optional` **filter**: `KueryNode` + +#### Inherited from + +[AttachedToCaseArgs](client._internal_namespace.AttachedToCaseArgs.md).[filter](client._internal_namespace.AttachedToCaseArgs.md#filter) + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:34](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L34) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[AttachedToCaseArgs](client._internal_namespace.AttachedToCaseArgs.md).[unsecuredSavedObjectsClient](client._internal_namespace.AttachedToCaseArgs.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateAttachmentArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateAttachmentArgs.md new file mode 100644 index 0000000000000..50030284f8fb6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateAttachmentArgs.md @@ -0,0 +1,64 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CreateAttachmentArgs + +# Interface: CreateAttachmentArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CreateAttachmentArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`CreateAttachmentArgs`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.CreateAttachmentArgs.md#attributes) +- [id](client._internal_namespace.CreateAttachmentArgs.md#id) +- [references](client._internal_namespace.CreateAttachmentArgs.md#references) +- [unsecuredSavedObjectsClient](client._internal_namespace.CreateAttachmentArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### attributes + +ā€¢ **attributes**: { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:48](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L48) + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:50](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L50) + +___ + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:49](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L49) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateAuditMsgParams.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateAuditMsgParams.md new file mode 100644 index 0000000000000..30c4ab0076bf0 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateAuditMsgParams.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CreateAuditMsgParams + +# Interface: CreateAuditMsgParams + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CreateAuditMsgParams + +## Table of contents + +### Properties + +- [entity](client._internal_namespace.CreateAuditMsgParams.md#entity) +- [error](client._internal_namespace.CreateAuditMsgParams.md#error) +- [operation](client._internal_namespace.CreateAuditMsgParams.md#operation) + +## Properties + +### entity + +ā€¢ `Optional` **entity**: [`OwnerEntity`](client._internal_namespace.OwnerEntity.md) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L15) + +___ + +### error + +ā€¢ `Optional` **error**: `Error` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:16](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L16) + +___ + +### operation + +ā€¢ **operation**: [`OperationDetails`](client._internal_namespace.OperationDetails.md) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/audit_logger.ts:14](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/audit_logger.ts#L14) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateOptions-1.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateOptions-1.md new file mode 100644 index 0000000000000..77e84843801b5 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateOptions-1.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CreateOptions + +# Interface: CreateOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CreateOptions + +## Table of contents + +### Properties + +- [connectorId](client._internal_namespace.CreateOptions-1.md#connectorid) +- [expiresAtMillis](client._internal_namespace.CreateOptions-1.md#expiresatmillis) +- [token](client._internal_namespace.CreateOptions-1.md#token) +- [tokenType](client._internal_namespace.CreateOptions-1.md#tokentype) + +## Properties + +### connectorId + +ā€¢ **connectorId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:11 + +___ + +### expiresAtMillis + +ā€¢ **expiresAtMillis**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:13 + +___ + +### token + +ā€¢ **token**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:12 + +___ + +### tokenType + +ā€¢ `Optional` **tokenType**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:14 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateOptions.md new file mode 100644 index 0000000000000..1070beb2f0304 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateOptions.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CreateOptions + +# Interface: CreateOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CreateOptions + +## Table of contents + +### Properties + +- [action](client._internal_namespace.CreateOptions.md#action) + +## Properties + +### action + +ā€¢ **action**: [`Action`](client._internal_namespace.Action.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:22 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateUserAction.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateUserAction.md new file mode 100644 index 0000000000000..5211a50019cae --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateUserAction.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CreateUserAction + +# Interface: CreateUserAction + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CreateUserAction + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends keyof [`BuilderParameters`](client._internal_namespace.BuilderParameters.md) | + +## Table of contents + +### Properties + +- [payload](client._internal_namespace.CreateUserAction.md#payload) +- [type](client._internal_namespace.CreateUserAction.md#type) + +## Properties + +### payload + +ā€¢ **payload**: [`BuilderParameters`](client._internal_namespace.BuilderParameters.md)[`T`][``"parameters"``][``"payload"``] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:68](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L68) + +___ + +### type + +ā€¢ **type**: `T` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:67](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L67) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateUserActionES.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateUserActionES.md new file mode 100644 index 0000000000000..efc0b67c18a3e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.CreateUserActionES.md @@ -0,0 +1,59 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / CreateUserActionES + +# Interface: CreateUserActionES + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).CreateUserActionES + +## Type parameters + +| Name | +| :------ | +| `T` | + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`CreateUserActionES`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.CreateUserActionES.md#attributes) +- [references](client._internal_namespace.CreateUserActionES.md#references) +- [unsecuredSavedObjectsClient](client._internal_namespace.CreateUserActionES.md#unsecuredsavedobjectsclient) + +## Properties + +### attributes + +ā€¢ **attributes**: `T` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:71](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L71) + +___ + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:72](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L72) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.DecoratedError.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.DecoratedError.md new file mode 100644 index 0000000000000..77ef99caaf16a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.DecoratedError.md @@ -0,0 +1,27 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / DecoratedError + +# Interface: DecoratedError + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).DecoratedError + +## Hierarchy + +- `Boom` + + ā†³ **`DecoratedError`** + +## Table of contents + +### Properties + +- [[code]](client._internal_namespace.DecoratedError.md#[code]) + +## Properties + +### [code] + +ā€¢ `Optional` **[code]**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/errors.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ElasticsearchFeatureConfig.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ElasticsearchFeatureConfig.md new file mode 100644 index 0000000000000..373ba63e5c659 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ElasticsearchFeatureConfig.md @@ -0,0 +1,94 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ElasticsearchFeatureConfig + +# Interface: ElasticsearchFeatureConfig + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ElasticsearchFeatureConfig + +Interface for registering an Elasticsearch feature. +Feature registration allows plugins to hide their applications based +on configured cluster or index privileges. + +## Table of contents + +### Properties + +- [catalogue](client._internal_namespace.ElasticsearchFeatureConfig.md#catalogue) +- [id](client._internal_namespace.ElasticsearchFeatureConfig.md#id) +- [management](client._internal_namespace.ElasticsearchFeatureConfig.md#management) +- [privileges](client._internal_namespace.ElasticsearchFeatureConfig.md#privileges) + +## Properties + +### catalogue + +ā€¢ `Optional` **catalogue**: `string`[] + +If this feature includes a catalogue entry, you can specify them here to control visibility based on the current space. + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:34 + +___ + +### id + +ā€¢ **id**: `string` + +Unique identifier for this feature. +This identifier is also used when generating UI Capabilities. + +**`see`** UICapabilities + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:15 + +___ + +### management + +ā€¢ `Optional` **management**: `Object` + +Management sections associated with this feature. + +**`example`** +```ts + // Enables access to the "Advanced Settings" management page within the Kibana section + management: { + kibana: ['settings'] + } +``` + +#### Index signature + +ā–Ŗ [sectionId: `string`]: `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:27 + +___ + +### privileges + +ā€¢ **privileges**: [`FeatureElasticsearchPrivileges`](client._internal_namespace.FeatureElasticsearchPrivileges.md)[] + +Feature privilege definition. Specify one or more privileges which grant access to this feature. +Users must satisfy all privileges in at least one of the defined sets of privileges in order to be granted access. + +**`example`** +```ts + [{ + requiredClusterPrivileges: ['monitor'], + requiredIndexPrivileges: { + ['metricbeat-*']: ['read', 'view_index_metadata'] + } + }] +``` + +**`see`** FeatureElasticsearchPrivileges + +#### Defined in + +x-pack/plugins/features/target/types/common/elasticsearch_feature.d.ts:50 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.EmbeddableRegistryDefinition.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.EmbeddableRegistryDefinition.md new file mode 100644 index 0000000000000..6a4eba88cc91d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.EmbeddableRegistryDefinition.md @@ -0,0 +1,157 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / EmbeddableRegistryDefinition + +# Interface: EmbeddableRegistryDefinition + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).EmbeddableRegistryDefinition + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `P` | extends [`EmbeddableStateWithType`](../modules/client._internal_namespace.md#embeddablestatewithtype) = [`EmbeddableStateWithType`](../modules/client._internal_namespace.md#embeddablestatewithtype) | + +## Hierarchy + +- [`PersistableStateDefinition`](../modules/client._internal_namespace.md#persistablestatedefinition)<`P`\> + + ā†³ **`EmbeddableRegistryDefinition`** + +## Table of contents + +### Properties + +- [id](client._internal_namespace.EmbeddableRegistryDefinition.md#id) +- [migrations](client._internal_namespace.EmbeddableRegistryDefinition.md#migrations) + +### Methods + +- [extract](client._internal_namespace.EmbeddableRegistryDefinition.md#extract) +- [inject](client._internal_namespace.EmbeddableRegistryDefinition.md#inject) +- [telemetry](client._internal_namespace.EmbeddableRegistryDefinition.md#telemetry) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/plugins/embeddable/target/types/server/types.d.ts:13 + +___ + +### migrations + +ā€¢ `Optional` **migrations**: [`MigrateFunctionsObject`](../modules/client._internal_namespace.md#migratefunctionsobject) \| [`GetMigrationFunctionObjectFn`](../modules/client._internal_namespace.md#getmigrationfunctionobjectfn) + +A list of migration functions, which migrate the persistable state +serializable object to the next version. Migration functions should are +keyed by the Kibana version using semver, where the version indicates to +which version the state will be migrated to. + +#### Inherited from + +PersistableStateDefinition.migrations + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:75 + +## Methods + +### extract + +ā–ø `Optional` **extract**(`state`): `Object` + +A function which receives state and should return the state with references +extracted and an array of the extracted references. The default case could +simply return the same state with an empty array of references. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `state` | `P` | The persistable state serializable state object. | + +#### Returns + +`Object` + +Persistable state object with references extracted and a list of + references. + +| Name | Type | +| :------ | :------ | +| `references` | [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] | +| `state` | `P` | + +#### Inherited from + +PersistableStateDefinition.extract + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:65 + +___ + +### inject + +ā–ø `Optional` **inject**(`state`, `references`): `P` + +A function which receives state and a list of references and should return +back the state with references injected. The default is an identity +function. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `state` | `P` | The persistable state serializable state object. | +| `references` | [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] | List of saved object references. | + +#### Returns + +`P` + +Persistable state object with references injected. + +#### Inherited from + +PersistableStateDefinition.inject + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:55 + +___ + +### telemetry + +ā–ø `Optional` **telemetry**(`state`, `stats`): `Record`<`string`, `any`\> + +Function which reports telemetry information. This function is essentially +a "reducer" - it receives the existing "stats" object and returns an +updated version of the "stats" object. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `state` | `P` | The persistable state serializable state object. | +| `stats` | `Record`<`string`, `any`\> | Stats object containing the stats which were already collected. This `stats` object shall not be mutated in-line. | + +#### Returns + +`Record`<`string`, `any`\> + +A new stats object augmented with new telemetry information. + +#### Inherited from + +PersistableStateDefinition.telemetry + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:45 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.EncryptedSavedObjectsClient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.EncryptedSavedObjectsClient.md new file mode 100644 index 0000000000000..fff1cd9a9e369 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.EncryptedSavedObjectsClient.md @@ -0,0 +1,39 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / EncryptedSavedObjectsClient + +# Interface: EncryptedSavedObjectsClient + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).EncryptedSavedObjectsClient + +## Table of contents + +### Methods + +- [getDecryptedAsInternalUser](client._internal_namespace.EncryptedSavedObjectsClient.md#getdecryptedasinternaluser) + +## Methods + +### getDecryptedAsInternalUser + +ā–ø **getDecryptedAsInternalUser**<`T`\>(`type`, `id`, `options?`): `Promise`<[`SavedObject`](client._internal_namespace.SavedObject.md)<`T`\>\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | `string` | +| `id` | `string` | +| `options?` | [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) | + +#### Returns + +`Promise`<[`SavedObject`](client._internal_namespace.SavedObject.md)<`T`\>\> + +#### Defined in + +x-pack/plugins/encrypted_saved_objects/target/types/server/saved_objects/index.d.ts:18 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ExecuteOptions-1.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ExecuteOptions-1.md new file mode 100644 index 0000000000000..4004d5c484793 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ExecuteOptions-1.md @@ -0,0 +1,101 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ExecuteOptions + +# Interface: ExecuteOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ExecuteOptions + +## Hierarchy + +- `Pick`<[`ExecuteOptions`](client._internal_namespace.ExecuteOptions.md), ``"params"`` \| ``"source"``\> + + ā†³ **`ExecuteOptions`** + +## Table of contents + +### Properties + +- [apiKey](client._internal_namespace.ExecuteOptions-1.md#apikey) +- [executionId](client._internal_namespace.ExecuteOptions-1.md#executionid) +- [id](client._internal_namespace.ExecuteOptions-1.md#id) +- [params](client._internal_namespace.ExecuteOptions-1.md#params) +- [relatedSavedObjects](client._internal_namespace.ExecuteOptions-1.md#relatedsavedobjects) +- [source](client._internal_namespace.ExecuteOptions-1.md#source) +- [spaceId](client._internal_namespace.ExecuteOptions-1.md#spaceid) + +## Properties + +### apiKey + +ā€¢ **apiKey**: ``null`` \| `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/create_execute_function.d.ts:15 + +___ + +### executionId + +ā€¢ **executionId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/create_execute_function.d.ts:16 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/create_execute_function.d.ts:13 + +___ + +### params + +ā€¢ **params**: `Record`<`string`, `unknown`\> + +#### Inherited from + +Pick.params + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:28 + +___ + +### relatedSavedObjects + +ā€¢ `Optional` **relatedSavedObjects**: `Readonly`<{ `namespace?`: `string` ; `typeId?`: `string` } & { `id`: `string` ; `type`: `string` }\>[] + +#### Defined in + +x-pack/plugins/actions/target/types/server/create_execute_function.d.ts:17 + +___ + +### source + +ā€¢ `Optional` **source**: [`ActionExecutionSource`](client._internal_namespace.ActionExecutionSource.md)<`unknown`\> + +#### Inherited from + +Pick.source + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:29 + +___ + +### spaceId + +ā€¢ **spaceId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/create_execute_function.d.ts:14 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ExecuteOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ExecuteOptions.md new file mode 100644 index 0000000000000..fb808b1afbbee --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ExecuteOptions.md @@ -0,0 +1,104 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ExecuteOptions + +# Interface: ExecuteOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ExecuteOptions + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Source` | `unknown` | + +## Table of contents + +### Properties + +- [actionId](client._internal_namespace.ExecuteOptions.md#actionid) +- [executionId](client._internal_namespace.ExecuteOptions.md#executionid) +- [isEphemeral](client._internal_namespace.ExecuteOptions.md#isephemeral) +- [params](client._internal_namespace.ExecuteOptions.md#params) +- [relatedSavedObjects](client._internal_namespace.ExecuteOptions.md#relatedsavedobjects) +- [request](client._internal_namespace.ExecuteOptions.md#request) +- [source](client._internal_namespace.ExecuteOptions.md#source) +- [taskInfo](client._internal_namespace.ExecuteOptions.md#taskinfo) + +## Properties + +### actionId + +ā€¢ **actionId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:25 + +___ + +### executionId + +ā€¢ `Optional` **executionId**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:31 + +___ + +### isEphemeral + +ā€¢ `Optional` **isEphemeral**: `boolean` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:26 + +___ + +### params + +ā€¢ **params**: `Record`<`string`, `unknown`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:28 + +___ + +### relatedSavedObjects + +ā€¢ `Optional` **relatedSavedObjects**: `Readonly`<{ `namespace?`: `string` ; `typeId?`: `string` } & { `id`: `string` ; `type`: `string` }\>[] + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:32 + +___ + +### request + +ā€¢ **request**: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:27 + +___ + +### source + +ā€¢ `Optional` **source**: [`ActionExecutionSource`](client._internal_namespace.ActionExecutionSource.md)<`Source`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:29 + +___ + +### taskInfo + +ā€¢ `Optional` **taskInfo**: [`TaskInfo`](client._internal_namespace.TaskInfo.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:30 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md new file mode 100644 index 0000000000000..bb462c5341233 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md @@ -0,0 +1,106 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FeatureElasticsearchPrivileges + +# Interface: FeatureElasticsearchPrivileges + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FeatureElasticsearchPrivileges + +Elasticsearch Feature privilege definition + +## Table of contents + +### Properties + +- [requiredClusterPrivileges](client._internal_namespace.FeatureElasticsearchPrivileges.md#requiredclusterprivileges) +- [requiredIndexPrivileges](client._internal_namespace.FeatureElasticsearchPrivileges.md#requiredindexprivileges) +- [requiredRoles](client._internal_namespace.FeatureElasticsearchPrivileges.md#requiredroles) +- [ui](client._internal_namespace.FeatureElasticsearchPrivileges.md#ui) + +## Properties + +### requiredClusterPrivileges + +ā€¢ **requiredClusterPrivileges**: `string`[] + +A set of Elasticsearch cluster privileges which are required for this feature to be enabled. +See https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_elasticsearch_privileges.d.ts:10 + +___ + +### requiredIndexPrivileges + +ā€¢ `Optional` **requiredIndexPrivileges**: `Object` + +A set of Elasticsearch index privileges which are required for this feature to be enabled, keyed on index name or pattern. +See https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html#privileges-list-indices + +**`example`** + +Requiring `read` access to `logstash-*` and `all` access to `foo-*` +```ts +feature.registerElasticsearchPrivilege({ + privileges: [{ + requiredIndexPrivileges: { + ['logstash-*']: ['read'], + ['foo-*]: ['all'] + } + }] +}) +``` + +#### Index signature + +ā–Ŗ [indexName: `string`]: `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_elasticsearch_privileges.d.ts:30 + +___ + +### requiredRoles + +ā€¢ `Optional` **requiredRoles**: `string`[] + +A set of Elasticsearch roles which are required for this feature to be enabled. + +**`deprecated`** do not rely on hard-coded role names. + +This is relied on by the reporting feature, and should be removed once reporting +migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_elasticsearch_privileges.d.ts:41 + +___ + +### ui + +ā€¢ **ui**: `string`[] + +A list of UI Capabilities that should be granted to users with this privilege. +These capabilities will automatically be namespaces within your feature id. + +**`example`** +```ts + { + ui: ['show', 'save'] + } + + This translates in the UI to the following (assuming a feature id of "foo"): + import { uiCapabilities } from 'ui/capabilities'; + + const canShowApp = uiCapabilities.foo.show; + const canSave = uiCapabilities.foo.save; +``` +Note: Since these are automatically namespaced, you are free to use generic names like "show" and "save". + +**`see`** UICapabilities + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_elasticsearch_privileges.d.ts:62 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureKibanaPrivileges.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureKibanaPrivileges.md new file mode 100644 index 0000000000000..caf57a8ff8987 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureKibanaPrivileges.md @@ -0,0 +1,246 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FeatureKibanaPrivileges + +# Interface: FeatureKibanaPrivileges + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FeatureKibanaPrivileges + +Feature privilege definition + +## Table of contents + +### Properties + +- [alerting](client._internal_namespace.FeatureKibanaPrivileges.md#alerting) +- [api](client._internal_namespace.FeatureKibanaPrivileges.md#api) +- [app](client._internal_namespace.FeatureKibanaPrivileges.md#app) +- [cases](client._internal_namespace.FeatureKibanaPrivileges.md#cases) +- [catalogue](client._internal_namespace.FeatureKibanaPrivileges.md#catalogue) +- [disabled](client._internal_namespace.FeatureKibanaPrivileges.md#disabled) +- [excludeFromBasePrivileges](client._internal_namespace.FeatureKibanaPrivileges.md#excludefrombaseprivileges) +- [management](client._internal_namespace.FeatureKibanaPrivileges.md#management) +- [requireAllSpaces](client._internal_namespace.FeatureKibanaPrivileges.md#requireallspaces) +- [savedObject](client._internal_namespace.FeatureKibanaPrivileges.md#savedobject) +- [ui](client._internal_namespace.FeatureKibanaPrivileges.md#ui) + +## Properties + +### alerting + +ā€¢ `Optional` **alerting**: `Object` + +If your feature requires access to specific Alert Types, then specify your access needs here. +Include both Alert Types registered by the feature and external Alert Types such as built-in +Alert Types and Alert Types provided by other features to which you wish to grant access. + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `alert?` | `Object` | +| `alert.all?` | readonly `string`[] | +| `alert.read?` | readonly `string`[] | +| `rule?` | `Object` | +| `rule.all?` | readonly `string`[] | +| `rule.read?` | readonly `string`[] | + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:82 + +___ + +### api + +ā€¢ `Optional` **api**: readonly `string`[] + +If your feature includes server-side APIs, you can tag those routes to secure access based on user permissions. + +**`example`** +```ts + // Configure your routes with a tag starting with the 'access:' prefix + server.route({ + path: '/api/my-route', + method: 'GET', + handler: () => { ...}, + options: { + tags: ['access:my_feature-admin'] + } + }); + + Then, specify the tags here (without the 'access:' prefix) which should be secured: + + { + api: ['my_feature-admin'] + } +``` + +NOTE: It is important to name your tags in a way that will not collide with other plugins/features. +A generic tag name like "access:read" could be used elsewhere, and access to that API endpoint would also +extend to any routes you have also tagged with that name. + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:64 + +___ + +### app + +ā€¢ `Optional` **app**: readonly `string`[] + +If your feature exposes a client-side application (most of them do!), then you can control access to them here. + +**`example`** +```ts + { + app: ['my-app', 'kibana'] + } +``` + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:76 + +___ + +### cases + +ā€¢ `Optional` **cases**: `Object` + +If your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should +be unique identifiers for the owners of cases you want access to. + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `all?` | readonly `string`[] | List of case owners which users should have full read/write access to when granted this privilege. **`example`** ```ts { all: ['securitySolution'] } ``` | +| `read?` | readonly `string`[] | List of case owners which users should have read-only access to when granted this privilege. **`example`** ```ts { read: ['securitySolution'] } ``` | + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:132 + +___ + +### catalogue + +ā€¢ `Optional` **catalogue**: readonly `string`[] + +If this feature includes a catalogue entry, you can specify them here to control visibility based on user permissions. + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:37 + +___ + +### disabled + +ā€¢ `Optional` **disabled**: `boolean` + +Whether or not this privilege should be hidden in the roles UI and disallowed on the API. Defaults to `false`. + +**`deprecated`** + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:18 + +___ + +### excludeFromBasePrivileges + +ā€¢ `Optional` **excludeFromBasePrivileges**: `boolean` + +Whether or not this specific privilege should be excluded from the base privileges. + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:8 + +___ + +### management + +ā€¢ `Optional` **management**: `Object` + +If this feature includes management sections, you can specify them here to control visibility of those +pages based on user privileges. + +**`example`** +```ts + // Enables access to the "Advanced Settings" management page within the Kibana section + management: { + kibana: ['settings'] + } +``` + +#### Index signature + +ā–Ŗ [sectionId: `string`]: readonly `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:31 + +___ + +### requireAllSpaces + +ā€¢ `Optional` **requireAllSpaces**: `boolean` + +Whether or not this privilege should only be granted to `All Spaces *`. Should be used for features that do not +support Spaces. Defaults to `false`. + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:13 + +___ + +### savedObject + +ā€¢ **savedObject**: `Object` + +If your feature requires access to specific saved objects, then specify your access needs here. + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `all` | readonly `string`[] | List of saved object types which users should have full read/write access to when granted this privilege. **`example`** ```ts { all: ['my-saved-object-type'] } ``` | +| `read` | readonly `string`[] | List of saved object types which users should have read-only access to when granted this privilege. **`example`** ```ts { read: ['config'] } ``` | + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:157 + +___ + +### ui + +ā€¢ **ui**: readonly `string`[] + +A list of UI Capabilities that should be granted to users with this privilege. +These capabilities will automatically be namespaces within your feature id. + +**`example`** +```ts + { + ui: ['show', 'save'] + } + + This translates in the UI to the following (assuming a feature id of "foo"): + import { uiCapabilities } from 'ui/capabilities'; + + const canShowApp = uiCapabilities.foo.show; + const canSave = uiCapabilities.foo.save; +``` +Note: Since these are automatically namespaced, you are free to use generic names like "show" and "save". + +**`see`** UICapabilities + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:199 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureUsageServiceSetup.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureUsageServiceSetup.md new file mode 100644 index 0000000000000..77770e22b41e2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FeatureUsageServiceSetup.md @@ -0,0 +1,34 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FeatureUsageServiceSetup + +# Interface: FeatureUsageServiceSetup + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FeatureUsageServiceSetup + +## Table of contents + +### Methods + +- [register](client._internal_namespace.FeatureUsageServiceSetup.md#register) + +## Methods + +### register + +ā–ø **register**(`featureName`, `licenseType`): `void` + +Register a feature to be able to notify of it's usages using the {@link FeatureUsageServiceStart | service start contract}. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `featureName` | `string` | +| `licenseType` | ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/licensing/target/types/server/services/feature_usage_service.d.ts:7 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindActionResult.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindActionResult.md new file mode 100644 index 0000000000000..e7306b5d7b931 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindActionResult.md @@ -0,0 +1,117 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FindActionResult + +# Interface: FindActionResult + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FindActionResult + +## Hierarchy + +- [`ActionResult`](client._internal_namespace.ActionResult.md) + + ā†³ **`FindActionResult`** + +## Table of contents + +### Properties + +- [actionTypeId](client._internal_namespace.FindActionResult.md#actiontypeid) +- [config](client._internal_namespace.FindActionResult.md#config) +- [id](client._internal_namespace.FindActionResult.md#id) +- [isMissingSecrets](client._internal_namespace.FindActionResult.md#ismissingsecrets) +- [isPreconfigured](client._internal_namespace.FindActionResult.md#ispreconfigured) +- [name](client._internal_namespace.FindActionResult.md#name) +- [referencedByCount](client._internal_namespace.FindActionResult.md#referencedbycount) + +## Properties + +### actionTypeId + +ā€¢ **actionTypeId**: `string` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[actionTypeId](client._internal_namespace.ActionResult.md#actiontypeid) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:50 + +___ + +### config + +ā€¢ `Optional` **config**: [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[config](client._internal_namespace.ActionResult.md#config) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:53 + +___ + +### id + +ā€¢ **id**: `string` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[id](client._internal_namespace.ActionResult.md#id) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:49 + +___ + +### isMissingSecrets + +ā€¢ `Optional` **isMissingSecrets**: `boolean` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[isMissingSecrets](client._internal_namespace.ActionResult.md#ismissingsecrets) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:52 + +___ + +### isPreconfigured + +ā€¢ **isPreconfigured**: `boolean` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[isPreconfigured](client._internal_namespace.ActionResult.md#ispreconfigured) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:54 + +___ + +### name + +ā€¢ **name**: `string` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[name](client._internal_namespace.ActionResult.md#name) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:51 + +___ + +### referencedByCount + +ā€¢ **referencedByCount**: `number` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:60 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCaseCommentsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCaseCommentsArgs.md new file mode 100644 index 0000000000000..a5b1689fc0e9b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCaseCommentsArgs.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FindCaseCommentsArgs + +# Interface: FindCaseCommentsArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FindCaseCommentsArgs + +## Table of contents + +### Properties + +- [id](client._internal_namespace.FindCaseCommentsArgs.md#id) +- [options](client._internal_namespace.FindCaseCommentsArgs.md#options) +- [unsecuredSavedObjectsClient](client._internal_namespace.FindCaseCommentsArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### id + +ā€¢ **id**: `string` \| `string`[] + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:84](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L84) + +___ + +### options + +ā€¢ `Optional` **options**: [`SavedObjectFindOptionsKueryNode`](../modules/client._internal_namespace.md#savedobjectfindoptionskuerynode) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:85](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L85) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:83](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L83) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCaseConfigureArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCaseConfigureArgs.md new file mode 100644 index 0000000000000..5e3635fe0c3ec --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCaseConfigureArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FindCaseConfigureArgs + +# Interface: FindCaseConfigureArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FindCaseConfigureArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs.md) + + ā†³ **`FindCaseConfigureArgs`** + +## Table of contents + +### Properties + +- [options](client._internal_namespace.FindCaseConfigureArgs.md#options) +- [unsecuredSavedObjectsClient](client._internal_namespace.FindCaseConfigureArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### options + +ā€¢ `Optional` **options**: [`SavedObjectFindOptionsKueryNode`](../modules/client._internal_namespace.md#savedobjectfindoptionskuerynode) + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:37](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L37) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L30) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCasesArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCasesArgs.md new file mode 100644 index 0000000000000..0ac807ecaadac --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCasesArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FindCasesArgs + +# Interface: FindCasesArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FindCasesArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`FindCasesArgs`** + +## Table of contents + +### Properties + +- [options](client._internal_namespace.FindCasesArgs.md#options) +- [unsecuredSavedObjectsClient](client._internal_namespace.FindCasesArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### options + +ā€¢ `Optional` **options**: [`SavedObjectFindOptionsKueryNode`](../modules/client._internal_namespace.md#savedobjectfindoptionskuerynode) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:89](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L89) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCommentsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCommentsArgs.md new file mode 100644 index 0000000000000..b88437b3e33a8 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindCommentsArgs.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FindCommentsArgs + +# Interface: FindCommentsArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FindCommentsArgs + +## Table of contents + +### Properties + +- [id](client._internal_namespace.FindCommentsArgs.md#id) +- [options](client._internal_namespace.FindCommentsArgs.md#options) +- [unsecuredSavedObjectsClient](client._internal_namespace.FindCommentsArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### id + +ā€¢ **id**: `string` \| `string`[] + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:78](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L78) + +___ + +### options + +ā€¢ `Optional` **options**: [`SavedObjectFindOptionsKueryNode`](../modules/client._internal_namespace.md#savedobjectfindoptionskuerynode) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L79) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:77](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L77) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindConnectorMappingsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindConnectorMappingsArgs.md new file mode 100644 index 0000000000000..5f70d4ae539e8 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.FindConnectorMappingsArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / FindConnectorMappingsArgs + +# Interface: FindConnectorMappingsArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).FindConnectorMappingsArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-2.md) + + ā†³ **`FindConnectorMappingsArgs`** + +## Table of contents + +### Properties + +- [options](client._internal_namespace.FindConnectorMappingsArgs.md#options) +- [unsecuredSavedObjectsClient](client._internal_namespace.FindConnectorMappingsArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### options + +ā€¢ `Optional` **options**: [`SavedObjectFindOptionsKueryNode`](../modules/client._internal_namespace.md#savedobjectfindoptionskuerynode) + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:18](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L18) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-2.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-2.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L15) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetAllSpacesOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetAllSpacesOptions.md new file mode 100644 index 0000000000000..905d61791cb2e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetAllSpacesOptions.md @@ -0,0 +1,44 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetAllSpacesOptions + +# Interface: GetAllSpacesOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetAllSpacesOptions + +Controls how spaces are retrieved. + +## Table of contents + +### Properties + +- [includeAuthorizedPurposes](client._internal_namespace.GetAllSpacesOptions.md#includeauthorizedpurposes) +- [purpose](client._internal_namespace.GetAllSpacesOptions.md#purpose) + +## Properties + +### includeAuthorizedPurposes + +ā€¢ `Optional` **includeAuthorizedPurposes**: `boolean` + +Set to true to return a set of flags indicating which purposes the user is authorized for. + +**`see`** GetAllSpacesPurpose + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:65 + +___ + +### purpose + +ā€¢ `Optional` **purpose**: [`GetAllSpacesPurpose`](../modules/client._internal_namespace.md#getallspacespurpose) + +An optional purpose describing how the set of spaces will be used. +The default purpose (`any`) will retrieve all spaces the user is authorized to see, +whereas a more specific purpose will retrieve all spaces the user is authorized to perform a specific action within. + +**`see`** GetAllSpacesPurpose + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:59 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetAttachmentArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetAttachmentArgs.md new file mode 100644 index 0000000000000..39f6f288c84c5 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetAttachmentArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetAttachmentArgs + +# Interface: GetAttachmentArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetAttachmentArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`GetAttachmentArgs`** + +## Table of contents + +### Properties + +- [attachmentId](client._internal_namespace.GetAttachmentArgs.md#attachmentid) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetAttachmentArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### attachmentId + +ā€¢ **attachmentId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:44](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L44) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseArgs.md new file mode 100644 index 0000000000000..5cca6876f1821 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetCaseArgs + +# Interface: GetCaseArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetCaseArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`GetCaseArgs`** + +## Table of contents + +### Properties + +- [id](client._internal_namespace.GetCaseArgs.md#id) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetCaseArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:69](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L69) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseConfigureArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseConfigureArgs.md new file mode 100644 index 0000000000000..2aa37a7bf78a9 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseConfigureArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetCaseConfigureArgs + +# Interface: GetCaseConfigureArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetCaseConfigureArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs.md) + + ā†³ **`GetCaseConfigureArgs`** + +## Table of contents + +### Properties + +- [configurationId](client._internal_namespace.GetCaseConfigureArgs.md#configurationid) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetCaseConfigureArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### configurationId + +ā€¢ **configurationId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:34](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L34) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L30) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseIdsByAlertIdArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseIdsByAlertIdArgs.md new file mode 100644 index 0000000000000..267aa4fe7100a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseIdsByAlertIdArgs.md @@ -0,0 +1,53 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetCaseIdsByAlertIdArgs + +# Interface: GetCaseIdsByAlertIdArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetCaseIdsByAlertIdArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`GetCaseIdsByAlertIdArgs`** + +## Table of contents + +### Properties + +- [alertId](client._internal_namespace.GetCaseIdsByAlertIdArgs.md#alertid) +- [filter](client._internal_namespace.GetCaseIdsByAlertIdArgs.md#filter) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetCaseIdsByAlertIdArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### alertId + +ā€¢ **alertId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:59](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L59) + +___ + +### filter + +ā€¢ `Optional` **filter**: `KueryNode` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:60](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L60) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseUserActionArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseUserActionArgs.md new file mode 100644 index 0000000000000..08edac1f82b2c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCaseUserActionArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetCaseUserActionArgs + +# Interface: GetCaseUserActionArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetCaseUserActionArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`GetCaseUserActionArgs`** + +## Table of contents + +### Properties + +- [caseId](client._internal_namespace.GetCaseUserActionArgs.md#caseid) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetCaseUserActionArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### caseId + +ā€¢ **caseId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:58](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L58) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCasesArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCasesArgs.md new file mode 100644 index 0000000000000..d5e802e19b9c0 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetCasesArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetCasesArgs + +# Interface: GetCasesArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetCasesArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`GetCasesArgs`** + +## Table of contents + +### Properties + +- [caseIds](client._internal_namespace.GetCasesArgs.md#caseids) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetCasesArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### caseIds + +ā€¢ **caseIds**: `string`[] + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:73](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L73) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetReportersArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetReportersArgs.md new file mode 100644 index 0000000000000..af1116f4c3ddb --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetReportersArgs.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetReportersArgs + +# Interface: GetReportersArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetReportersArgs + +## Table of contents + +### Properties + +- [filter](client._internal_namespace.GetReportersArgs.md#filter) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetReportersArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### filter + +ā€¢ `Optional` **filter**: `KueryNode` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:134](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L134) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:133](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L133) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetSpaceResult.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetSpaceResult.md new file mode 100644 index 0000000000000..8e4162988105e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetSpaceResult.md @@ -0,0 +1,176 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetSpaceResult + +# Interface: GetSpaceResult + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetSpaceResult + +Response format when querying for spaces. + +## Hierarchy + +- [`Space`](client._internal_namespace.Space.md) + + ā†³ **`GetSpaceResult`** + +## Table of contents + +### Properties + +- [\_reserved](client._internal_namespace.GetSpaceResult.md#_reserved) +- [authorizedPurposes](client._internal_namespace.GetSpaceResult.md#authorizedpurposes) +- [color](client._internal_namespace.GetSpaceResult.md#color) +- [description](client._internal_namespace.GetSpaceResult.md#description) +- [disabledFeatures](client._internal_namespace.GetSpaceResult.md#disabledfeatures) +- [id](client._internal_namespace.GetSpaceResult.md#id) +- [imageUrl](client._internal_namespace.GetSpaceResult.md#imageurl) +- [initials](client._internal_namespace.GetSpaceResult.md#initials) +- [name](client._internal_namespace.GetSpaceResult.md#name) + +## Properties + +### \_reserved + +ā€¢ `Optional` `Private` **\_reserved**: `boolean` + +Indicates that this space is reserved (system controlled). +Reserved spaces cannot be created or deleted by end-users. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[_reserved](client._internal_namespace.Space.md#_reserved) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:46 + +___ + +### authorizedPurposes + +ā€¢ `Optional` **authorizedPurposes**: `Record`<[`GetAllSpacesPurpose`](../modules/client._internal_namespace.md#getallspacespurpose), `boolean`\> + +A set of flags indicating which purposes the user is authorized for. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:82 + +___ + +### color + +ā€¢ `Optional` **color**: `string` + +Optional color (hex code) for this space. +If neither `color` nor `imageUrl` is specified, then a color will be automatically generated. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[color](client._internal_namespace.Space.md#color) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:24 + +___ + +### description + +ā€¢ `Optional` **description**: `string` + +Optional description for this space. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[description](client._internal_namespace.Space.md#description) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:19 + +___ + +### disabledFeatures + +ā€¢ **disabledFeatures**: `string`[] + +The set of feature ids that should be hidden within this space. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[disabledFeatures](client._internal_namespace.Space.md#disabledfeatures) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:40 + +___ + +### id + +ā€¢ **id**: `string` + +The unique identifier for this space. +The id becomes part of the "URL Identifier" of the space. + +Example: an id of `marketing` would result in the URL identifier of `/s/marketing`. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[id](client._internal_namespace.Space.md#id) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:11 + +___ + +### imageUrl + +ā€¢ `Optional` **imageUrl**: `string` + +Optional base-64 encoded data image url to show as this space's avatar. +This setting takes precedence over any configured `color` or `initials`. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[imageUrl](client._internal_namespace.Space.md#imageurl) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:36 + +___ + +### initials + +ā€¢ `Optional` **initials**: `string` + +Optional display initials for this space's avatar. Supports a maximum of 2 characters. +If initials are not provided, then they will be derived from the space name automatically. + +Initials are not displayed if an `imageUrl` has been specified. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[initials](client._internal_namespace.Space.md#initials) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:31 + +___ + +### name + +ā€¢ **name**: `string` + +Display name for this space. + +#### Inherited from + +[Space](client._internal_namespace.Space.md).[name](client._internal_namespace.Space.md#name) + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:15 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetTagsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetTagsArgs.md new file mode 100644 index 0000000000000..31088513fe67f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetTagsArgs.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetTagsArgs + +# Interface: GetTagsArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetTagsArgs + +## Table of contents + +### Properties + +- [filter](client._internal_namespace.GetTagsArgs.md#filter) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetTagsArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### filter + +ā€¢ `Optional` **filter**: `KueryNode` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:129](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L129) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:128](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L128) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetUserActionItemByDifference.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetUserActionItemByDifference.md new file mode 100644 index 0000000000000..50f9ae9a6fc34 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetUserActionItemByDifference.md @@ -0,0 +1,162 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetUserActionItemByDifference + +# Interface: GetUserActionItemByDifference + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetUserActionItemByDifference + +## Hierarchy + +- [`CommonUserActionArgs`](../modules/client._internal_namespace.md#commonuseractionargs) + + ā†³ **`GetUserActionItemByDifference`** + +## Table of contents + +### Properties + +- [action](client._internal_namespace.GetUserActionItemByDifference.md#action) +- [attachmentId](client._internal_namespace.GetUserActionItemByDifference.md#attachmentid) +- [caseId](client._internal_namespace.GetUserActionItemByDifference.md#caseid) +- [connectorId](client._internal_namespace.GetUserActionItemByDifference.md#connectorid) +- [field](client._internal_namespace.GetUserActionItemByDifference.md#field) +- [newValue](client._internal_namespace.GetUserActionItemByDifference.md#newvalue) +- [originalValue](client._internal_namespace.GetUserActionItemByDifference.md#originalvalue) +- [owner](client._internal_namespace.GetUserActionItemByDifference.md#owner) +- [unsecuredSavedObjectsClient](client._internal_namespace.GetUserActionItemByDifference.md#unsecuredsavedobjectsclient) +- [user](client._internal_namespace.GetUserActionItemByDifference.md#user) + +## Properties + +### action + +ā€¢ `Optional` **action**: ``"add"`` \| ``"create"`` \| ``"delete"`` \| ``"update"`` \| ``"push_to_service"`` + +#### Inherited from + +CommonUserActionArgs.action + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:80](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L80) + +___ + +### attachmentId + +ā€¢ `Optional` **attachmentId**: `string` + +#### Inherited from + +CommonUserActionArgs.attachmentId + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:78](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L78) + +___ + +### caseId + +ā€¢ **caseId**: `string` + +#### Inherited from + +CommonUserActionArgs.caseId + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:76](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L76) + +___ + +### connectorId + +ā€¢ `Optional` **connectorId**: `string` + +#### Inherited from + +CommonUserActionArgs.connectorId + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L79) + +___ + +### field + +ā€¢ **field**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:83](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L83) + +___ + +### newValue + +ā€¢ **newValue**: `unknown` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:85](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L85) + +___ + +### originalValue + +ā€¢ **originalValue**: `unknown` + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:84](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L84) + +___ + +### owner + +ā€¢ **owner**: `string` + +#### Inherited from + +CommonUserActionArgs.owner + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:77](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L77) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +CommonUserActionArgs.unsecuredSavedObjectsClient + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) + +___ + +### user + +ā€¢ **user**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Inherited from + +CommonUserActionArgs.user + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:75](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L75) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetUserArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetUserArgs.md new file mode 100644 index 0000000000000..d4913925ff206 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.GetUserArgs.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / GetUserArgs + +# Interface: GetUserArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).GetUserArgs + +## Table of contents + +### Properties + +- [request](client._internal_namespace.GetUserArgs.md#request) + +## Properties + +### request + +ā€¢ **request**: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:110](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L110) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IEventLogger.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IEventLogger.md new file mode 100644 index 0000000000000..a1b44e51859d4 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IEventLogger.md @@ -0,0 +1,73 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IEventLogger + +# Interface: IEventLogger + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IEventLogger + +## Table of contents + +### Methods + +- [logEvent](client._internal_namespace.IEventLogger.md#logevent) +- [startTiming](client._internal_namespace.IEventLogger.md#starttiming) +- [stopTiming](client._internal_namespace.IEventLogger.md#stoptiming) + +## Methods + +### logEvent + +ā–ø **logEvent**(`properties`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `properties` | [`IEvent`](../modules/client._internal_namespace.md#ievent) | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/event_log/target/types/server/types.d.ts:34 + +___ + +### startTiming + +ā–ø **startTiming**(`event`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | [`IEvent`](../modules/client._internal_namespace.md#ievent) | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/event_log/target/types/server/types.d.ts:35 + +___ + +### stopTiming + +ā–ø **stopTiming**(`event`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | [`IEvent`](../modules/client._internal_namespace.md#ievent) | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/event_log/target/types/server/types.d.ts:36 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IKibanaSocket.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IKibanaSocket.md new file mode 100644 index 0000000000000..cc2ea54f3975a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IKibanaSocket.md @@ -0,0 +1,150 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IKibanaSocket + +# Interface: IKibanaSocket + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IKibanaSocket + +A tiny abstraction for TCP socket. + +## Table of contents + +### Properties + +- [authorizationError](client._internal_namespace.IKibanaSocket.md#authorizationerror) +- [authorized](client._internal_namespace.IKibanaSocket.md#authorized) + +### Methods + +- [getPeerCertificate](client._internal_namespace.IKibanaSocket.md#getpeercertificate) +- [getProtocol](client._internal_namespace.IKibanaSocket.md#getprotocol) +- [renegotiate](client._internal_namespace.IKibanaSocket.md#renegotiate) + +## Properties + +### authorizationError + +ā€¢ `Optional` `Readonly` **authorizationError**: `Error` + +The reason why the peer's certificate has not been verified. This property becomes available +only when `authorized` is `false`. + +#### Defined in + +src/core/target/types/server/http/router/socket.d.ts:45 + +___ + +### authorized + +ā€¢ `Optional` `Readonly` **authorized**: `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`. + +#### Defined in + +src/core/target/types/server/http/router/socket.d.ts:40 + +## Methods + +### getPeerCertificate + +ā–ø **getPeerCertificate**(`detailed`): ``null`` \| `DetailedPeerCertificate` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `detailed` | ``true`` | + +#### Returns + +``null`` \| `DetailedPeerCertificate` + +#### Defined in + +src/core/target/types/server/http/router/socket.d.ts:9 + +ā–ø **getPeerCertificate**(`detailed`): ``null`` \| `PeerCertificate` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `detailed` | ``false`` | + +#### Returns + +``null`` \| `PeerCertificate` + +#### Defined in + +src/core/target/types/server/http/router/socket.d.ts:10 + +ā–ø **getPeerCertificate**(`detailed?`): ``null`` \| `DetailedPeerCertificate` \| `PeerCertificate` + +Returns an object representing the peer's certificate. +The returned object has some properties corresponding to the field of the certificate. +If detailed argument is true the full chain with issuer property will be returned, +if false only the top certificate without issuer property. +If the peer does not provide a certificate, it returns null. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `detailed?` | `boolean` | If true; the full chain with issuer property will be returned. | + +#### Returns + +``null`` \| `DetailedPeerCertificate` \| `PeerCertificate` + +An object representing the peer's certificate. + +#### Defined in + +src/core/target/types/server/http/router/socket.d.ts:20 + +___ + +### getProtocol + +ā–ø **getProtocol**(): ``null`` \| `string` + +Returns a string containing the negotiated SSL/TLS protocol version of the current connection. The value 'unknown' will be returned for +connected sockets that have not completed the handshaking process. The value null will be returned for server sockets or disconnected +client sockets. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information. + +#### Returns + +``null`` \| `string` + +#### Defined in + +src/core/target/types/server/http/router/socket.d.ts:26 + +___ + +### renegotiate + +ā–ø **renegotiate**(`options`): `Promise`<`void`\> + +Renegotiates a connection to obtain the peer's certificate. This cannot be used when the protocol version is TLSv1.3. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `options` | `Object` | The options may contain the following fields: rejectUnauthorized, requestCert (See tls.createServer() for details). | +| `options.rejectUnauthorized?` | `boolean` | - | +| `options.requestCert?` | `boolean` | - | + +#### Returns + +`Promise`<`void`\> + +A Promise that will be resolved if renegotiation succeeded, or will be rejected if renegotiation failed. + +#### Defined in + +src/core/target/types/server/http/router/socket.d.ts:32 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ILicense.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ILicense.md new file mode 100644 index 0000000000000..8449411b85e42 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ILicense.md @@ -0,0 +1,236 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ILicense + +# Interface: ILicense + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ILicense + +## Table of contents + +### Properties + +- [error](client._internal_namespace.ILicense.md#error) +- [expiryDateInMillis](client._internal_namespace.ILicense.md#expirydateinmillis) +- [isActive](client._internal_namespace.ILicense.md#isactive) +- [isAvailable](client._internal_namespace.ILicense.md#isavailable) +- [mode](client._internal_namespace.ILicense.md#mode) +- [signature](client._internal_namespace.ILicense.md#signature) +- [status](client._internal_namespace.ILicense.md#status) +- [type](client._internal_namespace.ILicense.md#type) +- [uid](client._internal_namespace.ILicense.md#uid) + +### Methods + +- [check](client._internal_namespace.ILicense.md#check) +- [getFeature](client._internal_namespace.ILicense.md#getfeature) +- [getUnavailableReason](client._internal_namespace.ILicense.md#getunavailablereason) +- [hasAtLeast](client._internal_namespace.ILicense.md#hasatleast) +- [toJSON](client._internal_namespace.ILicense.md#tojson) + +## Properties + +### error + +ā€¢ `Optional` **error**: `string` + +A potential error denoting the failure of the license from being retrieved. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:119 + +___ + +### expiryDateInMillis + +ā€¢ `Optional` **expiryDateInMillis**: `number` + +Unix epoch of the expiration date of the license. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:94 + +___ + +### isActive + +ā€¢ **isActive**: `boolean` + +Determine if the status of the license is active. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:90 + +___ + +### isAvailable + +ā€¢ **isAvailable**: `boolean` + +Determine if the license container has information. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:111 + +___ + +### mode + +ā€¢ `Optional` **mode**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +The license type, being usually one of basic, standard, gold, platinum, or trial. + +**`deprecated`** use 'type' instead. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:103 + +___ + +### signature + +ā€¢ **signature**: `string` + +Signature of the license content. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:107 + +___ + +### status + +ā€¢ `Optional` **status**: [`LicenseStatus`](../modules/client._internal_namespace.md#licensestatus) + +The validity status of the license. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:86 + +___ + +### type + +ā€¢ `Optional` **type**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +The license type, being usually one of basic, standard, gold, platinum, or trial. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:98 + +___ + +### uid + +ā€¢ `Optional` **uid**: `string` + +UID for license. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:82 + +## Methods + +### check + +ā–ø **check**(`pluginName`, `minimumLicenseRequired`): [`LicenseCheck`](client._internal_namespace.LicenseCheck.md) + +For a given plugin and license type, receive information about the status of the license. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `pluginName` | `string` | the name of the plugin | +| `minimumLicenseRequired` | ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` | the minimum valid license for operating the given plugin | + +#### Returns + +[`LicenseCheck`](client._internal_namespace.LicenseCheck.md) + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:134 + +___ + +### getFeature + +ā–ø **getFeature**(`name`): [`LicenseFeature`](client._internal_namespace.LicenseFeature.md) + +A specific API for interacting with the specific features of the license. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `name` | `string` | the name of the feature to interact with | + +#### Returns + +[`LicenseFeature`](client._internal_namespace.LicenseFeature.md) + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:139 + +___ + +### getUnavailableReason + +ā–ø **getUnavailableReason**(): `undefined` \| `string` + +If the license is not available, provides a string or Error containing the reason. + +#### Returns + +`undefined` \| `string` + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:123 + +___ + +### hasAtLeast + +ā–ø **hasAtLeast**(`minimumLicenseRequired`): `boolean` + +Determine if license type >= minimal required license type. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `minimumLicenseRequired` | ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` | the minimum valid license required for the given feature | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:128 + +___ + +### toJSON + +ā–ø **toJSON**(): [`PublicLicenseJSON`](client._internal_namespace.PublicLicenseJSON.md) + +Returns + +#### Returns + +[`PublicLicenseJSON`](client._internal_namespace.PublicLicenseJSON.md) + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:115 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md new file mode 100644 index 0000000000000..17a5e67c8b2b6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md @@ -0,0 +1,61 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ISavedObjectsPointInTimeFinder + +# Interface: ISavedObjectsPointInTimeFinder + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ISavedObjectsPointInTimeFinder + +## Type parameters + +| Name | +| :------ | +| `T` | +| `A` | + +## Table of contents + +### Methods + +- [close](client._internal_namespace.ISavedObjectsPointInTimeFinder.md#close) +- [find](client._internal_namespace.ISavedObjectsPointInTimeFinder.md#find) + +## Methods + +### close + +ā–ø **close**(): `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. + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/point_in_time_finder.d.ts:43 + +___ + +### find + +ā–ø **find**(): `AsyncGenerator`<[`SavedObjectsFindResponse`](client._internal_namespace.SavedObjectsFindResponse.md)<`T`, `A`\>, `any`, `unknown`\> + +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. + +#### Returns + +`AsyncGenerator`<[`SavedObjectsFindResponse`](client._internal_namespace.SavedObjectsFindResponse.md)<`T`, `A`\>, `any`, `unknown`\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/point_in_time_finder.d.ts:32 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IScopedClusterClient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IScopedClusterClient.md new file mode 100644 index 0000000000000..47f8263232290 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IScopedClusterClient.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IScopedClusterClient + +# Interface: IScopedClusterClient + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IScopedClusterClient + +Serves the same purpose as the normal {@link IClusterClient | cluster client} but exposes +an additional `asCurrentUser` method that doesn't use credentials of the Kibana internal +user (as `asInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers +extracted from the current user request to the API instead. + +## Table of contents + +### Properties + +- [asCurrentUser](client._internal_namespace.IScopedClusterClient.md#ascurrentuser) +- [asInternalUser](client._internal_namespace.IScopedClusterClient.md#asinternaluser) + +## Properties + +### asCurrentUser + +ā€¢ `Readonly` **asCurrentUser**: [`ElasticsearchClient`](../modules/client._internal_namespace.md#elasticsearchclient) + +A [client](../modules/client._internal_namespace.md#elasticsearchclient) to be used to query the elasticsearch cluster +on behalf of the user that initiated the request to the Kibana server. + +#### Defined in + +src/core/target/types/server/elasticsearch/client/scoped_cluster_client.d.ts:20 + +___ + +### asInternalUser + +ā€¢ `Readonly` **asInternalUser**: [`ElasticsearchClient`](../modules/client._internal_namespace.md#elasticsearchclient) + +A [client](../modules/client._internal_namespace.md#elasticsearchclient) to be used to query the elasticsearch cluster +on behalf of the internal Kibana user. + +#### Defined in + +src/core/target/types/server/elasticsearch/client/scoped_cluster_client.d.ts:15 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ISpacesClient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ISpacesClient.md new file mode 100644 index 0000000000000..5b7aab2435b5a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ISpacesClient.md @@ -0,0 +1,151 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ISpacesClient + +# Interface: ISpacesClient + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ISpacesClient + +Client interface for interacting with spaces. + +## Table of contents + +### Methods + +- [create](client._internal_namespace.ISpacesClient.md#create) +- [delete](client._internal_namespace.ISpacesClient.md#delete) +- [disableLegacyUrlAliases](client._internal_namespace.ISpacesClient.md#disablelegacyurlaliases) +- [get](client._internal_namespace.ISpacesClient.md#get) +- [getAll](client._internal_namespace.ISpacesClient.md#getall) +- [update](client._internal_namespace.ISpacesClient.md#update) + +## Methods + +### create + +ā–ø **create**(`space`): `Promise`<[`Space`](client._internal_namespace.Space.md)\> + +Creates a space. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `space` | [`Space`](client._internal_namespace.Space.md) | the space to create. | + +#### Returns + +`Promise`<[`Space`](client._internal_namespace.Space.md)\> + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_client/spaces_client.d.ts:22 + +___ + +### delete + +ā–ø **delete**(`id`): `Promise`<`void`\> + +Deletes a space, and all saved objects belonging to that space. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `id` | `string` | the id of the space to delete. | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_client/spaces_client.d.ts:33 + +___ + +### disableLegacyUrlAliases + +ā–ø **disableLegacyUrlAliases**(`aliases`): `Promise`<`void`\> + +Disables the specified legacy URL aliases. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `aliases` | [`LegacyUrlAliasTarget`](client._internal_namespace.LegacyUrlAliasTarget.md)[] | the aliases to disable. | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_client/spaces_client.d.ts:38 + +___ + +### get + +ā–ø **get**(`id`): `Promise`<[`Space`](client._internal_namespace.Space.md)\> + +Retrieve a space by its id. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `id` | `string` | the space id. | + +#### Returns + +`Promise`<[`Space`](client._internal_namespace.Space.md)\> + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_client/spaces_client.d.ts:17 + +___ + +### getAll + +ā–ø **getAll**(`options?`): `Promise`<[`GetSpaceResult`](client._internal_namespace.GetSpaceResult.md)[]\> + +Retrieve all available spaces. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `options?` | [`GetAllSpacesOptions`](client._internal_namespace.GetAllSpacesOptions.md) | controls which spaces are retrieved. | + +#### Returns + +`Promise`<[`GetSpaceResult`](client._internal_namespace.GetSpaceResult.md)[]\> + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_client/spaces_client.d.ts:12 + +___ + +### update + +ā–ø **update**(`id`, `space`): `Promise`<[`Space`](client._internal_namespace.Space.md)\> + +Updates a space. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `id` | `string` | the id of the space to update. | +| `space` | [`Space`](client._internal_namespace.Space.md) | the updated space. | + +#### Returns + +`Promise`<[`Space`](client._internal_namespace.Space.md)\> + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_client/spaces_client.d.ts:28 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IUsageCounter.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IUsageCounter.md new file mode 100644 index 0000000000000..9ed76ff78e51b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IUsageCounter.md @@ -0,0 +1,37 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IUsageCounter + +# Interface: IUsageCounter + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IUsageCounter + +Usage Counter allows to keep track of any events that occur. +By calling [IUsageCounter.incrementCounter](client._internal_namespace.IUsageCounter.md#incrementcounter) devs can notify this +API whenever the event happens. + +## Table of contents + +### Methods + +- [incrementCounter](client._internal_namespace.IUsageCounter.md#incrementcounter) + +## Methods + +### incrementCounter + +ā–ø **incrementCounter**(`params`): `void` + +Notifies the counter about a new event happening so it can increase the count internally. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `params` | [`IncrementCounterParams`](client._internal_namespace.IncrementCounterParams.md) | [IncrementCounterParams](client._internal_namespace.IncrementCounterParams.md) | + +#### Returns + +`void` + +#### Defined in + +src/plugins/usage_collection/target/types/server/usage_counters/usage_counter.d.ts:33 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IncrementCounterParams.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IncrementCounterParams.md new file mode 100644 index 0000000000000..0c79f0d867cdc --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IncrementCounterParams.md @@ -0,0 +1,51 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IncrementCounterParams + +# Interface: IncrementCounterParams + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IncrementCounterParams + +Details about the counter to be incremented + +## Table of contents + +### Properties + +- [counterName](client._internal_namespace.IncrementCounterParams.md#countername) +- [counterType](client._internal_namespace.IncrementCounterParams.md#countertype) +- [incrementBy](client._internal_namespace.IncrementCounterParams.md#incrementby) + +## Properties + +### counterName + +ā€¢ **counterName**: `string` + +The name of the counter + +#### Defined in + +src/plugins/usage_collection/target/types/server/usage_counters/usage_counter.d.ts:17 + +___ + +### counterType + +ā€¢ `Optional` **counterType**: `string` + +The counter type ("count" by default) + +#### Defined in + +src/plugins/usage_collection/target/types/server/usage_counters/usage_counter.d.ts:19 + +___ + +### incrementBy + +ā€¢ `Optional` **incrementBy**: `number` + +Increment the counter by this number (1 if not specified) + +#### Defined in + +src/plugins/usage_collection/target/types/server/usage_counters/usage_counter.d.ts:21 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IndexMapping.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IndexMapping.md new file mode 100644 index 0000000000000..71cfddb7c8981 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IndexMapping.md @@ -0,0 +1,45 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IndexMapping + +# Interface: IndexMapping + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IndexMapping + +**`internal`** + +## Table of contents + +### Properties + +- [\_meta](client._internal_namespace.IndexMapping.md#_meta) +- [dynamic](client._internal_namespace.IndexMapping.md#dynamic) +- [properties](client._internal_namespace.IndexMapping.md#properties) + +## Properties + +### \_meta + +ā€¢ `Optional` **\_meta**: [`IndexMappingMeta`](client._internal_namespace.IndexMappingMeta.md) + +#### Defined in + +src/core/target/types/server/saved_objects/mappings/types.d.ts:104 + +___ + +### dynamic + +ā€¢ `Optional` **dynamic**: `boolean` \| ``"strict"`` + +#### Defined in + +src/core/target/types/server/saved_objects/mappings/types.d.ts:102 + +___ + +### properties + +ā€¢ **properties**: [`SavedObjectsMappingProperties`](client._internal_namespace.SavedObjectsMappingProperties.md) + +#### Defined in + +src/core/target/types/server/saved_objects/mappings/types.d.ts:103 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IndexMappingMeta.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IndexMappingMeta.md new file mode 100644 index 0000000000000..de9e76ae00099 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IndexMappingMeta.md @@ -0,0 +1,27 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IndexMappingMeta + +# Interface: IndexMappingMeta + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IndexMappingMeta + +**`internal`** + +## Table of contents + +### Properties + +- [migrationMappingPropertyHashes](client._internal_namespace.IndexMappingMeta.md#migrationmappingpropertyhashes) + +## Properties + +### migrationMappingPropertyHashes + +ā€¢ `Optional` **migrationMappingPropertyHashes**: `Object` + +#### Index signature + +ā–Ŗ [k: `string`]: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/mappings/types.d.ts:108 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IntervalSchedule.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IntervalSchedule.md new file mode 100644 index 0000000000000..365dfd5f7dfdf --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.IntervalSchedule.md @@ -0,0 +1,23 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / IntervalSchedule + +# Interface: IntervalSchedule + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).IntervalSchedule + +## Table of contents + +### Properties + +- [interval](client._internal_namespace.IntervalSchedule.md#interval) + +## Properties + +### interval + +ā€¢ **interval**: `string` + +An interval in minutes (e.g. '5m'). If specified, this is a recurring task. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:137 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaFeatureConfig.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaFeatureConfig.md new file mode 100644 index 0000000000000..2013e42ad5bf2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaFeatureConfig.md @@ -0,0 +1,257 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / KibanaFeatureConfig + +# Interface: KibanaFeatureConfig + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).KibanaFeatureConfig + +Interface for registering a feature. +Feature registration allows plugins to hide their applications with spaces, +and secure access when configured for security. + +## Table of contents + +### Properties + +- [alerting](client._internal_namespace.KibanaFeatureConfig.md#alerting) +- [app](client._internal_namespace.KibanaFeatureConfig.md#app) +- [cases](client._internal_namespace.KibanaFeatureConfig.md#cases) +- [catalogue](client._internal_namespace.KibanaFeatureConfig.md#catalogue) +- [category](client._internal_namespace.KibanaFeatureConfig.md#category) +- [excludeFromBasePrivileges](client._internal_namespace.KibanaFeatureConfig.md#excludefrombaseprivileges) +- [id](client._internal_namespace.KibanaFeatureConfig.md#id) +- [management](client._internal_namespace.KibanaFeatureConfig.md#management) +- [minimumLicense](client._internal_namespace.KibanaFeatureConfig.md#minimumlicense) +- [name](client._internal_namespace.KibanaFeatureConfig.md#name) +- [order](client._internal_namespace.KibanaFeatureConfig.md#order) +- [privileges](client._internal_namespace.KibanaFeatureConfig.md#privileges) +- [privilegesTooltip](client._internal_namespace.KibanaFeatureConfig.md#privilegestooltip) +- [reserved](client._internal_namespace.KibanaFeatureConfig.md#reserved) +- [subFeatures](client._internal_namespace.KibanaFeatureConfig.md#subfeatures) + +## Properties + +### alerting + +ā€¢ `Optional` **alerting**: readonly `string`[] + +If your feature grants access to specific Alert Types, you can specify them here to control visibility based on the current space. +Include both Alert Types registered by the feature and external Alert Types such as built-in +Alert Types and Alert Types provided by other features to which you wish to grant access. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:83 + +___ + +### app + +ā€¢ **app**: readonly `string`[] + +An array of app ids that are enabled when this feature is enabled. +Apps specified here will automatically cascade to the privileges defined below, unless specified differently there. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:54 + +___ + +### cases + +ā€¢ `Optional` **cases**: readonly `string`[] + +If your feature grants access to specific case types, you can specify them here to control visibility based on the current space. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:87 + +___ + +### catalogue + +ā€¢ `Optional` **catalogue**: readonly `string`[] + +If this feature includes a catalogue entry, you can specify them here to control visibility based on the current space. + +Items specified here will automatically cascade to the privileges defined below, unless specified differently there. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:77 + +___ + +### category + +ā€¢ **category**: [`AppCategory`](client._internal_namespace.AppCategory.md) + +The category for this feature. +This will be used to organize the list of features for display within the +Spaces and Roles management screens. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:30 + +___ + +### excludeFromBasePrivileges + +ā€¢ `Optional` **excludeFromBasePrivileges**: `boolean` + +Whether or not this feature should be excluded from the base privileges. +This is primarily helpful when migrating applications with a "legacy" privileges model +to use Kibana privileges. We don't want these features to be considered part of the `all` +or `read` base privileges in a minor release if the user was previously granted access +using an additional reserved role. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:42 + +___ + +### id + +ā€¢ **id**: `string` + +Unique identifier for this feature. +This identifier is also used when generating UI Capabilities. + +**`see`** UICapabilities + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:19 + +___ + +### management + +ā€¢ `Optional` **management**: `Object` + +If this feature includes management sections, you can specify them here to control visibility of those +pages based on the current space. + +Items specified here will automatically cascade to the privileges defined below, unless specified differently there. + +**`example`** +```ts + // Enables access to the "Advanced Settings" management page within the Kibana section + management: { + kibana: ['settings'] + } +``` + +#### Index signature + +ā–Ŗ [sectionId: `string`]: readonly `string`[] + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:69 + +___ + +### minimumLicense + +ā€¢ `Optional` **minimumLicense**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +Optional minimum supported license. +If omitted, all licenses are allowed. +This does not restrict access to your feature based on license. +Its only purpose is to inform the space and roles UIs on which features to display. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:49 + +___ + +### name + +ā€¢ **name**: `string` + +Display name for this feature. +This will be displayed to end-users, so a translatable string is advised for i18n. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:24 + +___ + +### order + +ā€¢ `Optional` **order**: `number` + +An ordinal used to sort features relative to one another for display. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:34 + +___ + +### privileges + +ā€¢ **privileges**: ``null`` \| { `all`: [`FeatureKibanaPrivileges`](client._internal_namespace.FeatureKibanaPrivileges.md) ; `read`: [`FeatureKibanaPrivileges`](client._internal_namespace.FeatureKibanaPrivileges.md) } + +Feature privilege definition. + +**`example`** +```ts + { + all: {...}, + read: {...} + } +``` + +**`see`** FeatureKibanaPrivileges + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:100 + +___ + +### privilegesTooltip + +ā€¢ `Optional` **privilegesTooltip**: `string` + +Optional message to display on the Role Management screen when configuring permissions for this feature. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:111 + +___ + +### reserved + +ā€¢ `Optional` `Private` **reserved**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `description` | `string` | +| `privileges` | readonly [`ReservedKibanaPrivilege`](client._internal_namespace.ReservedKibanaPrivilege.md)[] | + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:115 + +___ + +### subFeatures + +ā€¢ `Optional` **subFeatures**: readonly [`SubFeatureConfig`](client._internal_namespace.SubFeatureConfig.md)[] + +Optional sub-feature privilege definitions. This can only be specified if `privileges` are are also defined. + +#### Defined in + +x-pack/plugins/features/target/types/common/kibana_feature.d.ts:107 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaMigratorOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaMigratorOptions.md new file mode 100644 index 0000000000000..1b316e68c5771 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaMigratorOptions.md @@ -0,0 +1,76 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / KibanaMigratorOptions + +# Interface: KibanaMigratorOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).KibanaMigratorOptions + +## Table of contents + +### Properties + +- [client](client._internal_namespace.KibanaMigratorOptions.md#client) +- [kibanaIndex](client._internal_namespace.KibanaMigratorOptions.md#kibanaindex) +- [kibanaVersion](client._internal_namespace.KibanaMigratorOptions.md#kibanaversion) +- [logger](client._internal_namespace.KibanaMigratorOptions.md#logger) +- [soMigrationsConfig](client._internal_namespace.KibanaMigratorOptions.md#somigrationsconfig) +- [typeRegistry](client._internal_namespace.KibanaMigratorOptions.md#typeregistry) + +## Properties + +### client + +ā€¢ **client**: [`ElasticsearchClient`](../modules/client._internal_namespace.md#elasticsearchclient) + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:10 + +___ + +### kibanaIndex + +ā€¢ **kibanaIndex**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:13 + +___ + +### kibanaVersion + +ā€¢ **kibanaVersion**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:14 + +___ + +### logger + +ā€¢ **logger**: `Logger` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:15 + +___ + +### soMigrationsConfig + +ā€¢ **soMigrationsConfig**: `Readonly`<{} & { `batchSize`: `number` ; `maxBatchSizeBytes`: `ByteSizeValue` ; `pollInterval`: `number` ; `retryAttempts`: `number` ; `scrollDuration`: `string` ; `skip`: `boolean` }\> + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:12 + +___ + +### typeRegistry + +ā€¢ **typeRegistry**: [`ISavedObjectTypeRegistry`](../modules/client._internal_namespace.md#isavedobjecttyperegistry) + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:11 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaMigratorStatus.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaMigratorStatus.md new file mode 100644 index 0000000000000..21bba02200fa4 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaMigratorStatus.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / KibanaMigratorStatus + +# Interface: KibanaMigratorStatus + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).KibanaMigratorStatus + +## Table of contents + +### Properties + +- [result](client._internal_namespace.KibanaMigratorStatus.md#result) +- [status](client._internal_namespace.KibanaMigratorStatus.md#status) +- [waitingIndex](client._internal_namespace.KibanaMigratorStatus.md#waitingindex) + +## Properties + +### result + +ā€¢ `Optional` **result**: [`MigrationResult`](../modules/client._internal_namespace.md#migrationresult)[] + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:20 + +___ + +### status + +ā€¢ **status**: [`MigrationStatus`](../modules/client._internal_namespace.md#migrationstatus) + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:19 + +___ + +### waitingIndex + +ā€¢ `Optional` **waitingIndex**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:21 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaRequestEvents.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaRequestEvents.md new file mode 100644 index 0000000000000..c4b610af9ba99 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.KibanaRequestEvents.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / KibanaRequestEvents + +# Interface: KibanaRequestEvents + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).KibanaRequestEvents + +Request events. + +## Table of contents + +### Properties + +- [aborted$](client._internal_namespace.KibanaRequestEvents.md#aborted$) +- [completed$](client._internal_namespace.KibanaRequestEvents.md#completed$) + +## Properties + +### aborted$ + +ā€¢ **aborted$**: `Observable`<`void`\> + +Observable that emits once if and when the request has been aborted. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:48 + +___ + +### completed$ + +ā€¢ **completed$**: `Observable`<`void`\> + +Observable that emits once if and when the request has been completely handled. + +**`remarks`** +The request may be considered completed if: +- A response has been sent to the client; or +- The request was aborted. + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:57 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LegacyUrlAliasTarget.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LegacyUrlAliasTarget.md new file mode 100644 index 0000000000000..1580adc5c3127 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LegacyUrlAliasTarget.md @@ -0,0 +1,51 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / LegacyUrlAliasTarget + +# Interface: LegacyUrlAliasTarget + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).LegacyUrlAliasTarget + +Client interface for interacting with legacy URL aliases. + +## Table of contents + +### Properties + +- [sourceId](client._internal_namespace.LegacyUrlAliasTarget.md#sourceid) +- [targetSpace](client._internal_namespace.LegacyUrlAliasTarget.md#targetspace) +- [targetType](client._internal_namespace.LegacyUrlAliasTarget.md#targettype) + +## Properties + +### sourceId + +ā€¢ **sourceId**: `string` + +The original ID of the object, before it was converted. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:99 + +___ + +### targetSpace + +ā€¢ **targetSpace**: `string` + +The namespace that the object existed in when it was converted. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:91 + +___ + +### targetType + +ā€¢ **targetType**: `string` + +The type of the object when it was converted. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:95 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicenseCheck.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicenseCheck.md new file mode 100644 index 0000000000000..084c5ae23607e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicenseCheck.md @@ -0,0 +1,36 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / LicenseCheck + +# Interface: LicenseCheck + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).LicenseCheck + +## Table of contents + +### Properties + +- [message](client._internal_namespace.LicenseCheck.md#message) +- [state](client._internal_namespace.LicenseCheck.md#state) + +## Properties + +### message + +ā€¢ `Optional` **message**: `string` + +A message containing the reason for a license type not being valid. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:75 + +___ + +### state + +ā€¢ **state**: [`LicenseCheckState`](../modules/client._internal_namespace.md#licensecheckstate) + +The state of checking the results of a license type meeting the license minimum. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:71 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicenseFeature.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicenseFeature.md new file mode 100644 index 0000000000000..e6794cd50d933 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicenseFeature.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / LicenseFeature + +# Interface: LicenseFeature + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).LicenseFeature + +## Table of contents + +### Properties + +- [isAvailable](client._internal_namespace.LicenseFeature.md#isavailable) +- [isEnabled](client._internal_namespace.LicenseFeature.md#isenabled) + +## Properties + +### isAvailable + +ā€¢ **isAvailable**: `boolean` + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:16 + +___ + +### isEnabled + +ā€¢ **isEnabled**: `boolean` + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:17 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicensingPluginSetup.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicensingPluginSetup.md new file mode 100644 index 0000000000000..240dbd27ad2fc --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.LicensingPluginSetup.md @@ -0,0 +1,60 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / LicensingPluginSetup + +# Interface: LicensingPluginSetup + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).LicensingPluginSetup + +## Table of contents + +### Properties + +- [featureUsage](client._internal_namespace.LicensingPluginSetup.md#featureusage) +- [license$](client._internal_namespace.LicensingPluginSetup.md#license$) + +### Methods + +- [refresh](client._internal_namespace.LicensingPluginSetup.md#refresh) + +## Properties + +### featureUsage + +ā€¢ **featureUsage**: [`FeatureUsageServiceSetup`](client._internal_namespace.FeatureUsageServiceSetup.md) + +APIs to register licensed feature usage. + +#### Defined in + +x-pack/plugins/licensing/target/types/server/types.d.ts:49 + +___ + +### license$ + +ā€¢ **license$**: `Observable`<[`ILicense`](client._internal_namespace.ILicense.md)\> + +Steam of licensing information [ILicense](client._internal_namespace.ILicense.md). + +**`deprecated`** in favour of the counterpart provided from start contract + +#### Defined in + +x-pack/plugins/licensing/target/types/server/types.d.ts:40 + +## Methods + +### refresh + +ā–ø **refresh**(): `Promise`<[`ILicense`](client._internal_namespace.ILicense.md)\> + +Triggers licensing information re-fetch. + +**`deprecated`** in favour of the counterpart provided from start contract + +#### Returns + +`Promise`<[`ILicense`](client._internal_namespace.ILicense.md)\> + +#### Defined in + +x-pack/plugins/licensing/target/types/server/types.d.ts:45 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Middleware.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Middleware.md new file mode 100644 index 0000000000000..0a6d5169b4278 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Middleware.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Middleware + +# Interface: Middleware + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Middleware + +## Table of contents + +### Properties + +- [beforeMarkRunning](client._internal_namespace.Middleware.md#beforemarkrunning) +- [beforeRun](client._internal_namespace.Middleware.md#beforerun) +- [beforeSave](client._internal_namespace.Middleware.md#beforesave) + +## Properties + +### beforeMarkRunning + +ā€¢ **beforeMarkRunning**: [`BeforeRunContextFunction`](../modules/client._internal_namespace.md#beforeruncontextfunction) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/lib/middleware.d.ts:11 + +___ + +### beforeRun + +ā€¢ **beforeRun**: [`BeforeRunContextFunction`](../modules/client._internal_namespace.md#beforeruncontextfunction) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/lib/middleware.d.ts:10 + +___ + +### beforeSave + +ā€¢ **beforeSave**: [`BeforeSaveContextFunction`](../modules/client._internal_namespace.md#beforesavecontextfunction) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/lib/middleware.d.ts:9 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.OperationDetails.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.OperationDetails.md new file mode 100644 index 0000000000000..a7e428f943d05 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.OperationDetails.md @@ -0,0 +1,91 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / OperationDetails + +# Interface: OperationDetails + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).OperationDetails + +Defines the structure for a case API route. + +## Table of contents + +### Properties + +- [action](client._internal_namespace.OperationDetails.md#action) +- [docType](client._internal_namespace.OperationDetails.md#doctype) +- [ecsType](client._internal_namespace.OperationDetails.md#ecstype) +- [name](client._internal_namespace.OperationDetails.md#name) +- [savedObjectType](client._internal_namespace.OperationDetails.md#savedobjecttype) +- [verbs](client._internal_namespace.OperationDetails.md#verbs) + +## Properties + +### action + +ā€¢ **action**: `string` + +The ECS `event.action` field, should be in the form of _ e.g comment_get, case_fined + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:83](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L83) + +___ + +### docType + +ā€¢ **docType**: `string` + +The readable name of the entity being operated on e.g. case, comment, configurations (make it plural if it reads better that way etc) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:91](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L91) + +___ + +### ecsType + +ā€¢ **ecsType**: `EcsEventType` + +The ECS event type that this operation should be audit logged as (creation, deletion, access, etc) + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:74](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L74) + +___ + +### name + +ā€¢ **name**: `string` + +The name of the operation to authorize against for the privilege check. +These values need to match one of the operation strings defined here: x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/cases.ts + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L79) + +___ + +### savedObjectType + +ā€¢ **savedObjectType**: `string` + +The actual saved object type of the entity e.g. cases, cases-comments + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:95](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L95) + +___ + +### verbs + +ā€¢ **verbs**: [`Verbs`](client._internal_namespace.Verbs.md) + +The verbs that are associated with this type of operation, these should line up with the event type e.g. creating, created, create etc + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:87](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L87) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.OwnerEntity.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.OwnerEntity.md new file mode 100644 index 0000000000000..771823c8e9711 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.OwnerEntity.md @@ -0,0 +1,35 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / OwnerEntity + +# Interface: OwnerEntity + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).OwnerEntity + +Describes an entity with the necessary fields to identify if the user is authorized to interact with the saved object +returned from some find query. + +## Table of contents + +### Properties + +- [id](client._internal_namespace.OwnerEntity.md#id) +- [owner](client._internal_namespace.OwnerEntity.md#owner) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:104](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L104) + +___ + +### owner + +ā€¢ **owner**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:103](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L103) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCase.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCase.md new file mode 100644 index 0000000000000..39774f46c552f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCase.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PatchCase + +# Interface: PatchCase + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PatchCase + +## Table of contents + +### Properties + +- [caseId](client._internal_namespace.PatchCase.md#caseid) +- [originalCase](client._internal_namespace.PatchCase.md#originalcase) +- [updatedAttributes](client._internal_namespace.PatchCase.md#updatedattributes) +- [version](client._internal_namespace.PatchCase.md#version) + +## Properties + +### caseId + +ā€¢ **caseId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:98](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L98) + +___ + +### originalCase + +ā€¢ **originalCase**: [`SavedObject`](client._internal_namespace.SavedObject.md)<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:100](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L100) + +___ + +### updatedAttributes + +ā€¢ **updatedAttributes**: `Partial`<{ `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & [`PushedArgs`](client._internal_namespace.PushedArgs.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:99](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L99) + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:101](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L101) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCaseConfigureArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCaseConfigureArgs.md new file mode 100644 index 0000000000000..c6909426e1088 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCaseConfigureArgs.md @@ -0,0 +1,64 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PatchCaseConfigureArgs + +# Interface: PatchCaseConfigureArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PatchCaseConfigureArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs.md) + + ā†³ **`PatchCaseConfigureArgs`** + +## Table of contents + +### Properties + +- [configurationId](client._internal_namespace.PatchCaseConfigureArgs.md#configurationid) +- [originalConfiguration](client._internal_namespace.PatchCaseConfigureArgs.md#originalconfiguration) +- [unsecuredSavedObjectsClient](client._internal_namespace.PatchCaseConfigureArgs.md#unsecuredsavedobjectsclient) +- [updatedAttributes](client._internal_namespace.PatchCaseConfigureArgs.md#updatedattributes) + +## Properties + +### configurationId + +ā€¢ **configurationId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:46](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L46) + +___ + +### originalConfiguration + +ā€¢ **originalConfiguration**: [`SavedObject`](client._internal_namespace.SavedObject.md)<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\> + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:48](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L48) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L30) + +___ + +### updatedAttributes + +ā€¢ **updatedAttributes**: `Partial`<{ `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\> + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:47](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L47) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCasesArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCasesArgs.md new file mode 100644 index 0000000000000..24db998f64f3d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PatchCasesArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PatchCasesArgs + +# Interface: PatchCasesArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PatchCasesArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`PatchCasesArgs`** + +## Table of contents + +### Properties + +- [cases](client._internal_namespace.PatchCasesArgs.md#cases) +- [unsecuredSavedObjectsClient](client._internal_namespace.PatchCasesArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### cases + +ā€¢ **cases**: [`PatchCase`](client._internal_namespace.PatchCase.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:106](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L106) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PersistableState.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PersistableState.md new file mode 100644 index 0000000000000..7300cc96a8fd2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PersistableState.md @@ -0,0 +1,133 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PersistableState + +# Interface: PersistableState + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PersistableState + +Persistable state interface can be implemented by something that persists +(stores) state, for example, in a saved object. Once implemented that thing +will gain ability to "extract" and "inject" saved object references, which +are necessary for various saved object tasks, such as export. It will also be +able to do state migrations across Kibana versions, if the shape of the state +would change over time. + +**`todo`** Maybe rename it to `PersistableStateItem`? + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `P` | extends `SerializableRecord` = `SerializableRecord` | + +## Table of contents + +### Properties + +- [migrations](client._internal_namespace.PersistableState.md#migrations) + +### Methods + +- [extract](client._internal_namespace.PersistableState.md#extract) +- [inject](client._internal_namespace.PersistableState.md#inject) +- [telemetry](client._internal_namespace.PersistableState.md#telemetry) + +## Properties + +### migrations + +ā€¢ **migrations**: [`MigrateFunctionsObject`](../modules/client._internal_namespace.md#migratefunctionsobject) \| [`GetMigrationFunctionObjectFn`](../modules/client._internal_namespace.md#getmigrationfunctionobjectfn) + +A list of migration functions, which migrate the persistable state +serializable object to the next version. Migration functions should are +keyed by the Kibana version using semver, where the version indicates to +which version the state will be migrated to. + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:75 + +## Methods + +### extract + +ā–ø **extract**(`state`): `Object` + +A function which receives state and should return the state with references +extracted and an array of the extracted references. The default case could +simply return the same state with an empty array of references. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `state` | `P` | The persistable state serializable state object. | + +#### Returns + +`Object` + +Persistable state object with references extracted and a list of + references. + +| Name | Type | +| :------ | :------ | +| `references` | [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] | +| `state` | `P` | + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:65 + +___ + +### inject + +ā–ø **inject**(`state`, `references`): `P` + +A function which receives state and a list of references and should return +back the state with references injected. The default is an identity +function. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `state` | `P` | The persistable state serializable state object. | +| `references` | [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] | List of saved object references. | + +#### Returns + +`P` + +Persistable state object with references injected. + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:55 + +___ + +### telemetry + +ā–ø **telemetry**(`state`, `stats`): `Record`<`string`, `any`\> + +Function which reports telemetry information. This function is essentially +a "reducer" - it receives the existing "stats" object and returns an +updated version of the "stats" object. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `state` | `P` | The persistable state serializable state object. | +| `stats` | `Record`<`string`, `any`\> | Stats object containing the stats which were already collected. This `stats` object shall not be mutated in-line. | + +#### Returns + +`Record`<`string`, `any`\> + +A new stats object augmented with new telemetry information. + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:45 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PluginStartContract.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PluginStartContract.md new file mode 100644 index 0000000000000..3ded8d5c50642 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PluginStartContract.md @@ -0,0 +1,40 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PluginStartContract + +# Interface: PluginStartContract + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PluginStartContract + +## Table of contents + +### Methods + +- [getElasticsearchFeatures](client._internal_namespace.PluginStartContract.md#getelasticsearchfeatures) +- [getKibanaFeatures](client._internal_namespace.PluginStartContract.md#getkibanafeatures) + +## Methods + +### getElasticsearchFeatures + +ā–ø **getElasticsearchFeatures**(): [`ElasticsearchFeature`](../classes/client._internal_namespace.ElasticsearchFeature.md)[] + +#### Returns + +[`ElasticsearchFeature`](../classes/client._internal_namespace.ElasticsearchFeature.md)[] + +#### Defined in + +x-pack/plugins/features/target/types/server/plugin.d.ts:28 + +___ + +### getKibanaFeatures + +ā–ø **getKibanaFeatures**(): [`KibanaFeature`](../classes/client._internal_namespace.KibanaFeature.md)[] + +#### Returns + +[`KibanaFeature`](../classes/client._internal_namespace.KibanaFeature.md)[] + +#### Defined in + +x-pack/plugins/features/target/types/server/plugin.d.ts:29 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseArgs.md new file mode 100644 index 0000000000000..03690ece438b7 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseArgs.md @@ -0,0 +1,53 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PostCaseArgs + +# Interface: PostCaseArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PostCaseArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`PostCaseArgs`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.PostCaseArgs.md#attributes) +- [id](client._internal_namespace.PostCaseArgs.md#id) +- [unsecuredSavedObjectsClient](client._internal_namespace.PostCaseArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### attributes + +ā€¢ **attributes**: { `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:93](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L93) + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:94](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L94) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseConfigureArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseConfigureArgs.md new file mode 100644 index 0000000000000..b10f3e3ae51ba --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseConfigureArgs.md @@ -0,0 +1,53 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PostCaseConfigureArgs + +# Interface: PostCaseConfigureArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PostCaseConfigureArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs.md) + + ā†³ **`PostCaseConfigureArgs`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.PostCaseConfigureArgs.md#attributes) +- [id](client._internal_namespace.PostCaseConfigureArgs.md#id) +- [unsecuredSavedObjectsClient](client._internal_namespace.PostCaseConfigureArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### attributes + +ā€¢ **attributes**: { `closure_type`: ``"close-by-user"`` \| ``"close-by-pushing"`` = ClosureTypeRT; `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt } & { `owner`: `string` = rt.string } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:41](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L41) + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:42](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L42) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/configure/index.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/configure/index.ts#L30) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseUserActionArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseUserActionArgs.md new file mode 100644 index 0000000000000..5b890d18106ea --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostCaseUserActionArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PostCaseUserActionArgs + +# Interface: PostCaseUserActionArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PostCaseUserActionArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-1.md) + + ā†³ **`PostCaseUserActionArgs`** + +## Table of contents + +### Properties + +- [actions](client._internal_namespace.PostCaseUserActionArgs.md#actions) +- [unsecuredSavedObjectsClient](client._internal_namespace.PostCaseUserActionArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### actions + +ā€¢ **actions**: [`BuilderReturnValue`](client._internal_namespace.BuilderReturnValue.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:67](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L67) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-1.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-1.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/index.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/index.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostConnectorMappingsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostConnectorMappingsArgs.md new file mode 100644 index 0000000000000..d4cc3e71a0ba8 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PostConnectorMappingsArgs.md @@ -0,0 +1,60 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PostConnectorMappingsArgs + +# Interface: PostConnectorMappingsArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PostConnectorMappingsArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-2.md) + + ā†³ **`PostConnectorMappingsArgs`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.PostConnectorMappingsArgs.md#attributes) +- [references](client._internal_namespace.PostConnectorMappingsArgs.md#references) +- [unsecuredSavedObjectsClient](client._internal_namespace.PostConnectorMappingsArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### attributes + +ā€¢ **attributes**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `mappings` | { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] | +| `owner` | `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:22](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L22) + +___ + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:23](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L23) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-2.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-2.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L15) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PreConfiguredAction.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PreConfiguredAction.md new file mode 100644 index 0000000000000..d5bd141afd372 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PreConfiguredAction.md @@ -0,0 +1,124 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PreConfiguredAction + +# Interface: PreConfiguredAction + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PreConfiguredAction + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Config` | extends [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) = [`ActionTypeConfig`](../modules/client._internal_namespace.md#actiontypeconfig) | +| `Secrets` | extends [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) = [`ActionTypeSecrets`](../modules/client._internal_namespace.md#actiontypesecrets) | + +## Hierarchy + +- [`ActionResult`](client._internal_namespace.ActionResult.md)<`Config`\> + + ā†³ **`PreConfiguredAction`** + +## Table of contents + +### Properties + +- [actionTypeId](client._internal_namespace.PreConfiguredAction.md#actiontypeid) +- [config](client._internal_namespace.PreConfiguredAction.md#config) +- [id](client._internal_namespace.PreConfiguredAction.md#id) +- [isMissingSecrets](client._internal_namespace.PreConfiguredAction.md#ismissingsecrets) +- [isPreconfigured](client._internal_namespace.PreConfiguredAction.md#ispreconfigured) +- [name](client._internal_namespace.PreConfiguredAction.md#name) +- [secrets](client._internal_namespace.PreConfiguredAction.md#secrets) + +## Properties + +### actionTypeId + +ā€¢ **actionTypeId**: `string` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[actionTypeId](client._internal_namespace.ActionResult.md#actiontypeid) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:50 + +___ + +### config + +ā€¢ `Optional` **config**: `Config` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[config](client._internal_namespace.ActionResult.md#config) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:53 + +___ + +### id + +ā€¢ **id**: `string` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[id](client._internal_namespace.ActionResult.md#id) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:49 + +___ + +### isMissingSecrets + +ā€¢ `Optional` **isMissingSecrets**: `boolean` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[isMissingSecrets](client._internal_namespace.ActionResult.md#ismissingsecrets) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:52 + +___ + +### isPreconfigured + +ā€¢ **isPreconfigured**: `boolean` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[isPreconfigured](client._internal_namespace.ActionResult.md#ispreconfigured) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:54 + +___ + +### name + +ā€¢ **name**: `string` + +#### Inherited from + +[ActionResult](client._internal_namespace.ActionResult.md).[name](client._internal_namespace.ActionResult.md#name) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:51 + +___ + +### secrets + +ā€¢ **secrets**: `Secrets` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:57 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ProxySettings.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ProxySettings.md new file mode 100644 index 0000000000000..e1816a9f513cd --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ProxySettings.md @@ -0,0 +1,65 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ProxySettings + +# Interface: ProxySettings + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ProxySettings + +## Table of contents + +### Properties + +- [proxyBypassHosts](client._internal_namespace.ProxySettings.md#proxybypasshosts) +- [proxyHeaders](client._internal_namespace.ProxySettings.md#proxyheaders) +- [proxyOnlyHosts](client._internal_namespace.ProxySettings.md#proxyonlyhosts) +- [proxySSLSettings](client._internal_namespace.ProxySettings.md#proxysslsettings) +- [proxyUrl](client._internal_namespace.ProxySettings.md#proxyurl) + +## Properties + +### proxyBypassHosts + +ā€¢ **proxyBypassHosts**: `undefined` \| `Set`<`string`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:110 + +___ + +### proxyHeaders + +ā€¢ `Optional` **proxyHeaders**: `Record`<`string`, `string`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:112 + +___ + +### proxyOnlyHosts + +ā€¢ **proxyOnlyHosts**: `undefined` \| `Set`<`string`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:111 + +___ + +### proxySSLSettings + +ā€¢ **proxySSLSettings**: [`SSLSettings`](client._internal_namespace.SSLSettings.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:113 + +___ + +### proxyUrl + +ā€¢ **proxyUrl**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:109 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PublicLicense.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PublicLicense.md new file mode 100644 index 0000000000000..63c54f6be23cd --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PublicLicense.md @@ -0,0 +1,80 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PublicLicense + +# Interface: PublicLicense + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PublicLicense + +Subset of license data considered as non-sensitive information. +Can be passed to the client. + +## Table of contents + +### Properties + +- [expiryDateInMillis](client._internal_namespace.PublicLicense.md#expirydateinmillis) +- [mode](client._internal_namespace.PublicLicense.md#mode) +- [status](client._internal_namespace.PublicLicense.md#status) +- [type](client._internal_namespace.PublicLicense.md#type) +- [uid](client._internal_namespace.PublicLicense.md#uid) + +## Properties + +### expiryDateInMillis + +ā€¢ **expiryDateInMillis**: `number` + +Unix epoch of the expiration date of the license. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:36 + +___ + +### mode + +ā€¢ **mode**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +The license type, being usually one of basic, standard, gold, platinum, or trial. + +**`deprecated`** use 'type' instead + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:45 + +___ + +### status + +ā€¢ **status**: [`LicenseStatus`](../modules/client._internal_namespace.md#licensestatus) + +The validity status of the license. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:32 + +___ + +### type + +ā€¢ **type**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +The license type, being usually one of basic, standard, gold, platinum, or trial. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:40 + +___ + +### uid + +ā€¢ **uid**: `string` + +UID for license. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:28 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PublicLicenseJSON.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PublicLicenseJSON.md new file mode 100644 index 0000000000000..895a3654baaf2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PublicLicenseJSON.md @@ -0,0 +1,46 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PublicLicenseJSON + +# Interface: PublicLicenseJSON + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PublicLicenseJSON + +Subset of license & features data considered as non-sensitive information. +Structured as json to be passed to the client. + +## Table of contents + +### Properties + +- [features](client._internal_namespace.PublicLicenseJSON.md#features) +- [license](client._internal_namespace.PublicLicenseJSON.md#license) +- [signature](client._internal_namespace.PublicLicenseJSON.md#signature) + +## Properties + +### features + +ā€¢ `Optional` **features**: [`PublicFeatures`](../modules/client._internal_namespace.md#publicfeatures) + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:59 + +___ + +### license + +ā€¢ `Optional` **license**: [`PublicLicense`](client._internal_namespace.PublicLicense.md) + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:58 + +___ + +### signature + +ā€¢ **signature**: `string` + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:60 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PushedArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PushedArgs.md new file mode 100644 index 0000000000000..0637bcb1cb21f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.PushedArgs.md @@ -0,0 +1,40 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / PushedArgs + +# Interface: PushedArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).PushedArgs + +## Table of contents + +### Properties + +- [pushed\_at](client._internal_namespace.PushedArgs.md#pushed_at) +- [pushed\_by](client._internal_namespace.PushedArgs.md#pushed_by) + +## Properties + +### pushed\_at + +ā€¢ **pushed\_at**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:64](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L64) + +___ + +### pushed\_by + +ā€¢ **pushed\_by**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:65](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L65) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Referencable.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Referencable.md new file mode 100644 index 0000000000000..b8914a27eb524 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Referencable.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Referencable + +# Interface: Referencable + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Referencable + +## Table of contents + +### Properties + +- [references](client._internal_namespace.Referencable.md#references) + +## Properties + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:40 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ReservedKibanaPrivilege.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ReservedKibanaPrivilege.md new file mode 100644 index 0000000000000..cfd5cc23baa8c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ReservedKibanaPrivilege.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ReservedKibanaPrivilege + +# Interface: ReservedKibanaPrivilege + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ReservedKibanaPrivilege + +## Table of contents + +### Properties + +- [id](client._internal_namespace.ReservedKibanaPrivilege.md#id) +- [privilege](client._internal_namespace.ReservedKibanaPrivilege.md#privilege) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/features/target/types/common/reserved_kibana_privilege.d.ts:3 + +___ + +### privilege + +ā€¢ **privilege**: [`FeatureKibanaPrivileges`](client._internal_namespace.FeatureKibanaPrivileges.md) + +#### Defined in + +x-pack/plugins/features/target/types/common/reserved_kibana_privilege.d.ts:4 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ResponseSettings.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ResponseSettings.md new file mode 100644 index 0000000000000..b5c3a7374e03d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ResponseSettings.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ResponseSettings + +# Interface: ResponseSettings + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ResponseSettings + +## Table of contents + +### Properties + +- [maxContentLength](client._internal_namespace.ResponseSettings.md#maxcontentlength) +- [timeout](client._internal_namespace.ResponseSettings.md#timeout) + +## Properties + +### maxContentLength + +ā€¢ **maxContentLength**: `number` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:116 + +___ + +### timeout + +ā€¢ **timeout**: `number` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:117 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteConfigOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteConfigOptions.md new file mode 100644 index 0000000000000..447612f4b9ece --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteConfigOptions.md @@ -0,0 +1,100 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RouteConfigOptions + +# Interface: RouteConfigOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RouteConfigOptions + +Additional route options. + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Method` | extends [`RouteMethod`](../modules/client._internal_namespace.md#routemethod) | + +## Table of contents + +### Properties + +- [authRequired](client._internal_namespace.RouteConfigOptions.md#authrequired) +- [body](client._internal_namespace.RouteConfigOptions.md#body) +- [tags](client._internal_namespace.RouteConfigOptions.md#tags) +- [timeout](client._internal_namespace.RouteConfigOptions.md#timeout) +- [xsrfRequired](client._internal_namespace.RouteConfigOptions.md#xsrfrequired) + +## Properties + +### authRequired + +ā€¢ `Optional` **authRequired**: `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. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:89 + +___ + +### body + +ā€¢ `Optional` **body**: `Method` extends ``"options"`` \| ``"get"`` ? `undefined` : [`RouteConfigOptionsBody`](client._internal_namespace.RouteConfigOptionsBody.md) + +Additional body options [RouteConfigOptionsBody](client._internal_namespace.RouteConfigOptionsBody.md). + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:105 + +___ + +### tags + +ā€¢ `Optional` **tags**: readonly `string`[] + +Additional metadata tag strings to attach to the route. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:101 + +___ + +### timeout + +ā€¢ `Optional` **timeout**: `Object` + +Defines per-route timeouts. + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `idleSocket?` | `number` | Milliseconds the socket can be idle before it's closed | +| `payload?` | `Method` extends ``"options"`` \| ``"get"`` ? `undefined` : `number` | Milliseconds to receive the payload | + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:109 + +___ + +### xsrfRequired + +ā€¢ `Optional` **xsrfRequired**: `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 + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:97 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteConfigOptionsBody.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteConfigOptionsBody.md new file mode 100644 index 0000000000000..c392c1845b22a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteConfigOptionsBody.md @@ -0,0 +1,89 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RouteConfigOptionsBody + +# Interface: RouteConfigOptionsBody + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RouteConfigOptionsBody + +Additional body options for a route + +## Table of contents + +### Properties + +- [accepts](client._internal_namespace.RouteConfigOptionsBody.md#accepts) +- [maxBytes](client._internal_namespace.RouteConfigOptionsBody.md#maxbytes) +- [output](client._internal_namespace.RouteConfigOptionsBody.md#output) +- [parse](client._internal_namespace.RouteConfigOptionsBody.md#parse) + +## Properties + +### accepts + +ā€¢ `Optional` **accepts**: `string` \| `string`[] \| [`RouteContentType`](../modules/client._internal_namespace.md#routecontenttype)[] + +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/* + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:45 + +___ + +### maxBytes + +ā€¢ `Optional` **maxBytes**: `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`. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:51 + +___ + +### output + +ā€¢ `Optional` **output**: ``"data"`` \| ``"stream"`` + +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. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:63 + +___ + +### parse + +ā€¢ `Optional` **parse**: `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. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:73 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidationResultFactory.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidationResultFactory.md new file mode 100644 index 0000000000000..4e45bca74bdee --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidationResultFactory.md @@ -0,0 +1,71 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RouteValidationResultFactory + +# Interface: RouteValidationResultFactory + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RouteValidationResultFactory + +Validation result factory to be used in the custom validation function to return the valid data or validation errors + +See [RouteValidationFunction](../modules/client._internal_namespace.md#routevalidationfunction). + +## Table of contents + +### Methods + +- [badRequest](client._internal_namespace.RouteValidationResultFactory.md#badrequest) +- [ok](client._internal_namespace.RouteValidationResultFactory.md#ok) + +## Methods + +### badRequest + +ā–ø **badRequest**(`error`, `path?`): `Object` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `string` \| `Error` | +| `path?` | `string`[] | + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `error` | [`RouteValidationError`](../classes/client._internal_namespace.RouteValidationError.md) | + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:14 + +___ + +### ok + +ā–ø **ok**<`T`\>(`value`): `Object` + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `T` | + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `value` | `T` | + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:11 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidatorConfig.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidatorConfig.md new file mode 100644 index 0000000000000..dcea2693b8a07 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidatorConfig.md @@ -0,0 +1,60 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RouteValidatorConfig + +# Interface: RouteValidatorConfig + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RouteValidatorConfig + +The configuration object to the RouteValidator class. +Set `params`, `query` and/or `body` to specify the validation logic to follow for that property. + +## Type parameters + +| Name | +| :------ | +| `P` | +| `Q` | +| `B` | + +## Table of contents + +### Properties + +- [body](client._internal_namespace.RouteValidatorConfig.md#body) +- [params](client._internal_namespace.RouteValidatorConfig.md#params) +- [query](client._internal_namespace.RouteValidatorConfig.md#query) + +## Properties + +### body + +ā€¢ `Optional` **body**: [`RouteValidationSpec`](../modules/client._internal_namespace.md#routevalidationspec)<`B`\> + +Validation logic for the body payload + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:79 + +___ + +### params + +ā€¢ `Optional` **params**: [`RouteValidationSpec`](../modules/client._internal_namespace.md#routevalidationspec)<`P`\> + +Validation logic for the URL params + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:69 + +___ + +### query + +ā€¢ `Optional` **query**: [`RouteValidationSpec`](../modules/client._internal_namespace.md#routevalidationspec)<`Q`\> + +Validation logic for the Query params + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:74 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidatorOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidatorOptions.md new file mode 100644 index 0000000000000..2652ad7475e82 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RouteValidatorOptions.md @@ -0,0 +1,33 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RouteValidatorOptions + +# Interface: RouteValidatorOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RouteValidatorOptions + +Additional options for the RouteValidator class to modify its default behaviour. + +## Table of contents + +### Properties + +- [unsafe](client._internal_namespace.RouteValidatorOptions.md#unsafe) + +## Properties + +### unsafe + +ā€¢ `Optional` **unsafe**: `Object` + +Set the `unsafe` config to avoid running some additional internal *safe* validations on top of your custom validation + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `body?` | `boolean` | +| `params?` | `boolean` | +| `query?` | `boolean` | + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:91 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RunContext.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RunContext.md new file mode 100644 index 0000000000000..01eec0d08684b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RunContext.md @@ -0,0 +1,25 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RunContext + +# Interface: RunContext + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RunContext + +The run context is passed into a task's run function as its sole argument. + +## Table of contents + +### Properties + +- [taskInstance](client._internal_namespace.RunContext.md#taskinstance) + +## Properties + +### taskInstance + +ā€¢ **taskInstance**: [`ConcreteTaskInstance`](client._internal_namespace.ConcreteTaskInstance.md) + +The document describing the task instance, its params, state, id, etc. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:23 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RunNowResult.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RunNowResult.md new file mode 100644 index 0000000000000..d5a584a4b99c5 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.RunNowResult.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / RunNowResult + +# Interface: RunNowResult + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).RunNowResult + +## Table of contents + +### Properties + +- [id](client._internal_namespace.RunNowResult.md#id) +- [state](client._internal_namespace.RunNowResult.md#state) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_scheduling.d.ts:18 + +___ + +### state + +ā€¢ `Optional` **state**: `Record`<`string`, `any`\> + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_scheduling.d.ts:19 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SSLSettings.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SSLSettings.md new file mode 100644 index 0000000000000..ce1f83e937876 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SSLSettings.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SSLSettings + +# Interface: SSLSettings + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SSLSettings + +## Table of contents + +### Properties + +- [verificationMode](client._internal_namespace.SSLSettings.md#verificationmode) + +## Properties + +### verificationMode + +ā€¢ `Optional` **verificationMode**: ``"none"`` \| ``"certificate"`` \| ``"full"`` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:120 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObject.md new file mode 100644 index 0000000000000..7a2ab41e7cf9c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObject.md @@ -0,0 +1,167 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObject + +# Interface: SavedObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObject + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Hierarchy + +- **`SavedObject`** + + ā†³ [`SavedObjectsFindResult`](client._internal_namespace.SavedObjectsFindResult.md) + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.SavedObject.md#attributes) +- [coreMigrationVersion](client._internal_namespace.SavedObject.md#coremigrationversion) +- [error](client._internal_namespace.SavedObject.md#error) +- [id](client._internal_namespace.SavedObject.md#id) +- [migrationVersion](client._internal_namespace.SavedObject.md#migrationversion) +- [namespaces](client._internal_namespace.SavedObject.md#namespaces) +- [originId](client._internal_namespace.SavedObject.md#originid) +- [references](client._internal_namespace.SavedObject.md#references) +- [type](client._internal_namespace.SavedObject.md#type) +- [updated\_at](client._internal_namespace.SavedObject.md#updated_at) +- [version](client._internal_namespace.SavedObject.md#version) + +## Properties + +### attributes + +ā€¢ **attributes**: `T` + +{@inheritdoc SavedObjectAttributes} + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:61 + +___ + +### coreMigrationVersion + +ā€¢ `Optional` **coreMigrationVersion**: `string` + +A semver value that is used when upgrading objects between Kibana versions. + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:67 + +___ + +### error + +ā€¢ `Optional` **error**: [`SavedObjectError`](client._internal_namespace.SavedObjectError.md) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:59 + +___ + +### id + +ā€¢ **id**: `string` + +The ID of this Saved Object, guaranteed to be unique for all objects of the same `type` + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:52 + +___ + +### migrationVersion + +ā€¢ `Optional` **migrationVersion**: [`SavedObjectsMigrationVersion`](client._internal_namespace.SavedObjectsMigrationVersion.md) + +{@inheritdoc SavedObjectsMigrationVersion} + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:65 + +___ + +### namespaces + +ā€¢ `Optional` **namespaces**: `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'`. + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:72 + +___ + +### originId + +ā€¢ `Optional` **originId**: `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. + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:79 + +___ + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +{@inheritdoc SavedObjectReference} + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:63 + +___ + +### type + +ā€¢ **type**: `string` + +The type of Saved Object. Each plugin can define it's own custom Saved Object types. + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:54 + +___ + +### updated\_at + +ā€¢ `Optional` **updated\_at**: `string` + +Timestamp of the last time this document had been updated. + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:58 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:56 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectAttributes.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectAttributes.md new file mode 100644 index 0000000000000..2f260171ce47a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectAttributes.md @@ -0,0 +1,20 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectAttributes + +# Interface: SavedObjectAttributes + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectAttributes + +The data for a Saved Object is stored as an object in the `attributes` +property. + +## Hierarchy + +- **`SavedObjectAttributes`** + + ā†³ [`ActionUpdate`](client._internal_namespace.ActionUpdate.md) + + ā†³ [`ConnectorToken`](client._internal_namespace.ConnectorToken.md) + +## Indexable + +ā–Ŗ [key: `string`]: [`SavedObjectAttribute`](../modules/client._internal_namespace.md#savedobjectattribute) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectDoc.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectDoc.md new file mode 100644 index 0000000000000..50478fb7b3cf2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectDoc.md @@ -0,0 +1,128 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectDoc + +# Interface: SavedObjectDoc + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectDoc + +Saved Object base document + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.SavedObjectDoc.md#attributes) +- [coreMigrationVersion](client._internal_namespace.SavedObjectDoc.md#coremigrationversion) +- [id](client._internal_namespace.SavedObjectDoc.md#id) +- [migrationVersion](client._internal_namespace.SavedObjectDoc.md#migrationversion) +- [namespace](client._internal_namespace.SavedObjectDoc.md#namespace) +- [namespaces](client._internal_namespace.SavedObjectDoc.md#namespaces) +- [originId](client._internal_namespace.SavedObjectDoc.md#originid) +- [type](client._internal_namespace.SavedObjectDoc.md#type) +- [updated\_at](client._internal_namespace.SavedObjectDoc.md#updated_at) +- [version](client._internal_namespace.SavedObjectDoc.md#version) + +## Properties + +### attributes + +ā€¢ **attributes**: `T` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:28 + +___ + +### coreMigrationVersion + +ā€¢ `Optional` **coreMigrationVersion**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:34 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:29 + +___ + +### migrationVersion + +ā€¢ `Optional` **migrationVersion**: [`SavedObjectsMigrationVersion`](client._internal_namespace.SavedObjectsMigrationVersion.md) + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:33 + +___ + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:31 + +___ + +### namespaces + +ā€¢ `Optional` **namespaces**: `string`[] + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:32 + +___ + +### originId + +ā€¢ `Optional` **originId**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:37 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:30 + +___ + +### updated\_at + +ā€¢ `Optional` **updated\_at**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:36 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:35 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectError.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectError.md new file mode 100644 index 0000000000000..8b93bb038d5fa --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectError.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectError + +# Interface: SavedObjectError + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectError + +## Table of contents + +### Properties + +- [error](client._internal_namespace.SavedObjectError.md#error) +- [message](client._internal_namespace.SavedObjectError.md#message) +- [metadata](client._internal_namespace.SavedObjectError.md#metadata) +- [statusCode](client._internal_namespace.SavedObjectError.md#statuscode) + +## Properties + +### error + +ā€¢ **error**: `string` + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:82 + +___ + +### message + +ā€¢ **message**: `string` + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:83 + +___ + +### metadata + +ā€¢ `Optional` **metadata**: `Record`<`string`, `unknown`\> + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:85 + +___ + +### statusCode + +ā€¢ **statusCode**: `number` + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:84 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectMigrationContext.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectMigrationContext.md new file mode 100644 index 0000000000000..b16816fc5ec40 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectMigrationContext.md @@ -0,0 +1,64 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectMigrationContext + +# Interface: SavedObjectMigrationContext + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectMigrationContext + +Migration context provided when invoking a [migration handler](../modules/client._internal_namespace.md#savedobjectmigrationfn) + +## Table of contents + +### Properties + +- [convertToMultiNamespaceTypeVersion](client._internal_namespace.SavedObjectMigrationContext.md#converttomultinamespacetypeversion) +- [isSingleNamespaceType](client._internal_namespace.SavedObjectMigrationContext.md#issinglenamespacetype) +- [log](client._internal_namespace.SavedObjectMigrationContext.md#log) +- [migrationVersion](client._internal_namespace.SavedObjectMigrationContext.md#migrationversion) + +## Properties + +### convertToMultiNamespaceTypeVersion + +ā€¢ `Optional` `Readonly` **convertToMultiNamespaceTypeVersion**: `string` + +The version in which this object type is being converted to a multi-namespace type + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/types.d.ts:57 + +___ + +### isSingleNamespaceType + +ā€¢ `Readonly` **isSingleNamespaceType**: `boolean` + +Whether this is a single-namespace type or not + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/types.d.ts:61 + +___ + +### log + +ā€¢ `Readonly` **log**: [`SavedObjectsMigrationLogger`](client._internal_namespace.SavedObjectsMigrationLogger.md) + +logger instance to be used by the migration handler + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/types.d.ts:49 + +___ + +### migrationVersion + +ā€¢ `Readonly` **migrationVersion**: `string` + +The migration version that this migration function is defined for + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/types.d.ts:53 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectMigrationMap.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectMigrationMap.md new file mode 100644 index 0000000000000..2632e6259ff5b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectMigrationMap.md @@ -0,0 +1,23 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectMigrationMap + +# Interface: SavedObjectMigrationMap + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectMigrationMap + +A map of [migration functions](../modules/client._internal_namespace.md#savedobjectmigrationfn) to be used for a given type. +The map's keys must be valid semver versions, and they cannot exceed the current Kibana version. + +For a given document, only migrations with a higher version number than that of the document will be applied. +Migrations are executed in order, starting from the lowest version and ending with the highest one. + +**`example`** +```typescript +const migrationsMap: SavedObjectMigrationMap = { + '1.0.0': migrateToV1, + '2.1.0': migrateToV21 +} +``` + +## Indexable + +ā–Ŗ [version: `string`]: [`SavedObjectMigrationFn`](../modules/client._internal_namespace.md#savedobjectmigrationfn)<`any`, `any`\> diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectReference.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectReference.md new file mode 100644 index 0000000000000..2c3f8ac1c7cc0 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectReference.md @@ -0,0 +1,45 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectReference + +# Interface: SavedObjectReference + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectReference + +A reference to another saved object. + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectReference.md#id) +- [name](client._internal_namespace.SavedObjectReference.md#name) +- [type](client._internal_namespace.SavedObjectReference.md#type) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:30 + +___ + +### name + +ā€¢ **name**: `string` + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:28 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:29 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectReferenceWithContext.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectReferenceWithContext.md new file mode 100644 index 0000000000000..511e6aec3d9b6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectReferenceWithContext.md @@ -0,0 +1,91 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectReferenceWithContext + +# Interface: SavedObjectReferenceWithContext + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectReferenceWithContext + +A returned input object or one of its references, with additional context. + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectReferenceWithContext.md#id) +- [inboundReferences](client._internal_namespace.SavedObjectReferenceWithContext.md#inboundreferences) +- [isMissing](client._internal_namespace.SavedObjectReferenceWithContext.md#ismissing) +- [spaces](client._internal_namespace.SavedObjectReferenceWithContext.md#spaces) +- [spacesWithMatchingAliases](client._internal_namespace.SavedObjectReferenceWithContext.md#spaceswithmatchingaliases) +- [type](client._internal_namespace.SavedObjectReferenceWithContext.md#type) + +## Properties + +### id + +ā€¢ **id**: `string` + +The ID of the referenced object + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:45 + +___ + +### inboundReferences + +ā€¢ **inboundReferences**: { `id`: `string` ; `name`: `string` ; `type`: `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 + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:52 + +___ + +### isMissing + +ā€¢ `Optional` **isMissing**: `boolean` + +Whether or not this object or reference is missing + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:61 + +___ + +### spaces + +ā€¢ **spaces**: `string`[] + +The space(s) that the referenced object exists in + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:47 + +___ + +### spacesWithMatchingAliases + +ā€¢ `Optional` **spacesWithMatchingAliases**: `string`[] + +The space(s) that legacy URL aliases matching this type/id exist in + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:63 + +___ + +### type + +ā€¢ **type**: `string` + +The type of the referenced object + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:43 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBaseOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBaseOptions.md new file mode 100644 index 0000000000000..afce23c52c88d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBaseOptions.md @@ -0,0 +1,47 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBaseOptions + +# Interface: SavedObjectsBaseOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBaseOptions + +## Hierarchy + +- **`SavedObjectsBaseOptions`** + + ā†³ [`SavedObjectsRemoveReferencesToResponse`](client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md) + + ā†³ [`SavedObjectsCreateOptions`](client._internal_namespace.SavedObjectsCreateOptions.md) + + ā†³ [`SavedObjectsDeleteOptions`](client._internal_namespace.SavedObjectsDeleteOptions.md) + + ā†³ [`SavedObjectsUpdateOptions`](client._internal_namespace.SavedObjectsUpdateOptions.md) + + ā†³ [`SavedObjectsBulkUpdateOptions`](client._internal_namespace.SavedObjectsBulkUpdateOptions.md) + + ā†³ [`SavedObjectsRemoveReferencesToOptions`](client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md) + + ā†³ [`SavedObjectsCollectMultiNamespaceReferencesOptions`](client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md) + + ā†³ [`SavedObjectsUpdateObjectsSpacesOptions`](client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md) + + ā†³ [`SavedObjectsDeleteByNamespaceOptions`](client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md) + + ā†³ [`SavedObjectsIncrementCounterOptions`](client._internal_namespace.SavedObjectsIncrementCounterOptions.md) + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkCreateObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkCreateObject.md new file mode 100644 index 0000000000000..1a5bbd79801ba --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkCreateObject.md @@ -0,0 +1,136 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkCreateObject + +# Interface: SavedObjectsBulkCreateObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkCreateObject + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.SavedObjectsBulkCreateObject.md#attributes) +- [coreMigrationVersion](client._internal_namespace.SavedObjectsBulkCreateObject.md#coremigrationversion) +- [id](client._internal_namespace.SavedObjectsBulkCreateObject.md#id) +- [initialNamespaces](client._internal_namespace.SavedObjectsBulkCreateObject.md#initialnamespaces) +- [migrationVersion](client._internal_namespace.SavedObjectsBulkCreateObject.md#migrationversion) +- [originId](client._internal_namespace.SavedObjectsBulkCreateObject.md#originid) +- [references](client._internal_namespace.SavedObjectsBulkCreateObject.md#references) +- [type](client._internal_namespace.SavedObjectsBulkCreateObject.md#type) +- [version](client._internal_namespace.SavedObjectsBulkCreateObject.md#version) + +## Properties + +### attributes + +ā€¢ **attributes**: `T` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:54 + +___ + +### coreMigrationVersion + +ā€¢ `Optional` **coreMigrationVersion**: `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. + +**`remarks`** +Do not attempt to set this manually. It should only be used if you retrieved an existing object that had the `coreMigrationVersion` +field set and you want to create it again. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:68 + +___ + +### id + +ā€¢ `Optional` **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:52 + +___ + +### initialNamespaces + +ā€¢ `Optional` **initialNamespaces**: `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](client._internal_namespace.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. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:81 + +___ + +### migrationVersion + +ā€¢ `Optional` **migrationVersion**: [`SavedObjectsMigrationVersion`](client._internal_namespace.SavedObjectsMigrationVersion.md) + +{@inheritDoc SavedObjectsMigrationVersion} + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:58 + +___ + +### originId + +ā€¢ `Optional` **originId**: `string` + +Optional ID of the original saved object, if this object's `id` was regenerated + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:70 + +___ + +### references + +ā€¢ `Optional` **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:56 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:53 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:55 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkGetObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkGetObject.md new file mode 100644 index 0000000000000..3b3dd0ecbc28b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkGetObject.md @@ -0,0 +1,65 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkGetObject + +# Interface: SavedObjectsBulkGetObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkGetObject + +## Table of contents + +### Properties + +- [fields](client._internal_namespace.SavedObjectsBulkGetObject.md#fields) +- [id](client._internal_namespace.SavedObjectsBulkGetObject.md#id) +- [namespaces](client._internal_namespace.SavedObjectsBulkGetObject.md#namespaces) +- [type](client._internal_namespace.SavedObjectsBulkGetObject.md#type) + +## Properties + +### fields + +ā€¢ `Optional` **fields**: `string`[] + +SavedObject fields to include in the response + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:239 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:236 + +___ + +### namespaces + +ā€¢ `Optional` **namespaces**: `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. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:250 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:237 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResolveObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResolveObject.md new file mode 100644 index 0000000000000..56105f08768ae --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResolveObject.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkResolveObject + +# Interface: SavedObjectsBulkResolveObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkResolveObject + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectsBulkResolveObject.md#id) +- [type](client._internal_namespace.SavedObjectsBulkResolveObject.md#type) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:279 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:280 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md new file mode 100644 index 0000000000000..4f7fc1463bb4b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md @@ -0,0 +1,27 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkResolveResponse + +# Interface: SavedObjectsBulkResolveResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkResolveResponse + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Table of contents + +### Properties + +- [resolved\_objects](client._internal_namespace.SavedObjectsBulkResolveResponse.md#resolved_objects) + +## Properties + +### resolved\_objects + +ā€¢ **resolved\_objects**: [`SavedObjectsResolveResponse`](client._internal_namespace.SavedObjectsResolveResponse.md)<`T`\>[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:287 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResponse.md new file mode 100644 index 0000000000000..76af857d6f612 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkResponse.md @@ -0,0 +1,27 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkResponse + +# Interface: SavedObjectsBulkResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkResponse + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Table of contents + +### Properties + +- [saved\_objects](client._internal_namespace.SavedObjectsBulkResponse.md#saved_objects) + +## Properties + +### saved\_objects + +ā€¢ **saved\_objects**: [`SavedObject`](client._internal_namespace.SavedObject.md)<`T`\>[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:107 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateObject.md new file mode 100644 index 0000000000000..f0ae9c5aa503f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateObject.md @@ -0,0 +1,111 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkUpdateObject + +# Interface: SavedObjectsBulkUpdateObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkUpdateObject + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Hierarchy + +- `Pick`<[`SavedObjectsUpdateOptions`](client._internal_namespace.SavedObjectsUpdateOptions.md)<`T`\>, ``"version"`` \| ``"references"``\> + + ā†³ **`SavedObjectsBulkUpdateObject`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.SavedObjectsBulkUpdateObject.md#attributes) +- [id](client._internal_namespace.SavedObjectsBulkUpdateObject.md#id) +- [namespace](client._internal_namespace.SavedObjectsBulkUpdateObject.md#namespace) +- [references](client._internal_namespace.SavedObjectsBulkUpdateObject.md#references) +- [type](client._internal_namespace.SavedObjectsBulkUpdateObject.md#type) +- [version](client._internal_namespace.SavedObjectsBulkUpdateObject.md#version) + +## Properties + +### attributes + +ā€¢ **attributes**: `Partial`<`T`\> + +{@inheritdoc SavedObjectAttributes} + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:93 + +___ + +### id + +ā€¢ **id**: `string` + +The ID of this Saved Object, guaranteed to be unique for all objects of the same `type` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:89 + +___ + +### namespace + +ā€¢ `Optional` **namespace**: `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](client._internal_namespace.SavedObjectsBulkUpdateOptions.md). + +Note: the default namespace's string representation is `'default'`, and its ID representation is `undefined`. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:100 + +___ + +### references + +ā€¢ `Optional` **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +{@inheritdoc SavedObjectReference} + +#### Inherited from + +Pick.references + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:191 + +___ + +### type + +ā€¢ **type**: `string` + +The type of this Saved Object. Each plugin can define it's own custom Saved Object types. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:91 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. + +#### Inherited from + +Pick.version + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:189 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateOptions.md new file mode 100644 index 0000000000000..4de3a8eefdb02 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateOptions.md @@ -0,0 +1,46 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkUpdateOptions + +# Interface: SavedObjectsBulkUpdateOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkUpdateOptions + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsBulkUpdateOptions`** + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsBulkUpdateOptions.md#namespace) +- [refresh](client._internal_namespace.SavedObjectsBulkUpdateOptions.md#refresh) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: [`MutatingOperationRefreshSetting`](../modules/client._internal_namespace.md#mutatingoperationrefreshsetting) + +The Elasticsearch Refresh setting for this operation + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:219 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md new file mode 100644 index 0000000000000..93fb3c3f3a3b2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md @@ -0,0 +1,27 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsBulkUpdateResponse + +# Interface: SavedObjectsBulkUpdateResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsBulkUpdateResponse + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Table of contents + +### Properties + +- [saved\_objects](client._internal_namespace.SavedObjectsBulkUpdateResponse.md#saved_objects) + +## Properties + +### saved\_objects + +ā€¢ **saved\_objects**: [`SavedObjectsUpdateResponse`](client._internal_namespace.SavedObjectsUpdateResponse.md)<`T`\>[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:264 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCheckConflictsObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCheckConflictsObject.md new file mode 100644 index 0000000000000..7b8a8b1b6982f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCheckConflictsObject.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsCheckConflictsObject + +# Interface: SavedObjectsCheckConflictsObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsCheckConflictsObject + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectsCheckConflictsObject.md#id) +- [type](client._internal_namespace.SavedObjectsCheckConflictsObject.md#type) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:169 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:170 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md new file mode 100644 index 0000000000000..d43f929a18fed --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsCheckConflictsResponse + +# Interface: SavedObjectsCheckConflictsResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsCheckConflictsResponse + +## Table of contents + +### Properties + +- [errors](client._internal_namespace.SavedObjectsCheckConflictsResponse.md#errors) + +## Properties + +### errors + +ā€¢ **errors**: { `error`: [`SavedObjectError`](client._internal_namespace.SavedObjectError.md) ; `id`: `string` ; `type`: `string` }[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:177 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md new file mode 100644 index 0000000000000..acf9af85bdc20 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md @@ -0,0 +1,37 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsClosePointInTimeResponse + +# Interface: SavedObjectsClosePointInTimeResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsClosePointInTimeResponse + +## Table of contents + +### Properties + +- [num\_freed](client._internal_namespace.SavedObjectsClosePointInTimeResponse.md#num_freed) +- [succeeded](client._internal_namespace.SavedObjectsClosePointInTimeResponse.md#succeeded) + +## Properties + +### num\_freed + +ā€¢ **num\_freed**: `number` + +The number of search contexts that have been successfully closed. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:360 + +___ + +### succeeded + +ā€¢ **succeeded**: `boolean` + +If true, all search contexts associated with the PIT id are +successfully closed. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:356 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md new file mode 100644 index 0000000000000..7db1c04858eb3 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsCollectMultiNamespaceReferencesObject + +# Interface: SavedObjectsCollectMultiNamespaceReferencesObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsCollectMultiNamespaceReferencesObject + +An object to collect references for. It must be a multi-namespace type (in other words, the object type must be registered with the +`namespaceType: 'multiple'` or `namespaceType: 'multiple-isolated'` option). + +Note: if options.purpose is 'updateObjectsSpaces', it must be a shareable type (in other words, the object type must be registered with +the `namespaceType: 'multiple'`). + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md#id) +- [type](client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md#type) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:24 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:25 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md new file mode 100644 index 0000000000000..32ffe4158cc00 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md @@ -0,0 +1,48 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsCollectMultiNamespaceReferencesOptions + +# Interface: SavedObjectsCollectMultiNamespaceReferencesOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsCollectMultiNamespaceReferencesOptions + +Options for collecting references. + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsCollectMultiNamespaceReferencesOptions`** + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md#namespace) +- [purpose](client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md#purpose) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### purpose + +ā€¢ `Optional` **purpose**: ``"collectMultiNamespaceReferences"`` \| ``"updateObjectsSpaces"`` + +Optional purpose used to determine filtering and authorization checks; default is 'collectMultiNamespaceReferences' + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:34 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md new file mode 100644 index 0000000000000..768ce8c1c6094 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md @@ -0,0 +1,23 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsCollectMultiNamespaceReferencesResponse + +# Interface: SavedObjectsCollectMultiNamespaceReferencesResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsCollectMultiNamespaceReferencesResponse + +The response when object references are collected. + +## Table of contents + +### Properties + +- [objects](client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md#objects) + +## Properties + +### objects + +ā€¢ **objects**: [`SavedObjectReferenceWithContext`](client._internal_namespace.SavedObjectReferenceWithContext.md)[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/collect_multi_namespace_references.d.ts:71 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCreateOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCreateOptions.md new file mode 100644 index 0000000000000..d2b13605808ac --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCreateOptions.md @@ -0,0 +1,162 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsCreateOptions + +# Interface: SavedObjectsCreateOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsCreateOptions + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsCreateOptions`** + +## Table of contents + +### Properties + +- [coreMigrationVersion](client._internal_namespace.SavedObjectsCreateOptions.md#coremigrationversion) +- [id](client._internal_namespace.SavedObjectsCreateOptions.md#id) +- [initialNamespaces](client._internal_namespace.SavedObjectsCreateOptions.md#initialnamespaces) +- [migrationVersion](client._internal_namespace.SavedObjectsCreateOptions.md#migrationversion) +- [namespace](client._internal_namespace.SavedObjectsCreateOptions.md#namespace) +- [originId](client._internal_namespace.SavedObjectsCreateOptions.md#originid) +- [overwrite](client._internal_namespace.SavedObjectsCreateOptions.md#overwrite) +- [references](client._internal_namespace.SavedObjectsCreateOptions.md#references) +- [refresh](client._internal_namespace.SavedObjectsCreateOptions.md#refresh) +- [version](client._internal_namespace.SavedObjectsCreateOptions.md#version) + +## Properties + +### coreMigrationVersion + +ā€¢ `Optional` **coreMigrationVersion**: `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. + +**`remarks`** +Do not attempt to set this manually. It should only be used if you retrieved an existing object that had the `coreMigrationVersion` +field set and you want to create it again. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:29 + +___ + +### id + +ā€¢ `Optional` **id**: `string` + +(not recommended) Specify an id for the document + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:10 + +___ + +### initialNamespaces + +ā€¢ `Optional` **initialNamespaces**: `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](client._internal_namespace.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. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:45 + +___ + +### migrationVersion + +ā€¢ `Optional` **migrationVersion**: [`SavedObjectsMigrationVersion`](client._internal_namespace.SavedObjectsMigrationVersion.md) + +{@inheritDoc SavedObjectsMigrationVersion} + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:19 + +___ + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### originId + +ā€¢ `Optional` **originId**: `string` + +Optional ID of the original saved object, if this object's `id` was regenerated + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:34 + +___ + +### overwrite + +ā€¢ `Optional` **overwrite**: `boolean` + +Overwrite existing documents (defaults to false) + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:12 + +___ + +### references + +ā€¢ `Optional` **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:30 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: [`MutatingOperationRefreshSetting`](../modules/client._internal_namespace.md#mutatingoperationrefreshsetting) + +The Elasticsearch Refresh setting for this operation + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:32 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +An opaque version number which changes on each successful write operation. +Can be used in conjunction with `overwrite` for implementing optimistic concurrency control. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:17 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCreatePointInTimeFinderDependencies.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCreatePointInTimeFinderDependencies.md new file mode 100644 index 0000000000000..3289e3cb4144f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsCreatePointInTimeFinderDependencies.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsCreatePointInTimeFinderDependencies + +# Interface: SavedObjectsCreatePointInTimeFinderDependencies + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsCreatePointInTimeFinderDependencies + +## Table of contents + +### Properties + +- [client](client._internal_namespace.SavedObjectsCreatePointInTimeFinderDependencies.md#client) + +## Properties + +### client + +ā€¢ **client**: `Pick`<[`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract), ``"find"`` \| ``"openPointInTimeForType"`` \| ``"closePointInTime"``\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/point_in_time_finder.d.ts:12 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md new file mode 100644 index 0000000000000..17fa13e76ec5f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md @@ -0,0 +1,46 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsDeleteByNamespaceOptions + +# Interface: SavedObjectsDeleteByNamespaceOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsDeleteByNamespaceOptions + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsDeleteByNamespaceOptions`** + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md#namespace) +- [refresh](client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md#refresh) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: `boolean` + +The Elasticsearch supports only boolean flag for this operation + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:49 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsDeleteOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsDeleteOptions.md new file mode 100644 index 0000000000000..21bd9feec57cf --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsDeleteOptions.md @@ -0,0 +1,59 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsDeleteOptions + +# Interface: SavedObjectsDeleteOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsDeleteOptions + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsDeleteOptions`** + +## Table of contents + +### Properties + +- [force](client._internal_namespace.SavedObjectsDeleteOptions.md#force) +- [namespace](client._internal_namespace.SavedObjectsDeleteOptions.md#namespace) +- [refresh](client._internal_namespace.SavedObjectsDeleteOptions.md#refresh) + +## Properties + +### force + +ā€¢ `Optional` **force**: `boolean` + +Force deletion of an object that exists in multiple namespaces + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:229 + +___ + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: [`MutatingOperationRefreshSetting`](../modules/client._internal_namespace.md#mutatingoperationrefreshsetting) + +The Elasticsearch Refresh setting for this operation + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:227 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsExportTransformContext.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsExportTransformContext.md new file mode 100644 index 0000000000000..2b82cecc98091 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsExportTransformContext.md @@ -0,0 +1,26 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsExportTransformContext + +# Interface: SavedObjectsExportTransformContext + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsExportTransformContext + +Context passed down to a [export transform function](../modules/client._internal_namespace.md#savedobjectsexporttransform) + +## Table of contents + +### Properties + +- [request](client._internal_namespace.SavedObjectsExportTransformContext.md#request) + +## Properties + +### request + +ā€¢ **request**: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> + +The request that initiated the export request. Can be used to create scoped +services or client inside the [transformation](../modules/client._internal_namespace.md#savedobjectsexporttransform) + +#### Defined in + +src/core/target/types/server/saved_objects/export/types.d.ts:87 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindOptions.md new file mode 100644 index 0000000000000..1cc767734ce55 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindOptions.md @@ -0,0 +1,270 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsFindOptions + +# Interface: SavedObjectsFindOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsFindOptions + +## Table of contents + +### Properties + +- [aggs](client._internal_namespace.SavedObjectsFindOptions.md#aggs) +- [defaultSearchOperator](client._internal_namespace.SavedObjectsFindOptions.md#defaultsearchoperator) +- [fields](client._internal_namespace.SavedObjectsFindOptions.md#fields) +- [filter](client._internal_namespace.SavedObjectsFindOptions.md#filter) +- [hasReference](client._internal_namespace.SavedObjectsFindOptions.md#hasreference) +- [hasReferenceOperator](client._internal_namespace.SavedObjectsFindOptions.md#hasreferenceoperator) +- [namespaces](client._internal_namespace.SavedObjectsFindOptions.md#namespaces) +- [page](client._internal_namespace.SavedObjectsFindOptions.md#page) +- [perPage](client._internal_namespace.SavedObjectsFindOptions.md#perpage) +- [pit](client._internal_namespace.SavedObjectsFindOptions.md#pit) +- [preference](client._internal_namespace.SavedObjectsFindOptions.md#preference) +- [rootSearchFields](client._internal_namespace.SavedObjectsFindOptions.md#rootsearchfields) +- [search](client._internal_namespace.SavedObjectsFindOptions.md#search) +- [searchAfter](client._internal_namespace.SavedObjectsFindOptions.md#searchafter) +- [searchFields](client._internal_namespace.SavedObjectsFindOptions.md#searchfields) +- [sortField](client._internal_namespace.SavedObjectsFindOptions.md#sortfield) +- [sortOrder](client._internal_namespace.SavedObjectsFindOptions.md#sortorder) +- [type](client._internal_namespace.SavedObjectsFindOptions.md#type) +- [typeToNamespacesMap](client._internal_namespace.SavedObjectsFindOptions.md#typetonamespacesmap) + +## Properties + +### aggs + +ā€¢ `Optional` **aggs**: `Record`<`string`, `AggregationsAggregationContainer`\> + +A record of aggregations to perform. +The API currently only supports a limited set of metrics and bucket aggregation types. +Additional aggregation types can be contributed to Core. + +**`example`** +Aggregating on SO attribute field +```ts +const aggs = { latest_version: { max: { field: 'dashboard.attributes.version' } } }; +return client.find({ type: 'dashboard', aggs }) +``` + +**`example`** +Aggregating on SO root field +```ts +const aggs = { latest_update: { max: { field: 'dashboard.updated_at' } } }; +return client.find({ type: 'dashboard', aggs }) +``` + +**`alpha`** + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:103 + +___ + +### defaultSearchOperator + +ā€¢ `Optional` **defaultSearchOperator**: ``"AND"`` \| ``"OR"`` + +The search operator to use with the provided filter. Defaults to `OR` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:80 + +___ + +### fields + +ā€¢ `Optional` **fields**: `string`[] + +An array of fields to include in the results + +**`example`** +SavedObjects.find({type: 'dashboard', fields: ['attributes.name', 'attributes.location']}) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:54 + +___ + +### filter + +ā€¢ `Optional` **filter**: `any` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:81 + +___ + +### hasReference + +ā€¢ `Optional` **hasReference**: [`SavedObjectsFindOptionsReference`](client._internal_namespace.SavedObjectsFindOptionsReference.md) \| [`SavedObjectsFindOptionsReference`](client._internal_namespace.SavedObjectsFindOptionsReference.md)[] + +Search for documents having a reference to the specified objects. +Use `hasReferenceOperator` to specify the operator to use when searching for multiple references. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:72 + +___ + +### hasReferenceOperator + +ā€¢ `Optional` **hasReferenceOperator**: ``"AND"`` \| ``"OR"`` + +The operator to use when searching by multiple references using the `hasReference` option. Defaults to `OR` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:76 + +___ + +### namespaces + +ā€¢ `Optional` **namespaces**: `string`[] + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:104 + +___ + +### page + +ā€¢ `Optional` **page**: `number` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:45 + +___ + +### perPage + +ā€¢ `Optional` **perPage**: `number` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:46 + +___ + +### pit + +ā€¢ `Optional` **pit**: [`SavedObjectsPitParams`](client._internal_namespace.SavedObjectsPitParams.md) + +Search against a specific Point In Time (PIT) that you've opened with [SavedObjectsClient.openPointInTimeForType](../classes/client._internal_namespace.SavedObjectsClient.md#openpointintimefortype). + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:118 + +___ + +### preference + +ā€¢ `Optional` **preference**: `string` + +An optional ES preference value to be used for the query + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:114 + +___ + +### rootSearchFields + +ā€¢ `Optional` **rootSearchFields**: `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. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:67 + +___ + +### search + +ā€¢ `Optional` **search**: `string` + +Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String `query` argument for more information + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:56 + +___ + +### searchAfter + +ā€¢ `Optional` **searchAfter**: `string`[] + +Use the sort values from the previous page to retrieve the next page of results. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:62 + +___ + +### searchFields + +ā€¢ `Optional` **searchFields**: `string`[] + +The fields to perform the parsed query against. See Elasticsearch Simple Query String `fields` argument for more information + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:58 + +___ + +### sortField + +ā€¢ `Optional` **sortField**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:47 + +___ + +### sortOrder + +ā€¢ `Optional` **sortOrder**: `SortOrder` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:48 + +___ + +### type + +ā€¢ **type**: `string` \| `string`[] + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:44 + +___ + +### typeToNamespacesMap + +ā€¢ `Optional` **typeToNamespacesMap**: `Map`<`string`, `undefined` \| `string`[]\> + +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. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:112 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindOptionsReference.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindOptionsReference.md new file mode 100644 index 0000000000000..dd1f782c26b7d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindOptionsReference.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsFindOptionsReference + +# Interface: SavedObjectsFindOptionsReference + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsFindOptionsReference + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectsFindOptionsReference.md#id) +- [type](client._internal_namespace.SavedObjectsFindOptionsReference.md#type) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:30 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:29 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindResponse.md new file mode 100644 index 0000000000000..5fd16ec67e781 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindResponse.md @@ -0,0 +1,88 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsFindResponse + +# Interface: SavedObjectsFindResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsFindResponse + +Return type of the Saved Objects `find()` method. + +*Note*: this type is different between the Public and Server Saved Objects +clients. + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | +| `A` | `unknown` | + +## Table of contents + +### Properties + +- [aggregations](client._internal_namespace.SavedObjectsFindResponse.md#aggregations) +- [page](client._internal_namespace.SavedObjectsFindResponse.md#page) +- [per\_page](client._internal_namespace.SavedObjectsFindResponse.md#per_page) +- [pit\_id](client._internal_namespace.SavedObjectsFindResponse.md#pit_id) +- [saved\_objects](client._internal_namespace.SavedObjectsFindResponse.md#saved_objects) +- [total](client._internal_namespace.SavedObjectsFindResponse.md#total) + +## Properties + +### aggregations + +ā€¢ `Optional` **aggregations**: `A` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:157 + +___ + +### page + +ā€¢ **page**: `number` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:161 + +___ + +### per\_page + +ā€¢ **per\_page**: `number` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:160 + +___ + +### pit\_id + +ā€¢ `Optional` **pit\_id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:162 + +___ + +### saved\_objects + +ā€¢ **saved\_objects**: [`SavedObjectsFindResult`](client._internal_namespace.SavedObjectsFindResult.md)<`T`\>[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:158 + +___ + +### total + +ā€¢ **total**: `number` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:159 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindResult.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindResult.md new file mode 100644 index 0000000000000..aa7578f7daaa6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsFindResult.md @@ -0,0 +1,262 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsFindResult + +# Interface: SavedObjectsFindResult + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsFindResult + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Hierarchy + +- [`SavedObject`](client._internal_namespace.SavedObject.md)<`T`\> + + ā†³ **`SavedObjectsFindResult`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.SavedObjectsFindResult.md#attributes) +- [coreMigrationVersion](client._internal_namespace.SavedObjectsFindResult.md#coremigrationversion) +- [error](client._internal_namespace.SavedObjectsFindResult.md#error) +- [id](client._internal_namespace.SavedObjectsFindResult.md#id) +- [migrationVersion](client._internal_namespace.SavedObjectsFindResult.md#migrationversion) +- [namespaces](client._internal_namespace.SavedObjectsFindResult.md#namespaces) +- [originId](client._internal_namespace.SavedObjectsFindResult.md#originid) +- [references](client._internal_namespace.SavedObjectsFindResult.md#references) +- [score](client._internal_namespace.SavedObjectsFindResult.md#score) +- [sort](client._internal_namespace.SavedObjectsFindResult.md#sort) +- [type](client._internal_namespace.SavedObjectsFindResult.md#type) +- [updated\_at](client._internal_namespace.SavedObjectsFindResult.md#updated_at) +- [version](client._internal_namespace.SavedObjectsFindResult.md#version) + +## Properties + +### attributes + +ā€¢ **attributes**: `T` + +{@inheritdoc SavedObjectAttributes} + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[attributes](client._internal_namespace.SavedObject.md#attributes) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:61 + +___ + +### coreMigrationVersion + +ā€¢ `Optional` **coreMigrationVersion**: `string` + +A semver value that is used when upgrading objects between Kibana versions. + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[coreMigrationVersion](client._internal_namespace.SavedObject.md#coremigrationversion) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:67 + +___ + +### error + +ā€¢ `Optional` **error**: [`SavedObjectError`](client._internal_namespace.SavedObjectError.md) + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[error](client._internal_namespace.SavedObject.md#error) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:59 + +___ + +### id + +ā€¢ **id**: `string` + +The ID of this Saved Object, guaranteed to be unique for all objects of the same `type` + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[id](client._internal_namespace.SavedObject.md#id) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:52 + +___ + +### migrationVersion + +ā€¢ `Optional` **migrationVersion**: [`SavedObjectsMigrationVersion`](client._internal_namespace.SavedObjectsMigrationVersion.md) + +{@inheritdoc SavedObjectsMigrationVersion} + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[migrationVersion](client._internal_namespace.SavedObject.md#migrationversion) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:65 + +___ + +### namespaces + +ā€¢ `Optional` **namespaces**: `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'`. + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[namespaces](client._internal_namespace.SavedObject.md#namespaces) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:72 + +___ + +### originId + +ā€¢ `Optional` **originId**: `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. + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[originId](client._internal_namespace.SavedObject.md#originid) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:79 + +___ + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +{@inheritdoc SavedObjectReference} + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[references](client._internal_namespace.SavedObject.md#references) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:63 + +___ + +### score + +ā€¢ **score**: `number` + +The Elasticsearch `_score` of this result. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:117 + +___ + +### sort + +ā€¢ `Optional` **sort**: `string`[] + +The Elasticsearch `sort` value of this result. + +**`remarks`** +This can be passed directly to the `searchAfter` param in the [SavedObjectsFindOptions](client._internal_namespace.SavedObjectsFindOptions.md) +in order to page through large numbers of hits. It is recommended you use this alongside +a Point In Time (PIT) that was opened with [SavedObjectsClient.openPointInTimeForType](../classes/client._internal_namespace.SavedObjectsClient.md#openpointintimefortype). + +**`example`** +```ts +const { id } = await savedObjectsClient.openPointInTimeForType('visualization'); +const page1 = await savedObjectsClient.find({ + type: 'visualization', + sortField: 'updated_at', + sortOrder: 'asc', + pit: { id }, +}); +const lastHit = page1.saved_objects[page1.saved_objects.length - 1]; +const page2 = await savedObjectsClient.find({ + type: 'visualization', + sortField: 'updated_at', + sortOrder: 'asc', + pit: { id: page1.pit_id }, + searchAfter: lastHit.sort, +}); +await savedObjectsClient.closePointInTime(page2.pit_id); +``` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:146 + +___ + +### type + +ā€¢ **type**: `string` + +The type of Saved Object. Each plugin can define it's own custom Saved Object types. + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[type](client._internal_namespace.SavedObject.md#type) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:54 + +___ + +### updated\_at + +ā€¢ `Optional` **updated\_at**: `string` + +Timestamp of the last time this document had been updated. + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[updated_at](client._internal_namespace.SavedObject.md#updated_at) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:58 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. + +#### Inherited from + +[SavedObject](client._internal_namespace.SavedObject.md).[version](client._internal_namespace.SavedObject.md#version) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:56 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportActionRequiredWarning.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportActionRequiredWarning.md new file mode 100644 index 0000000000000..e2996e270116e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportActionRequiredWarning.md @@ -0,0 +1,65 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsImportActionRequiredWarning + +# Interface: SavedObjectsImportActionRequiredWarning + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsImportActionRequiredWarning + +A warning meant to notify that a specific user action is required to finalize the import +of some type of object. + +**`remark`** The `actionUrl` must be a path relative to the basePath, and not include it. + +## Table of contents + +### Properties + +- [actionPath](client._internal_namespace.SavedObjectsImportActionRequiredWarning.md#actionpath) +- [buttonLabel](client._internal_namespace.SavedObjectsImportActionRequiredWarning.md#buttonlabel) +- [message](client._internal_namespace.SavedObjectsImportActionRequiredWarning.md#message) +- [type](client._internal_namespace.SavedObjectsImportActionRequiredWarning.md#type) + +## Properties + +### actionPath + +ā€¢ **actionPath**: `string` + +The path (without the basePath) that the user should be redirect to address this warning. + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:191 + +___ + +### buttonLabel + +ā€¢ `Optional` **buttonLabel**: `string` + +An optional label to use for the link button. If unspecified, a default label will be used. + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:193 + +___ + +### message + +ā€¢ **message**: `string` + +The translated message to display to the user. + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:189 + +___ + +### type + +ā€¢ **type**: ``"action_required"`` + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:187 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportHookResult.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportHookResult.md new file mode 100644 index 0000000000000..37e2cbd5d788b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportHookResult.md @@ -0,0 +1,25 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsImportHookResult + +# Interface: SavedObjectsImportHookResult + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsImportHookResult + +Result from a [import hook](../modules/client._internal_namespace.md#savedobjectsimporthook) + +## Table of contents + +### Properties + +- [warnings](client._internal_namespace.SavedObjectsImportHookResult.md#warnings) + +## Properties + +### warnings + +ā€¢ `Optional` **warnings**: [`SavedObjectsImportWarning`](../modules/client._internal_namespace.md#savedobjectsimportwarning)[] + +An optional list of warnings to display in the UI when the import succeeds. + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:213 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportSimpleWarning.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportSimpleWarning.md new file mode 100644 index 0000000000000..55f2c60462af4 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsImportSimpleWarning.md @@ -0,0 +1,36 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsImportSimpleWarning + +# Interface: SavedObjectsImportSimpleWarning + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsImportSimpleWarning + +A simple informative warning that will be displayed to the user. + +## Table of contents + +### Properties + +- [message](client._internal_namespace.SavedObjectsImportSimpleWarning.md#message) +- [type](client._internal_namespace.SavedObjectsImportSimpleWarning.md#type) + +## Properties + +### message + +ā€¢ **message**: `string` + +The translated message to display to the user + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:176 + +___ + +### type + +ā€¢ **type**: ``"simple"`` + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:174 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsIncrementCounterField.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsIncrementCounterField.md new file mode 100644 index 0000000000000..b215848243659 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsIncrementCounterField.md @@ -0,0 +1,36 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsIncrementCounterField + +# Interface: SavedObjectsIncrementCounterField + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsIncrementCounterField + +## Table of contents + +### Properties + +- [fieldName](client._internal_namespace.SavedObjectsIncrementCounterField.md#fieldname) +- [incrementBy](client._internal_namespace.SavedObjectsIncrementCounterField.md#incrementby) + +## Properties + +### fieldName + +ā€¢ **fieldName**: `string` + +The field name to increment the counter by. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:63 + +___ + +### incrementBy + +ā€¢ `Optional` **incrementBy**: `number` + +The number to increment the field by (defaults to 1). + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:65 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsIncrementCounterOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsIncrementCounterOptions.md new file mode 100644 index 0000000000000..ce239bd55e5c2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsIncrementCounterOptions.md @@ -0,0 +1,93 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsIncrementCounterOptions + +# Interface: SavedObjectsIncrementCounterOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsIncrementCounterOptions + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Attributes` | `unknown` | + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsIncrementCounterOptions`** + +## Table of contents + +### Properties + +- [initialize](client._internal_namespace.SavedObjectsIncrementCounterOptions.md#initialize) +- [migrationVersion](client._internal_namespace.SavedObjectsIncrementCounterOptions.md#migrationversion) +- [namespace](client._internal_namespace.SavedObjectsIncrementCounterOptions.md#namespace) +- [refresh](client._internal_namespace.SavedObjectsIncrementCounterOptions.md#refresh) +- [upsertAttributes](client._internal_namespace.SavedObjectsIncrementCounterOptions.md#upsertattributes) + +## Properties + +### initialize + +ā€¢ `Optional` **initialize**: `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. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:30 + +___ + +### migrationVersion + +ā€¢ `Optional` **migrationVersion**: [`SavedObjectsMigrationVersion`](client._internal_namespace.SavedObjectsMigrationVersion.md) + +[SavedObjectsMigrationVersion](client._internal_namespace.SavedObjectsMigrationVersion.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:32 + +___ + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: [`MutatingOperationRefreshSetting`](../modules/client._internal_namespace.md#mutatingoperationrefreshsetting) + +(default='wait_for') The Elasticsearch refresh setting for this +operation. See [MutatingOperationRefreshSetting](../modules/client._internal_namespace.md#mutatingoperationrefreshsetting) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:37 + +___ + +### upsertAttributes + +ā€¢ `Optional` **upsertAttributes**: `Attributes` + +Attributes to use when upserting the document if it doesn't exist. + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:41 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMappingProperties.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMappingProperties.md new file mode 100644 index 0000000000000..5dca5a908c566 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMappingProperties.md @@ -0,0 +1,11 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsMappingProperties + +# Interface: SavedObjectsMappingProperties + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsMappingProperties + +Describe the fields of a [saved object type](client._internal_namespace.SavedObjectsTypeMappingDefinition.md). + +## Indexable + +ā–Ŗ [field: `string`]: [`SavedObjectsFieldMapping`](../modules/client._internal_namespace.md#savedobjectsfieldmapping) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMigrationLogger.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMigrationLogger.md new file mode 100644 index 0000000000000..399885d1ab4ae --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMigrationLogger.md @@ -0,0 +1,124 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsMigrationLogger + +# Interface: SavedObjectsMigrationLogger + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsMigrationLogger + +## Table of contents + +### Methods + +- [debug](client._internal_namespace.SavedObjectsMigrationLogger.md#debug) +- [error](client._internal_namespace.SavedObjectsMigrationLogger.md#error) +- [info](client._internal_namespace.SavedObjectsMigrationLogger.md#info) +- [warn](client._internal_namespace.SavedObjectsMigrationLogger.md#warn) +- [warning](client._internal_namespace.SavedObjectsMigrationLogger.md#warning) + +## Methods + +### debug + +ā–ø **debug**(`msg`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/core/migration_logger.d.ts:5 + +___ + +### error + +ā–ø **error**<`Meta`\>(`msg`, `meta`): `void` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Meta` | extends `LogMeta` = `LogMeta` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | +| `meta` | `Meta` | + +#### Returns + +`void` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/core/migration_logger.d.ts:12 + +___ + +### info + +ā–ø **info**(`msg`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/core/migration_logger.d.ts:6 + +___ + +### warn + +ā–ø **warn**(`msg`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/core/migration_logger.d.ts:11 + +___ + +### warning + +ā–ø **warning**(`msg`): `void` + +**`deprecated`** Use `warn` instead. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/core/migration_logger.d.ts:10 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMigrationVersion.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMigrationVersion.md new file mode 100644 index 0000000000000..deee7313ee96b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsMigrationVersion.md @@ -0,0 +1,21 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsMigrationVersion + +# Interface: SavedObjectsMigrationVersion + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.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. + +**`example`** +migrationVersion: { + dashboard: '7.1.1', + space: '6.6.6', +} + +## Indexable + +ā–Ŗ [pluginName: `string`]: `string` diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md new file mode 100644 index 0000000000000..1b5d7dd5c90ea --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsOpenPointInTimeOptions + +# Interface: SavedObjectsOpenPointInTimeOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsOpenPointInTimeOptions + +## Table of contents + +### Properties + +- [keepAlive](client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md#keepalive) +- [namespaces](client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md#namespaces) +- [preference](client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md#preference) + +## Properties + +### keepAlive + +ā€¢ `Optional` **keepAlive**: `string` + +Optionally specify how long ES should keep the PIT alive until the next request. Defaults to `5m`. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:320 + +___ + +### namespaces + +ā€¢ `Optional` **namespaces**: `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 + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:333 + +___ + +### preference + +ā€¢ `Optional` **preference**: `string` + +An optional ES preference value to be used for the query. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:324 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md new file mode 100644 index 0000000000000..22718b1c3177c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md @@ -0,0 +1,23 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsOpenPointInTimeResponse + +# Interface: SavedObjectsOpenPointInTimeResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsOpenPointInTimeResponse + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md#id) + +## Properties + +### id + +ā€¢ **id**: `string` + +PIT ID returned from ES. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:342 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsPitParams.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsPitParams.md new file mode 100644 index 0000000000000..0c2d6fdc1cc4e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsPitParams.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsPitParams + +# Interface: SavedObjectsPitParams + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsPitParams + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectsPitParams.md#id) +- [keepAlive](client._internal_namespace.SavedObjectsPitParams.md#keepalive) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:36 + +___ + +### keepAlive + +ā€¢ `Optional` **keepAlive**: `string` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:37 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md new file mode 100644 index 0000000000000..79de02623cf8a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md @@ -0,0 +1,46 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsRemoveReferencesToOptions + +# Interface: SavedObjectsRemoveReferencesToOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsRemoveReferencesToOptions + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsRemoveReferencesToOptions`** + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md#namespace) +- [refresh](client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md#refresh) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: `boolean` + +The Elasticsearch Refresh setting for this operation. Defaults to `true` + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:203 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md new file mode 100644 index 0000000000000..c6d285307c99d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md @@ -0,0 +1,46 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsRemoveReferencesToResponse + +# Interface: SavedObjectsRemoveReferencesToResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsRemoveReferencesToResponse + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsRemoveReferencesToResponse`** + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md#namespace) +- [updated](client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md#updated) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### updated + +ā€¢ **updated**: `number` + +The number of objects that have been updated by this operation + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:211 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsResolveResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsResolveResponse.md new file mode 100644 index 0000000000000..a4d66d064bf63 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsResolveResponse.md @@ -0,0 +1,61 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsResolveResponse + +# Interface: SavedObjectsResolveResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsResolveResponse + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Table of contents + +### Properties + +- [alias\_target\_id](client._internal_namespace.SavedObjectsResolveResponse.md#alias_target_id) +- [outcome](client._internal_namespace.SavedObjectsResolveResponse.md#outcome) +- [saved\_object](client._internal_namespace.SavedObjectsResolveResponse.md#saved_object) + +## Properties + +### alias\_target\_id + +ā€¢ `Optional` **alias\_target\_id**: `string` + +The ID of the object that the legacy URL alias points to. This is only defined when the outcome is `'aliasMatch'` or `'conflict'`. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:311 + +___ + +### outcome + +ā€¢ **outcome**: ``"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. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:307 + +___ + +### saved\_object + +ā€¢ **saved\_object**: [`SavedObject`](client._internal_namespace.SavedObject.md)<`T`\> + +The saved object that was found. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:297 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsType.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsType.md new file mode 100644 index 0000000000000..b211135fc93ac --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsType.md @@ -0,0 +1,212 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsType + +# Interface: SavedObjectsType + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsType + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Attributes` | `any` | + +## Table of contents + +### Properties + +- [convertToAliasScript](client._internal_namespace.SavedObjectsType.md#converttoaliasscript) +- [convertToMultiNamespaceTypeVersion](client._internal_namespace.SavedObjectsType.md#converttomultinamespacetypeversion) +- [excludeOnUpgrade](client._internal_namespace.SavedObjectsType.md#excludeonupgrade) +- [hidden](client._internal_namespace.SavedObjectsType.md#hidden) +- [indexPattern](client._internal_namespace.SavedObjectsType.md#indexpattern) +- [management](client._internal_namespace.SavedObjectsType.md#management) +- [mappings](client._internal_namespace.SavedObjectsType.md#mappings) +- [migrations](client._internal_namespace.SavedObjectsType.md#migrations) +- [name](client._internal_namespace.SavedObjectsType.md#name) +- [namespaceType](client._internal_namespace.SavedObjectsType.md#namespacetype) +- [schemas](client._internal_namespace.SavedObjectsType.md#schemas) + +## Properties + +### convertToAliasScript + +ā€¢ `Optional` **convertToAliasScript**: `string` + +If defined, will be used to convert the type to an alias. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:235 + +___ + +### convertToMultiNamespaceTypeVersion + +ā€¢ `Optional` **convertToMultiNamespaceTypeVersion**: `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'`](../modules/client._internal_namespace.md#savedobjectsnamespacetype) + 3. This type must also specify [`namespaceType: 'multiple'`](../modules/client._internal_namespace.md#savedobjectsnamespacetype) *or* + [`namespaceType: 'multiple-isolated'`](../modules/client._internal_namespace.md#savedobjectsnamespacetype) + +Example of a single-namespace type in 7.12: + +```ts +{ + name: 'foo', + hidden: false, + namespaceType: 'single', + mappings: {...} +} +``` + +Example after converting to a multi-namespace (isolated) type in 8.0: + +```ts +{ + name: 'foo', + hidden: false, + namespaceType: 'multiple-isolated', + mappings: {...}, + convertToMultiNamespaceTypeVersion: '8.0.0' +} +``` + +Example after converting to a multi-namespace (shareable) type in 8.1: + +```ts +{ + name: 'foo', + hidden: false, + namespaceType: 'multiple', + 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. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:305 + +___ + +### excludeOnUpgrade + +ā€¢ `Optional` **excludeOnUpgrade**: [`SavedObjectTypeExcludeFromUpgradeFilterHook`](../modules/client._internal_namespace.md#savedobjecttypeexcludefromupgradefilterhook) + +If defined, allows a type to exclude unneeded documents from the migration process and effectively be deleted. +See [SavedObjectTypeExcludeFromUpgradeFilterHook](../modules/client._internal_namespace.md#savedobjecttypeexcludefromupgradefilterhook) for more details. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:240 + +___ + +### hidden + +ā€¢ **hidden**: `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 {@link SavedObjectsServiceStart.createInternalRepository | createInternalRepository}. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:223 + +___ + +### indexPattern + +ā€¢ `Optional` **indexPattern**: `string` + +If defined, the type instances will be stored in the given index instead of the default one. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:231 + +___ + +### management + +ā€¢ `Optional` **management**: [`SavedObjectsTypeManagementDefinition`](client._internal_namespace.SavedObjectsTypeManagementDefinition.md)<`Attributes`\> + +An optional [saved objects management section](client._internal_namespace.SavedObjectsTypeManagementDefinition.md) definition for the type. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:309 + +___ + +### mappings + +ā€¢ **mappings**: [`SavedObjectsTypeMappingDefinition`](client._internal_namespace.SavedObjectsTypeMappingDefinition.md) + +The [mapping definition](client._internal_namespace.SavedObjectsTypeMappingDefinition.md) for the type. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:244 + +___ + +### migrations + +ā€¢ `Optional` **migrations**: [`SavedObjectMigrationMap`](client._internal_namespace.SavedObjectMigrationMap.md) \| () => [`SavedObjectMigrationMap`](client._internal_namespace.SavedObjectMigrationMap.md) + +An optional map of [migrations](../modules/client._internal_namespace.md#savedobjectmigrationfn) or a function returning a map of [migrations](../modules/client._internal_namespace.md#savedobjectmigrationfn) to be used to migrate the type. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:248 + +___ + +### name + +ā€¢ **name**: `string` + +The name of the type, which is also used as the internal id. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:216 + +___ + +### namespaceType + +ā€¢ **namespaceType**: [`SavedObjectsNamespaceType`](../modules/client._internal_namespace.md#savedobjectsnamespacetype) + +The [namespace type](../modules/client._internal_namespace.md#savedobjectsnamespacetype) for the type. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:227 + +___ + +### schemas + +ā€¢ `Optional` **schemas**: [`SavedObjectsValidationMap`](client._internal_namespace.SavedObjectsValidationMap.md) \| () => [`SavedObjectsValidationMap`](client._internal_namespace.SavedObjectsValidationMap.md) + +An optional schema that can be used to validate the attributes of the type. + +When provided, calls to [create](../classes/client._internal_namespace.SavedObjectsClient.md#create) will be validated against this schema. + +See [SavedObjectsValidationMap](client._internal_namespace.SavedObjectsValidationMap.md) for more details. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:256 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsTypeManagementDefinition.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsTypeManagementDefinition.md new file mode 100644 index 0000000000000..4c9f9b9342215 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsTypeManagementDefinition.md @@ -0,0 +1,299 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsTypeManagementDefinition + +# Interface: SavedObjectsTypeManagementDefinition + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsTypeManagementDefinition + +Configuration options for the [type](client._internal_namespace.SavedObjectsType.md)'s management section. + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Attributes` | `any` | + +## Table of contents + +### Properties + +- [defaultSearchField](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#defaultsearchfield) +- [displayName](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#displayname) +- [icon](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#icon) +- [importableAndExportable](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#importableandexportable) +- [isExportable](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#isexportable) +- [onExport](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#onexport) +- [onImport](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#onimport) +- [visibleInManagement](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#visibleinmanagement) + +### Methods + +- [getEditUrl](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#getediturl) +- [getInAppUrl](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#getinappurl) +- [getTitle](client._internal_namespace.SavedObjectsTypeManagementDefinition.md#gettitle) + +## Properties + +### defaultSearchField + +ā€¢ `Optional` **defaultSearchField**: `string` + +The default search field to use for this type. Defaults to `id`. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:337 + +___ + +### displayName + +ā€¢ `Optional` **displayName**: `string` + +When specified, will be used instead of the type's name in SO management section's labels. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:324 + +___ + +### icon + +ā€¢ `Optional` **icon**: `string` + +The eui icon name to display in the management table. +If not defined, the default icon will be used. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:342 + +___ + +### importableAndExportable + +ā€¢ `Optional` **importableAndExportable**: `boolean` + +Is the type importable or exportable. Defaults to `false`. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:320 + +___ + +### isExportable + +ā€¢ `Optional` **isExportable**: [`SavedObjectsExportablePredicate`](../modules/client._internal_namespace.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)` + +**`example`** +Registering a type with a per-object exportability predicate +```ts +// src/plugins/my_plugin/server/plugin.ts +import { myType } from './saved_objects'; + +export class Plugin() { + setup: (core: CoreSetup) => { + core.savedObjects.registerType({ + ...myType, + management: { + ...myType.management, + isExportable: (object) => { + if (object.attributes.myCustomAttr === 'foo') { + return false; + } + return true; + } + }, + }); + } +} +``` + +**`remarks`** `importableAndExportable` must be `true` to specify this property. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:462 + +___ + +### onExport + +ā€¢ `Optional` **onExport**: [`SavedObjectsExportTransform`](../modules/client._internal_namespace.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](../modules/client._internal_namespace.md#savedobjectsexporttransform) 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)` + +**`remarks`** `importableAndExportable` must be `true` to specify this property. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:380 + +___ + +### onImport + +ā€¢ `Optional` **onImport**: [`SavedObjectsImportHook`](../modules/client._internal_namespace.md#savedobjectsimporthook)<`Attributes`\> + +An optional [import hook](../modules/client._internal_namespace.md#savedobjectsimporthook) 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](../modules/client._internal_namespace.md#savedobjectsimporthook) +for more info. + +**`example`** +Registering a hook displaying a warning about a specific type of object +```ts +// src/plugins/my_plugin/server/plugin.ts +import { myType } from './saved_objects'; + +export class Plugin() { + setup: (core: CoreSetup) => { + core.savedObjects.registerType({ + ...myType, + management: { + ...myType.management, + onImport: (objects) => { + if(someActionIsNeeded(objects)) { + return { + warnings: [ + { + type: 'action_required', + message: 'Objects need to be manually enabled after import', + actionPath: '/app/my-app/require-activation', + }, + ] + } + } + return {}; + } + }, + }); + } +} +``` + +**`remarks`** messages returned in the warnings are user facing and must be translated. + +**`remarks`** `importableAndExportable` must be `true` to specify this property. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:423 + +___ + +### visibleInManagement + +ā€¢ `Optional` **visibleInManagement**: `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`. + +**`remarks`** `importableAndExportable` must be `true` to specify this property. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:333 + +## Methods + +### getEditUrl + +ā–ø `Optional` **getEditUrl**(`savedObject`): `string` + +Function returning the url to use to redirect to the editing page of this object. +If not defined, editing will not be allowed. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `savedObject` | [`SavedObject`](client._internal_namespace.SavedObject.md)<`Attributes`\> | + +#### Returns + +`string` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:352 + +___ + +### getInAppUrl + +ā–ø `Optional` **getInAppUrl**(`savedObject`): `Object` + +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. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `savedObject` | [`SavedObject`](client._internal_namespace.SavedObject.md)<`Attributes`\> | + +#### Returns + +`Object` + +an object containing a `path` and `uiCapabilitiesPath` properties. the `path` is the path to + the object page, relative to the base path. `uiCapabilitiesPath` is the path to check in the + [uiCapabilities](client._internal_namespace.Capabilities.md) to check if the user has permission to access the object. + +| Name | Type | +| :------ | :------ | +| `path` | `string` | +| `uiCapabilitiesPath` | `string` | + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:361 + +___ + +### getTitle + +ā–ø `Optional` **getTitle**(`savedObject`): `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. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `savedObject` | [`SavedObject`](client._internal_namespace.SavedObject.md)<`Attributes`\> | + +#### Returns + +`string` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:347 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsTypeMappingDefinition.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsTypeMappingDefinition.md new file mode 100644 index 0000000000000..4ebbf456a0556 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsTypeMappingDefinition.md @@ -0,0 +1,62 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsTypeMappingDefinition + +# Interface: SavedObjectsTypeMappingDefinition + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsTypeMappingDefinition + +Describe a saved object type mapping. + +**`example`** +```ts +const typeDefinition: SavedObjectsTypeMappingDefinition = { + properties: { + enabled: { + type: "boolean" + }, + sendUsageFrom: { + ignore_above: 256, + type: "keyword" + }, + lastReported: { + type: "date" + }, + lastVersionChecked: { + ignore_above: 256, + type: "keyword" + }, + } +} +``` + +## Table of contents + +### Properties + +- [dynamic](client._internal_namespace.SavedObjectsTypeMappingDefinition.md#dynamic) +- [properties](client._internal_namespace.SavedObjectsTypeMappingDefinition.md#properties) + +## Properties + +### dynamic + +ā€¢ `Optional` **dynamic**: ``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. + +#### Defined in + +src/core/target/types/server/saved_objects/mappings/types.d.ts:33 + +___ + +### properties + +ā€¢ **properties**: [`SavedObjectsMappingProperties`](client._internal_namespace.SavedObjectsMappingProperties.md) + +The underlying properties of the type mapping + +#### Defined in + +src/core/target/types/server/saved_objects/mappings/types.d.ts:35 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md new file mode 100644 index 0000000000000..5f5243a72ad69 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md @@ -0,0 +1,68 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsUpdateObjectsSpacesObject + +# Interface: SavedObjectsUpdateObjectsSpacesObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsUpdateObjectsSpacesObject + +An object that should have its spaces updated. + +## Table of contents + +### Properties + +- [id](client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md#id) +- [spaces](client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md#spaces) +- [type](client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md#type) +- [version](client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md#version) + +## Properties + +### id + +ā€¢ **id**: `string` + +The type of the object to update + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:14 + +___ + +### spaces + +ā€¢ `Optional` **spaces**: `string`[] + +The space(s) that the object to update currently exists in. This is only intended to be used by SOC wrappers. + +**`internal`** + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:22 + +___ + +### type + +ā€¢ **type**: `string` + +The ID of the object to update + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:16 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +The version of the object to update; this is used for optimistic concurrency control. This is only intended to be used by SOC wrappers. + +**`internal`** + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:28 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md new file mode 100644 index 0000000000000..403680115772c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md @@ -0,0 +1,48 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsUpdateObjectsSpacesOptions + +# Interface: SavedObjectsUpdateObjectsSpacesOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsUpdateObjectsSpacesOptions + +Options for the update operation. + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsUpdateObjectsSpacesOptions`** + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md#namespace) +- [refresh](client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md#refresh) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: [`MutatingOperationRefreshSetting`](../modules/client._internal_namespace.md#mutatingoperationrefreshsetting) + +The Elasticsearch Refresh setting for this operation + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:37 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md new file mode 100644 index 0000000000000..204b50f484657 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md @@ -0,0 +1,23 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsUpdateObjectsSpacesResponse + +# Interface: SavedObjectsUpdateObjectsSpacesResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsUpdateObjectsSpacesResponse + +The response when objects' spaces are updated. + +## Table of contents + +### Properties + +- [objects](client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md#objects) + +## Properties + +### objects + +ā€¢ **objects**: [`SavedObjectsUpdateObjectsSpacesResponseObject`](client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md)[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:45 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md new file mode 100644 index 0000000000000..f529bdcf9344b --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md @@ -0,0 +1,64 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsUpdateObjectsSpacesResponseObject + +# Interface: SavedObjectsUpdateObjectsSpacesResponseObject + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsUpdateObjectsSpacesResponseObject + +Details about a specific object's update result. + +## Table of contents + +### Properties + +- [error](client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md#error) +- [id](client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md#id) +- [spaces](client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md#spaces) +- [type](client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md#type) + +## Properties + +### error + +ā€¢ `Optional` **error**: [`SavedObjectError`](client._internal_namespace.SavedObjectError.md) + +Included if there was an error updating this object's spaces + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:60 + +___ + +### id + +ā€¢ **id**: `string` + +The ID of the referenced object + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:56 + +___ + +### spaces + +ā€¢ **spaces**: `string`[] + +The space(s) that the referenced object exists in + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:58 + +___ + +### type + +ā€¢ **type**: `string` + +The type of the referenced object + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/update_objects_spaces.d.ts:54 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateOptions.md new file mode 100644 index 0000000000000..0c7500b08b2fe --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateOptions.md @@ -0,0 +1,91 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsUpdateOptions + +# Interface: SavedObjectsUpdateOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsUpdateOptions + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Attributes` | `unknown` | + +## Hierarchy + +- [`SavedObjectsBaseOptions`](client._internal_namespace.SavedObjectsBaseOptions.md) + + ā†³ **`SavedObjectsUpdateOptions`** + +## Table of contents + +### Properties + +- [namespace](client._internal_namespace.SavedObjectsUpdateOptions.md#namespace) +- [references](client._internal_namespace.SavedObjectsUpdateOptions.md#references) +- [refresh](client._internal_namespace.SavedObjectsUpdateOptions.md#refresh) +- [upsert](client._internal_namespace.SavedObjectsUpdateOptions.md#upsert) +- [version](client._internal_namespace.SavedObjectsUpdateOptions.md#version) + +## Properties + +### namespace + +ā€¢ `Optional` **namespace**: `string` + +Specify the namespace for this operation + +#### Inherited from + +[SavedObjectsBaseOptions](client._internal_namespace.SavedObjectsBaseOptions.md).[namespace](client._internal_namespace.SavedObjectsBaseOptions.md#namespace) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:126 + +___ + +### references + +ā€¢ `Optional` **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +{@inheritdoc SavedObjectReference} + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:191 + +___ + +### refresh + +ā€¢ `Optional` **refresh**: [`MutatingOperationRefreshSetting`](../modules/client._internal_namespace.md#mutatingoperationrefreshsetting) + +The Elasticsearch Refresh setting for this operation + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:193 + +___ + +### upsert + +ā€¢ `Optional` **upsert**: `Attributes` + +If specified, will be used to perform an upsert if the document doesn't exist + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:195 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:189 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md new file mode 100644 index 0000000000000..2fa6a0e54a556 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md @@ -0,0 +1,199 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsUpdateResponse + +# Interface: SavedObjectsUpdateResponse + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsUpdateResponse + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Hierarchy + +- `Omit`<[`SavedObject`](client._internal_namespace.SavedObject.md)<`T`\>, ``"attributes"`` \| ``"references"``\> + + ā†³ **`SavedObjectsUpdateResponse`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.SavedObjectsUpdateResponse.md#attributes) +- [coreMigrationVersion](client._internal_namespace.SavedObjectsUpdateResponse.md#coremigrationversion) +- [error](client._internal_namespace.SavedObjectsUpdateResponse.md#error) +- [id](client._internal_namespace.SavedObjectsUpdateResponse.md#id) +- [migrationVersion](client._internal_namespace.SavedObjectsUpdateResponse.md#migrationversion) +- [namespaces](client._internal_namespace.SavedObjectsUpdateResponse.md#namespaces) +- [originId](client._internal_namespace.SavedObjectsUpdateResponse.md#originid) +- [references](client._internal_namespace.SavedObjectsUpdateResponse.md#references) +- [type](client._internal_namespace.SavedObjectsUpdateResponse.md#type) +- [updated\_at](client._internal_namespace.SavedObjectsUpdateResponse.md#updated_at) +- [version](client._internal_namespace.SavedObjectsUpdateResponse.md#version) + +## Properties + +### attributes + +ā€¢ **attributes**: `Partial`<`T`\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:271 + +___ + +### coreMigrationVersion + +ā€¢ `Optional` **coreMigrationVersion**: `string` + +A semver value that is used when upgrading objects between Kibana versions. + +#### Inherited from + +Omit.coreMigrationVersion + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:67 + +___ + +### error + +ā€¢ `Optional` **error**: [`SavedObjectError`](client._internal_namespace.SavedObjectError.md) + +#### Inherited from + +Omit.error + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:59 + +___ + +### id + +ā€¢ **id**: `string` + +The ID of this Saved Object, guaranteed to be unique for all objects of the same `type` + +#### Inherited from + +Omit.id + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:52 + +___ + +### migrationVersion + +ā€¢ `Optional` **migrationVersion**: [`SavedObjectsMigrationVersion`](client._internal_namespace.SavedObjectsMigrationVersion.md) + +{@inheritdoc SavedObjectsMigrationVersion} + +#### Inherited from + +Omit.migrationVersion + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:65 + +___ + +### namespaces + +ā€¢ `Optional` **namespaces**: `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'`. + +#### Inherited from + +Omit.namespaces + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:72 + +___ + +### originId + +ā€¢ `Optional` **originId**: `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. + +#### Inherited from + +Omit.originId + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:79 + +___ + +### references + +ā€¢ **references**: `undefined` \| [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +src/core/target/types/server/saved_objects/service/saved_objects_client.d.ts:272 + +___ + +### type + +ā€¢ **type**: `string` + +The type of Saved Object. Each plugin can define it's own custom Saved Object types. + +#### Inherited from + +Omit.type + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:54 + +___ + +### updated\_at + +ā€¢ `Optional` **updated\_at**: `string` + +Timestamp of the last time this document had been updated. + +#### Inherited from + +Omit.updated\_at + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:58 + +___ + +### version + +ā€¢ `Optional` **version**: `string` + +An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. + +#### Inherited from + +Omit.version + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:56 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsValidationMap.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsValidationMap.md new file mode 100644 index 0000000000000..366dc9fe0a476 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SavedObjectsValidationMap.md @@ -0,0 +1,34 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SavedObjectsValidationMap + +# Interface: SavedObjectsValidationMap + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SavedObjectsValidationMap + +A map of [validation specs](../modules/client._internal_namespace.md#savedobjectsvalidationspec) to be used for a given type. +The map's keys must be valid semver versions. + +Any time you change the schema of a [SavedObjectsType](client._internal_namespace.SavedObjectsType.md), you should add a new entry +to this map for the Kibana version the change was introduced in. + +**`example`** +```typescript +const validationMap: SavedObjectsValidationMap = { + '1.0.0': schema.object({ + foo: schema.string(), + }), + '2.0.0': schema.object({ + foo: schema.string({ + minLength: 2, + validate(value) { + if (!/^[a-z]+$/.test(value)) { + return 'must be lowercase letters only'; + } + } + }), + }), +} +``` + +## Indexable + +ā–Ŗ [version: `string`]: [`SavedObjectsValidationSpec`](../modules/client._internal_namespace.md#savedobjectsvalidationspec) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Services.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Services.md new file mode 100644 index 0000000000000..3a770aca3f595 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Services.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Services + +# Interface: Services + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Services + +## Table of contents + +### Properties + +- [connectorTokenClient](client._internal_namespace.Services.md#connectortokenclient) +- [savedObjectsClient](client._internal_namespace.Services.md#savedobjectsclient) +- [scopedClusterClient](client._internal_namespace.Services.md#scopedclusterclient) + +## Properties + +### connectorTokenClient + +ā€¢ **connectorTokenClient**: [`ConnectorTokenClient`](../classes/client._internal_namespace.ConnectorTokenClient.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:26 + +___ + +### savedObjectsClient + +ā€¢ **savedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:24 + +___ + +### scopedClusterClient + +ā€¢ **scopedClusterClient**: [`ElasticsearchClient`](../modules/client._internal_namespace.md#elasticsearchclient) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:25 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Space.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Space.md new file mode 100644 index 0000000000000..018efefd6f456 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Space.md @@ -0,0 +1,131 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Space + +# Interface: Space + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Space + +A Space. + +## Hierarchy + +- **`Space`** + + ā†³ [`GetSpaceResult`](client._internal_namespace.GetSpaceResult.md) + +## Table of contents + +### Properties + +- [\_reserved](client._internal_namespace.Space.md#_reserved) +- [color](client._internal_namespace.Space.md#color) +- [description](client._internal_namespace.Space.md#description) +- [disabledFeatures](client._internal_namespace.Space.md#disabledfeatures) +- [id](client._internal_namespace.Space.md#id) +- [imageUrl](client._internal_namespace.Space.md#imageurl) +- [initials](client._internal_namespace.Space.md#initials) +- [name](client._internal_namespace.Space.md#name) + +## Properties + +### \_reserved + +ā€¢ `Optional` `Private` **\_reserved**: `boolean` + +Indicates that this space is reserved (system controlled). +Reserved spaces cannot be created or deleted by end-users. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:46 + +___ + +### color + +ā€¢ `Optional` **color**: `string` + +Optional color (hex code) for this space. +If neither `color` nor `imageUrl` is specified, then a color will be automatically generated. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:24 + +___ + +### description + +ā€¢ `Optional` **description**: `string` + +Optional description for this space. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:19 + +___ + +### disabledFeatures + +ā€¢ **disabledFeatures**: `string`[] + +The set of feature ids that should be hidden within this space. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:40 + +___ + +### id + +ā€¢ **id**: `string` + +The unique identifier for this space. +The id becomes part of the "URL Identifier" of the space. + +Example: an id of `marketing` would result in the URL identifier of `/s/marketing`. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:11 + +___ + +### imageUrl + +ā€¢ `Optional` **imageUrl**: `string` + +Optional base-64 encoded data image url to show as this space's avatar. +This setting takes precedence over any configured `color` or `initials`. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:36 + +___ + +### initials + +ā€¢ `Optional` **initials**: `string` + +Optional display initials for this space's avatar. Supports a maximum of 2 characters. +If initials are not provided, then they will be derived from the space name automatically. + +Initials are not displayed if an `imageUrl` has been specified. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:31 + +___ + +### name + +ā€¢ **name**: `string` + +Display name for this space. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:15 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SpacesServiceStart.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SpacesServiceStart.md new file mode 100644 index 0000000000000..5dd67943c579f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SpacesServiceStart.md @@ -0,0 +1,150 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SpacesServiceStart + +# Interface: SpacesServiceStart + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SpacesServiceStart + +The Spaces service start contract. + +## Table of contents + +### Methods + +- [createSpacesClient](client._internal_namespace.SpacesServiceStart.md#createspacesclient) +- [getActiveSpace](client._internal_namespace.SpacesServiceStart.md#getactivespace) +- [getSpaceId](client._internal_namespace.SpacesServiceStart.md#getspaceid) +- [isInDefaultSpace](client._internal_namespace.SpacesServiceStart.md#isindefaultspace) +- [namespaceToSpaceId](client._internal_namespace.SpacesServiceStart.md#namespacetospaceid) +- [spaceIdToNamespace](client._internal_namespace.SpacesServiceStart.md#spaceidtonamespace) + +## Methods + +### createSpacesClient + +ā–ø **createSpacesClient**(`request`): [`ISpacesClient`](client._internal_namespace.ISpacesClient.md) + +Creates a scoped instance of the SpacesClient. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | the request. | + +#### Returns + +[`ISpacesClient`](client._internal_namespace.ISpacesClient.md) + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_service/spaces_service.d.ts:32 + +___ + +### getActiveSpace + +ā–ø **getActiveSpace**(`request`): `Promise`<[`Space`](client._internal_namespace.Space.md)\> + +Retrieves the Space associated with the provided request. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | the request. | + +#### Returns + +`Promise`<[`Space`](client._internal_namespace.Space.md)\> + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_service/spaces_service.d.ts:47 + +___ + +### getSpaceId + +ā–ø **getSpaceId**(`request`): `string` + +Retrieves the space id associated with the provided request. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | the request. | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_service/spaces_service.d.ts:37 + +___ + +### isInDefaultSpace + +ā–ø **isInDefaultSpace**(`request`): `boolean` + +Indicates if the provided request is executing within the context of the `default` space. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | the request. | + +#### Returns + +`boolean` + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_service/spaces_service.d.ts:42 + +___ + +### namespaceToSpaceId + +ā–ø **namespaceToSpaceId**(`namespace`): `string` + +Converts the provided namespace into the corresponding space id. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `namespace` | `undefined` \| `string` | the namespace to convert. | + +#### Returns + +`string` + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_service/spaces_service.d.ts:57 + +___ + +### spaceIdToNamespace + +ā–ø **spaceIdToNamespace**(`spaceId`): `undefined` \| `string` + +Converts the provided space id into the corresponding Saved Objects `namespace` id. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `spaceId` | `string` | the space id to convert. | + +#### Returns + +`undefined` \| `string` + +#### Defined in + +x-pack/plugins/spaces/target/types/server/spaces_service/spaces_service.d.ts:52 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeatureConfig.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeatureConfig.md new file mode 100644 index 0000000000000..adfb11e4efd7d --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeatureConfig.md @@ -0,0 +1,38 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SubFeatureConfig + +# Interface: SubFeatureConfig + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SubFeatureConfig + +Configuration for a sub-feature. + +## Table of contents + +### Properties + +- [name](client._internal_namespace.SubFeatureConfig.md#name) +- [privilegeGroups](client._internal_namespace.SubFeatureConfig.md#privilegegroups) + +## Properties + +### name + +ā€¢ **name**: `string` + +Display name for this sub-feature + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:9 + +___ + +### privilegeGroups + +ā€¢ **privilegeGroups**: readonly [`SubFeaturePrivilegeGroupConfig`](client._internal_namespace.SubFeaturePrivilegeGroupConfig.md)[] + +Collection of privilege groups + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:11 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeaturePrivilegeConfig.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeaturePrivilegeConfig.md new file mode 100644 index 0000000000000..4cbd7bc89efc7 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeaturePrivilegeConfig.md @@ -0,0 +1,334 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SubFeaturePrivilegeConfig + +# Interface: SubFeaturePrivilegeConfig + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SubFeaturePrivilegeConfig + +Configuration for a sub-feature privilege. + +## Hierarchy + +- `Omit`<[`FeatureKibanaPrivileges`](client._internal_namespace.FeatureKibanaPrivileges.md), ``"excludeFromBasePrivileges"``\> + + ā†³ **`SubFeaturePrivilegeConfig`** + +## Table of contents + +### Properties + +- [alerting](client._internal_namespace.SubFeaturePrivilegeConfig.md#alerting) +- [api](client._internal_namespace.SubFeaturePrivilegeConfig.md#api) +- [app](client._internal_namespace.SubFeaturePrivilegeConfig.md#app) +- [cases](client._internal_namespace.SubFeaturePrivilegeConfig.md#cases) +- [catalogue](client._internal_namespace.SubFeaturePrivilegeConfig.md#catalogue) +- [disabled](client._internal_namespace.SubFeaturePrivilegeConfig.md#disabled) +- [id](client._internal_namespace.SubFeaturePrivilegeConfig.md#id) +- [includeIn](client._internal_namespace.SubFeaturePrivilegeConfig.md#includein) +- [management](client._internal_namespace.SubFeaturePrivilegeConfig.md#management) +- [minimumLicense](client._internal_namespace.SubFeaturePrivilegeConfig.md#minimumlicense) +- [name](client._internal_namespace.SubFeaturePrivilegeConfig.md#name) +- [requireAllSpaces](client._internal_namespace.SubFeaturePrivilegeConfig.md#requireallspaces) +- [savedObject](client._internal_namespace.SubFeaturePrivilegeConfig.md#savedobject) +- [ui](client._internal_namespace.SubFeaturePrivilegeConfig.md#ui) + +## Properties + +### alerting + +ā€¢ `Optional` **alerting**: `Object` + +If your feature requires access to specific Alert Types, then specify your access needs here. +Include both Alert Types registered by the feature and external Alert Types such as built-in +Alert Types and Alert Types provided by other features to which you wish to grant access. + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `alert?` | `Object` | +| `alert.all?` | readonly `string`[] | +| `alert.read?` | readonly `string`[] | +| `rule?` | `Object` | +| `rule.all?` | readonly `string`[] | +| `rule.read?` | readonly `string`[] | + +#### Inherited from + +Omit.alerting + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:82 + +___ + +### api + +ā€¢ `Optional` **api**: readonly `string`[] + +If your feature includes server-side APIs, you can tag those routes to secure access based on user permissions. + +**`example`** +```ts + // Configure your routes with a tag starting with the 'access:' prefix + server.route({ + path: '/api/my-route', + method: 'GET', + handler: () => { ...}, + options: { + tags: ['access:my_feature-admin'] + } + }); + + Then, specify the tags here (without the 'access:' prefix) which should be secured: + + { + api: ['my_feature-admin'] + } +``` + +NOTE: It is important to name your tags in a way that will not collide with other plugins/features. +A generic tag name like "access:read" could be used elsewhere, and access to that API endpoint would also +extend to any routes you have also tagged with that name. + +#### Inherited from + +Omit.api + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:64 + +___ + +### app + +ā€¢ `Optional` **app**: readonly `string`[] + +If your feature exposes a client-side application (most of them do!), then you can control access to them here. + +**`example`** +```ts + { + app: ['my-app', 'kibana'] + } +``` + +#### Inherited from + +Omit.app + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:76 + +___ + +### cases + +ā€¢ `Optional` **cases**: `Object` + +If your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should +be unique identifiers for the owners of cases you want access to. + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `all?` | readonly `string`[] | List of case owners which users should have full read/write access to when granted this privilege. **`example`** ```ts { all: ['securitySolution'] } ``` | +| `read?` | readonly `string`[] | List of case owners which users should have read-only access to when granted this privilege. **`example`** ```ts { read: ['securitySolution'] } ``` | + +#### Inherited from + +Omit.cases + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:132 + +___ + +### catalogue + +ā€¢ `Optional` **catalogue**: readonly `string`[] + +If this feature includes a catalogue entry, you can specify them here to control visibility based on user permissions. + +#### Inherited from + +Omit.catalogue + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:37 + +___ + +### disabled + +ā€¢ `Optional` **disabled**: `boolean` + +Whether or not this privilege should be hidden in the roles UI and disallowed on the API. Defaults to `false`. + +**`deprecated`** + +#### Inherited from + +Omit.disabled + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:18 + +___ + +### id + +ā€¢ **id**: `string` + +Identifier for this privilege. Must be unique across all other privileges within a feature. + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:47 + +___ + +### includeIn + +ā€¢ **includeIn**: ``"all"`` \| ``"none"`` \| ``"read"`` + +Denotes which Primary Feature Privilege this sub-feature privilege should be included in. +`read` is also included in `all` automatically. + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:56 + +___ + +### management + +ā€¢ `Optional` **management**: `Object` + +If this feature includes management sections, you can specify them here to control visibility of those +pages based on user privileges. + +**`example`** +```ts + // Enables access to the "Advanced Settings" management page within the Kibana section + management: { + kibana: ['settings'] + } +``` + +#### Index signature + +ā–Ŗ [sectionId: `string`]: readonly `string`[] + +#### Inherited from + +Omit.management + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:31 + +___ + +### minimumLicense + +ā€¢ `Optional` **minimumLicense**: ``"basic"`` \| ``"standard"`` \| ``"gold"`` \| ``"platinum"`` \| ``"enterprise"`` \| ``"trial"`` + +The minimum supported license level for this sub-feature privilege. +If no license level is supplied, then this privilege will be available for all licences +that are valid for the overall feature. + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:62 + +___ + +### name + +ā€¢ **name**: `string` + +The display name for this privilege. + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:51 + +___ + +### requireAllSpaces + +ā€¢ `Optional` **requireAllSpaces**: `boolean` + +Whether or not this privilege should only be granted to `All Spaces *`. Should be used for features that do not +support Spaces. Defaults to `false`. + +#### Inherited from + +Omit.requireAllSpaces + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:13 + +___ + +### savedObject + +ā€¢ **savedObject**: `Object` + +If your feature requires access to specific saved objects, then specify your access needs here. + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `all` | readonly `string`[] | List of saved object types which users should have full read/write access to when granted this privilege. **`example`** ```ts { all: ['my-saved-object-type'] } ``` | +| `read` | readonly `string`[] | List of saved object types which users should have read-only access to when granted this privilege. **`example`** ```ts { read: ['config'] } ``` | + +#### Inherited from + +Omit.savedObject + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:157 + +___ + +### ui + +ā€¢ **ui**: readonly `string`[] + +A list of UI Capabilities that should be granted to users with this privilege. +These capabilities will automatically be namespaces within your feature id. + +**`example`** +```ts + { + ui: ['show', 'save'] + } + + This translates in the UI to the following (assuming a feature id of "foo"): + import { uiCapabilities } from 'ui/capabilities'; + + const canShowApp = uiCapabilities.foo.show; + const canSave = uiCapabilities.foo.save; +``` +Note: Since these are automatically namespaced, you are free to use generic names like "show" and "save". + +**`see`** UICapabilities + +#### Inherited from + +Omit.ui + +#### Defined in + +x-pack/plugins/features/target/types/common/feature_kibana_privileges.d.ts:199 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeaturePrivilegeGroupConfig.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeaturePrivilegeGroupConfig.md new file mode 100644 index 0000000000000..28dcebc6af10c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.SubFeaturePrivilegeGroupConfig.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / SubFeaturePrivilegeGroupConfig + +# Interface: SubFeaturePrivilegeGroupConfig + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).SubFeaturePrivilegeGroupConfig + +Configuration for a sub-feature privilege group. + +## Table of contents + +### Properties + +- [groupType](client._internal_namespace.SubFeaturePrivilegeGroupConfig.md#grouptype) +- [privileges](client._internal_namespace.SubFeaturePrivilegeGroupConfig.md#privileges) + +## Properties + +### groupType + +ā€¢ **groupType**: [`SubFeaturePrivilegeGroupType`](../modules/client._internal_namespace.md#subfeatureprivilegegrouptype) + +The type of privilege group. +- `mutually_exclusive`:: + Users will be able to select at most one privilege within this group. + Privileges must be specified in descending order of permissiveness (e.g. `All`, `Read`, not `Read`, `All) +- `independent`:: + Users will be able to select any combination of privileges within this group. + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:34 + +___ + +### privileges + +ā€¢ **privileges**: readonly [`SubFeaturePrivilegeConfig`](client._internal_namespace.SubFeaturePrivilegeConfig.md)[] + +The privileges which belong to this group. + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:38 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskInfo.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskInfo.md new file mode 100644 index 0000000000000..56843b1283c19 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskInfo.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TaskInfo + +# Interface: TaskInfo + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TaskInfo + +## Table of contents + +### Properties + +- [attempts](client._internal_namespace.TaskInfo.md#attempts) +- [scheduled](client._internal_namespace.TaskInfo.md#scheduled) + +## Properties + +### attempts + +ā€¢ **attempts**: `number` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:22 + +___ + +### scheduled + +ā€¢ **scheduled**: `Date` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:21 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskInstance.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskInstance.md new file mode 100644 index 0000000000000..4cea61eafbdb2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskInstance.md @@ -0,0 +1,199 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TaskInstance + +# Interface: TaskInstance + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TaskInstance + +## Hierarchy + +- **`TaskInstance`** + + ā†³ [`ConcreteTaskInstance`](client._internal_namespace.ConcreteTaskInstance.md) + +## Table of contents + +### Properties + +- [id](client._internal_namespace.TaskInstance.md#id) +- [ownerId](client._internal_namespace.TaskInstance.md#ownerid) +- [params](client._internal_namespace.TaskInstance.md#params) +- [retryAt](client._internal_namespace.TaskInstance.md#retryat) +- [runAt](client._internal_namespace.TaskInstance.md#runat) +- [schedule](client._internal_namespace.TaskInstance.md#schedule) +- [scheduledAt](client._internal_namespace.TaskInstance.md#scheduledat) +- [scope](client._internal_namespace.TaskInstance.md#scope) +- [startedAt](client._internal_namespace.TaskInstance.md#startedat) +- [state](client._internal_namespace.TaskInstance.md#state) +- [taskType](client._internal_namespace.TaskInstance.md#tasktype) +- [traceparent](client._internal_namespace.TaskInstance.md#traceparent) +- [user](client._internal_namespace.TaskInstance.md#user) + +## Properties + +### id + +ā€¢ `Optional` **id**: `string` + +Optional ID that can be passed by the caller. When ID is undefined, ES +will auto-generate a unique id. Otherwise, ID will be used to either +create a new document, or update existing document + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:145 + +___ + +### ownerId + +ā€¢ `Optional` **ownerId**: ``null`` \| `string` + +The random uuid of the Kibana instance which claimed ownership of the task last + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:205 + +___ + +### params + +ā€¢ **params**: `Record`<`string`, `any`\> + +A task-specific set of parameters, used by the task's run function to tailor +its work. This is generally user-input, such as { sms: '333-444-2222' }. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:182 + +___ + +### retryAt + +ā€¢ `Optional` **retryAt**: ``null`` \| `Date` + +The date and time that this task should re-execute if stuck in "running" / timeout +status. This value is only set when status is set to "running". + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:165 + +___ + +### runAt + +ā€¢ `Optional` **runAt**: `Date` + +The date and time that this task is scheduled to be run. It is not +guaranteed to run at this time, but it is guaranteed not to run earlier +than this. Defaults to immediately. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:171 + +___ + +### schedule + +ā€¢ `Optional` **schedule**: [`IntervalSchedule`](client._internal_namespace.IntervalSchedule.md) + +A TaskSchedule string, which specifies this as a recurring task. + +Currently, this supports a single format: an interval in minutes or seconds (e.g. '5m', '30s'). + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:177 + +___ + +### scheduledAt + +ā€¢ `Optional` **scheduledAt**: `Date` + +The date and time that this task was originally scheduled. This is used +for convenience to task run functions, and for troubleshooting. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:154 + +___ + +### scope + +ā€¢ `Optional` **scope**: `string`[] + +Used to group tasks for querying. So, reporting might schedule tasks with a scope of 'reporting', +and then query such tasks to provide a glimpse at only reporting tasks, rather than at all tasks. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:201 + +___ + +### startedAt + +ā€¢ `Optional` **startedAt**: ``null`` \| `Date` + +The date and time that this task started execution. This is used to determine +the "real" runAt that ended up running the task. This value is only set +when status is set to "running". + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:160 + +___ + +### state + +ā€¢ **state**: `Record`<`string`, `any`\> + +The state passed into the task's run function, and returned by the previous +run. If there was no previous run, or if the previous run did not return +any state, this will be the empy object: {} + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:188 + +___ + +### taskType + +ā€¢ **taskType**: `string` + +The task definition type whose run function will execute this instance. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:149 + +___ + +### traceparent + +ā€¢ `Optional` **traceparent**: `string` + +The serialized traceparent string of the current APM transaction or span. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:192 + +___ + +### user + +ā€¢ `Optional` **user**: `string` + +The id of the user who scheduled this task. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:196 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskManagerSetupContract.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskManagerSetupContract.md new file mode 100644 index 0000000000000..15c8f2fe2b91e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskManagerSetupContract.md @@ -0,0 +1,70 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TaskManagerSetupContract + +# Interface: TaskManagerSetupContract + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TaskManagerSetupContract + +## Table of contents + +### Properties + +- [index](client._internal_namespace.TaskManagerSetupContract.md#index) + +### Methods + +- [addMiddleware](client._internal_namespace.TaskManagerSetupContract.md#addmiddleware) +- [registerTaskDefinitions](client._internal_namespace.TaskManagerSetupContract.md#registertaskdefinitions) + +## Properties + +### index + +ā€¢ **index**: `string` + +**`deprecated`** + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/plugin.d.ts:12 + +## Methods + +### addMiddleware + +ā–ø **addMiddleware**(`middleware`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `middleware` | [`Middleware`](client._internal_namespace.Middleware.md) | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/plugin.d.ts:13 + +___ + +### registerTaskDefinitions + +ā–ø **registerTaskDefinitions**(`taskDefinitions`): `void` + +Method for allowing consumers to register task definitions into the system. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `taskDefinitions` | [`TaskDefinitionRegistry`](../modules/client._internal_namespace.md#taskdefinitionregistry) | The Kibana task definitions dictionary | + +#### Returns + +`void` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/plugin.d.ts:18 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskRegisterDefinition.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskRegisterDefinition.md new file mode 100644 index 0000000000000..f5d534feba600 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskRegisterDefinition.md @@ -0,0 +1,130 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TaskRegisterDefinition + +# Interface: TaskRegisterDefinition + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TaskRegisterDefinition + +Defines a task which can be scheduled and run by the Kibana +task manager. + +## Table of contents + +### Properties + +- [createTaskRunner](client._internal_namespace.TaskRegisterDefinition.md#createtaskrunner) +- [description](client._internal_namespace.TaskRegisterDefinition.md#description) +- [maxAttempts](client._internal_namespace.TaskRegisterDefinition.md#maxattempts) +- [maxConcurrency](client._internal_namespace.TaskRegisterDefinition.md#maxconcurrency) +- [timeout](client._internal_namespace.TaskRegisterDefinition.md#timeout) +- [title](client._internal_namespace.TaskRegisterDefinition.md#title) + +### Methods + +- [getRetry](client._internal_namespace.TaskRegisterDefinition.md#getretry) + +## Properties + +### createTaskRunner + +ā€¢ **createTaskRunner**: [`TaskRunCreatorFunction`](../modules/client._internal_namespace.md#taskruncreatorfunction) + +Creates an object that has a run function which performs the task's work, +and an optional cancel function which cancels the task. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:35 + +___ + +### description + +ā€¢ `Optional` **description**: `string` + +An optional more detailed description of what this task does. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:22 + +___ + +### maxAttempts + +ā€¢ `Optional` **maxAttempts**: `number` + +Up to how many times the task should retry when it fails to run. This will +default to the global variable. The default value, if not specified, is 1. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:40 + +___ + +### maxConcurrency + +ā€¢ `Optional` **maxConcurrency**: `number` + +The maximum number tasks of this type that can be run concurrently per Kibana instance. +Setting this value will force Task Manager to poll for this task type separately from other task types +which can add significant load to the ES cluster, so please use this configuration only when absolutely necessary. +The default value, if not given, is 0. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:47 + +___ + +### timeout + +ā€¢ `Optional` **timeout**: `string` + +How long, in minutes or seconds, the system should wait for the task to complete +before it is considered to be timed out. (e.g. '5m', the default). If +the task takes longer than this, Kibana will send it a kill command and +the task will be re-attempted. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:18 + +___ + +### title + +ā€¢ `Optional` **title**: `string` + +A brief, human-friendly title for this task. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:11 + +## Methods + +### getRetry + +ā–ø `Optional` **getRetry**(`attempts`, `error`): `boolean` \| `Date` + +Function that customizes how the task should behave when the task fails. This +function can return `true`, `false` or a Date. True will tell task manager +to retry using default delay logic. False will tell task manager to stop retrying +this task. Date will suggest when to the task manager the task should retry. +This function isn't used for recurring tasks, those retry as per their configured recurring schedule. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `attempts` | `number` | +| `error` | `object` | + +#### Returns + +`boolean` \| `Date` + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:30 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskRunnerContext.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskRunnerContext.md new file mode 100644 index 0000000000000..d79cef9c996c1 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TaskRunnerContext.md @@ -0,0 +1,89 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TaskRunnerContext + +# Interface: TaskRunnerContext + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TaskRunnerContext + +## Table of contents + +### Properties + +- [actionTypeRegistry](client._internal_namespace.TaskRunnerContext.md#actiontyperegistry) +- [basePathService](client._internal_namespace.TaskRunnerContext.md#basepathservice) +- [encryptedSavedObjectsClient](client._internal_namespace.TaskRunnerContext.md#encryptedsavedobjectsclient) +- [logger](client._internal_namespace.TaskRunnerContext.md#logger) +- [spaceIdToNamespace](client._internal_namespace.TaskRunnerContext.md#spaceidtonamespace) + +### Methods + +- [getUnsecuredSavedObjectsClient](client._internal_namespace.TaskRunnerContext.md#getunsecuredsavedobjectsclient) + +## Properties + +### actionTypeRegistry + +ā€¢ **actionTypeRegistry**: [`ActionTypeRegistryContract`](../modules/client._internal_namespace.md#actiontyperegistrycontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:8 + +___ + +### basePathService + +ā€¢ **basePathService**: [`IBasePath`](../modules/client._internal_namespace.md#ibasepath) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:11 + +___ + +### encryptedSavedObjectsClient + +ā€¢ **encryptedSavedObjectsClient**: [`EncryptedSavedObjectsClient`](client._internal_namespace.EncryptedSavedObjectsClient.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:9 + +___ + +### logger + +ā€¢ **logger**: `Logger` + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:7 + +___ + +### spaceIdToNamespace + +ā€¢ **spaceIdToNamespace**: [`SpaceIdToNamespaceFunction`](../modules/client._internal_namespace.md#spaceidtonamespacefunction) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:10 + +## Methods + +### getUnsecuredSavedObjectsClient + +ā–ø **getUnsecuredSavedObjectsClient**(`request`): [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)<`unknown`, `unknown`, `unknown`, `any`\> | + +#### Returns + +[`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/task_runner_factory.d.ts:12 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TranslatedUpdateAlertRequest.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TranslatedUpdateAlertRequest.md new file mode 100644 index 0000000000000..0a44beb8592e7 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.TranslatedUpdateAlertRequest.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / TranslatedUpdateAlertRequest + +# Interface: TranslatedUpdateAlertRequest + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).TranslatedUpdateAlertRequest + +## Table of contents + +### Properties + +- [id](client._internal_namespace.TranslatedUpdateAlertRequest.md#id) +- [index](client._internal_namespace.TranslatedUpdateAlertRequest.md#index) +- [status](client._internal_namespace.TranslatedUpdateAlertRequest.md#status) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:208](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L208) + +___ + +### index + +ā€¢ **index**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:209](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L209) + +___ + +### status + +ā€¢ **status**: `STATUS_VALUES` + +#### Defined in + +[x-pack/plugins/cases/server/services/alerts/index.ts:210](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/alerts/index.ts#L210) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateAlertRequest.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateAlertRequest.md new file mode 100644 index 0000000000000..53ee404bbf12a --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateAlertRequest.md @@ -0,0 +1,45 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UpdateAlertRequest + +# Interface: UpdateAlertRequest + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UpdateAlertRequest + +Defines the fields necessary to update an alert's status. + +## Table of contents + +### Properties + +- [id](client._internal_namespace.UpdateAlertRequest.md#id) +- [index](client._internal_namespace.UpdateAlertRequest.md#index) +- [status](client._internal_namespace.UpdateAlertRequest.md#status) + +## Properties + +### id + +ā€¢ **id**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/client/alerts/types.ts:28](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/alerts/types.ts#L28) + +___ + +### index + +ā€¢ **index**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/client/alerts/types.ts:29](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/alerts/types.ts#L29) + +___ + +### status + +ā€¢ **status**: [`CaseStatuses`](../enums/client._internal_namespace.CaseStatuses.md) + +#### Defined in + +[x-pack/plugins/cases/server/client/alerts/types.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/alerts/types.ts#L30) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateArgs.md new file mode 100644 index 0000000000000..c0f6cf3d0d1a2 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateArgs.md @@ -0,0 +1,43 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UpdateArgs + +# Interface: UpdateArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UpdateArgs + +## Table of contents + +### Properties + +- [attachmentId](client._internal_namespace.UpdateArgs.md#attachmentid) +- [options](client._internal_namespace.UpdateArgs.md#options) +- [updatedAttributes](client._internal_namespace.UpdateArgs.md#updatedattributes) + +## Properties + +### attachmentId + +ā€¢ **attachmentId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:54](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L54) + +___ + +### options + +ā€¢ `Optional` **options**: [`SavedObjectsUpdateOptions`](client._internal_namespace.SavedObjectsUpdateOptions.md)<{ `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } \| { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } }\> + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:56](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L56) + +___ + +### updatedAttributes + +ā€¢ **updatedAttributes**: { `created_at`: `undefined` \| `string` = rt.string; `created_by`: `undefined` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } = UserRT; `owner`: `undefined` \| `string` = rt.string; `pushed_at`: `undefined` \| ``null`` \| `string` ; `pushed_by`: `undefined` \| ``null`` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } ; `updated_at`: `undefined` \| ``null`` \| `string` ; `updated_by`: `undefined` \| ``null`` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } } & { `alertId`: `undefined` \| `string` \| `string`[] ; `index`: `undefined` \| `string` \| `string`[] ; `owner`: `undefined` \| `string` = rt.string; `rule`: `undefined` \| { `id`: ``null`` \| `string` ; `name`: ``null`` \| `string` } ; `type`: `undefined` \| [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `undefined` \| `string` = rt.string; `created_by`: `undefined` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } = UserRT; `owner`: `undefined` \| `string` = rt.string; `pushed_at`: `undefined` \| ``null`` \| `string` ; `pushed_by`: `undefined` \| ``null`` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } ; `updated_at`: `undefined` \| ``null`` \| `string` ; `updated_by`: `undefined` \| ``null`` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } } + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:55](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L55) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateConnectorMappingsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateConnectorMappingsArgs.md new file mode 100644 index 0000000000000..4af6344e575d6 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateConnectorMappingsArgs.md @@ -0,0 +1,64 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UpdateConnectorMappingsArgs + +# Interface: UpdateConnectorMappingsArgs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UpdateConnectorMappingsArgs + +## Hierarchy + +- [`ClientArgs`](client._internal_namespace.ClientArgs-2.md) + + ā†³ **`UpdateConnectorMappingsArgs`** + +## Table of contents + +### Properties + +- [attributes](client._internal_namespace.UpdateConnectorMappingsArgs.md#attributes) +- [mappingId](client._internal_namespace.UpdateConnectorMappingsArgs.md#mappingid) +- [references](client._internal_namespace.UpdateConnectorMappingsArgs.md#references) +- [unsecuredSavedObjectsClient](client._internal_namespace.UpdateConnectorMappingsArgs.md#unsecuredsavedobjectsclient) + +## Properties + +### attributes + +ā€¢ **attributes**: `Partial`<{ `mappings`: { action\_type: "append" \| "nothing" \| "overwrite"; source: "description" \| "title" \| "comments"; target: string; }[] ; `owner`: `string` = rt.string }\> + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:28](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L28) + +___ + +### mappingId + +ā€¢ **mappingId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:27](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L27) + +___ + +### references + +ā€¢ **references**: [`SavedObjectReference`](client._internal_namespace.SavedObjectReference.md)[] + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:29](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L29) + +___ + +### unsecuredSavedObjectsClient + +ā€¢ **unsecuredSavedObjectsClient**: [`SavedObjectsClientContract`](../modules/client._internal_namespace.md#savedobjectsclientcontract) + +#### Inherited from + +[ClientArgs](client._internal_namespace.ClientArgs-2.md).[unsecuredSavedObjectsClient](client._internal_namespace.ClientArgs-2.md#unsecuredsavedobjectsclient) + +#### Defined in + +[x-pack/plugins/cases/server/services/connector_mappings/index.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/connector_mappings/index.ts#L15) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateOptions-1.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateOptions-1.md new file mode 100644 index 0000000000000..cd8125ed13bf5 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateOptions-1.md @@ -0,0 +1,54 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UpdateOptions + +# Interface: UpdateOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UpdateOptions + +## Table of contents + +### Properties + +- [expiresAtMillis](client._internal_namespace.UpdateOptions-1.md#expiresatmillis) +- [id](client._internal_namespace.UpdateOptions-1.md#id) +- [token](client._internal_namespace.UpdateOptions-1.md#token) +- [tokenType](client._internal_namespace.UpdateOptions-1.md#tokentype) + +## Properties + +### expiresAtMillis + +ā€¢ **expiresAtMillis**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:19 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:17 + +___ + +### token + +ā€¢ **token**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:18 + +___ + +### tokenType + +ā€¢ `Optional` **tokenType**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/builtin_action_types/lib/connector_token_client.d.ts:20 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateOptions.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateOptions.md new file mode 100644 index 0000000000000..f1bc374522175 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UpdateOptions.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UpdateOptions + +# Interface: UpdateOptions + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UpdateOptions + +## Table of contents + +### Properties + +- [action](client._internal_namespace.UpdateOptions.md#action) +- [id](client._internal_namespace.UpdateOptions.md#id) + +## Properties + +### action + +ā€¢ **action**: [`ActionUpdate`](client._internal_namespace.ActionUpdate.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:41 + +___ + +### id + +ā€¢ **id**: `string` + +#### Defined in + +x-pack/plugins/actions/target/types/server/actions_client.d.ts:40 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.User.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.User.md new file mode 100644 index 0000000000000..947805536297f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.User.md @@ -0,0 +1,90 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / User + +# Interface: User + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).User + +## Hierarchy + +- **`User`** + + ā†³ [`AuthenticatedUser`](client._internal_namespace.AuthenticatedUser.md) + +## Table of contents + +### Properties + +- [email](client._internal_namespace.User.md#email) +- [enabled](client._internal_namespace.User.md#enabled) +- [full\_name](client._internal_namespace.User.md#full_name) +- [metadata](client._internal_namespace.User.md#metadata) +- [roles](client._internal_namespace.User.md#roles) +- [username](client._internal_namespace.User.md#username) + +## Properties + +### email + +ā€¢ `Optional` **email**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:3 + +___ + +### enabled + +ā€¢ **enabled**: `boolean` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:6 + +___ + +### full\_name + +ā€¢ `Optional` **full\_name**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:4 + +___ + +### metadata + +ā€¢ `Optional` **metadata**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `_deprecated?` | `boolean` | +| `_deprecated_reason?` | `string` | +| `_reserved` | `boolean` | + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:7 + +___ + +### roles + +ā€¢ **roles**: readonly `string`[] + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:5 + +___ + +### username + +ā€¢ **username**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/user.d.ts:2 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UserRealm.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UserRealm.md new file mode 100644 index 0000000000000..2d1d75692a0e0 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.UserRealm.md @@ -0,0 +1,32 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / UserRealm + +# Interface: UserRealm + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).UserRealm + +## Table of contents + +### Properties + +- [name](client._internal_namespace.UserRealm.md#name) +- [type](client._internal_namespace.UserRealm.md#type) + +## Properties + +### name + +ā€¢ **name**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authenticated_user.d.ts:4 + +___ + +### type + +ā€¢ **type**: `string` + +#### Defined in + +x-pack/plugins/security/target/types/common/model/authenticated_user.d.ts:5 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ValidatorType.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ValidatorType.md new file mode 100644 index 0000000000000..c771a20cde115 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.ValidatorType.md @@ -0,0 +1,37 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / ValidatorType + +# Interface: ValidatorType + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).ValidatorType + +## Type parameters + +| Name | +| :------ | +| `Type` | + +## Table of contents + +### Methods + +- [validate](client._internal_namespace.ValidatorType.md#validate) + +## Methods + +### validate + +ā–ø **validate**(`value`): `Type` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `unknown` | + +#### Returns + +`Type` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:64 diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Verbs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Verbs.md new file mode 100644 index 0000000000000..6234a71241e99 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/client._internal_namespace.Verbs.md @@ -0,0 +1,45 @@ +[Cases Client API Interface](../README.md) / [client](../modules/client.md) / [\_internal\_namespace](../modules/client._internal_namespace.md) / Verbs + +# Interface: Verbs + +[client](../modules/client.md).[_internal_namespace](../modules/client._internal_namespace.md).Verbs + +The tenses for describing the action performed by a API route + +## Table of contents + +### Properties + +- [past](client._internal_namespace.Verbs.md#past) +- [present](client._internal_namespace.Verbs.md#present) +- [progressive](client._internal_namespace.Verbs.md#progressive) + +## Properties + +### past + +ā€¢ **past**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:18](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L18) + +___ + +### present + +ā€¢ **present**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:16](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L16) + +___ + +### progressive + +ā€¢ **progressive**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:17](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L17) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.CreateMappingsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.CreateMappingsArgs.md new file mode 100644 index 0000000000000..14e3f0fc93459 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.CreateMappingsArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [configure/client](../modules/configure_client.md) / [\_internal\_namespace](../modules/configure_client._internal_namespace.md) / CreateMappingsArgs + +# Interface: CreateMappingsArgs + +[configure/client](../modules/configure_client.md).[_internal_namespace](../modules/configure_client._internal_namespace.md).CreateMappingsArgs + +## Hierarchy + +- [`MappingsArgs`](configure_client._internal_namespace.MappingsArgs.md) + + ā†³ **`CreateMappingsArgs`** + +## Table of contents + +### Properties + +- [connector](configure_client._internal_namespace.CreateMappingsArgs.md#connector) +- [owner](configure_client._internal_namespace.CreateMappingsArgs.md#owner) + +## Properties + +### connector + +ā€¢ **connector**: { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } + +#### Inherited from + +[MappingsArgs](configure_client._internal_namespace.MappingsArgs.md).[connector](configure_client._internal_namespace.MappingsArgs.md#connector) + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/types.ts:11](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/types.ts#L11) + +___ + +### owner + +ā€¢ **owner**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/types.ts:15](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/types.ts#L15) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.MappingsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.MappingsArgs.md new file mode 100644 index 0000000000000..b21de0e3f9018 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.MappingsArgs.md @@ -0,0 +1,29 @@ +[Cases Client API Interface](../README.md) / [configure/client](../modules/configure_client.md) / [\_internal\_namespace](../modules/configure_client._internal_namespace.md) / MappingsArgs + +# Interface: MappingsArgs + +[configure/client](../modules/configure_client.md).[_internal_namespace](../modules/configure_client._internal_namespace.md).MappingsArgs + +## Hierarchy + +- **`MappingsArgs`** + + ā†³ [`CreateMappingsArgs`](configure_client._internal_namespace.CreateMappingsArgs.md) + + ā†³ [`UpdateMappingsArgs`](configure_client._internal_namespace.UpdateMappingsArgs.md) + +## Table of contents + +### Properties + +- [connector](configure_client._internal_namespace.MappingsArgs.md#connector) + +## Properties + +### connector + +ā€¢ **connector**: { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/types.ts:11](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/types.ts#L11) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.UpdateMappingsArgs.md b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.UpdateMappingsArgs.md new file mode 100644 index 0000000000000..e81c67f5bd4a0 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client._internal_namespace.UpdateMappingsArgs.md @@ -0,0 +1,42 @@ +[Cases Client API Interface](../README.md) / [configure/client](../modules/configure_client.md) / [\_internal\_namespace](../modules/configure_client._internal_namespace.md) / UpdateMappingsArgs + +# Interface: UpdateMappingsArgs + +[configure/client](../modules/configure_client.md).[_internal_namespace](../modules/configure_client._internal_namespace.md).UpdateMappingsArgs + +## Hierarchy + +- [`MappingsArgs`](configure_client._internal_namespace.MappingsArgs.md) + + ā†³ **`UpdateMappingsArgs`** + +## Table of contents + +### Properties + +- [connector](configure_client._internal_namespace.UpdateMappingsArgs.md#connector) +- [mappingId](configure_client._internal_namespace.UpdateMappingsArgs.md#mappingid) + +## Properties + +### connector + +ā€¢ **connector**: { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } + +#### Inherited from + +[MappingsArgs](configure_client._internal_namespace.MappingsArgs.md).[connector](configure_client._internal_namespace.MappingsArgs.md#connector) + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/types.ts:11](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/types.ts#L11) + +___ + +### mappingId + +ā€¢ **mappingId**: `string` + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/types.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/types.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client.configuresubclient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client.configuresubclient.md index f94e7d6c7f49e..393957ba1c7f5 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client.configuresubclient.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/configure_client.configuresubclient.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [configure/client](../modules/configure_client.md) / ConfigureSubClient +[Cases Client API Interface](../README.md) / [configure/client](../modules/configure_client.md) / ConfigureSubClient # Interface: ConfigureSubClient @@ -10,16 +10,16 @@ This is the public API for interacting with the connector configuration for case ### Methods -- [create](configure_client.configuresubclient.md#create) -- [get](configure_client.configuresubclient.md#get) -- [getConnectors](configure_client.configuresubclient.md#getconnectors) -- [update](configure_client.configuresubclient.md#update) +- [create](configure_client.ConfigureSubClient.md#create) +- [get](configure_client.ConfigureSubClient.md#get) +- [getConnectors](configure_client.ConfigureSubClient.md#getconnectors) +- [update](configure_client.ConfigureSubClient.md#update) ## Methods ### create -ā–ø **create**(`configuration`: [*ICasesConfigureRequest*](typedoc_interfaces.icasesconfigurerequest.md)): *Promise*<[*ICasesConfigureResponse*](typedoc_interfaces.icasesconfigureresponse.md)\> +ā–ø **create**(`configuration`): `Promise`<[`ICasesConfigureResponse`](typedoc_interfaces.ICasesConfigureResponse.md)\> Creates a configuration if one does not already exist. If one exists it is deleted and a new one is created. @@ -27,17 +27,21 @@ Creates a configuration if one does not already exist. If one exists it is delet | Name | Type | | :------ | :------ | -| `configuration` | [*ICasesConfigureRequest*](typedoc_interfaces.icasesconfigurerequest.md) | +| `configuration` | [`ICasesConfigureRequest`](typedoc_interfaces.ICasesConfigureRequest.md) | -**Returns:** *Promise*<[*ICasesConfigureResponse*](typedoc_interfaces.icasesconfigureresponse.md)\> +#### Returns -Defined in: [configure/client.ts:98](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/configure/client.ts#L98) +`Promise`<[`ICasesConfigureResponse`](typedoc_interfaces.ICasesConfigureResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/client.ts:93](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/client.ts#L93) ___ ### get -ā–ø **get**(`params`: { `owner`: *undefined* \| *string* \| *string*[] }): *Promise*<{} \| [*ICasesConfigureResponse*](typedoc_interfaces.icasesconfigureresponse.md)\> +ā–ø **get**(`params`): `Promise`<{} \| [`ICasesConfigureResponse`](typedoc_interfaces.ICasesConfigureResponse.md)\> Retrieves the external connector configuration for a particular case owner. @@ -45,30 +49,38 @@ Retrieves the external connector configuration for a particular case owner. | Name | Type | | :------ | :------ | -| `params` | *object* | -| `params.owner` | *undefined* \| *string* \| *string*[] | +| `params` | `Object` | +| `params.owner` | `undefined` \| `string` \| `string`[] | + +#### Returns + +`Promise`<{} \| [`ICasesConfigureResponse`](typedoc_interfaces.ICasesConfigureResponse.md)\> -**Returns:** *Promise*<{} \| [*ICasesConfigureResponse*](typedoc_interfaces.icasesconfigureresponse.md)\> +#### Defined in -Defined in: [configure/client.ts:80](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/configure/client.ts#L80) +[x-pack/plugins/cases/server/client/configure/client.ts:75](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/client.ts#L75) ___ ### getConnectors -ā–ø **getConnectors**(): *Promise* +ā–ø **getConnectors**(): `Promise`<[`FindActionResult`](client._internal_namespace.FindActionResult.md)[]\> Retrieves the valid external connectors supported by the cases plugin. -**Returns:** *Promise* +#### Returns -Defined in: [configure/client.ts:84](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/configure/client.ts#L84) +`Promise`<[`FindActionResult`](client._internal_namespace.FindActionResult.md)[]\> + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/client.ts:79](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/client.ts#L79) ___ ### update -ā–ø **update**(`configurationId`: *string*, `configurations`: [*ICasesConfigurePatch*](typedoc_interfaces.icasesconfigurepatch.md)): *Promise*<[*ICasesConfigureResponse*](typedoc_interfaces.icasesconfigureresponse.md)\> +ā–ø **update**(`configurationId`, `configurations`): `Promise`<[`ICasesConfigureResponse`](typedoc_interfaces.ICasesConfigureResponse.md)\> Updates a particular configuration with new values. @@ -76,9 +88,13 @@ Updates a particular configuration with new values. | Name | Type | Description | | :------ | :------ | :------ | -| `configurationId` | *string* | the ID of the configuration to update | -| `configurations` | [*ICasesConfigurePatch*](typedoc_interfaces.icasesconfigurepatch.md) | the new configuration parameters | +| `configurationId` | `string` | the ID of the configuration to update | +| `configurations` | [`ICasesConfigurePatch`](typedoc_interfaces.ICasesConfigurePatch.md) | the new configuration parameters | + +#### Returns + +`Promise`<[`ICasesConfigureResponse`](typedoc_interfaces.ICasesConfigureResponse.md)\> -**Returns:** *Promise*<[*ICasesConfigureResponse*](typedoc_interfaces.icasesconfigureresponse.md)\> +#### Defined in -Defined in: [configure/client.ts:91](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/configure/client.ts#L91) +[x-pack/plugins/cases/server/client/configure/client.ts:86](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/client.ts#L86) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/metrics_client.MetricsSubClient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/metrics_client.MetricsSubClient.md new file mode 100644 index 0000000000000..c59b437c7f23e --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/metrics_client.MetricsSubClient.md @@ -0,0 +1,33 @@ +[Cases Client API Interface](../README.md) / [metrics/client](../modules/metrics_client.md) / MetricsSubClient + +# Interface: MetricsSubClient + +[metrics/client](../modules/metrics_client.md).MetricsSubClient + +API for interacting with the metrics. + +## Table of contents + +### Methods + +- [getCaseMetrics](metrics_client.MetricsSubClient.md#getcasemetrics) + +## Methods + +### getCaseMetrics + +ā–ø **getCaseMetrics**(`params`): `Promise`<{ `actions`: `undefined` \| { isolateHost?: { isolate: { total: number; }; unisolate: { total: number; }; } \| undefined; } ; `alerts`: `undefined` \| { count?: number \| undefined; hosts?: { total: number; values: { name: string \| undefined; id: string; count: number; }[]; } \| undefined; users?: { total: number; values: { name: string; count: number; }[]; } \| undefined; } ; `connectors`: `undefined` \| { `total`: `number` = rt.number } ; `lifespan`: `undefined` \| { `closeDate`: ``null`` \| `string` ; `creationDate`: `string` = rt.string; `statusInfo`: { openDuration: number; inProgressDuration: number; reopenDates: string[]; } = StatusInfoRt } }\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`CaseMetricsParams`](metrics_client._internal_namespace.CaseMetricsParams.md) | + +#### Returns + +`Promise`<{ `actions`: `undefined` \| { isolateHost?: { isolate: { total: number; }; unisolate: { total: number; }; } \| undefined; } ; `alerts`: `undefined` \| { count?: number \| undefined; hosts?: { total: number; values: { name: string \| undefined; id: string; count: number; }[]; } \| undefined; users?: { total: number; values: { name: string; count: number; }[]; } \| undefined; } ; `connectors`: `undefined` \| { `total`: `number` = rt.number } ; `lifespan`: `undefined` \| { `closeDate`: ``null`` \| `string` ; `creationDate`: `string` = rt.string; `statusInfo`: { openDuration: number; inProgressDuration: number; reopenDates: string[]; } = StatusInfoRt } }\> + +#### Defined in + +[x-pack/plugins/cases/server/client/metrics/client.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/metrics/client.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/metrics_client._internal_namespace.CaseMetricsParams.md b/x-pack/plugins/cases/docs/cases_client/interfaces/metrics_client._internal_namespace.CaseMetricsParams.md new file mode 100644 index 0000000000000..8f03bed67e646 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/metrics_client._internal_namespace.CaseMetricsParams.md @@ -0,0 +1,36 @@ +[Cases Client API Interface](../README.md) / [metrics/client](../modules/metrics_client.md) / [\_internal\_namespace](../modules/metrics_client._internal_namespace.md) / CaseMetricsParams + +# Interface: CaseMetricsParams + +[metrics/client](../modules/metrics_client.md).[_internal_namespace](../modules/metrics_client._internal_namespace.md).CaseMetricsParams + +## Table of contents + +### Properties + +- [caseId](metrics_client._internal_namespace.CaseMetricsParams.md#caseid) +- [features](metrics_client._internal_namespace.CaseMetricsParams.md#features) + +## Properties + +### caseId + +ā€¢ **caseId**: `string` + +The ID of the case. + +#### Defined in + +[x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts:26](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts#L26) + +___ + +### features + +ā€¢ **features**: `string`[] + +The metrics to retrieve. + +#### Defined in + +[x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts:30](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts#L30) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/stats_client.statssubclient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/stats_client.statssubclient.md index 9bbf3cdaf015f..37dab1782ee06 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/stats_client.statssubclient.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/stats_client.statssubclient.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [stats/client](../modules/stats_client.md) / StatsSubClient +[Cases Client API Interface](../README.md) / [stats/client](../modules/stats_client.md) / StatsSubClient # Interface: StatsSubClient @@ -10,13 +10,13 @@ Statistics API contract. ### Methods -- [getStatusTotalsByType](stats_client.statssubclient.md#getstatustotalsbytype) +- [getStatusTotalsByType](stats_client.StatsSubClient.md#getstatustotalsbytype) ## Methods ### getStatusTotalsByType -ā–ø **getStatusTotalsByType**(`params`: { `owner`: *undefined* \| *string* \| *string*[] }): *Promise*<{ `count_closed_cases`: *number* ; `count_in_progress_cases`: *number* ; `count_open_cases`: *number* }\> +ā–ø **getStatusTotalsByType**(`params`): `Promise`<{ `count_closed_cases`: `number` = rt.number; `count_in_progress_cases`: `number` = rt.number; `count_open_cases`: `number` = rt.number }\> Retrieves the total number of open, closed, and in-progress cases. @@ -24,9 +24,13 @@ Retrieves the total number of open, closed, and in-progress cases. | Name | Type | | :------ | :------ | -| `params` | *object* | -| `params.owner` | *undefined* \| *string* \| *string*[] | +| `params` | `Object` | +| `params.owner` | `undefined` \| `string` \| `string`[] | -**Returns:** *Promise*<{ `count_closed_cases`: *number* ; `count_in_progress_cases`: *number* ; `count_open_cases`: *number* }\> +#### Returns -Defined in: [stats/client.ts:34](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/stats/client.ts#L34) +`Promise`<{ `count_closed_cases`: `number` = rt.number; `count_in_progress_cases`: `number` = rt.number; `count_open_cases`: `number` = rt.number }\> + +#### Defined in + +[x-pack/plugins/cases/server/client/stats/client.ts:34](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/stats/client.ts#L34) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/sub_cases_client.subcasesclient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/sub_cases_client.subcasesclient.md deleted file mode 100644 index e3ca5a756f8a7..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/sub_cases_client.subcasesclient.md +++ /dev/null @@ -1,89 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [sub_cases/client](../modules/sub_cases_client.md) / SubCasesClient - -# Interface: SubCasesClient - -[sub_cases/client](../modules/sub_cases_client.md).SubCasesClient - -The API routes for interacting with sub cases. - -## Table of contents - -### Methods - -- [delete](sub_cases_client.subcasesclient.md#delete) -- [find](sub_cases_client.subcasesclient.md#find) -- [get](sub_cases_client.subcasesclient.md#get) -- [update](sub_cases_client.subcasesclient.md#update) - -## Methods - -### delete - -ā–ø **delete**(`ids`: *string*[]): *Promise* - -Deletes the specified entities and their attachments. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ids` | *string*[] | - -**Returns:** *Promise* - -Defined in: [sub_cases/client.ts:68](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/sub_cases/client.ts#L68) - -___ - -### find - -ā–ø **find**(`findArgs`: FindArgs): *Promise*<[*ISubCasesFindResponse*](typedoc_interfaces.isubcasesfindresponse.md)\> - -Retrieves the sub cases matching the search criteria. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `findArgs` | FindArgs | - -**Returns:** *Promise*<[*ISubCasesFindResponse*](typedoc_interfaces.isubcasesfindresponse.md)\> - -Defined in: [sub_cases/client.ts:72](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/sub_cases/client.ts#L72) - -___ - -### get - -ā–ø **get**(`getArgs`: GetArgs): *Promise*<[*ISubCaseResponse*](typedoc_interfaces.isubcaseresponse.md)\> - -Retrieves a single sub case. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `getArgs` | GetArgs | - -**Returns:** *Promise*<[*ISubCaseResponse*](typedoc_interfaces.isubcaseresponse.md)\> - -Defined in: [sub_cases/client.ts:76](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/sub_cases/client.ts#L76) - -___ - -### update - -ā–ø **update**(`subCases`: { `subCases`: { `status`: *undefined* \| open \| *any*[*any*] \| closed } & { id: string; version: string; }[] }): *Promise*<[*ISubCasesResponse*](typedoc_interfaces.isubcasesresponse.md)\> - -Updates the specified sub cases to the new values included in the request. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `subCases` | *object* | -| `subCases.subCases` | { `status`: *undefined* \| open \| *any*[*any*] \| closed } & { id: string; version: string; }[] | - -**Returns:** *Promise*<[*ISubCasesResponse*](typedoc_interfaces.isubcasesresponse.md)\> - -Defined in: [sub_cases/client.ts:80](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/sub_cases/client.ts#L80) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.ICaseResolveResponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.ICaseResolveResponse.md new file mode 100644 index 0000000000000..a428247ab70ba --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.ICaseResolveResponse.md @@ -0,0 +1,49 @@ +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICaseResolveResponse + +# Interface: ICaseResolveResponse + +[typedoc_interfaces](../modules/typedoc_interfaces.md).ICaseResolveResponse + +## Hierarchy + +- [`CaseResolveResponse`](../modules/typedoc_interfaces._internal_namespace.md#caseresolveresponse) + + ā†³ **`ICaseResolveResponse`** + +## Table of contents + +### Properties + +- [alias\_target\_id](typedoc_interfaces.ICaseResolveResponse.md#alias_target_id) +- [case](typedoc_interfaces.ICaseResolveResponse.md#case) +- [outcome](typedoc_interfaces.ICaseResolveResponse.md#outcome) + +## Properties + +### alias\_target\_id + +ā€¢ **alias\_target\_id**: `undefined` \| `string` = `rt.string` + +#### Inherited from + +CaseResolveResponse.alias\_target\_id + +___ + +### case + +ā€¢ **case**: { `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `totalAlerts`: `number` = rt.number; `totalComment`: `number` = rt.number; `version`: `string` = rt.string } & { `comments`: `undefined` \| { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string }[] } = `CaseResponseRt` + +#### Inherited from + +CaseResolveResponse.case + +___ + +### outcome + +ā€¢ **outcome**: ``"exactMatch"`` \| ``"aliasMatch"`` \| ``"conflict"`` + +#### Inherited from + +CaseResolveResponse.outcome diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.iallcommentsresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.iallcommentsresponse.md index 06322bb51e2ad..e4d0d7cdaa594 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.iallcommentsresponse.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.iallcommentsresponse.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / IAllCommentsResponse +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / IAllCommentsResponse # Interface: IAllCommentsResponse @@ -6,6 +6,6 @@ ## Hierarchy -- *AllCommentsResponse* +- [`AllCommentsResponse`](../modules/typedoc_interfaces._internal_namespace.md#allcommentsresponse) - ā†³ **IAllCommentsResponse** + ā†³ **`IAllCommentsResponse`** diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasepostrequest.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasepostrequest.md index 5f9189ea41e48..bcca7301539f5 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasepostrequest.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasepostrequest.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasePostRequest +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasePostRequest # Interface: ICasePostRequest @@ -9,80 +9,83 @@ the docs are huge. ## Hierarchy -- *CasePostRequest* +- [`CasePostRequest`](../modules/typedoc_interfaces._internal_namespace.md#casepostrequest) - ā†³ **ICasePostRequest** + ā†³ **`ICasePostRequest`** ## Table of contents ### Properties -- [connector](typedoc_interfaces.icasepostrequest.md#connector) -- [description](typedoc_interfaces.icasepostrequest.md#description) -- [owner](typedoc_interfaces.icasepostrequest.md#owner) -- [settings](typedoc_interfaces.icasepostrequest.md#settings) -- [tags](typedoc_interfaces.icasepostrequest.md#tags) -- [title](typedoc_interfaces.icasepostrequest.md#title) -- [type](typedoc_interfaces.icasepostrequest.md#type) +- [connector](typedoc_interfaces.ICasePostRequest.md#connector) +- [description](typedoc_interfaces.ICasePostRequest.md#description) +- [owner](typedoc_interfaces.ICasePostRequest.md#owner) +- [settings](typedoc_interfaces.ICasePostRequest.md#settings) +- [tags](typedoc_interfaces.ICasePostRequest.md#tags) +- [title](typedoc_interfaces.ICasePostRequest.md#title) ## Properties ### connector -ā€¢ **connector**: { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: jira } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` ; `type`: none } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: resilient } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: serviceNowITSM } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: serviceNowSIR } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: swimlane } +ā€¢ **connector**: { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = `CaseConnectorRt` -Inherited from: CasePostRequest.connector +#### Inherited from + +CasePostRequest.connector ___ ### description -ā€¢ **description**: *string* +ā€¢ **description**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasePostRequest.description +CasePostRequest.description ___ ### owner -ā€¢ **owner**: *string* +ā€¢ **owner**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasePostRequest.owner +CasePostRequest.owner ___ ### settings -ā€¢ **settings**: *object* +ā€¢ **settings**: `Object` = `SettingsRt` #### Type declaration | Name | Type | | :------ | :------ | -| `syncAlerts` | *boolean* | +| `syncAlerts` | `boolean` | -Inherited from: CasePostRequest.settings +#### Inherited from + +CasePostRequest.settings ___ ### tags -ā€¢ **tags**: *string*[] +ā€¢ **tags**: `string`[] + +#### Inherited from -Inherited from: CasePostRequest.tags +CasePostRequest.tags ___ ### title -ā€¢ **title**: *string* - -Inherited from: CasePostRequest.title - -___ - -### type +ā€¢ **title**: `string` = `rt.string` -ā€¢ **type**: *undefined* \| collection \| individual +#### Inherited from -Inherited from: CasePostRequest.type +CasePostRequest.title diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseresponse.md index dc591a508844b..5a323c8095768 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseresponse.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseresponse.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICaseResponse +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICaseResponse # Interface: ICaseResponse @@ -6,223 +6,234 @@ ## Hierarchy -- *CaseResponse* +- [`CaseResponse`](../modules/typedoc_interfaces._internal_namespace.md#caseresponse) - ā†³ **ICaseResponse** + ā†³ **`ICaseResponse`** ## Table of contents ### Properties -- [closed\_at](typedoc_interfaces.icaseresponse.md#closed_at) -- [closed\_by](typedoc_interfaces.icaseresponse.md#closed_by) -- [comments](typedoc_interfaces.icaseresponse.md#comments) -- [connector](typedoc_interfaces.icaseresponse.md#connector) -- [created\_at](typedoc_interfaces.icaseresponse.md#created_at) -- [created\_by](typedoc_interfaces.icaseresponse.md#created_by) -- [description](typedoc_interfaces.icaseresponse.md#description) -- [external\_service](typedoc_interfaces.icaseresponse.md#external_service) -- [id](typedoc_interfaces.icaseresponse.md#id) -- [owner](typedoc_interfaces.icaseresponse.md#owner) -- [settings](typedoc_interfaces.icaseresponse.md#settings) -- [status](typedoc_interfaces.icaseresponse.md#status) -- [subCaseIds](typedoc_interfaces.icaseresponse.md#subcaseids) -- [subCases](typedoc_interfaces.icaseresponse.md#subcases) -- [tags](typedoc_interfaces.icaseresponse.md#tags) -- [title](typedoc_interfaces.icaseresponse.md#title) -- [totalAlerts](typedoc_interfaces.icaseresponse.md#totalalerts) -- [totalComment](typedoc_interfaces.icaseresponse.md#totalcomment) -- [type](typedoc_interfaces.icaseresponse.md#type) -- [updated\_at](typedoc_interfaces.icaseresponse.md#updated_at) -- [updated\_by](typedoc_interfaces.icaseresponse.md#updated_by) -- [version](typedoc_interfaces.icaseresponse.md#version) +- [closed\_at](typedoc_interfaces.ICaseResponse.md#closed_at) +- [closed\_by](typedoc_interfaces.ICaseResponse.md#closed_by) +- [comments](typedoc_interfaces.ICaseResponse.md#comments) +- [connector](typedoc_interfaces.ICaseResponse.md#connector) +- [created\_at](typedoc_interfaces.ICaseResponse.md#created_at) +- [created\_by](typedoc_interfaces.ICaseResponse.md#created_by) +- [description](typedoc_interfaces.ICaseResponse.md#description) +- [external\_service](typedoc_interfaces.ICaseResponse.md#external_service) +- [id](typedoc_interfaces.ICaseResponse.md#id) +- [owner](typedoc_interfaces.ICaseResponse.md#owner) +- [settings](typedoc_interfaces.ICaseResponse.md#settings) +- [status](typedoc_interfaces.ICaseResponse.md#status) +- [tags](typedoc_interfaces.ICaseResponse.md#tags) +- [title](typedoc_interfaces.ICaseResponse.md#title) +- [totalAlerts](typedoc_interfaces.ICaseResponse.md#totalalerts) +- [totalComment](typedoc_interfaces.ICaseResponse.md#totalcomment) +- [updated\_at](typedoc_interfaces.ICaseResponse.md#updated_at) +- [updated\_by](typedoc_interfaces.ICaseResponse.md#updated_by) +- [version](typedoc_interfaces.ICaseResponse.md#version) ## Properties ### closed\_at -ā€¢ **closed\_at**: ``null`` \| *string* +ā€¢ **closed\_at**: ``null`` \| `string` -Inherited from: CaseResponse.closed\_at +#### Inherited from + +CaseResponse.closed\_at ___ ### closed\_by -ā€¢ **closed\_by**: ``null`` \| { `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* } +ā€¢ **closed\_by**: ``null`` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } + +#### Inherited from -Inherited from: CaseResponse.closed\_by +CaseResponse.closed\_by ___ ### comments -ā€¢ **comments**: *undefined* \| { `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }[] +ā€¢ **comments**: `undefined` \| { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string }[] -Inherited from: CaseResponse.comments +#### Inherited from + +CaseResponse.comments ___ ### connector -ā€¢ **connector**: { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: jira } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` ; `type`: none } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: resilient } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: serviceNowITSM } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: serviceNowSIR } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: swimlane } +ā€¢ **connector**: { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = `CaseConnectorRt` + +#### Inherited from -Inherited from: CaseResponse.connector +CaseResponse.connector ___ ### created\_at -ā€¢ **created\_at**: *string* +ā€¢ **created\_at**: `string` = `rt.string` -Inherited from: CaseResponse.created\_at +#### Inherited from + +CaseResponse.created\_at ___ ### created\_by -ā€¢ **created\_by**: *object* +ā€¢ **created\_by**: `Object` = `UserRT` #### Type declaration | Name | Type | | :------ | :------ | -| `email` | *undefined* \| ``null`` \| *string* | -| `full_name` | *undefined* \| ``null`` \| *string* | -| `username` | *undefined* \| ``null`` \| *string* | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | + +#### Inherited from -Inherited from: CaseResponse.created\_by +CaseResponse.created\_by ___ ### description -ā€¢ **description**: *string* +ā€¢ **description**: `string` = `rt.string` -Inherited from: CaseResponse.description +#### Inherited from + +CaseResponse.description ___ ### external\_service -ā€¢ **external\_service**: ``null`` \| { `connector_id`: *string* ; `connector_name`: *string* ; `external_id`: *string* ; `external_title`: *string* ; `external_url`: *string* } & { `pushed_at`: *string* ; `pushed_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } +ā€¢ **external\_service**: ``null`` \| { `connector_id`: `string` = rt.string } & { `connector_name`: `string` = rt.string; `external_id`: `string` = rt.string; `external_title`: `string` = rt.string; `external_url`: `string` = rt.string; `pushed_at`: `string` = rt.string; `pushed_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT } = `CaseFullExternalServiceRt` + +#### Inherited from -Inherited from: CaseResponse.external\_service +CaseResponse.external\_service ___ ### id -ā€¢ **id**: *string* +ā€¢ **id**: `string` = `rt.string` -Inherited from: CaseResponse.id +#### Inherited from + +CaseResponse.id ___ ### owner -ā€¢ **owner**: *string* +ā€¢ **owner**: `string` = `rt.string` + +#### Inherited from -Inherited from: CaseResponse.owner +CaseResponse.owner ___ ### settings -ā€¢ **settings**: *object* +ā€¢ **settings**: `Object` = `SettingsRt` #### Type declaration | Name | Type | | :------ | :------ | -| `syncAlerts` | *boolean* | - -Inherited from: CaseResponse.settings - -___ - -### status +| `syncAlerts` | `boolean` | -ā€¢ **status**: CaseStatuses +#### Inherited from -Inherited from: CaseResponse.status +CaseResponse.settings ___ -### subCaseIds - -ā€¢ **subCaseIds**: *undefined* \| *string*[] - -Inherited from: CaseResponse.subCaseIds - -___ +### status -### subCases +ā€¢ **status**: `CaseStatuses` = `CaseStatusRt` -ā€¢ **subCases**: *undefined* \| { `status`: CaseStatuses } & { `closed_at`: ``null`` \| *string* ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: *string* ; `created_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `totalAlerts`: *number* ; `totalComment`: *number* ; `version`: *string* } & { `comments`: *undefined* \| { `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }[] }[] +#### Inherited from -Inherited from: CaseResponse.subCases +CaseResponse.status ___ ### tags -ā€¢ **tags**: *string*[] +ā€¢ **tags**: `string`[] + +#### Inherited from -Inherited from: CaseResponse.tags +CaseResponse.tags ___ ### title -ā€¢ **title**: *string* +ā€¢ **title**: `string` = `rt.string` -Inherited from: CaseResponse.title +#### Inherited from + +CaseResponse.title ___ ### totalAlerts -ā€¢ **totalAlerts**: *number* +ā€¢ **totalAlerts**: `number` = `rt.number` + +#### Inherited from -Inherited from: CaseResponse.totalAlerts +CaseResponse.totalAlerts ___ ### totalComment -ā€¢ **totalComment**: *number* +ā€¢ **totalComment**: `number` = `rt.number` -Inherited from: CaseResponse.totalComment +#### Inherited from -___ - -### type - -ā€¢ **type**: CaseType - -Inherited from: CaseResponse.type +CaseResponse.totalComment ___ ### updated\_at -ā€¢ **updated\_at**: ``null`` \| *string* +ā€¢ **updated\_at**: ``null`` \| `string` -Inherited from: CaseResponse.updated\_at +#### Inherited from + +CaseResponse.updated\_at ___ ### updated\_by -ā€¢ **updated\_by**: ``null`` \| { `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* } +ā€¢ **updated\_by**: ``null`` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } + +#### Inherited from -Inherited from: CaseResponse.updated\_by +CaseResponse.updated\_by ___ ### version -ā€¢ **version**: *string* +ā€¢ **version**: `string` = `rt.string` + +#### Inherited from -Inherited from: CaseResponse.version +CaseResponse.version diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurepatch.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurepatch.md index 9ab5341a2dbc6..b645740febc08 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurepatch.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurepatch.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasesConfigurePatch +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasesConfigurePatch # Interface: ICasesConfigurePatch @@ -6,38 +6,44 @@ ## Hierarchy -- *CasesConfigurePatch* +- [`CasesConfigurePatch`](../modules/typedoc_interfaces._internal_namespace.md#casesconfigurepatch) - ā†³ **ICasesConfigurePatch** + ā†³ **`ICasesConfigurePatch`** ## Table of contents ### Properties -- [closure\_type](typedoc_interfaces.icasesconfigurepatch.md#closure_type) -- [connector](typedoc_interfaces.icasesconfigurepatch.md#connector) -- [version](typedoc_interfaces.icasesconfigurepatch.md#version) +- [closure\_type](typedoc_interfaces.ICasesConfigurePatch.md#closure_type) +- [connector](typedoc_interfaces.ICasesConfigurePatch.md#connector) +- [version](typedoc_interfaces.ICasesConfigurePatch.md#version) ## Properties ### closure\_type -ā€¢ **closure\_type**: *undefined* \| ``"close-by-user"`` \| ``"close-by-pushing"`` +ā€¢ **closure\_type**: `undefined` \| ``"close-by-user"`` \| ``"close-by-pushing"`` = `ClosureTypeRT` -Inherited from: CasesConfigurePatch.closure\_type +#### Inherited from + +CasesConfigurePatch.closure\_type ___ ### connector -ā€¢ **connector**: *undefined* \| { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: jira } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` ; `type`: none } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: resilient } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: serviceNowITSM } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: serviceNowSIR } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: swimlane } +ā€¢ **connector**: `undefined` \| { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = `CaseConnectorRt` + +#### Inherited from -Inherited from: CasesConfigurePatch.connector +CasesConfigurePatch.connector ___ ### version -ā€¢ **version**: *string* +ā€¢ **version**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasesConfigurePatch.version +CasesConfigurePatch.version diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurerequest.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurerequest.md index 0b1c11ac548a6..5dc7249d20f57 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurerequest.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigurerequest.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasesConfigureRequest +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasesConfigureRequest # Interface: ICasesConfigureRequest @@ -6,38 +6,44 @@ ## Hierarchy -- *CasesConfigureRequest* +- [`CasesConfigureRequest`](../modules/typedoc_interfaces._internal_namespace.md#casesconfigurerequest) - ā†³ **ICasesConfigureRequest** + ā†³ **`ICasesConfigureRequest`** ## Table of contents ### Properties -- [closure\_type](typedoc_interfaces.icasesconfigurerequest.md#closure_type) -- [connector](typedoc_interfaces.icasesconfigurerequest.md#connector) -- [owner](typedoc_interfaces.icasesconfigurerequest.md#owner) +- [closure\_type](typedoc_interfaces.ICasesConfigureRequest.md#closure_type) +- [connector](typedoc_interfaces.ICasesConfigureRequest.md#connector) +- [owner](typedoc_interfaces.ICasesConfigureRequest.md#owner) ## Properties ### closure\_type -ā€¢ **closure\_type**: ``"close-by-user"`` \| ``"close-by-pushing"`` +ā€¢ **closure\_type**: ``"close-by-user"`` \| ``"close-by-pushing"`` = `ClosureTypeRT` -Inherited from: CasesConfigureRequest.closure\_type +#### Inherited from + +CasesConfigureRequest.closure\_type ___ ### connector -ā€¢ **connector**: { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: jira } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` ; `type`: none } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: resilient } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: serviceNowITSM } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: serviceNowSIR } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: swimlane } +ā€¢ **connector**: { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = `CaseConnectorRt` + +#### Inherited from -Inherited from: CasesConfigureRequest.connector +CasesConfigureRequest.connector ___ ### owner -ā€¢ **owner**: *string* +ā€¢ **owner**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasesConfigureRequest.owner +CasesConfigureRequest.owner diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigureresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigureresponse.md index 42c7378431c1b..20754bcaa22b6 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigureresponse.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesconfigureresponse.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasesConfigureResponse +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasesConfigureResponse # Interface: ICasesConfigureResponse @@ -6,118 +6,140 @@ ## Hierarchy -- *CasesConfigureResponse* +- [`CasesConfigureResponse`](../modules/typedoc_interfaces._internal_namespace.md#casesconfigureresponse) - ā†³ **ICasesConfigureResponse** + ā†³ **`ICasesConfigureResponse`** ## Table of contents ### Properties -- [closure\_type](typedoc_interfaces.icasesconfigureresponse.md#closure_type) -- [connector](typedoc_interfaces.icasesconfigureresponse.md#connector) -- [created\_at](typedoc_interfaces.icasesconfigureresponse.md#created_at) -- [created\_by](typedoc_interfaces.icasesconfigureresponse.md#created_by) -- [error](typedoc_interfaces.icasesconfigureresponse.md#error) -- [id](typedoc_interfaces.icasesconfigureresponse.md#id) -- [mappings](typedoc_interfaces.icasesconfigureresponse.md#mappings) -- [owner](typedoc_interfaces.icasesconfigureresponse.md#owner) -- [updated\_at](typedoc_interfaces.icasesconfigureresponse.md#updated_at) -- [updated\_by](typedoc_interfaces.icasesconfigureresponse.md#updated_by) -- [version](typedoc_interfaces.icasesconfigureresponse.md#version) +- [closure\_type](typedoc_interfaces.ICasesConfigureResponse.md#closure_type) +- [connector](typedoc_interfaces.ICasesConfigureResponse.md#connector) +- [created\_at](typedoc_interfaces.ICasesConfigureResponse.md#created_at) +- [created\_by](typedoc_interfaces.ICasesConfigureResponse.md#created_by) +- [error](typedoc_interfaces.ICasesConfigureResponse.md#error) +- [id](typedoc_interfaces.ICasesConfigureResponse.md#id) +- [mappings](typedoc_interfaces.ICasesConfigureResponse.md#mappings) +- [owner](typedoc_interfaces.ICasesConfigureResponse.md#owner) +- [updated\_at](typedoc_interfaces.ICasesConfigureResponse.md#updated_at) +- [updated\_by](typedoc_interfaces.ICasesConfigureResponse.md#updated_by) +- [version](typedoc_interfaces.ICasesConfigureResponse.md#version) ## Properties ### closure\_type -ā€¢ **closure\_type**: ``"close-by-user"`` \| ``"close-by-pushing"`` +ā€¢ **closure\_type**: ``"close-by-user"`` \| ``"close-by-pushing"`` = `ClosureTypeRT` -Inherited from: CasesConfigureResponse.closure\_type +#### Inherited from + +CasesConfigureResponse.closure\_type ___ ### connector -ā€¢ **connector**: { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: jira } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` ; `type`: none } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: resilient } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: serviceNowITSM } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: serviceNowSIR } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: swimlane } +ā€¢ **connector**: { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = `CaseConnectorRt` + +#### Inherited from -Inherited from: CasesConfigureResponse.connector +CasesConfigureResponse.connector ___ ### created\_at -ā€¢ **created\_at**: *string* +ā€¢ **created\_at**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasesConfigureResponse.created\_at +CasesConfigureResponse.created\_at ___ ### created\_by -ā€¢ **created\_by**: *object* +ā€¢ **created\_by**: `Object` = `UserRT` #### Type declaration | Name | Type | | :------ | :------ | -| `email` | *undefined* \| ``null`` \| *string* | -| `full_name` | *undefined* \| ``null`` \| *string* | -| `username` | *undefined* \| ``null`` \| *string* | +| `email` | `undefined` \| ``null`` \| `string` | +| `full_name` | `undefined` \| ``null`` \| `string` | +| `username` | `undefined` \| ``null`` \| `string` | -Inherited from: CasesConfigureResponse.created\_by +#### Inherited from + +CasesConfigureResponse.created\_by ___ ### error -ā€¢ **error**: ``null`` \| *string* +ā€¢ **error**: ``null`` \| `string` + +#### Inherited from -Inherited from: CasesConfigureResponse.error +CasesConfigureResponse.error ___ ### id -ā€¢ **id**: *string* +ā€¢ **id**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasesConfigureResponse.id +CasesConfigureResponse.id ___ ### mappings -ā€¢ **mappings**: { `action_type`: ``"append"`` \| ``"nothing"`` \| ``"overwrite"`` ; `source`: ``"description"`` \| ``"title"`` \| ``"comments"`` ; `target`: *string* }[] +ā€¢ **mappings**: { `action_type`: ``"append"`` \| ``"nothing"`` \| ``"overwrite"`` = ActionTypeRT; `source`: ``"description"`` \| ``"title"`` \| ``"comments"`` = CaseFieldRT; `target`: `string` = ThirdPartyFieldRT }[] -Inherited from: CasesConfigureResponse.mappings +#### Inherited from + +CasesConfigureResponse.mappings ___ ### owner -ā€¢ **owner**: *string* +ā€¢ **owner**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasesConfigureResponse.owner +CasesConfigureResponse.owner ___ ### updated\_at -ā€¢ **updated\_at**: ``null`` \| *string* +ā€¢ **updated\_at**: ``null`` \| `string` + +#### Inherited from -Inherited from: CasesConfigureResponse.updated\_at +CasesConfigureResponse.updated\_at ___ ### updated\_by -ā€¢ **updated\_by**: ``null`` \| { `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* } +ā€¢ **updated\_by**: ``null`` \| { `email`: `undefined` \| ``null`` \| `string` ; `full_name`: `undefined` \| ``null`` \| `string` ; `username`: `undefined` \| ``null`` \| `string` } -Inherited from: CasesConfigureResponse.updated\_by +#### Inherited from + +CasesConfigureResponse.updated\_by ___ ### version -ā€¢ **version**: *string* +ā€¢ **version**: `string` = `rt.string` + +#### Inherited from -Inherited from: CasesConfigureResponse.version +CasesConfigureResponse.version diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindrequest.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindrequest.md index cb8ec7797677f..b9cc22c6eee44 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindrequest.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindrequest.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasesFindRequest +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasesFindRequest # Interface: ICasesFindRequest @@ -6,128 +6,143 @@ ## Hierarchy -- *CasesFindRequest* +- [`CasesFindRequest`](../modules/client._internal_namespace.md#casesfindrequest) - ā†³ **ICasesFindRequest** + ā†³ **`ICasesFindRequest`** ## Table of contents ### Properties -- [defaultSearchOperator](typedoc_interfaces.icasesfindrequest.md#defaultsearchoperator) -- [fields](typedoc_interfaces.icasesfindrequest.md#fields) -- [owner](typedoc_interfaces.icasesfindrequest.md#owner) -- [page](typedoc_interfaces.icasesfindrequest.md#page) -- [perPage](typedoc_interfaces.icasesfindrequest.md#perpage) -- [reporters](typedoc_interfaces.icasesfindrequest.md#reporters) -- [search](typedoc_interfaces.icasesfindrequest.md#search) -- [searchFields](typedoc_interfaces.icasesfindrequest.md#searchfields) -- [sortField](typedoc_interfaces.icasesfindrequest.md#sortfield) -- [sortOrder](typedoc_interfaces.icasesfindrequest.md#sortorder) -- [status](typedoc_interfaces.icasesfindrequest.md#status) -- [tags](typedoc_interfaces.icasesfindrequest.md#tags) -- [type](typedoc_interfaces.icasesfindrequest.md#type) +- [defaultSearchOperator](typedoc_interfaces.ICasesFindRequest.md#defaultsearchoperator) +- [fields](typedoc_interfaces.ICasesFindRequest.md#fields) +- [owner](typedoc_interfaces.ICasesFindRequest.md#owner) +- [page](typedoc_interfaces.ICasesFindRequest.md#page) +- [perPage](typedoc_interfaces.ICasesFindRequest.md#perpage) +- [reporters](typedoc_interfaces.ICasesFindRequest.md#reporters) +- [search](typedoc_interfaces.ICasesFindRequest.md#search) +- [searchFields](typedoc_interfaces.ICasesFindRequest.md#searchfields) +- [sortField](typedoc_interfaces.ICasesFindRequest.md#sortfield) +- [sortOrder](typedoc_interfaces.ICasesFindRequest.md#sortorder) +- [status](typedoc_interfaces.ICasesFindRequest.md#status) +- [tags](typedoc_interfaces.ICasesFindRequest.md#tags) ## Properties ### defaultSearchOperator -ā€¢ **defaultSearchOperator**: *undefined* \| ``"AND"`` \| ``"OR"`` +ā€¢ **defaultSearchOperator**: `undefined` \| ``"AND"`` \| ``"OR"`` -Inherited from: CasesFindRequest.defaultSearchOperator +#### Inherited from + +CasesFindRequest.defaultSearchOperator ___ ### fields -ā€¢ **fields**: *undefined* \| *string*[] +ā€¢ **fields**: `undefined` \| `string`[] + +#### Inherited from -Inherited from: CasesFindRequest.fields +CasesFindRequest.fields ___ ### owner -ā€¢ **owner**: *undefined* \| *string* \| *string*[] +ā€¢ **owner**: `undefined` \| `string` \| `string`[] -Inherited from: CasesFindRequest.owner +#### Inherited from + +CasesFindRequest.owner ___ ### page -ā€¢ **page**: *undefined* \| *number* +ā€¢ **page**: `undefined` \| `number` = `NumberFromString` + +#### Inherited from -Inherited from: CasesFindRequest.page +CasesFindRequest.page ___ ### perPage -ā€¢ **perPage**: *undefined* \| *number* +ā€¢ **perPage**: `undefined` \| `number` = `NumberFromString` -Inherited from: CasesFindRequest.perPage +#### Inherited from + +CasesFindRequest.perPage ___ ### reporters -ā€¢ **reporters**: *undefined* \| *string* \| *string*[] +ā€¢ **reporters**: `undefined` \| `string` \| `string`[] + +#### Inherited from -Inherited from: CasesFindRequest.reporters +CasesFindRequest.reporters ___ ### search -ā€¢ **search**: *undefined* \| *string* +ā€¢ **search**: `undefined` \| `string` = `rt.string` -Inherited from: CasesFindRequest.search +#### Inherited from + +CasesFindRequest.search ___ ### searchFields -ā€¢ **searchFields**: *undefined* \| *string* \| *string*[] +ā€¢ **searchFields**: `undefined` \| `string` \| `string`[] + +#### Inherited from -Inherited from: CasesFindRequest.searchFields +CasesFindRequest.searchFields ___ ### sortField -ā€¢ **sortField**: *undefined* \| *string* +ā€¢ **sortField**: `undefined` \| `string` = `rt.string` -Inherited from: CasesFindRequest.sortField +#### Inherited from + +CasesFindRequest.sortField ___ ### sortOrder -ā€¢ **sortOrder**: *undefined* \| ``"desc"`` \| ``"asc"`` +ā€¢ **sortOrder**: `undefined` \| ``"desc"`` \| ``"asc"`` + +#### Inherited from -Inherited from: CasesFindRequest.sortOrder +CasesFindRequest.sortOrder ___ ### status -ā€¢ **status**: *undefined* \| open \| *any*[*any*] \| closed +ā€¢ **status**: `undefined` \| [`open`](../enums/client._internal_namespace.CaseStatuses.md#open) \| `any`[`any`] \| [`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed) = `CaseStatusRt` -Inherited from: CasesFindRequest.status +#### Inherited from + +CasesFindRequest.status ___ ### tags -ā€¢ **tags**: *undefined* \| *string* \| *string*[] - -Inherited from: CasesFindRequest.tags - -___ - -### type +ā€¢ **tags**: `undefined` \| `string` \| `string`[] -ā€¢ **type**: *undefined* \| collection \| individual +#### Inherited from -Inherited from: CasesFindRequest.type +CasesFindRequest.tags diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindresponse.md index 06e14d219cde0..16b88c29d4d8e 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindresponse.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesfindresponse.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasesFindResponse +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasesFindResponse # Interface: ICasesFindResponse @@ -6,74 +6,88 @@ ## Hierarchy -- *CasesFindResponse* +- [`CasesFindResponse`](../modules/typedoc_interfaces._internal_namespace.md#casesfindresponse) - ā†³ **ICasesFindResponse** + ā†³ **`ICasesFindResponse`** ## Table of contents ### Properties -- [cases](typedoc_interfaces.icasesfindresponse.md#cases) -- [count\_closed\_cases](typedoc_interfaces.icasesfindresponse.md#count_closed_cases) -- [count\_in\_progress\_cases](typedoc_interfaces.icasesfindresponse.md#count_in_progress_cases) -- [count\_open\_cases](typedoc_interfaces.icasesfindresponse.md#count_open_cases) -- [page](typedoc_interfaces.icasesfindresponse.md#page) -- [per\_page](typedoc_interfaces.icasesfindresponse.md#per_page) -- [total](typedoc_interfaces.icasesfindresponse.md#total) +- [cases](typedoc_interfaces.ICasesFindResponse.md#cases) +- [count\_closed\_cases](typedoc_interfaces.ICasesFindResponse.md#count_closed_cases) +- [count\_in\_progress\_cases](typedoc_interfaces.ICasesFindResponse.md#count_in_progress_cases) +- [count\_open\_cases](typedoc_interfaces.ICasesFindResponse.md#count_open_cases) +- [page](typedoc_interfaces.ICasesFindResponse.md#page) +- [per\_page](typedoc_interfaces.ICasesFindResponse.md#per_page) +- [total](typedoc_interfaces.ICasesFindResponse.md#total) ## Properties ### cases -ā€¢ **cases**: { `connector`: { id: string; name: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { id: string; name: string; } & { type: ConnectorTypes.none; fields: null; } & { id: string; name: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { id: string; name: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { id: string; name: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { id: string; name: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } ; `description`: *string* ; `owner`: *string* ; `settings`: { syncAlerts: boolean; } ; `status`: CaseStatuses ; `tags`: *string*[] ; `title`: *string* ; `type`: CaseType } & { `closed_at`: ``null`` \| *string* ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `external_service`: ``null`` \| { connector\_id: string; connector\_name: string; external\_id: string; external\_title: string; external\_url: string; } & { pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; }; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `totalAlerts`: *number* ; `totalComment`: *number* ; `version`: *string* } & { `comments`: *undefined* \| { `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }[] ; `subCaseIds`: *undefined* \| *string*[] ; `subCases`: *undefined* \| { `status`: CaseStatuses } & { `closed_at`: ``null`` \| *string* ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: *string* ; `created_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `totalAlerts`: *number* ; `totalComment`: *number* ; `version`: *string* } & { comments?: ((({ comment: string; type: CommentType.user; owner: string; } & { associationType: AssociationType; created\_at: string; created\_by: { email: string \| null \| undefined; full\_name: string \| ... 1 more ... \| undefined; username: string \| ... 1 more ... \| undefined; }; ... 4 more ...; updated\_by: { ...; } ...[] }[] +ā€¢ **cases**: { `connector`: { id: string; } & { type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.none; fields: null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.resilient; fields: { incidentTypes: string[] \| null; severityCode: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowITSM; fields: { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.serviceNowSIR; fields: { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } \| null; } & { name: string; } & { id: string; } & { type: ConnectorTypes.swimlane; fields: { caseId: string \| null; } \| null; } & { name: string; } = CaseConnectorRt; `description`: `string` = rt.string; `owner`: `string` = rt.string; `settings`: { syncAlerts: boolean; } = SettingsRt; `status`: `CaseStatuses` = CaseStatusRt; `tags`: `string`[] ; `title`: `string` = rt.string } & { `closed_at`: ``null`` \| `string` ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `external_service`: ``null`` \| { connector\_id: string; } & { connector\_name: string; external\_id: string; external\_title: string; external\_url: string; pushed\_at: string; pushed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| ... 1 more ... \| undefined; }; } = CaseFullExternalServiceRt; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `totalAlerts`: `number` = rt.number; `totalComment`: `number` = rt.number; `version`: `string` = rt.string } & { `comments`: `undefined` \| { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string }[] }[] -Inherited from: CasesFindResponse.cases +#### Inherited from + +CasesFindResponse.cases ___ ### count\_closed\_cases -ā€¢ **count\_closed\_cases**: *number* +ā€¢ **count\_closed\_cases**: `number` = `rt.number` + +#### Inherited from -Inherited from: CasesFindResponse.count\_closed\_cases +CasesFindResponse.count\_closed\_cases ___ ### count\_in\_progress\_cases -ā€¢ **count\_in\_progress\_cases**: *number* +ā€¢ **count\_in\_progress\_cases**: `number` = `rt.number` -Inherited from: CasesFindResponse.count\_in\_progress\_cases +#### Inherited from + +CasesFindResponse.count\_in\_progress\_cases ___ ### count\_open\_cases -ā€¢ **count\_open\_cases**: *number* +ā€¢ **count\_open\_cases**: `number` = `rt.number` + +#### Inherited from -Inherited from: CasesFindResponse.count\_open\_cases +CasesFindResponse.count\_open\_cases ___ ### page -ā€¢ **page**: *number* +ā€¢ **page**: `number` = `rt.number` -Inherited from: CasesFindResponse.page +#### Inherited from + +CasesFindResponse.page ___ ### per\_page -ā€¢ **per\_page**: *number* +ā€¢ **per\_page**: `number` = `rt.number` + +#### Inherited from -Inherited from: CasesFindResponse.per\_page +CasesFindResponse.per\_page ___ ### total -ā€¢ **total**: *number* +ā€¢ **total**: `number` = `rt.number` + +#### Inherited from -Inherited from: CasesFindResponse.total +CasesFindResponse.total diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasespatchrequest.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasespatchrequest.md index d4747a1836cc4..5cf299204ef13 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasespatchrequest.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasespatchrequest.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasesPatchRequest +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasesPatchRequest # Interface: ICasesPatchRequest @@ -6,20 +6,22 @@ ## Hierarchy -- *CasesPatchRequest* +- [`CasesPatchRequest`](../modules/typedoc_interfaces._internal_namespace.md#casespatchrequest) - ā†³ **ICasesPatchRequest** + ā†³ **`ICasesPatchRequest`** ## Table of contents ### Properties -- [cases](typedoc_interfaces.icasespatchrequest.md#cases) +- [cases](typedoc_interfaces.ICasesPatchRequest.md#cases) ## Properties ### cases -ā€¢ **cases**: { `connector`: *undefined* \| { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: jira } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` ; `type`: none } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: resilient } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: serviceNowITSM } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: serviceNowSIR } & { `id`: *string* ; `name`: *string* } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: swimlane } ; `description`: *undefined* \| *string* ; `owner`: *undefined* \| *string* ; `settings`: *undefined* \| { `syncAlerts`: *boolean* } ; `status`: *undefined* \| open \| *any*[*any*] \| closed ; `tags`: *undefined* \| *string*[] ; `title`: *undefined* \| *string* ; `type`: *undefined* \| collection \| individual } & { `id`: *string* ; `version`: *string* }[] +ā€¢ **cases**: { `connector`: `undefined` \| { `id`: `string` = rt.string } & { `fields`: ``null`` \| { issueType: string \| null; priority: string \| null; parent: string \| null; } ; `type`: [`jira`](../modules/client._internal_namespace.md#jira) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` = rt.null; `type`: [`none`](../modules/client._internal_namespace.md#none) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { incidentTypes: string[] \| null; severityCode: string \| null; } ; `type`: [`resilient`](../modules/client._internal_namespace.md#resilient) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { impact: string \| null; severity: string \| null; urgency: string \| null; category: string \| null; subcategory: string \| null; } ; `type`: [`serviceNowITSM`](../modules/client._internal_namespace.md#servicenowitsm) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { category: string \| null; destIp: boolean \| null; malwareHash: boolean \| null; malwareUrl: boolean \| null; priority: string \| null; sourceIp: boolean \| null; subcategory: string \| null; } ; `type`: [`serviceNowSIR`](../modules/client._internal_namespace.md#servicenowsir) } & { `name`: `string` = rt.string } & { `id`: `string` = rt.string } & { `fields`: ``null`` \| { caseId: string \| null; } ; `type`: [`swimlane`](../modules/client._internal_namespace.md#swimlane) } & { `name`: `string` = rt.string } = CaseConnectorRt; `description`: `undefined` \| `string` = rt.string; `owner`: `undefined` \| `string` = rt.string; `settings`: `undefined` \| { `syncAlerts`: `boolean` = rt.boolean } = SettingsRt; `status`: `undefined` \| [`open`](../enums/client._internal_namespace.CaseStatuses.md#open) \| `any`[`any`] \| [`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed) = CaseStatusRt; `tags`: `undefined` \| `string`[] ; `title`: `undefined` \| `string` = rt.string } & { `id`: `string` = rt.string; `version`: `string` = rt.string }[] -Inherited from: CasesPatchRequest.cases +#### Inherited from + +CasesPatchRequest.cases diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesresponse.md index 2c9eed242d1fb..250ac66e4a680 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesresponse.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icasesresponse.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICasesResponse +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICasesResponse # Interface: ICasesResponse @@ -6,6 +6,6 @@ ## Hierarchy -- *CasesResponse* +- [`CasesResponse`](../modules/typedoc_interfaces._internal_namespace.md#casesresponse) - ā†³ **ICasesResponse** + ā†³ **`ICasesResponse`** diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseuseractionsresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseuseractionsresponse.md index 0347711e331dc..d3b936903e42c 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseuseractionsresponse.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icaseuseractionsresponse.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICaseUserActionsResponse +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICaseUserActionsResponse # Interface: ICaseUserActionsResponse @@ -6,6 +6,6 @@ ## Hierarchy -- *CaseUserActionsResponse* +- [`CaseUserActionsResponse`](../modules/typedoc_interfaces._internal_namespace.md#caseuseractionsresponse) - ā†³ **ICaseUserActionsResponse** + ā†³ **`ICaseUserActionsResponse`** diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icommentsresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icommentsresponse.md index 4a720e2c6d9be..012b28393f5b9 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icommentsresponse.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.icommentsresponse.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ICommentsResponse +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](../modules/typedoc_interfaces.md) / ICommentsResponse # Interface: ICommentsResponse @@ -6,47 +6,55 @@ ## Hierarchy -- *CommentsResponse* +- [`CommentsResponse`](../modules/typedoc_interfaces._internal_namespace.md#commentsresponse) - ā†³ **ICommentsResponse** + ā†³ **`ICommentsResponse`** ## Table of contents ### Properties -- [comments](typedoc_interfaces.icommentsresponse.md#comments) -- [page](typedoc_interfaces.icommentsresponse.md#page) -- [per\_page](typedoc_interfaces.icommentsresponse.md#per_page) -- [total](typedoc_interfaces.icommentsresponse.md#total) +- [comments](typedoc_interfaces.ICommentsResponse.md#comments) +- [page](typedoc_interfaces.ICommentsResponse.md#page) +- [per\_page](typedoc_interfaces.ICommentsResponse.md#per_page) +- [total](typedoc_interfaces.ICommentsResponse.md#total) ## Properties ### comments -ā€¢ **comments**: { `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }[] +ā€¢ **comments**: { `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`user`](../modules/client._internal_namespace.md#user) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `alertId`: `string` \| `string`[] ; `index`: `string` \| `string`[] ; `owner`: `string` = rt.string; `rule`: { id: string \| null; name: string \| null; } ; `type`: [`alert`](../modules/client._internal_namespace.md#alert) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: `string` = rt.string; `owner`: `string` = rt.string; `type`: [`actions`](../modules/client._internal_namespace.md#actions) } & { `created_at`: `string` = rt.string; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } = UserRT; `owner`: `string` = rt.string; `pushed_at`: ``null`` \| `string` ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| `string` ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: `string` = rt.string; `version`: `string` = rt.string }[] -Inherited from: CommentsResponse.comments +#### Inherited from + +CommentsResponse.comments ___ ### page -ā€¢ **page**: *number* +ā€¢ **page**: `number` = `rt.number` + +#### Inherited from -Inherited from: CommentsResponse.page +CommentsResponse.page ___ ### per\_page -ā€¢ **per\_page**: *number* +ā€¢ **per\_page**: `number` = `rt.number` -Inherited from: CommentsResponse.per\_page +#### Inherited from + +CommentsResponse.per\_page ___ ### total -ā€¢ **total**: *number* +ā€¢ **total**: `number` = `rt.number` + +#### Inherited from -Inherited from: CommentsResponse.total +CommentsResponse.total diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcaseresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcaseresponse.md deleted file mode 100644 index a6bf610f86349..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcaseresponse.md +++ /dev/null @@ -1,133 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ISubCaseResponse - -# Interface: ISubCaseResponse - -[typedoc_interfaces](../modules/typedoc_interfaces.md).ISubCaseResponse - -## Hierarchy - -- *SubCaseResponse* - - ā†³ **ISubCaseResponse** - -## Table of contents - -### Properties - -- [closed\_at](typedoc_interfaces.isubcaseresponse.md#closed_at) -- [closed\_by](typedoc_interfaces.isubcaseresponse.md#closed_by) -- [comments](typedoc_interfaces.isubcaseresponse.md#comments) -- [created\_at](typedoc_interfaces.isubcaseresponse.md#created_at) -- [created\_by](typedoc_interfaces.isubcaseresponse.md#created_by) -- [id](typedoc_interfaces.isubcaseresponse.md#id) -- [owner](typedoc_interfaces.isubcaseresponse.md#owner) -- [status](typedoc_interfaces.isubcaseresponse.md#status) -- [totalAlerts](typedoc_interfaces.isubcaseresponse.md#totalalerts) -- [totalComment](typedoc_interfaces.isubcaseresponse.md#totalcomment) -- [updated\_at](typedoc_interfaces.isubcaseresponse.md#updated_at) -- [updated\_by](typedoc_interfaces.isubcaseresponse.md#updated_by) -- [version](typedoc_interfaces.isubcaseresponse.md#version) - -## Properties - -### closed\_at - -ā€¢ **closed\_at**: ``null`` \| *string* - -Inherited from: SubCaseResponse.closed\_at - -___ - -### closed\_by - -ā€¢ **closed\_by**: ``null`` \| { `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* } - -Inherited from: SubCaseResponse.closed\_by - -___ - -### comments - -ā€¢ **comments**: *undefined* \| { `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }[] - -Inherited from: SubCaseResponse.comments - -___ - -### created\_at - -ā€¢ **created\_at**: *string* - -Inherited from: SubCaseResponse.created\_at - -___ - -### created\_by - -ā€¢ **created\_by**: ``null`` \| { `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* } - -Inherited from: SubCaseResponse.created\_by - -___ - -### id - -ā€¢ **id**: *string* - -Inherited from: SubCaseResponse.id - -___ - -### owner - -ā€¢ **owner**: *string* - -Inherited from: SubCaseResponse.owner - -___ - -### status - -ā€¢ **status**: CaseStatuses - -Inherited from: SubCaseResponse.status - -___ - -### totalAlerts - -ā€¢ **totalAlerts**: *number* - -Inherited from: SubCaseResponse.totalAlerts - -___ - -### totalComment - -ā€¢ **totalComment**: *number* - -Inherited from: SubCaseResponse.totalComment - -___ - -### updated\_at - -ā€¢ **updated\_at**: ``null`` \| *string* - -Inherited from: SubCaseResponse.updated\_at - -___ - -### updated\_by - -ā€¢ **updated\_by**: ``null`` \| { `email`: *undefined* \| ``null`` \| *string* ; `full_name`: *undefined* \| ``null`` \| *string* ; `username`: *undefined* \| ``null`` \| *string* } - -Inherited from: SubCaseResponse.updated\_by - -___ - -### version - -ā€¢ **version**: *string* - -Inherited from: SubCaseResponse.version diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcasesfindresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcasesfindresponse.md deleted file mode 100644 index 61fb60a54db00..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcasesfindresponse.md +++ /dev/null @@ -1,79 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ISubCasesFindResponse - -# Interface: ISubCasesFindResponse - -[typedoc_interfaces](../modules/typedoc_interfaces.md).ISubCasesFindResponse - -## Hierarchy - -- *SubCasesFindResponse* - - ā†³ **ISubCasesFindResponse** - -## Table of contents - -### Properties - -- [count\_closed\_cases](typedoc_interfaces.isubcasesfindresponse.md#count_closed_cases) -- [count\_in\_progress\_cases](typedoc_interfaces.isubcasesfindresponse.md#count_in_progress_cases) -- [count\_open\_cases](typedoc_interfaces.isubcasesfindresponse.md#count_open_cases) -- [page](typedoc_interfaces.isubcasesfindresponse.md#page) -- [per\_page](typedoc_interfaces.isubcasesfindresponse.md#per_page) -- [subCases](typedoc_interfaces.isubcasesfindresponse.md#subcases) -- [total](typedoc_interfaces.isubcasesfindresponse.md#total) - -## Properties - -### count\_closed\_cases - -ā€¢ **count\_closed\_cases**: *number* - -Inherited from: SubCasesFindResponse.count\_closed\_cases - -___ - -### count\_in\_progress\_cases - -ā€¢ **count\_in\_progress\_cases**: *number* - -Inherited from: SubCasesFindResponse.count\_in\_progress\_cases - -___ - -### count\_open\_cases - -ā€¢ **count\_open\_cases**: *number* - -Inherited from: SubCasesFindResponse.count\_open\_cases - -___ - -### page - -ā€¢ **page**: *number* - -Inherited from: SubCasesFindResponse.page - -___ - -### per\_page - -ā€¢ **per\_page**: *number* - -Inherited from: SubCasesFindResponse.per\_page - -___ - -### subCases - -ā€¢ **subCases**: { `status`: CaseStatuses } & { `closed_at`: ``null`` \| *string* ; `closed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `created_at`: *string* ; `created_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `totalAlerts`: *number* ; `totalComment`: *number* ; `version`: *string* } & { `comments`: *undefined* \| { `comment`: *string* ; `owner`: *string* ; `type`: user } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `alertId`: *string* \| *string*[] ; `index`: *string* \| *string*[] ; `owner`: *string* ; `rule`: { id: string \| null; name: string \| null; } ; `type`: alert \| generatedAlert } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* } & { `actions`: { targets: { hostname: string; endpointId: string; }[]; type: string; } ; `comment`: *string* ; `owner`: *string* ; `type`: actions } & { `associationType`: AssociationType ; `created_at`: *string* ; `created_by`: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `owner`: *string* ; `pushed_at`: ``null`` \| *string* ; `pushed_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } ; `updated_at`: ``null`` \| *string* ; `updated_by`: ``null`` \| { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } } & { `id`: *string* ; `version`: *string* }[] }[] - -Inherited from: SubCasesFindResponse.subCases - -___ - -### total - -ā€¢ **total**: *number* - -Inherited from: SubCasesFindResponse.total diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcasesresponse.md b/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcasesresponse.md deleted file mode 100644 index 6ee45e59b53b5..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/typedoc_interfaces.isubcasesresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / [typedoc_interfaces](../modules/typedoc_interfaces.md) / ISubCasesResponse - -# Interface: ISubCasesResponse - -[typedoc_interfaces](../modules/typedoc_interfaces.md).ISubCasesResponse - -## Hierarchy - -- *SubCasesResponse* - - ā†³ **ISubCasesResponse** diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionget.md b/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionget.md index 1cbebef379dbd..8650aed9753f1 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionget.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionget.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [user_actions/client](../modules/user_actions_client.md) / UserActionGet +[Cases Client API Interface](../README.md) / [user\_actions/client](../modules/user_actions_client.md) / UserActionGet # Interface: UserActionGet @@ -10,25 +10,16 @@ Parameters for retrieving user actions for a particular case ### Properties -- [caseId](user_actions_client.useractionget.md#caseid) -- [subCaseId](user_actions_client.useractionget.md#subcaseid) +- [caseId](user_actions_client.UserActionGet.md#caseid) ## Properties ### caseId -ā€¢ **caseId**: *string* +ā€¢ **caseId**: `string` The ID of the case -Defined in: [user_actions/client.ts:19](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/user_actions/client.ts#L19) +#### Defined in -___ - -### subCaseId - -ā€¢ `Optional` **subCaseId**: *string* - -If specified then a sub case will be used for finding all the user actions - -Defined in: [user_actions/client.ts:23](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/user_actions/client.ts#L23) +[x-pack/plugins/cases/server/client/user_actions/client.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/user_actions/client.ts#L19) diff --git a/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionssubclient.md b/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionssubclient.md index 065f20b4cefcb..0cf541f5cc445 100644 --- a/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionssubclient.md +++ b/x-pack/plugins/cases/docs/cases_client/interfaces/user_actions_client.useractionssubclient.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / [user_actions/client](../modules/user_actions_client.md) / UserActionsSubClient +[Cases Client API Interface](../README.md) / [user\_actions/client](../modules/user_actions_client.md) / UserActionsSubClient # Interface: UserActionsSubClient @@ -10,13 +10,13 @@ API for interacting the actions performed by a user when interacting with the ca ### Methods -- [getAll](user_actions_client.useractionssubclient.md#getall) +- [getAll](user_actions_client.UserActionsSubClient.md#getall) ## Methods ### getAll -ā–ø **getAll**(`clientArgs`: [*UserActionGet*](user_actions_client.useractionget.md)): *Promise*<[*ICaseUserActionsResponse*](typedoc_interfaces.icaseuseractionsresponse.md)\> +ā–ø **getAll**(`clientArgs`): `Promise`<[`ICaseUserActionsResponse`](typedoc_interfaces.ICaseUserActionsResponse.md)\> Retrieves all user actions for a particular case. @@ -24,8 +24,12 @@ Retrieves all user actions for a particular case. | Name | Type | | :------ | :------ | -| `clientArgs` | [*UserActionGet*](user_actions_client.useractionget.md) | +| `clientArgs` | [`UserActionGet`](user_actions_client.UserActionGet.md) | -**Returns:** *Promise*<[*ICaseUserActionsResponse*](typedoc_interfaces.icaseuseractionsresponse.md)\> +#### Returns -Defined in: [user_actions/client.ts:33](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/user_actions/client.ts#L33) +`Promise`<[`ICaseUserActionsResponse`](typedoc_interfaces.ICaseUserActionsResponse.md)\> + +#### Defined in + +[x-pack/plugins/cases/server/client/user_actions/client.ts:29](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/user_actions/client.ts#L29) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/attachments_add.md b/x-pack/plugins/cases/docs/cases_client/modules/attachments_add.md deleted file mode 100644 index d9ac6e6ce431b..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/modules/attachments_add.md +++ /dev/null @@ -1,9 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / attachments/add - -# Module: attachments/add - -## Table of contents - -### Interfaces - -- [AddArgs](../interfaces/attachments_add.addargs.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/attachments_client._internal_namespace.md b/x-pack/plugins/cases/docs/cases_client/modules/attachments_client._internal_namespace.md new file mode 100644 index 0000000000000..953648379c08f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/modules/attachments_client._internal_namespace.md @@ -0,0 +1,18 @@ +[Cases Client API Interface](../README.md) / [attachments/client](attachments_client.md) / \_internal\_namespace + +# Namespace: \_internal\_namespace + +[attachments/client](attachments_client.md)._internal_namespace + +## Table of contents + +### Interfaces + +- [AddArgs](../interfaces/attachments_client._internal_namespace.AddArgs.md) +- [DeleteAllArgs](../interfaces/attachments_client._internal_namespace.DeleteAllArgs.md) +- [DeleteArgs](../interfaces/attachments_client._internal_namespace.DeleteArgs.md) +- [FindArgs](../interfaces/attachments_client._internal_namespace.FindArgs.md) +- [GetAllAlertsAttachToCase](../interfaces/attachments_client._internal_namespace.GetAllAlertsAttachToCase.md) +- [GetAllArgs](../interfaces/attachments_client._internal_namespace.GetAllArgs.md) +- [GetArgs](../interfaces/attachments_client._internal_namespace.GetArgs.md) +- [UpdateArgs](../interfaces/attachments_client._internal_namespace.UpdateArgs.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/attachments_client.md b/x-pack/plugins/cases/docs/cases_client/modules/attachments_client.md index 47d96b98356e7..2463e2c654e93 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/attachments_client.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/attachments_client.md @@ -1,9 +1,13 @@ -[Cases Client API Interface](../cases_client_api.md) / attachments/client +[Cases Client API Interface](../README.md) / attachments/client # Module: attachments/client ## Table of contents +### Namespaces + +- [\_internal\_namespace](attachments_client._internal_namespace.md) + ### Interfaces -- [AttachmentsSubClient](../interfaces/attachments_client.attachmentssubclient.md) +- [AttachmentsSubClient](../interfaces/attachments_client.AttachmentsSubClient.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/attachments_delete.md b/x-pack/plugins/cases/docs/cases_client/modules/attachments_delete.md deleted file mode 100644 index 0e2cf420b6375..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/modules/attachments_delete.md +++ /dev/null @@ -1,10 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / attachments/delete - -# Module: attachments/delete - -## Table of contents - -### Interfaces - -- [DeleteAllArgs](../interfaces/attachments_delete.deleteallargs.md) -- [DeleteArgs](../interfaces/attachments_delete.deleteargs.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/attachments_get.md b/x-pack/plugins/cases/docs/cases_client/modules/attachments_get.md deleted file mode 100644 index 6460511da79a1..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/modules/attachments_get.md +++ /dev/null @@ -1,12 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / attachments/get - -# Module: attachments/get - -## Table of contents - -### Interfaces - -- [FindArgs](../interfaces/attachments_get.findargs.md) -- [GetAllAlertsAttachToCase](../interfaces/attachments_get.getallalertsattachtocase.md) -- [GetAllArgs](../interfaces/attachments_get.getallargs.md) -- [GetArgs](../interfaces/attachments_get.getargs.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/attachments_update.md b/x-pack/plugins/cases/docs/cases_client/modules/attachments_update.md deleted file mode 100644 index 011fe531ede34..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/modules/attachments_update.md +++ /dev/null @@ -1,9 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / attachments/update - -# Module: attachments/update - -## Table of contents - -### Interfaces - -- [UpdateArgs](../interfaces/attachments_update.updateargs.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/cases_client.md b/x-pack/plugins/cases/docs/cases_client/modules/cases_client.md index c6e9cf17d9840..daf591f75c1f8 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/cases_client.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/cases_client.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / cases/client +[Cases Client API Interface](../README.md) / cases/client # Module: cases/client @@ -6,4 +6,4 @@ ### Interfaces -- [CasesSubClient](../interfaces/cases_client.casessubclient.md) +- [CasesSubClient](../interfaces/cases_client.CasesSubClient.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/cases_get._internal_namespace.md b/x-pack/plugins/cases/docs/cases_client/modules/cases_get._internal_namespace.md new file mode 100644 index 0000000000000..a43b25f69372f --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/modules/cases_get._internal_namespace.md @@ -0,0 +1,35 @@ +[Cases Client API Interface](../README.md) / [cases/get](cases_get.md) / \_internal\_namespace + +# Namespace: \_internal\_namespace + +[cases/get](cases_get.md)._internal_namespace + +## Table of contents + +### Type aliases + +- [User](cases_get._internal_namespace.md#user) + +### Variables + +- [UserRT](cases_get._internal_namespace.md#userrt) + +## Type aliases + +### User + +ʬ **User**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/user.ts:18](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/user.ts#L18) + +## Variables + +### UserRT + +ā€¢ **UserRT**: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/user.ts:10](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/user.ts#L10) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/cases_get.md b/x-pack/plugins/cases/docs/cases_client/modules/cases_get.md index 4c165866cec47..6dbf7bb10d0a3 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/cases_get.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/cases_get.md @@ -1,24 +1,29 @@ -[Cases Client API Interface](../cases_client_api.md) / cases/get +[Cases Client API Interface](../README.md) / cases/get # Module: cases/get ## Table of contents +### Namespaces + +- [\_internal\_namespace](cases_get._internal_namespace.md) + ### Interfaces -- [CasesByAlertIDParams](../interfaces/cases_get.casesbyalertidparams.md) -- [GetParams](../interfaces/cases_get.getparams.md) +- [CasesByAlertIDParams](../interfaces/cases_get.CasesByAlertIDParams.md) +- [GetParams](../interfaces/cases_get.GetParams.md) ### Functions - [getReporters](cases_get.md#getreporters) - [getTags](cases_get.md#gettags) +- [resolve](cases_get.md#resolve) ## Functions ### getReporters -ā–ø **getReporters**(`params`: AllReportersFindRequest, `clientArgs`: CasesClientArgs): *Promise* +ā–ø **getReporters**(`params`, `clientArgs`): `Promise`<[`User`](cases_get._internal_namespace.md#user)[]\> Retrieves the reporters from all the cases. @@ -26,18 +31,23 @@ Retrieves the reporters from all the cases. | Name | Type | | :------ | :------ | -| `params` | AllReportersFindRequest | -| `clientArgs` | CasesClientArgs | +| `params` | `Object` | +| `params.owner` | `undefined` \| `string` \| `string`[] | +| `clientArgs` | [`CasesClientArgs`](../interfaces/client._internal_namespace.CasesClientArgs.md) | + +#### Returns -**Returns:** *Promise* +`Promise`<[`User`](cases_get._internal_namespace.md#user)[]\> -Defined in: [cases/get.ts:289](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/get.ts#L289) +#### Defined in + +[x-pack/plugins/cases/server/client/cases/get.ts:301](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/get.ts#L301) ___ ### getTags -ā–ø **getTags**(`params`: AllTagsFindRequest, `clientArgs`: CasesClientArgs): *Promise* +ā–ø **getTags**(`params`, `clientArgs`): `Promise`<`string`[]\> Retrieves the tags from all the cases. @@ -45,9 +55,39 @@ Retrieves the tags from all the cases. | Name | Type | | :------ | :------ | -| `params` | AllTagsFindRequest | -| `clientArgs` | CasesClientArgs | +| `params` | `Object` | +| `params.owner` | `undefined` \| `string` \| `string`[] | +| `clientArgs` | [`CasesClientArgs`](../interfaces/client._internal_namespace.CasesClientArgs.md) | + +#### Returns + +`Promise`<`string`[]\> + +#### Defined in + +[x-pack/plugins/cases/server/client/cases/get.ts:269](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/get.ts#L269) + +___ + +### resolve + +ā–ø `Const` **resolve**(`__namedParameters`, `clientArgs`): `Promise`<{ `case`: { description: string; status: CaseStatuses; tags: string[]; title: string; connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { ...; }) \| ... 4 more ... \| ({ ...; } & { ...; })); settings: { ...; }; owner: str... & { closed\_at: string \| null; closed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } \| null; created\_at: string; created\_by: { ...; }; external\_service: ({ ...; } & { ...; }) \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { `comments`: `undefined` \| { comment: string; type: CommentType.user; owner: string; } & { created\_at: string; created\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; }; owner: string; pushed\_at: string \| null; pushed\_by: { ...; } \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; version: string; } & { type: CommentType.alert; alertId: string \| string[]; index: string \| string[]; rule: { id: string \| null; name: string \| null; }; owner: string; } & { created\_at: string; created\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; }; owner: string; pushed\_at: string \| null; pushed\_by: { ...; } \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; version: string; } & { type: CommentType.actions; comment: string; actions: { targets: { hostname: string; endpointId: string; }[]; type: string; }; owner: string; } & { created\_at: string; created\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; }; owner: string; pushed\_at: string \| null; pushed\_by: { ...; } \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; version: string; }[] } = CaseResponseRt; `outcome`: ``"exactMatch"`` \| ``"aliasMatch"`` \| ``"conflict"`` } & { `alias_target_id`: `undefined` \| `string` = rt.string }\> + +Retrieves a case resolving its ID and optionally loading its comments. + +**`experimental`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`GetParams`](../interfaces/cases_get.GetParams.md) | +| `clientArgs` | [`CasesClientArgs`](../interfaces/client._internal_namespace.CasesClientArgs.md) | + +#### Returns + +`Promise`<{ `case`: { description: string; status: CaseStatuses; tags: string[]; title: string; connector: { id: string; } & (({ type: ConnectorTypes.jira; fields: { issueType: string \| null; priority: string \| null; parent: string \| null; } \| null; } & { ...; }) \| ... 4 more ... \| ({ ...; } & { ...; })); settings: { ...; }; owner: str... & { closed\_at: string \| null; closed\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; } \| null; created\_at: string; created\_by: { ...; }; external\_service: ({ ...; } & { ...; }) \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { `comments`: `undefined` \| { comment: string; type: CommentType.user; owner: string; } & { created\_at: string; created\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; }; owner: string; pushed\_at: string \| null; pushed\_by: { ...; } \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; version: string; } & { type: CommentType.alert; alertId: string \| string[]; index: string \| string[]; rule: { id: string \| null; name: string \| null; }; owner: string; } & { created\_at: string; created\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; }; owner: string; pushed\_at: string \| null; pushed\_by: { ...; } \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; version: string; } & { type: CommentType.actions; comment: string; actions: { targets: { hostname: string; endpointId: string; }[]; type: string; }; owner: string; } & { created\_at: string; created\_by: { email: string \| null \| undefined; full\_name: string \| null \| undefined; username: string \| null \| undefined; }; owner: string; pushed\_at: string \| null; pushed\_by: { ...; } \| null; updated\_at: string \| null; updated\_by: { ...; } \| null; } & { id: string; version: string; }[] } = CaseResponseRt; `outcome`: ``"exactMatch"`` \| ``"aliasMatch"`` \| ``"conflict"`` } & { `alias_target_id`: `undefined` \| `string` = rt.string }\> -**Returns:** *Promise* +#### Defined in -Defined in: [cases/get.ts:239](https://github.com/elastic/kibana/blob/a80791aa4cc/x-pack/plugins/cases/server/client/cases/get.ts#L239) +[x-pack/plugins/cases/server/client/cases/get.ts:208](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/cases/get.ts#L208) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/cases_push.md b/x-pack/plugins/cases/docs/cases_client/modules/cases_push.md index 4be9df64bb420..bb9667b3308db 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/cases_push.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/cases_push.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / cases/push +[Cases Client API Interface](../README.md) / cases/push # Module: cases/push @@ -6,4 +6,4 @@ ### Interfaces -- [PushParams](../interfaces/cases_push.pushparams.md) +- [PushParams](../interfaces/cases_push.PushParams.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/client._internal_namespace.md b/x-pack/plugins/cases/docs/cases_client/modules/client._internal_namespace.md new file mode 100644 index 0000000000000..4489106b370d1 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/modules/client._internal_namespace.md @@ -0,0 +1,2213 @@ +[Cases Client API Interface](../README.md) / [client](client.md) / \_internal\_namespace + +# Namespace: \_internal\_namespace + +[client](client.md)._internal_namespace + +## Table of contents + +### Enumerations + +- [ActionExecutionSourceType](../enums/client._internal_namespace.ActionExecutionSourceType.md) +- [AuthorizationMode](../enums/client._internal_namespace.AuthorizationMode.md) +- [CaseStatuses](../enums/client._internal_namespace.CaseStatuses.md) +- [TaskStatus](../enums/client._internal_namespace.TaskStatus.md) +- [ViewMode](../enums/client._internal_namespace.ViewMode.md) + +### Enumeration members + +- [actions](client._internal_namespace.md#actions) +- [alert](client._internal_namespace.md#alert) +- [jira](client._internal_namespace.md#jira) +- [none](client._internal_namespace.md#none) +- [resilient](client._internal_namespace.md#resilient) +- [serviceNowITSM](client._internal_namespace.md#servicenowitsm) +- [serviceNowSIR](client._internal_namespace.md#servicenowsir) +- [swimlane](client._internal_namespace.md#swimlane) +- [user](client._internal_namespace.md#user) + +### Classes + +- [ActionExecutor](../classes/client._internal_namespace.ActionExecutor.md) +- [ActionTypeRegistry](../classes/client._internal_namespace.ActionTypeRegistry.md) +- [Actions](../classes/client._internal_namespace.Actions.md) +- [ActionsAuthorization](../classes/client._internal_namespace.ActionsAuthorization.md) +- [ActionsClient](../classes/client._internal_namespace.ActionsClient.md) +- [AlertService](../classes/client._internal_namespace.AlertService.md) +- [AlertingActions](../classes/client._internal_namespace.AlertingActions.md) +- [ApiActions](../classes/client._internal_namespace.ApiActions.md) +- [AppActions](../classes/client._internal_namespace.AppActions.md) +- [AttachmentService](../classes/client._internal_namespace.AttachmentService.md) +- [Authorization](../classes/client._internal_namespace.Authorization.md) +- [AuthorizationAuditLogger](../classes/client._internal_namespace.AuthorizationAuditLogger.md) +- [BasePath](../classes/client._internal_namespace.BasePath.md) +- [BuilderFactory](../classes/client._internal_namespace.BuilderFactory.md) +- [CaseConfigureService](../classes/client._internal_namespace.CaseConfigureService.md) +- [CaseUserActionService](../classes/client._internal_namespace.CaseUserActionService.md) +- [CasesActions](../classes/client._internal_namespace.CasesActions.md) +- [CasesClientInternal](../classes/client._internal_namespace.CasesClientInternal.md) +- [CasesService](../classes/client._internal_namespace.CasesService.md) +- [ConnectorMappingsService](../classes/client._internal_namespace.ConnectorMappingsService.md) +- [ConnectorTokenClient](../classes/client._internal_namespace.ConnectorTokenClient.md) +- [ElasticsearchFeature](../classes/client._internal_namespace.ElasticsearchFeature.md) +- [KibanaFeature](../classes/client._internal_namespace.KibanaFeature.md) +- [KibanaMigrator](../classes/client._internal_namespace.KibanaMigrator.md) +- [KibanaRequest](../classes/client._internal_namespace.KibanaRequest.md) +- [LicenseState](../classes/client._internal_namespace.LicenseState.md) +- [RouteValidationError](../classes/client._internal_namespace.RouteValidationError.md) +- [RouteValidator](../classes/client._internal_namespace.RouteValidator.md) +- [SavedObjectActions](../classes/client._internal_namespace.SavedObjectActions.md) +- [SavedObjectTypeRegistry](../classes/client._internal_namespace.SavedObjectTypeRegistry.md) +- [SavedObjectsClient](../classes/client._internal_namespace.SavedObjectsClient.md) +- [SavedObjectsErrorHelpers](../classes/client._internal_namespace.SavedObjectsErrorHelpers.md) +- [SavedObjectsRepository](../classes/client._internal_namespace.SavedObjectsRepository.md) +- [SpaceActions](../classes/client._internal_namespace.SpaceActions.md) +- [SubFeature](../classes/client._internal_namespace.SubFeature.md) +- [TaskRunnerFactory](../classes/client._internal_namespace.TaskRunnerFactory.md) +- [UIActions](../classes/client._internal_namespace.UIActions.md) +- [UserActionBuilder](../classes/client._internal_namespace.UserActionBuilder.md) + +### Interfaces + +- [Action](../interfaces/client._internal_namespace.Action.md) +- [ActionExecutionSource](../interfaces/client._internal_namespace.ActionExecutionSource.md) +- [ActionExecutorContext](../interfaces/client._internal_namespace.ActionExecutorContext.md) +- [ActionResult](../interfaces/client._internal_namespace.ActionResult.md) +- [ActionType](../interfaces/client._internal_namespace.ActionType.md) +- [ActionType](../interfaces/client._internal_namespace.ActionType-1.md) +- [ActionTypeExecutorOptions](../interfaces/client._internal_namespace.ActionTypeExecutorOptions.md) +- [ActionTypeExecutorResult](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md) +- [ActionTypeRegistryOpts](../interfaces/client._internal_namespace.ActionTypeRegistryOpts.md) +- [ActionUpdate](../interfaces/client._internal_namespace.ActionUpdate.md) +- [ActionsConfigurationUtilities](../interfaces/client._internal_namespace.ActionsConfigurationUtilities.md) +- [ActionsLicenseInformation](../interfaces/client._internal_namespace.ActionsLicenseInformation.md) +- [AggregationBuilder](../interfaces/client._internal_namespace.AggregationBuilder.md) +- [Alert](../interfaces/client._internal_namespace.Alert.md) +- [AlertIdIndex](../interfaces/client._internal_namespace.AlertIdIndex.md) +- [AlertInfo](../interfaces/client._internal_namespace.AlertInfo.md) +- [AlertsResponse](../interfaces/client._internal_namespace.AlertsResponse.md) +- [AppCategory](../interfaces/client._internal_namespace.AppCategory.md) +- [AttachedToCaseArgs](../interfaces/client._internal_namespace.AttachedToCaseArgs.md) +- [Attributes](../interfaces/client._internal_namespace.Attributes.md) +- [AuditEvent](../interfaces/client._internal_namespace.AuditEvent.md) +- [AuditLogger](../interfaces/client._internal_namespace.AuditLogger.md) +- [AuthFilterHelpers](../interfaces/client._internal_namespace.AuthFilterHelpers.md) +- [AuthenticatedUser](../interfaces/client._internal_namespace.AuthenticatedUser.md) +- [AuthenticationProvider](../interfaces/client._internal_namespace.AuthenticationProvider.md) +- [AuthorizationMode](../interfaces/client._internal_namespace.AuthorizationMode-1.md) +- [AuthorizationServiceSetup](../interfaces/client._internal_namespace.AuthorizationServiceSetup.md) +- [BeforeSaveContext](../interfaces/client._internal_namespace.BeforeSaveContext.md) +- [BuilderParameters](../interfaces/client._internal_namespace.BuilderParameters.md) +- [BuilderReturnValue](../interfaces/client._internal_namespace.BuilderReturnValue.md) +- [BulkCreateAttachmentDeletionUserAction](../interfaces/client._internal_namespace.BulkCreateAttachmentDeletionUserAction.md) +- [BulkCreateBulkUpdateCaseUserActions](../interfaces/client._internal_namespace.BulkCreateBulkUpdateCaseUserActions.md) +- [BulkCreateCaseDeletionUserAction](../interfaces/client._internal_namespace.BulkCreateCaseDeletionUserAction.md) +- [BulkUpdateAttachmentArgs](../interfaces/client._internal_namespace.BulkUpdateAttachmentArgs.md) +- [CancellableTask](../interfaces/client._internal_namespace.CancellableTask.md) +- [Capabilities](../interfaces/client._internal_namespace.Capabilities.md) +- [CaseCommentStats](../interfaces/client._internal_namespace.CaseCommentStats.md) +- [CasesClientArgs](../interfaces/client._internal_namespace.CasesClientArgs.md) +- [CasesMapWithPageInfo](../interfaces/client._internal_namespace.CasesMapWithPageInfo.md) +- [CheckPrivileges](../interfaces/client._internal_namespace.CheckPrivileges.md) +- [CheckPrivilegesOptions](../interfaces/client._internal_namespace.CheckPrivilegesOptions.md) +- [CheckPrivilegesPayload](../interfaces/client._internal_namespace.CheckPrivilegesPayload.md) +- [CheckPrivilegesResponse](../interfaces/client._internal_namespace.CheckPrivilegesResponse.md) +- [ClientArgs](../interfaces/client._internal_namespace.ClientArgs.md) +- [ClientArgs](../interfaces/client._internal_namespace.ClientArgs-1.md) +- [ClientArgs](../interfaces/client._internal_namespace.ClientArgs-2.md) +- [CommonArguments](../interfaces/client._internal_namespace.CommonArguments.md) +- [ConcreteTaskInstance](../interfaces/client._internal_namespace.ConcreteTaskInstance.md) +- [ConnectorToken](../interfaces/client._internal_namespace.ConnectorToken.md) +- [ConstructorOptions](../interfaces/client._internal_namespace.ConstructorOptions.md) +- [ConstructorOptions](../interfaces/client._internal_namespace.ConstructorOptions-1.md) +- [ConstructorOptions](../interfaces/client._internal_namespace.ConstructorOptions-2.md) +- [CountActionsAttachedToCaseArgs](../interfaces/client._internal_namespace.CountActionsAttachedToCaseArgs.md) +- [CreateAttachmentArgs](../interfaces/client._internal_namespace.CreateAttachmentArgs.md) +- [CreateAuditMsgParams](../interfaces/client._internal_namespace.CreateAuditMsgParams.md) +- [CreateOptions](../interfaces/client._internal_namespace.CreateOptions.md) +- [CreateOptions](../interfaces/client._internal_namespace.CreateOptions-1.md) +- [CreateUserAction](../interfaces/client._internal_namespace.CreateUserAction.md) +- [CreateUserActionES](../interfaces/client._internal_namespace.CreateUserActionES.md) +- [DecoratedError](../interfaces/client._internal_namespace.DecoratedError.md) +- [ElasticsearchFeatureConfig](../interfaces/client._internal_namespace.ElasticsearchFeatureConfig.md) +- [EmbeddableRegistryDefinition](../interfaces/client._internal_namespace.EmbeddableRegistryDefinition.md) +- [EncryptedSavedObjectsClient](../interfaces/client._internal_namespace.EncryptedSavedObjectsClient.md) +- [ExecuteOptions](../interfaces/client._internal_namespace.ExecuteOptions.md) +- [ExecuteOptions](../interfaces/client._internal_namespace.ExecuteOptions-1.md) +- [FeatureElasticsearchPrivileges](../interfaces/client._internal_namespace.FeatureElasticsearchPrivileges.md) +- [FeatureKibanaPrivileges](../interfaces/client._internal_namespace.FeatureKibanaPrivileges.md) +- [FeatureUsageServiceSetup](../interfaces/client._internal_namespace.FeatureUsageServiceSetup.md) +- [FindActionResult](../interfaces/client._internal_namespace.FindActionResult.md) +- [FindCaseCommentsArgs](../interfaces/client._internal_namespace.FindCaseCommentsArgs.md) +- [FindCaseConfigureArgs](../interfaces/client._internal_namespace.FindCaseConfigureArgs.md) +- [FindCasesArgs](../interfaces/client._internal_namespace.FindCasesArgs.md) +- [FindCommentsArgs](../interfaces/client._internal_namespace.FindCommentsArgs.md) +- [FindConnectorMappingsArgs](../interfaces/client._internal_namespace.FindConnectorMappingsArgs.md) +- [GetAllSpacesOptions](../interfaces/client._internal_namespace.GetAllSpacesOptions.md) +- [GetAttachmentArgs](../interfaces/client._internal_namespace.GetAttachmentArgs.md) +- [GetCaseArgs](../interfaces/client._internal_namespace.GetCaseArgs.md) +- [GetCaseConfigureArgs](../interfaces/client._internal_namespace.GetCaseConfigureArgs.md) +- [GetCaseIdsByAlertIdArgs](../interfaces/client._internal_namespace.GetCaseIdsByAlertIdArgs.md) +- [GetCaseUserActionArgs](../interfaces/client._internal_namespace.GetCaseUserActionArgs.md) +- [GetCasesArgs](../interfaces/client._internal_namespace.GetCasesArgs.md) +- [GetReportersArgs](../interfaces/client._internal_namespace.GetReportersArgs.md) +- [GetSpaceResult](../interfaces/client._internal_namespace.GetSpaceResult.md) +- [GetTagsArgs](../interfaces/client._internal_namespace.GetTagsArgs.md) +- [GetUserActionItemByDifference](../interfaces/client._internal_namespace.GetUserActionItemByDifference.md) +- [GetUserArgs](../interfaces/client._internal_namespace.GetUserArgs.md) +- [IEventLogger](../interfaces/client._internal_namespace.IEventLogger.md) +- [IKibanaSocket](../interfaces/client._internal_namespace.IKibanaSocket.md) +- [ILicense](../interfaces/client._internal_namespace.ILicense.md) +- [ISavedObjectsPointInTimeFinder](../interfaces/client._internal_namespace.ISavedObjectsPointInTimeFinder.md) +- [IScopedClusterClient](../interfaces/client._internal_namespace.IScopedClusterClient.md) +- [ISpacesClient](../interfaces/client._internal_namespace.ISpacesClient.md) +- [IUsageCounter](../interfaces/client._internal_namespace.IUsageCounter.md) +- [IncrementCounterParams](../interfaces/client._internal_namespace.IncrementCounterParams.md) +- [IndexMapping](../interfaces/client._internal_namespace.IndexMapping.md) +- [IndexMappingMeta](../interfaces/client._internal_namespace.IndexMappingMeta.md) +- [IntervalSchedule](../interfaces/client._internal_namespace.IntervalSchedule.md) +- [KibanaFeatureConfig](../interfaces/client._internal_namespace.KibanaFeatureConfig.md) +- [KibanaMigratorOptions](../interfaces/client._internal_namespace.KibanaMigratorOptions.md) +- [KibanaMigratorStatus](../interfaces/client._internal_namespace.KibanaMigratorStatus.md) +- [KibanaRequestEvents](../interfaces/client._internal_namespace.KibanaRequestEvents.md) +- [LegacyUrlAliasTarget](../interfaces/client._internal_namespace.LegacyUrlAliasTarget.md) +- [LicenseCheck](../interfaces/client._internal_namespace.LicenseCheck.md) +- [LicenseFeature](../interfaces/client._internal_namespace.LicenseFeature.md) +- [LicensingPluginSetup](../interfaces/client._internal_namespace.LicensingPluginSetup.md) +- [Middleware](../interfaces/client._internal_namespace.Middleware.md) +- [OperationDetails](../interfaces/client._internal_namespace.OperationDetails.md) +- [OwnerEntity](../interfaces/client._internal_namespace.OwnerEntity.md) +- [PatchCase](../interfaces/client._internal_namespace.PatchCase.md) +- [PatchCaseConfigureArgs](../interfaces/client._internal_namespace.PatchCaseConfigureArgs.md) +- [PatchCasesArgs](../interfaces/client._internal_namespace.PatchCasesArgs.md) +- [PersistableState](../interfaces/client._internal_namespace.PersistableState.md) +- [PluginStartContract](../interfaces/client._internal_namespace.PluginStartContract.md) +- [PostCaseArgs](../interfaces/client._internal_namespace.PostCaseArgs.md) +- [PostCaseConfigureArgs](../interfaces/client._internal_namespace.PostCaseConfigureArgs.md) +- [PostCaseUserActionArgs](../interfaces/client._internal_namespace.PostCaseUserActionArgs.md) +- [PostConnectorMappingsArgs](../interfaces/client._internal_namespace.PostConnectorMappingsArgs.md) +- [PreConfiguredAction](../interfaces/client._internal_namespace.PreConfiguredAction.md) +- [ProxySettings](../interfaces/client._internal_namespace.ProxySettings.md) +- [PublicLicense](../interfaces/client._internal_namespace.PublicLicense.md) +- [PublicLicenseJSON](../interfaces/client._internal_namespace.PublicLicenseJSON.md) +- [PushedArgs](../interfaces/client._internal_namespace.PushedArgs.md) +- [Referencable](../interfaces/client._internal_namespace.Referencable.md) +- [ReservedKibanaPrivilege](../interfaces/client._internal_namespace.ReservedKibanaPrivilege.md) +- [ResponseSettings](../interfaces/client._internal_namespace.ResponseSettings.md) +- [RouteConfigOptions](../interfaces/client._internal_namespace.RouteConfigOptions.md) +- [RouteConfigOptionsBody](../interfaces/client._internal_namespace.RouteConfigOptionsBody.md) +- [RouteValidationResultFactory](../interfaces/client._internal_namespace.RouteValidationResultFactory.md) +- [RouteValidatorConfig](../interfaces/client._internal_namespace.RouteValidatorConfig.md) +- [RouteValidatorOptions](../interfaces/client._internal_namespace.RouteValidatorOptions.md) +- [RunContext](../interfaces/client._internal_namespace.RunContext.md) +- [RunNowResult](../interfaces/client._internal_namespace.RunNowResult.md) +- [SSLSettings](../interfaces/client._internal_namespace.SSLSettings.md) +- [SavedObject](../interfaces/client._internal_namespace.SavedObject.md) +- [SavedObjectAttributes](../interfaces/client._internal_namespace.SavedObjectAttributes.md) +- [SavedObjectDoc](../interfaces/client._internal_namespace.SavedObjectDoc.md) +- [SavedObjectError](../interfaces/client._internal_namespace.SavedObjectError.md) +- [SavedObjectMigrationContext](../interfaces/client._internal_namespace.SavedObjectMigrationContext.md) +- [SavedObjectMigrationMap](../interfaces/client._internal_namespace.SavedObjectMigrationMap.md) +- [SavedObjectReference](../interfaces/client._internal_namespace.SavedObjectReference.md) +- [SavedObjectReferenceWithContext](../interfaces/client._internal_namespace.SavedObjectReferenceWithContext.md) +- [SavedObjectsBaseOptions](../interfaces/client._internal_namespace.SavedObjectsBaseOptions.md) +- [SavedObjectsBulkCreateObject](../interfaces/client._internal_namespace.SavedObjectsBulkCreateObject.md) +- [SavedObjectsBulkGetObject](../interfaces/client._internal_namespace.SavedObjectsBulkGetObject.md) +- [SavedObjectsBulkResolveObject](../interfaces/client._internal_namespace.SavedObjectsBulkResolveObject.md) +- [SavedObjectsBulkResolveResponse](../interfaces/client._internal_namespace.SavedObjectsBulkResolveResponse.md) +- [SavedObjectsBulkResponse](../interfaces/client._internal_namespace.SavedObjectsBulkResponse.md) +- [SavedObjectsBulkUpdateObject](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateObject.md) +- [SavedObjectsBulkUpdateOptions](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateOptions.md) +- [SavedObjectsBulkUpdateResponse](../interfaces/client._internal_namespace.SavedObjectsBulkUpdateResponse.md) +- [SavedObjectsCheckConflictsObject](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsObject.md) +- [SavedObjectsCheckConflictsResponse](../interfaces/client._internal_namespace.SavedObjectsCheckConflictsResponse.md) +- [SavedObjectsClosePointInTimeResponse](../interfaces/client._internal_namespace.SavedObjectsClosePointInTimeResponse.md) +- [SavedObjectsCollectMultiNamespaceReferencesObject](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesObject.md) +- [SavedObjectsCollectMultiNamespaceReferencesOptions](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesOptions.md) +- [SavedObjectsCollectMultiNamespaceReferencesResponse](../interfaces/client._internal_namespace.SavedObjectsCollectMultiNamespaceReferencesResponse.md) +- [SavedObjectsCreateOptions](../interfaces/client._internal_namespace.SavedObjectsCreateOptions.md) +- [SavedObjectsCreatePointInTimeFinderDependencies](../interfaces/client._internal_namespace.SavedObjectsCreatePointInTimeFinderDependencies.md) +- [SavedObjectsDeleteByNamespaceOptions](../interfaces/client._internal_namespace.SavedObjectsDeleteByNamespaceOptions.md) +- [SavedObjectsDeleteOptions](../interfaces/client._internal_namespace.SavedObjectsDeleteOptions.md) +- [SavedObjectsExportTransformContext](../interfaces/client._internal_namespace.SavedObjectsExportTransformContext.md) +- [SavedObjectsFindOptions](../interfaces/client._internal_namespace.SavedObjectsFindOptions.md) +- [SavedObjectsFindOptionsReference](../interfaces/client._internal_namespace.SavedObjectsFindOptionsReference.md) +- [SavedObjectsFindResponse](../interfaces/client._internal_namespace.SavedObjectsFindResponse.md) +- [SavedObjectsFindResult](../interfaces/client._internal_namespace.SavedObjectsFindResult.md) +- [SavedObjectsImportActionRequiredWarning](../interfaces/client._internal_namespace.SavedObjectsImportActionRequiredWarning.md) +- [SavedObjectsImportHookResult](../interfaces/client._internal_namespace.SavedObjectsImportHookResult.md) +- [SavedObjectsImportSimpleWarning](../interfaces/client._internal_namespace.SavedObjectsImportSimpleWarning.md) +- [SavedObjectsIncrementCounterField](../interfaces/client._internal_namespace.SavedObjectsIncrementCounterField.md) +- [SavedObjectsIncrementCounterOptions](../interfaces/client._internal_namespace.SavedObjectsIncrementCounterOptions.md) +- [SavedObjectsMappingProperties](../interfaces/client._internal_namespace.SavedObjectsMappingProperties.md) +- [SavedObjectsMigrationLogger](../interfaces/client._internal_namespace.SavedObjectsMigrationLogger.md) +- [SavedObjectsMigrationVersion](../interfaces/client._internal_namespace.SavedObjectsMigrationVersion.md) +- [SavedObjectsOpenPointInTimeOptions](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeOptions.md) +- [SavedObjectsOpenPointInTimeResponse](../interfaces/client._internal_namespace.SavedObjectsOpenPointInTimeResponse.md) +- [SavedObjectsPitParams](../interfaces/client._internal_namespace.SavedObjectsPitParams.md) +- [SavedObjectsRemoveReferencesToOptions](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToOptions.md) +- [SavedObjectsRemoveReferencesToResponse](../interfaces/client._internal_namespace.SavedObjectsRemoveReferencesToResponse.md) +- [SavedObjectsResolveResponse](../interfaces/client._internal_namespace.SavedObjectsResolveResponse.md) +- [SavedObjectsType](../interfaces/client._internal_namespace.SavedObjectsType.md) +- [SavedObjectsTypeManagementDefinition](../interfaces/client._internal_namespace.SavedObjectsTypeManagementDefinition.md) +- [SavedObjectsTypeMappingDefinition](../interfaces/client._internal_namespace.SavedObjectsTypeMappingDefinition.md) +- [SavedObjectsUpdateObjectsSpacesObject](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesObject.md) +- [SavedObjectsUpdateObjectsSpacesOptions](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesOptions.md) +- [SavedObjectsUpdateObjectsSpacesResponse](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponse.md) +- [SavedObjectsUpdateObjectsSpacesResponseObject](../interfaces/client._internal_namespace.SavedObjectsUpdateObjectsSpacesResponseObject.md) +- [SavedObjectsUpdateOptions](../interfaces/client._internal_namespace.SavedObjectsUpdateOptions.md) +- [SavedObjectsUpdateResponse](../interfaces/client._internal_namespace.SavedObjectsUpdateResponse.md) +- [SavedObjectsValidationMap](../interfaces/client._internal_namespace.SavedObjectsValidationMap.md) +- [Services](../interfaces/client._internal_namespace.Services.md) +- [Space](../interfaces/client._internal_namespace.Space.md) +- [SpacesServiceStart](../interfaces/client._internal_namespace.SpacesServiceStart.md) +- [SubFeatureConfig](../interfaces/client._internal_namespace.SubFeatureConfig.md) +- [SubFeaturePrivilegeConfig](../interfaces/client._internal_namespace.SubFeaturePrivilegeConfig.md) +- [SubFeaturePrivilegeGroupConfig](../interfaces/client._internal_namespace.SubFeaturePrivilegeGroupConfig.md) +- [TaskInfo](../interfaces/client._internal_namespace.TaskInfo.md) +- [TaskInstance](../interfaces/client._internal_namespace.TaskInstance.md) +- [TaskManagerSetupContract](../interfaces/client._internal_namespace.TaskManagerSetupContract.md) +- [TaskRegisterDefinition](../interfaces/client._internal_namespace.TaskRegisterDefinition.md) +- [TaskRunnerContext](../interfaces/client._internal_namespace.TaskRunnerContext.md) +- [TranslatedUpdateAlertRequest](../interfaces/client._internal_namespace.TranslatedUpdateAlertRequest.md) +- [UpdateAlertRequest](../interfaces/client._internal_namespace.UpdateAlertRequest.md) +- [UpdateArgs](../interfaces/client._internal_namespace.UpdateArgs.md) +- [UpdateConnectorMappingsArgs](../interfaces/client._internal_namespace.UpdateConnectorMappingsArgs.md) +- [UpdateOptions](../interfaces/client._internal_namespace.UpdateOptions.md) +- [UpdateOptions](../interfaces/client._internal_namespace.UpdateOptions-1.md) +- [User](../interfaces/client._internal_namespace.User.md) +- [UserRealm](../interfaces/client._internal_namespace.UserRealm.md) +- [ValidatorType](../interfaces/client._internal_namespace.ValidatorType.md) +- [Verbs](../interfaces/client._internal_namespace.Verbs.md) + +### Type aliases + +- [ActionExecutorContract](client._internal_namespace.md#actionexecutorcontract) +- [ActionTypeConfig](client._internal_namespace.md#actiontypeconfig) +- [ActionTypeParams](client._internal_namespace.md#actiontypeparams) +- [ActionTypeRegistryContract](client._internal_namespace.md#actiontyperegistrycontract) +- [ActionTypeSecrets](client._internal_namespace.md#actiontypesecrets) +- [ActionsClient](client._internal_namespace.md#actionsclient) +- [AggregationResponse](client._internal_namespace.md#aggregationresponse) +- [BeforeRunContextFunction](client._internal_namespace.md#beforeruncontextfunction) +- [BeforeSaveContextFunction](client._internal_namespace.md#beforesavecontextfunction) +- [CancelFunction](client._internal_namespace.md#cancelfunction) +- [CasesFindRequest](client._internal_namespace.md#casesfindrequest) +- [CheckPrivilegesDynamically](client._internal_namespace.md#checkprivilegesdynamically) +- [CheckPrivilegesDynamicallyWithRequest](client._internal_namespace.md#checkprivilegesdynamicallywithrequest) +- [CheckPrivilegesWithRequest](client._internal_namespace.md#checkprivilegeswithrequest) +- [CheckSavedObjectsPrivileges](client._internal_namespace.md#checksavedobjectsprivileges) +- [CheckSavedObjectsPrivilegesWithRequest](client._internal_namespace.md#checksavedobjectsprivilegeswithrequest) +- [CommonBuilderArguments](client._internal_namespace.md#commonbuilderarguments) +- [CommonUserActionArgs](client._internal_namespace.md#commonuseractionargs) +- [ConnectorTokenClientContract](client._internal_namespace.md#connectortokenclientcontract) +- [CreateUserActionClient](client._internal_namespace.md#createuseractionclient) +- [DeepPartial](client._internal_namespace.md#deeppartial) +- [DeepWriteable](client._internal_namespace.md#deepwriteable) +- [DestructiveRouteMethod](client._internal_namespace.md#destructiveroutemethod) +- [ElasticsearchClient](client._internal_namespace.md#elasticsearchclient) +- [EmbeddableInput](client._internal_namespace.md#embeddableinput) +- [EmbeddableStateWithType](client._internal_namespace.md#embeddablestatewithtype) +- [EnsureSOAuthCallback](client._internal_namespace.md#ensuresoauthcallback) +- [ExecutionEnqueuer](client._internal_namespace.md#executionenqueuer) +- [ExecutorType](client._internal_namespace.md#executortype) +- [FailedRunResult](client._internal_namespace.md#failedrunresult) +- [FindCaseOptions](client._internal_namespace.md#findcaseoptions) +- [GetAllSpacesPurpose](client._internal_namespace.md#getallspacespurpose) +- [GetMigrationFunctionObjectFn](client._internal_namespace.md#getmigrationfunctionobjectfn) +- [GetServicesFunction](client._internal_namespace.md#getservicesfunction) +- [GetSpaceFn](client._internal_namespace.md#getspacefn) +- [Headers](client._internal_namespace.md#headers) +- [IBasePath](client._internal_namespace.md#ibasepath) +- [IEvent](client._internal_namespace.md#ievent) +- [IKibanaMigrator](client._internal_namespace.md#ikibanamigrator) +- [ILicenseState](client._internal_namespace.md#ilicensestate) +- [ISavedObjectTypeRegistry](client._internal_namespace.md#isavedobjecttyperegistry) +- [ISavedObjectsRepository](client._internal_namespace.md#isavedobjectsrepository) +- [IValidatedEvent](client._internal_namespace.md#ivalidatedevent) +- [KibanaExecutionContext](client._internal_namespace.md#kibanaexecutioncontext) +- [KibanaRequestRouteOptions](client._internal_namespace.md#kibanarequestrouteoptions) +- [KnownHeaders](client._internal_namespace.md#knownheaders) +- [KnownKeys](client._internal_namespace.md#knownkeys) +- [LicenseCheckState](client._internal_namespace.md#licensecheckstate) +- [LicenseStatus](client._internal_namespace.md#licensestatus) +- [Mapper](client._internal_namespace.md#mapper) +- [MigrateFunction](client._internal_namespace.md#migratefunction) +- [MigrateFunctionsObject](client._internal_namespace.md#migratefunctionsobject) +- [MigrationResult](client._internal_namespace.md#migrationresult) +- [MigrationStatus](client._internal_namespace.md#migrationstatus) +- [MutatingOperationRefreshSetting](client._internal_namespace.md#mutatingoperationrefreshsetting) +- [PatchCaseArgs](client._internal_namespace.md#patchcaseargs) +- [PersistableStateDefinition](client._internal_namespace.md#persistablestatedefinition) +- [PublicFeatures](client._internal_namespace.md#publicfeatures) +- [RouteContentType](client._internal_namespace.md#routecontenttype) +- [RouteMethod](client._internal_namespace.md#routemethod) +- [RouteValidationFunction](client._internal_namespace.md#routevalidationfunction) +- [RouteValidationSpec](client._internal_namespace.md#routevalidationspec) +- [RouteValidatorFullConfig](client._internal_namespace.md#routevalidatorfullconfig) +- [RunFunction](client._internal_namespace.md#runfunction) +- [RunResult](client._internal_namespace.md#runresult) +- [SafeRouteMethod](client._internal_namespace.md#saferoutemethod) +- [SavedObjectAttribute](client._internal_namespace.md#savedobjectattribute) +- [SavedObjectAttributeSingle](client._internal_namespace.md#savedobjectattributesingle) +- [SavedObjectFindOptions](client._internal_namespace.md#savedobjectfindoptions) +- [SavedObjectFindOptionsKueryNode](client._internal_namespace.md#savedobjectfindoptionskuerynode) +- [SavedObjectMigrationFn](client._internal_namespace.md#savedobjectmigrationfn) +- [SavedObjectTypeExcludeFromUpgradeFilterHook](client._internal_namespace.md#savedobjecttypeexcludefromupgradefilterhook) +- [SavedObjectUnsanitizedDoc](client._internal_namespace.md#savedobjectunsanitizeddoc) +- [SavedObjectsClientContract](client._internal_namespace.md#savedobjectsclientcontract) +- [SavedObjectsCreatePointInTimeFinderOptions](client._internal_namespace.md#savedobjectscreatepointintimefinderoptions) +- [SavedObjectsExportTransform](client._internal_namespace.md#savedobjectsexporttransform) +- [SavedObjectsExportablePredicate](client._internal_namespace.md#savedobjectsexportablepredicate) +- [SavedObjectsFieldMapping](client._internal_namespace.md#savedobjectsfieldmapping) +- [SavedObjectsImportHook](client._internal_namespace.md#savedobjectsimporthook) +- [SavedObjectsImportWarning](client._internal_namespace.md#savedobjectsimportwarning) +- [SavedObjectsNamespaceType](client._internal_namespace.md#savedobjectsnamespacetype) +- [SavedObjectsValidationSpec](client._internal_namespace.md#savedobjectsvalidationspec) +- [SpaceIdToNamespaceFunction](client._internal_namespace.md#spaceidtonamespacefunction) +- [StringKeysAsVals](client._internal_namespace.md#stringkeysasvals) +- [SubFeaturePrivilegeGroupType](client._internal_namespace.md#subfeatureprivilegegrouptype) +- [SuccessfulRunResult](client._internal_namespace.md#successfulrunresult) +- [TaskDefinitionRegistry](client._internal_namespace.md#taskdefinitionregistry) +- [TaskRunCreatorFunction](client._internal_namespace.md#taskruncreatorfunction) +- [UpdateAttachmentArgs](client._internal_namespace.md#updateattachmentargs) +- [UserAction](client._internal_namespace.md#useraction) +- [UserActionParameters](client._internal_namespace.md#useractionparameters) +- [UserActionTypes](client._internal_namespace.md#useractiontypes) + +### Variables + +- [ActionTypesRt](client._internal_namespace.md#actiontypesrt) +- [ActionsRt](client._internal_namespace.md#actionsrt) +- [CasesFindRequestRt](client._internal_namespace.md#casesfindrequestrt) +- [EventSchema](client._internal_namespace.md#eventschema) +- [SavedObjectFindOptionsRt](client._internal_namespace.md#savedobjectfindoptionsrt) + +## Enumeration members + +### actions + +ā€¢ **actions**: `Object` = `"actions"` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/comment.ts:26](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/comment.ts#L26) + +___ + +### alert + +ā€¢ **alert**: `Object` = `"alert"` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/comment.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/comment.ts#L25) + +___ + +### jira + +ā€¢ **jira**: `Object` = `".jira"` + +#### Defined in + +[x-pack/plugins/cases/common/api/connectors/index.ts:36](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/connectors/index.ts#L36) + +___ + +### none + +ā€¢ **none**: `Object` = `".none"` + +#### Defined in + +[x-pack/plugins/cases/common/api/connectors/index.ts:37](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/connectors/index.ts#L37) + +___ + +### resilient + +ā€¢ **resilient**: `Object` = `".resilient"` + +#### Defined in + +[x-pack/plugins/cases/common/api/connectors/index.ts:38](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/connectors/index.ts#L38) + +___ + +### serviceNowITSM + +ā€¢ **serviceNowITSM**: `Object` = `".servicenow"` + +#### Defined in + +[x-pack/plugins/cases/common/api/connectors/index.ts:39](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/connectors/index.ts#L39) + +___ + +### serviceNowSIR + +ā€¢ **serviceNowSIR**: `Object` = `".servicenow-sir"` + +#### Defined in + +[x-pack/plugins/cases/common/api/connectors/index.ts:40](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/connectors/index.ts#L40) + +___ + +### swimlane + +ā€¢ **swimlane**: `Object` = `".swimlane"` + +#### Defined in + +[x-pack/plugins/cases/common/api/connectors/index.ts:41](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/connectors/index.ts#L41) + +___ + +### user + +ā€¢ **user**: `Object` = `"user"` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/comment.ts:24](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/comment.ts#L24) + +## Type aliases + +### ActionExecutorContract + +ʬ **ActionExecutorContract**: `PublicMethodsOf`<[`ActionExecutor`](../classes/client._internal_namespace.ActionExecutor.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/action_executor.d.ts:34 + +___ + +### ActionTypeConfig + +ʬ **ActionTypeConfig**: `Record`<`string`, `unknown`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:19 + +___ + +### ActionTypeParams + +ʬ **ActionTypeParams**: `Record`<`string`, `unknown`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:21 + +___ + +### ActionTypeRegistryContract + +ʬ **ActionTypeRegistryContract**: `PublicMethodsOf`<[`ActionTypeRegistry`](../classes/client._internal_namespace.ActionTypeRegistry.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:17 + +___ + +### ActionTypeSecrets + +ʬ **ActionTypeSecrets**: `Record`<`string`, `unknown`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:20 + +___ + +### ActionsClient + +ʬ **ActionsClient**: `PublicMethodsOf`<[`ActionsClient`](../classes/client._internal_namespace.ActionsClient.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/index.d.ts:7 + +___ + +### AggregationResponse + +ʬ **AggregationResponse**: `Record`<`string`, `estypes.AggregationsAggregate`\> \| `undefined` + +#### Defined in + +[x-pack/plugins/cases/server/client/metrics/types.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/metrics/types.ts#L25) + +___ + +### BeforeRunContextFunction + +ʬ **BeforeRunContextFunction**: [`Mapper`](client._internal_namespace.md#mapper)<[`RunContext`](../interfaces/client._internal_namespace.RunContext.md)\> + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/lib/middleware.d.ts:7 + +___ + +### BeforeSaveContextFunction + +ʬ **BeforeSaveContextFunction**: [`Mapper`](client._internal_namespace.md#mapper)<[`BeforeSaveContext`](../interfaces/client._internal_namespace.BeforeSaveContext.md)\> + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/lib/middleware.d.ts:6 + +___ + +### CancelFunction + +ʬ **CancelFunction**: () => `Promise`<[`RunResult`](client._internal_namespace.md#runresult) \| `undefined` \| `void`\> + +#### Type declaration + +ā–ø (): `Promise`<[`RunResult`](client._internal_namespace.md#runresult) \| `undefined` \| `void`\> + +##### Returns + +`Promise`<[`RunResult`](client._internal_namespace.md#runresult) \| `undefined` \| `void`\> + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:65 + +___ + +### CasesFindRequest + +ʬ **CasesFindRequest**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:284](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L284) + +___ + +### CheckPrivilegesDynamically + +ʬ **CheckPrivilegesDynamically**: (`privileges`: [`CheckPrivilegesPayload`](../interfaces/client._internal_namespace.CheckPrivilegesPayload.md), `options?`: [`CheckPrivilegesOptions`](../interfaces/client._internal_namespace.CheckPrivilegesOptions.md)) => `Promise`<[`CheckPrivilegesResponse`](../interfaces/client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Type declaration + +ā–ø (`privileges`, `options?`): `Promise`<[`CheckPrivilegesResponse`](../interfaces/client._internal_namespace.CheckPrivilegesResponse.md)\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `privileges` | [`CheckPrivilegesPayload`](../interfaces/client._internal_namespace.CheckPrivilegesPayload.md) | +| `options?` | [`CheckPrivilegesOptions`](../interfaces/client._internal_namespace.CheckPrivilegesOptions.md) | + +##### Returns + +`Promise`<[`CheckPrivilegesResponse`](../interfaces/client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/check_privileges_dynamically.d.ts:4 + +___ + +### CheckPrivilegesDynamicallyWithRequest + +ʬ **CheckPrivilegesDynamicallyWithRequest**: (`request`: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)) => [`CheckPrivilegesDynamically`](client._internal_namespace.md#checkprivilegesdynamically) + +#### Type declaration + +ā–ø (`request`): [`CheckPrivilegesDynamically`](client._internal_namespace.md#checkprivilegesdynamically) + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md) | + +##### Returns + +[`CheckPrivilegesDynamically`](client._internal_namespace.md#checkprivilegesdynamically) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/check_privileges_dynamically.d.ts:5 + +___ + +### CheckPrivilegesWithRequest + +ʬ **CheckPrivilegesWithRequest**: (`request`: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)) => [`CheckPrivileges`](../interfaces/client._internal_namespace.CheckPrivileges.md) + +#### Type declaration + +ā–ø (`request`): [`CheckPrivileges`](../interfaces/client._internal_namespace.CheckPrivileges.md) + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md) | + +##### Returns + +[`CheckPrivileges`](../interfaces/client._internal_namespace.CheckPrivileges.md) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/types.d.ts:59 + +___ + +### CheckSavedObjectsPrivileges + +ʬ **CheckSavedObjectsPrivileges**: (`actions`: `string` \| `string`[], `namespaceOrNamespaces?`: `string` \| (`undefined` \| `string`)[]) => `Promise`<[`CheckPrivilegesResponse`](../interfaces/client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Type declaration + +ā–ø (`actions`, `namespaceOrNamespaces?`): `Promise`<[`CheckPrivilegesResponse`](../interfaces/client._internal_namespace.CheckPrivilegesResponse.md)\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `actions` | `string` \| `string`[] | +| `namespaceOrNamespaces?` | `string` \| (`undefined` \| `string`)[] | + +##### Returns + +`Promise`<[`CheckPrivilegesResponse`](../interfaces/client._internal_namespace.CheckPrivilegesResponse.md)\> + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/check_saved_objects_privileges.d.ts:5 + +___ + +### CheckSavedObjectsPrivilegesWithRequest + +ʬ **CheckSavedObjectsPrivilegesWithRequest**: (`request`: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)) => [`CheckSavedObjectsPrivileges`](client._internal_namespace.md#checksavedobjectsprivileges) + +#### Type declaration + +ā–ø (`request`): [`CheckSavedObjectsPrivileges`](client._internal_namespace.md#checksavedobjectsprivileges) + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md) | + +##### Returns + +[`CheckSavedObjectsPrivileges`](client._internal_namespace.md#checksavedobjectsprivileges) + +#### Defined in + +x-pack/plugins/security/target/types/server/authorization/check_saved_objects_privileges.d.ts:4 + +___ + +### CommonBuilderArguments + +ʬ **CommonBuilderArguments**: [`CommonArguments`](../interfaces/client._internal_namespace.CommonArguments.md) & { `action`: [`UserAction`](client._internal_namespace.md#useraction) ; `type`: [`UserActionTypes`](client._internal_namespace.md#useractiontypes) ; `value`: `unknown` ; `valueKey`: `string` } + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:97](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L97) + +___ + +### CommonUserActionArgs + +ʬ **CommonUserActionArgs**: [`ClientArgs`](../interfaces/client._internal_namespace.ClientArgs-1.md) & [`CommonArguments`](../interfaces/client._internal_namespace.CommonArguments.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:75](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L75) + +___ + +### ConnectorTokenClientContract + +ʬ **ConnectorTokenClientContract**: `PublicMethodsOf`<[`ConnectorTokenClient`](../classes/client._internal_namespace.ConnectorTokenClient.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:22 + +___ + +### CreateUserActionClient + +ʬ **CreateUserActionClient**<`T`\>: [`CreateUserAction`](../interfaces/client._internal_namespace.CreateUserAction.md)<`T`\> & [`CommonUserActionArgs`](client._internal_namespace.md#commonuseractionargs) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends keyof [`BuilderParameters`](../interfaces/client._internal_namespace.BuilderParameters.md) | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/index.ts:98](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/index.ts#L98) + +___ + +### DeepPartial + +ʬ **DeepPartial**<`T`\>: { [P in keyof T]?: T[P] extends infer U[] ? DeepPartial[] : DeepPartial } + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Defined in + +x-pack/plugins/event_log/target/types/generated/schemas.d.ts:5 + +___ + +### DeepWriteable + +ʬ **DeepWriteable**<`T`\>: { -readonly [P in keyof T]: DeepWriteable } + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Defined in + +x-pack/plugins/event_log/target/types/generated/schemas.d.ts:2 + +___ + +### DestructiveRouteMethod + +ʬ **DestructiveRouteMethod**: ``"post"`` \| ``"put"`` \| ``"delete"`` \| ``"patch"`` + +Set of HTTP methods changing the state of the server. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:7 + +___ + +### ElasticsearchClient + +ʬ **ElasticsearchClient**: `Omit`<`KibanaClient`, ``"connectionPool"`` \| ``"transport"`` \| ``"serializer"`` \| ``"extend"`` \| ``"child"`` \| ``"close"`` \| ``"diagnostic"``\> & { `transport`: { `request`: (`params`: `TransportRequestParams`, `options?`: `TransportRequestOptions`) => `Promise`<`TransportResult`<`TResponse`, `unknown`\>\> } } + +Client used to query the elasticsearch cluster. + +#### Defined in + +src/core/target/types/server/elasticsearch/client/types.d.ts:8 + +___ + +### EmbeddableInput + +ʬ **EmbeddableInput**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `disableTriggers?` | `boolean` | Whether this embeddable should not execute triggers. | +| `disabledActions?` | `string`[] | List of action IDs that this embeddable should not render. | +| `enhancements?` | `SerializableRecord` | Reserved key for enhancements added by other plugins. | +| `executionContext?` | [`KibanaExecutionContext`](client._internal_namespace.md#kibanaexecutioncontext) | - | +| `hidePanelTitles?` | `boolean` | - | +| `id` | `string` | Note this is not a saved object id. It is used to uniquely identify this Embeddable instance from others (e.g. inside a container). It's possible to have two Embeddables where everything else is the same but the id. | +| `lastReloadRequestTime?` | `number` | - | +| `searchSessionId?` | `string` | Search session id to group searches | +| `syncColors?` | `boolean` | Flag whether colors should be synced with other panels | +| `title?` | `string` | - | +| `viewMode?` | [`ViewMode`](../enums/client._internal_namespace.ViewMode.md) | - | + +#### Defined in + +src/plugins/embeddable/target/types/common/types.d.ts:10 + +___ + +### EmbeddableStateWithType + +ʬ **EmbeddableStateWithType**: [`EmbeddableInput`](client._internal_namespace.md#embeddableinput) & { `type`: `string` } + +#### Defined in + +src/plugins/embeddable/target/types/common/types.d.ts:53 + +___ + +### EnsureSOAuthCallback + +ʬ **EnsureSOAuthCallback**: (`entities`: [`OwnerEntity`](../interfaces/client._internal_namespace.OwnerEntity.md)[]) => `void` + +#### Type declaration + +ā–ø (`entities`): `void` + +Function callback for making sure the found saved objects are of the authorized owner + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `entities` | [`OwnerEntity`](../interfaces/client._internal_namespace.OwnerEntity.md)[] | + +##### Returns + +`void` + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:110](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L110) + +___ + +### ExecutionEnqueuer + +ʬ **ExecutionEnqueuer**<`T`\>: (`unsecuredSavedObjectsClient`: [`SavedObjectsClientContract`](client._internal_namespace.md#savedobjectsclientcontract), `options`: [`ExecuteOptions`](../interfaces/client._internal_namespace.ExecuteOptions-1.md)) => `Promise`<`T`\> + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Type declaration + +ā–ø (`unsecuredSavedObjectsClient`, `options`): `Promise`<`T`\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `unsecuredSavedObjectsClient` | [`SavedObjectsClientContract`](client._internal_namespace.md#savedobjectsclientcontract) | +| `options` | [`ExecuteOptions`](../interfaces/client._internal_namespace.ExecuteOptions-1.md) | + +##### Returns + +`Promise`<`T`\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/create_execute_function.d.ts:19 + +___ + +### ExecutorType + +ʬ **ExecutorType**<`Config`, `Secrets`, `Params`, `ResultData`\>: (`options`: [`ActionTypeExecutorOptions`](../interfaces/client._internal_namespace.ActionTypeExecutorOptions.md)<`Config`, `Secrets`, `Params`\>) => `Promise`<[`ActionTypeExecutorResult`](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md)<`ResultData`\>\> + +#### Type parameters + +| Name | +| :------ | +| `Config` | +| `Secrets` | +| `Params` | +| `ResultData` | + +#### Type declaration + +ā–ø (`options`): `Promise`<[`ActionTypeExecutorResult`](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md)<`ResultData`\>\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`ActionTypeExecutorOptions`](../interfaces/client._internal_namespace.ActionTypeExecutorOptions.md)<`Config`, `Secrets`, `Params`\> | + +##### Returns + +`Promise`<[`ActionTypeExecutorResult`](../interfaces/client._internal_namespace.ActionTypeExecutorResult.md)<`ResultData`\>\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:62 + +___ + +### FailedRunResult + +ʬ **FailedRunResult**: [`SuccessfulRunResult`](client._internal_namespace.md#successfulrunresult) & { `error`: `Error` } + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:52 + +___ + +### FindCaseOptions + +ʬ **FindCaseOptions**: [`CasesFindRequest`](client._internal_namespace.md#casesfindrequest) & [`SavedObjectFindOptionsKueryNode`](client._internal_namespace.md#savedobjectfindoptionskuerynode) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:125](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L125) + +___ + +### GetAllSpacesPurpose + +ʬ **GetAllSpacesPurpose**: ``"any"`` \| ``"copySavedObjectsIntoSpace"`` \| ``"findSavedObjects"`` \| ``"shareSavedObjectsIntoSpace"`` + +The set of purposes to retrieve spaces: +- `any`: retrieves all spaces the user is authorized to see. +- `copySavedObjectsIntoSpace`: retrieves all spaces the user is authorized to copy saved objects into. +- `findSavedObjects`: retrieves all spaces the user is authorized to search within. +- `shareSavedObjectsIntoSpace`: retrieves all spaces the user is authorized to share saved objects into. + +#### Defined in + +x-pack/plugins/spaces/target/types/common/types.d.ts:74 + +___ + +### GetMigrationFunctionObjectFn + +ʬ **GetMigrationFunctionObjectFn**: () => [`MigrateFunctionsObject`](client._internal_namespace.md#migratefunctionsobject) + +#### Type declaration + +ā–ø (): [`MigrateFunctionsObject`](client._internal_namespace.md#migratefunctionsobject) + +##### Returns + +[`MigrateFunctionsObject`](client._internal_namespace.md#migratefunctionsobject) + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:77 + +___ + +### GetServicesFunction + +ʬ **GetServicesFunction**: (`request`: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)) => [`Services`](../interfaces/client._internal_namespace.Services.md) + +#### Type declaration + +ā–ø (`request`): [`Services`](../interfaces/client._internal_namespace.Services.md) + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md) | + +##### Returns + +[`Services`](../interfaces/client._internal_namespace.Services.md) + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:16 + +___ + +### GetSpaceFn + +ʬ **GetSpaceFn**: (`request`: [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md)) => `Promise`<[`Space`](../interfaces/client._internal_namespace.Space.md) \| `undefined`\> + +#### Type declaration + +ā–ø (`request`): `Promise`<[`Space`](../interfaces/client._internal_namespace.Space.md) \| `undefined`\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `request` | [`KibanaRequest`](../classes/client._internal_namespace.KibanaRequest.md) | + +##### Returns + +`Promise`<[`Space`](../interfaces/client._internal_namespace.Space.md) \| `undefined`\> + +#### Defined in + +[x-pack/plugins/cases/server/authorization/types.ts:21](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/authorization/types.ts#L21) + +___ + +### Headers + +ʬ **Headers**: { [header in KnownHeaders]?: string \| string[] } & { [header: string]: `string` \| `string`[] \| `undefined`; } + +Http request headers to read. + +#### Defined in + +src/core/target/types/server/http/router/headers.d.ts:36 + +___ + +### IBasePath + +ʬ **IBasePath**: `Pick`<[`BasePath`](../classes/client._internal_namespace.BasePath.md), keyof [`BasePath`](../classes/client._internal_namespace.BasePath.md)\> + +Access or manipulate the Kibana base path + +[BasePath](../classes/client._internal_namespace.BasePath.md) + +#### Defined in + +src/core/target/types/server/http/base_path_service.d.ts:50 + +___ + +### IEvent + +ʬ **IEvent**: [`DeepPartial`](client._internal_namespace.md#deeppartial)<[`DeepWriteable`](client._internal_namespace.md#deepwriteable)<[`IValidatedEvent`](client._internal_namespace.md#ivalidatedevent)\>\> + +#### Defined in + +x-pack/plugins/event_log/target/types/generated/schemas.d.ts:10 + +___ + +### IKibanaMigrator + +ʬ **IKibanaMigrator**: `Pick`<[`KibanaMigrator`](../classes/client._internal_namespace.KibanaMigrator.md), keyof [`KibanaMigrator`](../classes/client._internal_namespace.KibanaMigrator.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/kibana_migrator.d.ts:17 + +___ + +### ILicenseState + +ʬ **ILicenseState**: `PublicMethodsOf`<[`LicenseState`](../classes/client._internal_namespace.LicenseState.md)\> + +#### Defined in + +x-pack/plugins/actions/target/types/server/lib/license_state.d.ts:6 + +___ + +### ISavedObjectTypeRegistry + +ʬ **ISavedObjectTypeRegistry**: `Omit`<[`SavedObjectTypeRegistry`](../classes/client._internal_namespace.SavedObjectTypeRegistry.md), ``"registerType"``\> + +See [SavedObjectTypeRegistry](../classes/client._internal_namespace.SavedObjectTypeRegistry.md) for documentation. + +#### Defined in + +src/core/target/types/server/saved_objects/saved_objects_type_registry.d.ts:7 + +___ + +### ISavedObjectsRepository + +ʬ **ISavedObjectsRepository**: `Pick`<[`SavedObjectsRepository`](../classes/client._internal_namespace.SavedObjectsRepository.md), keyof [`SavedObjectsRepository`](../classes/client._internal_namespace.SavedObjectsRepository.md)\> + +See [SavedObjectsRepository](../classes/client._internal_namespace.SavedObjectsRepository.md) + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/repository.d.ts:57 + +___ + +### IValidatedEvent + +ʬ **IValidatedEvent**: `TypeOf` + +#### Defined in + +x-pack/plugins/event_log/target/types/generated/schemas.d.ts:9 + +___ + +### KibanaExecutionContext + +ʬ **KibanaExecutionContext**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `description` | `string` | human readable description. For example, a vis title, action name | +| `id` | `string` | unique value to identify the source | +| `name` | `string` | public name of a user-facing feature | +| `parent?` | [`KibanaExecutionContext`](client._internal_namespace.md#kibanaexecutioncontext) | a context that spawned the current context. | +| `type` | `string` | Kibana application initated an operation. | +| `url?` | `string` | in browser - url to navigate to a current page, on server - endpoint path, for task: task SO url | + +#### Defined in + +src/core/target/types/types/execution_context.d.ts:5 + +___ + +### KibanaRequestRouteOptions + +ʬ **KibanaRequestRouteOptions**<`Method`\>: `Method` extends ``"get"`` \| ``"options"`` ? `Required`<`Omit`<[`RouteConfigOptions`](../interfaces/client._internal_namespace.RouteConfigOptions.md)<`Method`\>, ``"body"``\>\> : `Required`<[`RouteConfigOptions`](../interfaces/client._internal_namespace.RouteConfigOptions.md)<`Method`\>\> + +Route options: If 'GET' or 'OPTIONS' method, body options won't be returned. + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Method` | extends [`RouteMethod`](client._internal_namespace.md#routemethod) | + +#### Defined in + +src/core/target/types/server/http/router/request.d.ts:30 + +___ + +### KnownHeaders + +ʬ **KnownHeaders**: [`KnownKeys`](client._internal_namespace.md#knownkeys)<`IncomingHttpHeaders`\> + +Set of well-known HTTP headers. + +#### Defined in + +src/core/target/types/server/http/router/headers.d.ts:31 + +___ + +### KnownKeys + +ʬ **KnownKeys**<`T`\>: [`StringKeysAsVals`](client._internal_namespace.md#stringkeysasvals)<`T`\> extends { [\_ in keyof T]: infer U } ? `U` : `never` + +Creates a Union type of all known keys of a given interface. + +**`example`** +```ts +interface Person { + name: string; + age: number; + [attributes: string]: string | number; +} +type PersonKnownKeys = KnownKeys; // "age" | "name" +``` + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Defined in + +src/core/target/types/server/http/router/headers.d.ts:24 + +___ + +### LicenseCheckState + +ʬ **LicenseCheckState**: ``"unavailable"`` \| ``"invalid"`` \| ``"valid"`` \| ``"expired"`` + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:1 + +___ + +### LicenseStatus + +ʬ **LicenseStatus**: ``"active"`` \| ``"invalid"`` \| ``"expired"`` + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:13 + +___ + +### Mapper + +ʬ **Mapper**<`T`\>: (`params`: `T`) => `Promise`<`T`\> + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Type declaration + +ā–ø (`params`): `Promise`<`T`\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | `T` | + +##### Returns + +`Promise`<`T`\> + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/lib/middleware.d.ts:2 + +___ + +### MigrateFunction + +ʬ **MigrateFunction**<`FromVersion`, `ToVersion`\>: (`state`: `FromVersion`) => `ToVersion` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `FromVersion` | extends `Serializable` = `SerializableRecord` | +| `ToVersion` | extends `Serializable` = `SerializableRecord` | + +#### Type declaration + +ā–ø (`state`): `ToVersion` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `state` | `FromVersion` | + +##### Returns + +`ToVersion` + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:86 + +___ + +### MigrateFunctionsObject + +ʬ **MigrateFunctionsObject**: `Object` + +Collection of migrations that a given type of persistable state object has +accumulated over time. Migration functions are keyed using semver version +of Kibana releases. + +#### Index signature + +ā–Ŗ [semver: `string`]: [`MigrateFunction`](client._internal_namespace.md#migratefunction)<`any`, `any`\> + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:83 + +___ + +### MigrationResult + +ʬ **MigrationResult**: { `status`: ``"skipped"`` } \| { `status`: ``"patched"`` } \| { `destIndex`: `string` ; `elapsedMs`: `number` ; `sourceIndex`: `string` ; `status`: ``"migrated"`` } + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/core/types.d.ts:2 + +___ + +### MigrationStatus + +ʬ **MigrationStatus**: ``"waiting_to_start"`` \| ``"waiting_for_other_nodes"`` \| ``"running"`` \| ``"completed"`` + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/core/types.d.ts:1 + +___ + +### MutatingOperationRefreshSetting + +ʬ **MutatingOperationRefreshSetting**: `boolean` \| ``"wait_for"`` + +Elasticsearch Refresh setting for mutating operation + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:132 + +___ + +### PatchCaseArgs + +ʬ **PatchCaseArgs**: [`PatchCase`](../interfaces/client._internal_namespace.PatchCase.md) & [`ClientArgs`](../interfaces/client._internal_namespace.ClientArgs-1.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/cases/index.ts:103](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/cases/index.ts#L103) + +___ + +### PersistableStateDefinition + +ʬ **PersistableStateDefinition**<`P`\>: `Partial`<[`PersistableState`](../interfaces/client._internal_namespace.PersistableState.md)<`P`\>\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `P` | extends `SerializableRecord` = `SerializableRecord` | + +#### Defined in + +src/plugins/kibana_utils/target/types/common/persistable_state/types.d.ts:93 + +___ + +### PublicFeatures + +ʬ **PublicFeatures**: `Record`<`string`, [`LicenseFeature`](../interfaces/client._internal_namespace.LicenseFeature.md)\> + +Provides information about feature availability for the current license. + +#### Defined in + +x-pack/plugins/licensing/target/types/common/types.d.ts:51 + +___ + +### RouteContentType + +ʬ **RouteContentType**: ``"application/json"`` \| ``"application/*+json"`` \| ``"application/octet-stream"`` \| ``"application/x-www-form-urlencoded"`` \| ``"multipart/form-data"`` \| ``"text/*"`` + +The set of supported parseable Content-Types + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:27 + +___ + +### RouteMethod + +ʬ **RouteMethod**: [`SafeRouteMethod`](client._internal_namespace.md#saferoutemethod) \| [`DestructiveRouteMethod`](client._internal_namespace.md#destructiveroutemethod) + +The set of common HTTP methods supported by Kibana routing. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:17 + +___ + +### RouteValidationFunction + +ʬ **RouteValidationFunction**<`T`\>: (`data`: `any`, `validationResult`: [`RouteValidationResultFactory`](../interfaces/client._internal_namespace.RouteValidationResultFactory.md)) => { `error?`: `never` ; `value`: `T` } \| { `error`: [`RouteValidationError`](../classes/client._internal_namespace.RouteValidationError.md) ; `value?`: `never` } + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Type declaration + +ā–ø (`data`, `validationResult`): { `error?`: `never` ; `value`: `T` } \| { `error`: [`RouteValidationError`](../classes/client._internal_namespace.RouteValidationError.md) ; `value?`: `never` } + +The custom validation function if @kbn/config-schema is not a valid solution for your specific plugin requirements. + +**`example`** + +The validation should look something like: +```typescript +interface MyExpectedBody { + bar: string; + baz: number; +} + +const myBodyValidation: RouteValidationFunction = (data, validationResult) => { + const { ok, badRequest } = validationResult; + const { bar, baz } = data || {}; + if (typeof bar === 'string' && typeof baz === 'number') { + return ok({ bar, baz }); + } else { + return badRequest('Wrong payload', ['body']); + } +} +``` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `any` | +| `validationResult` | [`RouteValidationResultFactory`](../interfaces/client._internal_namespace.RouteValidationResultFactory.md) | + +##### Returns + +{ `error?`: `never` ; `value`: `T` } \| { `error`: [`RouteValidationError`](../classes/client._internal_namespace.RouteValidationError.md) ; `value?`: `never` } + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:43 + +___ + +### RouteValidationSpec + +ʬ **RouteValidationSpec**<`T`\>: `ObjectType` \| `Type`<`T`\> \| [`RouteValidationFunction`](client._internal_namespace.md#routevalidationfunction)<`T`\> + +Allowed property validation options: either @kbn/config-schema validations or custom validation functions + +See [RouteValidationFunction](client._internal_namespace.md#routevalidationfunction) for custom validation. + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:57 + +___ + +### RouteValidatorFullConfig + +ʬ **RouteValidatorFullConfig**<`P`, `Q`, `B`\>: [`RouteValidatorConfig`](../interfaces/client._internal_namespace.RouteValidatorConfig.md)<`P`, `Q`, `B`\> & [`RouteValidatorOptions`](../interfaces/client._internal_namespace.RouteValidatorOptions.md) + +Route validations config and options merged into one object + +#### Type parameters + +| Name | +| :------ | +| `P` | +| `Q` | +| `B` | + +#### Defined in + +src/core/target/types/server/http/router/validator/validator.d.ts:101 + +___ + +### RunFunction + +ʬ **RunFunction**: () => `Promise`<[`RunResult`](client._internal_namespace.md#runresult) \| `undefined` \| `void`\> + +#### Type declaration + +ā–ø (): `Promise`<[`RunResult`](client._internal_namespace.md#runresult) \| `undefined` \| `void`\> + +##### Returns + +`Promise`<[`RunResult`](client._internal_namespace.md#runresult) \| `undefined` \| `void`\> + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:64 + +___ + +### RunResult + +ʬ **RunResult**: [`FailedRunResult`](client._internal_namespace.md#failedrunresult) \| [`SuccessfulRunResult`](client._internal_namespace.md#successfulrunresult) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:59 + +___ + +### SafeRouteMethod + +ʬ **SafeRouteMethod**: ``"get"`` \| ``"options"`` + +Set of HTTP methods not changing the state of the server. + +#### Defined in + +src/core/target/types/server/http/router/route.d.ts:12 + +___ + +### SavedObjectAttribute + +ʬ **SavedObjectAttribute**: [`SavedObjectAttributeSingle`](client._internal_namespace.md#savedobjectattributesingle) \| [`SavedObjectAttributeSingle`](client._internal_namespace.md#savedobjectattributesingle)[] + +Type definition for a Saved Object attribute value + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:12 + +___ + +### SavedObjectAttributeSingle + +ʬ **SavedObjectAttributeSingle**: `string` \| `number` \| `boolean` \| ``null`` \| `undefined` \| [`SavedObjectAttributes`](../interfaces/client._internal_namespace.SavedObjectAttributes.md) + +Don't use this type, it's simply a helper type for [SavedObjectAttribute](client._internal_namespace.md#savedobjectattribute) + +#### Defined in + +src/core/target/types/types/saved_objects.d.ts:6 + +___ + +### SavedObjectFindOptions + +ʬ **SavedObjectFindOptions**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/saved_object.ts:72](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/saved_object.ts#L72) + +___ + +### SavedObjectFindOptionsKueryNode + +ʬ **SavedObjectFindOptionsKueryNode**: `Omit`<[`SavedObjectFindOptions`](client._internal_namespace.md#savedobjectfindoptions), ``"filter"``\> & { `filter?`: `KueryNode` } + +#### Defined in + +[x-pack/plugins/cases/server/common/types.ts:19](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/common/types.ts#L19) + +___ + +### SavedObjectMigrationFn + +ʬ **SavedObjectMigrationFn**<`InputAttributes`, `MigratedAttributes`\>: (`doc`: [`SavedObjectUnsanitizedDoc`](client._internal_namespace.md#savedobjectunsanitizeddoc)<`InputAttributes`\>, `context`: [`SavedObjectMigrationContext`](../interfaces/client._internal_namespace.SavedObjectMigrationContext.md)) => [`SavedObjectUnsanitizedDoc`](client._internal_namespace.md#savedobjectunsanitizeddoc)<`MigratedAttributes`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `InputAttributes` | `unknown` | +| `MigratedAttributes` | `unknown` | + +#### Type declaration + +ā–ø (`doc`, `context`): [`SavedObjectUnsanitizedDoc`](client._internal_namespace.md#savedobjectunsanitizeddoc)<`MigratedAttributes`\> + +A migration function for a [saved object type](../interfaces/client._internal_namespace.SavedObjectsType.md) +used to migrate it to a given version + +**`example`** +```typescript +interface TypeV1Attributes { + someKey: string; + obsoleteProperty: number; +} + +interface TypeV2Attributes { + someKey: string; + newProperty: string; +} + +const migrateToV2: SavedObjectMigrationFn = (doc, { log }) => { + const { obsoleteProperty, ...otherAttributes } = doc.attributes; + // instead of mutating `doc` we make a shallow copy so that we can use separate types for the input + // and output attributes. We don't need to make a deep copy, we just need to ensure that obsolete + // attributes are not present on the returned doc. + return { + ...doc, + attributes: { + ...otherAttributes, + newProperty: migrate(obsoleteProperty), + }, + }; +}; +``` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `doc` | [`SavedObjectUnsanitizedDoc`](client._internal_namespace.md#savedobjectunsanitizeddoc)<`InputAttributes`\> | +| `context` | [`SavedObjectMigrationContext`](../interfaces/client._internal_namespace.SavedObjectMigrationContext.md) | + +##### Returns + +[`SavedObjectUnsanitizedDoc`](client._internal_namespace.md#savedobjectunsanitizeddoc)<`MigratedAttributes`\> + +#### Defined in + +src/core/target/types/server/saved_objects/migrations/types.d.ts:39 + +___ + +### SavedObjectTypeExcludeFromUpgradeFilterHook + +ʬ **SavedObjectTypeExcludeFromUpgradeFilterHook**: (`toolkit`: { `readonlyEsClient`: `Pick`<[`ElasticsearchClient`](client._internal_namespace.md#elasticsearchclient), ``"search"``\> }) => `estypes.QueryDslQueryContainer` \| `Promise`<`estypes.QueryDslQueryContainer`\> + +#### Type declaration + +ā–ø (`toolkit`): `estypes.QueryDslQueryContainer` \| `Promise`<`estypes.QueryDslQueryContainer`\> + +If defined, allows a type to run a search query and return a query filter that may match any documents which may +be excluded from the next migration upgrade process. Useful for cleaning up large numbers of old documents which +are no longer needed and may slow the migration process. + +If this hook fails, the migration will proceed without these documents having been filtered out, so this +should not be used as a guarantee that these documents have been deleted. + +**`alpha`** Experimental and subject to change + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `toolkit` | `Object` | +| `toolkit.readonlyEsClient` | `Pick`<[`ElasticsearchClient`](client._internal_namespace.md#elasticsearchclient), ``"search"``\> | + +##### Returns + +`estypes.QueryDslQueryContainer` \| `Promise`<`estypes.QueryDslQueryContainer`\> + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:479 + +___ + +### SavedObjectUnsanitizedDoc + +ʬ **SavedObjectUnsanitizedDoc**<`T`\>: [`SavedObjectDoc`](../interfaces/client._internal_namespace.SavedObjectDoc.md)<`T`\> & `Partial`<[`Referencable`](../interfaces/client._internal_namespace.Referencable.md)\> + +Describes Saved Object documents from Kibana < 7.0.0 which don't have a +`references` root property defined. This type should only be used in +migrations. + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Defined in + +src/core/target/types/server/saved_objects/serialization/types.d.ts:49 + +___ + +### SavedObjectsClientContract + +ʬ **SavedObjectsClientContract**: `Pick`<[`SavedObjectsClient`](../classes/client._internal_namespace.SavedObjectsClient.md), keyof [`SavedObjectsClient`](../classes/client._internal_namespace.SavedObjectsClient.md)\> + +Saved Objects is Kibana's data persisentence mechanism allowing plugins to +use Elasticsearch for storing plugin state. + +## SavedObjectsClient errors + +Since the SavedObjectsClient has its hands in everything we +are a little paranoid about the way we present errors back to +to application code. Ideally, all errors will be either: + + 1. Caused by bad implementation (ie. undefined is not a function) and + as such unpredictable + 2. An error that has been classified and decorated appropriately + by the decorators in [SavedObjectsErrorHelpers](../classes/client._internal_namespace.SavedObjectsErrorHelpers.md) + +Type 1 errors are inevitable, but since all expected/handle-able errors +should be Type 2 the `isXYZError()` helpers exposed at +`SavedObjectsErrorHelpers` should be used to understand and manage error +responses from the `SavedObjectsClient`. + +Type 2 errors are decorated versions of the source error, so if +the elasticsearch client threw an error it will be decorated based +on its type. That means that rather than looking for `error.body.error.type` or +doing substring checks on `error.body.error.reason`, just use the helpers to +understand the meaning of the error: + + ```js + if (SavedObjectsErrorHelpers.isNotFoundError(error)) { + // handle 404 + } + + if (SavedObjectsErrorHelpers.isNotAuthorizedError(error)) { + // 401 handling should be automatic, but in case you wanted to know + } + + // always rethrow the error unless you handle it + throw error; + ``` + +### 404s from missing index + +From the perspective of application code and APIs the SavedObjectsClient is +a black box that persists objects. One of the internal details that users have +no control over is that we use an elasticsearch index for persistence and that +index might be missing. + +At the time of writing we are in the process of transitioning away from the +operating assumption that the SavedObjects index is always available. Part of +this transition is handling errors resulting from an index missing. These used +to trigger a 500 error in most cases, and in others cause 404s with different +error messages. + +From my (Spencer) perspective, a 404 from the SavedObjectsApi is a 404; The +object the request/call was targeting could not be found. This is why #14141 +takes special care to ensure that 404 errors are generic and don't distinguish +between index missing or document missing. + +See [SavedObjectsClient](../classes/client._internal_namespace.SavedObjectsClient.md) +See [SavedObjectsErrorHelpers](../classes/client._internal_namespace.SavedObjectsErrorHelpers.md) + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:195 + +___ + +### SavedObjectsCreatePointInTimeFinderOptions + +ʬ **SavedObjectsCreatePointInTimeFinderOptions**: `Omit`<[`SavedObjectsFindOptions`](../interfaces/client._internal_namespace.SavedObjectsFindOptions.md), ``"page"`` \| ``"pit"`` \| ``"searchAfter"``\> + +#### Defined in + +src/core/target/types/server/saved_objects/service/lib/point_in_time_finder.d.ts:7 + +___ + +### SavedObjectsExportTransform + +ʬ **SavedObjectsExportTransform**<`T`\>: (`context`: [`SavedObjectsExportTransformContext`](../interfaces/client._internal_namespace.SavedObjectsExportTransformContext.md), `objects`: [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>[]) => [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)[] \| `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)[]\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Type declaration + +ā–ø (`context`, `objects`): [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)[] \| `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)[]\> + +Transformation function used to mutate the exported objects of the associated type. + +A type's export transform function will be executed once per user-initiated export, +for all objects of that type. + +**`example`** +Registering a transform function changing the object's attributes during the export +```ts +// src/plugins/my_plugin/server/plugin.ts +import { myType } from './saved_objects'; + +export class Plugin() { + setup: (core: CoreSetup) => { + core.savedObjects.registerType({ + ...myType, + management: { + ...myType.management, + onExport: (ctx, objects) => { + return objects.map((obj) => ({ + ...obj, + attributes: { + ...obj.attributes, + enabled: false, + } + }) + } + }, + }); + } +} +``` + +**`example`** +Registering a transform function adding additional objects to the export +```ts +// src/plugins/my_plugin/server/plugin.ts +import { myType } from './saved_objects'; + +export class Plugin() { + setup: (core: CoreSetup) => { + const savedObjectStartContractPromise = getStartServices().then( + ([{ savedObjects: savedObjectsStart }]) => savedObjectsStart + ); + + core.savedObjects.registerType({ + ...myType, + management: { + ...myType.management, + onExport: async (ctx, objects) => { + const { getScopedClient } = await savedObjectStartContractPromise; + const client = getScopedClient(ctx.request); + + const depResponse = await client.find({ + type: 'my-nested-object', + hasReference: objs.map(({ id, type }) => ({ id, type })), + }); + + return [...objs, ...depResponse.saved_objects]; + } + }, + }); + } +} +``` + +**`remarks`** Trying to change an object's id or type during the transform will result in + a runtime error during the export process. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `context` | [`SavedObjectsExportTransformContext`](../interfaces/client._internal_namespace.SavedObjectsExportTransformContext.md) | +| `objects` | [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>[] | + +##### Returns + +[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)[] \| `Promise`<[`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)[]\> + +#### Defined in + +src/core/target/types/server/saved_objects/export/types.d.ts:160 + +___ + +### SavedObjectsExportablePredicate + +ʬ **SavedObjectsExportablePredicate**<`Attributes`\>: (`obj`: [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`Attributes`\>) => `boolean` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Attributes` | `unknown` | + +#### Type declaration + +ā–ø (`obj`): `boolean` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `obj` | [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`Attributes`\> | + +##### Returns + +`boolean` + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:467 + +___ + +### SavedObjectsFieldMapping + +ʬ **SavedObjectsFieldMapping**: `estypes.MappingProperty` & { `dynamic?`: ``false`` \| ``"strict"`` } + +Describe a [saved object type mapping](../interfaces/client._internal_namespace.SavedObjectsTypeMappingDefinition.md) field. + +Please refer to [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html) +For the mapping documentation + +#### Defined in + +src/core/target/types/server/saved_objects/mappings/types.d.ts:89 + +___ + +### SavedObjectsImportHook + +ʬ **SavedObjectsImportHook**<`T`\>: (`objects`: [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>[]) => [`SavedObjectsImportHookResult`](../interfaces/client._internal_namespace.SavedObjectsImportHookResult.md) \| `Promise`<[`SavedObjectsImportHookResult`](../interfaces/client._internal_namespace.SavedObjectsImportHookResult.md)\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Type declaration + +ā–ø (`objects`): [`SavedObjectsImportHookResult`](../interfaces/client._internal_namespace.SavedObjectsImportHookResult.md) \| `Promise`<[`SavedObjectsImportHookResult`](../interfaces/client._internal_namespace.SavedObjectsImportHookResult.md)\> + +A hook associated with a specific saved object type, that will be invoked during +the import process. The hook will have access to the objects of the registered type. + +Currently, the only supported feature for import hooks is to return warnings to be displayed +in the UI when the import succeeds. + +**`remark`** The only interactions the hook can have with the import process is via the hook's + response. Mutating the objects inside the hook's code will have no effect. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `objects` | [`SavedObject`](../interfaces/client._internal_namespace.SavedObject.md)<`T`\>[] | + +##### Returns + +[`SavedObjectsImportHookResult`](../interfaces/client._internal_namespace.SavedObjectsImportHookResult.md) \| `Promise`<[`SavedObjectsImportHookResult`](../interfaces/client._internal_namespace.SavedObjectsImportHookResult.md)\> + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:227 + +___ + +### SavedObjectsImportWarning + +ʬ **SavedObjectsImportWarning**: [`SavedObjectsImportSimpleWarning`](../interfaces/client._internal_namespace.SavedObjectsImportSimpleWarning.md) \| [`SavedObjectsImportActionRequiredWarning`](../interfaces/client._internal_namespace.SavedObjectsImportActionRequiredWarning.md) + +Composite type of all the possible types of import warnings. + +See [SavedObjectsImportSimpleWarning](../interfaces/client._internal_namespace.SavedObjectsImportSimpleWarning.md) and [SavedObjectsImportActionRequiredWarning](../interfaces/client._internal_namespace.SavedObjectsImportActionRequiredWarning.md) +for more details. + +#### Defined in + +src/core/target/types/server/saved_objects/import/types.d.ts:203 + +___ + +### SavedObjectsNamespaceType + +ʬ **SavedObjectsNamespaceType**: ``"single"`` \| ``"multiple"`` \| ``"multiple-isolated"`` \| ``"agnostic"`` + +The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: + * single (default): This type of saved object is namespace-isolated, e.g., it exists in only one namespace. + * multiple: This type of saved object is shareable, e.g., it can exist in one or more namespaces. + * multiple-isolated: This type of saved object is namespace-isolated, e.g., it exists in only one namespace, but object IDs must be + unique across all namespaces. This is intended to be an intermediate step when objects with a "single" namespace type are being + converted to a "multiple" namespace type. In other words, objects with a "multiple-isolated" namespace type will be *share-capable*, + but will not actually be shareable until the namespace type is changed to "multiple". + * agnostic: This type of saved object is global. + +#### Defined in + +src/core/target/types/server/saved_objects/types.d.ts:208 + +___ + +### SavedObjectsValidationSpec + +ʬ **SavedObjectsValidationSpec**: `ObjectType` + +Allows for validating properties using @kbn/config-schema validations. + +#### Defined in + +src/core/target/types/server/saved_objects/validation/types.d.ts:7 + +___ + +### SpaceIdToNamespaceFunction + +ʬ **SpaceIdToNamespaceFunction**: (`spaceId?`: `string`) => `string` \| `undefined` + +#### Type declaration + +ā–ø (`spaceId?`): `string` \| `undefined` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `spaceId?` | `string` | + +##### Returns + +`string` \| `undefined` + +#### Defined in + +x-pack/plugins/actions/target/types/server/types.d.ts:18 + +___ + +### StringKeysAsVals + +ʬ **StringKeysAsVals**<`T`\>: { [K in keyof T]: string extends K ? never : number extends K ? never : K } + +Converts an object type to a new object type where each string +key is copied to the values of the object, and non string keys are +given a `never` value. This allows us to map over the values and +get the list of all string keys on a type in `KnownKeys` + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Defined in + +src/core/target/types/server/http/router/headers.d.ts:9 + +___ + +### SubFeaturePrivilegeGroupType + +ʬ **SubFeaturePrivilegeGroupType**: ``"mutually_exclusive"`` \| ``"independent"`` + +The type of privilege group. +- `mutually_exclusive`:: + Users will be able to select at most one privilege within this group. + Privileges must be specified in descending order of permissiveness (e.g. `All`, `Read`, not `Read`, `All) +- `independent`:: + Users will be able to select any combination of privileges within this group. + +#### Defined in + +x-pack/plugins/features/target/types/common/sub_feature.d.ts:21 + +___ + +### SuccessfulRunResult + +ʬ **SuccessfulRunResult**: { `state`: `Record`<`string`, `unknown`\> } & { `runAt?`: `Date` ; `schedule?`: `never` } \| { `runAt?`: `never` ; `schedule?`: [`IntervalSchedule`](../interfaces/client._internal_namespace.IntervalSchedule.md) } + +The return value of a task's run function should be a promise of RunResult. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:28 + +___ + +### TaskDefinitionRegistry + +ʬ **TaskDefinitionRegistry**: `Record`<`string`, [`TaskRegisterDefinition`](../interfaces/client._internal_namespace.TaskRegisterDefinition.md)\> + +A mapping of task type id to the task definition. + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task_type_dictionary.d.ts:52 + +___ + +### TaskRunCreatorFunction + +ʬ **TaskRunCreatorFunction**: (`context`: [`RunContext`](../interfaces/client._internal_namespace.RunContext.md)) => [`CancellableTask`](../interfaces/client._internal_namespace.CancellableTask.md) + +#### Type declaration + +ā–ø (`context`): [`CancellableTask`](../interfaces/client._internal_namespace.CancellableTask.md) + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `context` | [`RunContext`](../interfaces/client._internal_namespace.RunContext.md) | + +##### Returns + +[`CancellableTask`](../interfaces/client._internal_namespace.CancellableTask.md) + +#### Defined in + +x-pack/plugins/task_manager/target/types/server/task.d.ts:70 + +___ + +### UpdateAttachmentArgs + +ʬ **UpdateAttachmentArgs**: [`UpdateArgs`](../interfaces/client._internal_namespace.UpdateArgs.md) & [`ClientArgs`](../interfaces/client._internal_namespace.ClientArgs-1.md) + +#### Defined in + +[x-pack/plugins/cases/server/services/attachments/index.ts:59](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/attachments/index.ts#L59) + +___ + +### UserAction + +ʬ **UserAction**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/user_actions/index.ts:85](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/user_actions/index.ts#L85) + +___ + +### UserActionParameters + +ʬ **UserActionParameters**<`T`\>: [`BuilderParameters`](../interfaces/client._internal_namespace.BuilderParameters.md)[`T`][``"parameters"``] & [`CommonArguments`](../interfaces/client._internal_namespace.CommonArguments.md) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends keyof [`BuilderParameters`](../interfaces/client._internal_namespace.BuilderParameters.md) | + +#### Defined in + +[x-pack/plugins/cases/server/services/user_actions/types.ts:71](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/services/user_actions/types.ts#L71) + +___ + +### UserActionTypes + +ʬ **UserActionTypes**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/user_actions/index.ts:86](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/user_actions/index.ts#L86) + +## Variables + +### ActionTypesRt + +ā€¢ **ActionTypesRt**: `KeyofC`<{ `comment`: ``"comment"`` = 'comment'; `connector`: ``"connector"`` = 'connector'; `create_case`: ``"create_case"`` = 'create\_case'; `delete_case`: ``"delete_case"`` = 'delete\_case'; `description`: ``"description"`` = 'description'; `pushed`: ``"pushed"`` = 'pushed'; `settings`: ``"settings"`` = 'settings'; `status`: ``"status"`` = 'status'; `tags`: ``"tags"`` = 'tags'; `title`: ``"title"`` = 'title' }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/user_actions/common.ts:35](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/user_actions/common.ts#L35) + +___ + +### ActionsRt + +ā€¢ **ActionsRt**: `KeyofC`<{ `add`: ``"add"`` = 'add'; `create`: ``"create"`` = 'create'; `delete`: ``"delete"`` = 'delete'; `push_to_service`: ``"push_to_service"`` = 'push\_to\_service'; `update`: ``"update"`` = 'update' }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/user_actions/common.ts:36](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/user_actions/common.ts#L36) + +___ + +### CasesFindRequestRt + +ā€¢ **CasesFindRequestRt**: `PartialC`<{ `defaultSearchOperator`: `UnionC`<[`LiteralC`<``"AND"``\>, `LiteralC`<``"OR"``\>]\> ; `fields`: `ArrayC`<`StringC`\> ; `owner`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `page`: `Type`<`number`, `string`, `unknown`\> = NumberFromString; `perPage`: `Type`<`number`, `string`, `unknown`\> = NumberFromString; `reporters`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `search`: `StringC` = rt.string; `searchFields`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `sortField`: `StringC` = rt.string; `sortOrder`: `UnionC`<[`LiteralC`<``"desc"``\>, `LiteralC`<``"asc"``\>]\> ; `status`: `UnionC`<[`LiteralC`<[`open`](../enums/client._internal_namespace.CaseStatuses.md#open)\>, `LiteralC`<`any`[`any`]\>, `LiteralC`<[`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed)\>]\> = CaseStatusRt; `tags`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:136](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L136) + +___ + +### EventSchema + +ā€¢ **EventSchema**: `Type` + +#### Defined in + +x-pack/plugins/event_log/target/types/generated/schemas.d.ts:11 + +___ + +### SavedObjectFindOptionsRt + +ā€¢ **SavedObjectFindOptionsRt**: `PartialC`<{ `defaultSearchOperator`: `UnionC`<[`LiteralC`<``"AND"``\>, `LiteralC`<``"OR"``\>]\> ; `fields`: `ArrayC`<`StringC`\> ; `filter`: `StringC` = rt.string; `hasReference`: `UnionC`<[`ArrayC`<`TypeC`<{ `id`: `StringC` = rt.string; `type`: `StringC` = rt.string }\>\>, `TypeC`<{ `id`: `StringC` = rt.string; `type`: `StringC` = rt.string }\>]\> ; `hasReferenceOperator`: `UnionC`<[`LiteralC`<``"AND"``\>, `LiteralC`<``"OR"``\>]\> ; `page`: `Type`<`number`, `string`, `unknown`\> = NumberFromString; `perPage`: `Type`<`number`, `string`, `unknown`\> = NumberFromString; `search`: `StringC` = rt.string; `searchFields`: `ArrayC`<`StringC`\> ; `sortField`: `StringC` = rt.string; `sortOrder`: `UnionC`<[`LiteralC`<``"desc"``\>, `LiteralC`<``"asc"``\>]\> }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/saved_object.ts:25](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/saved_object.ts#L25) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/client.md b/x-pack/plugins/cases/docs/cases_client/modules/client.md index 7fb6b64253dd9..b03a7ba7673bb 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/client.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/client.md @@ -1,9 +1,13 @@ -[Cases Client API Interface](../cases_client_api.md) / client +[Cases Client API Interface](../README.md) / client # Module: client ## Table of contents +### Namespaces + +- [\_internal\_namespace](client._internal_namespace.md) + ### Classes -- [CasesClient](../classes/client.casesclient.md) +- [CasesClient](../classes/client.CasesClient.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/configure_client._internal_namespace.md b/x-pack/plugins/cases/docs/cases_client/modules/configure_client._internal_namespace.md new file mode 100644 index 0000000000000..cb22acb5a298c --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/modules/configure_client._internal_namespace.md @@ -0,0 +1,13 @@ +[Cases Client API Interface](../README.md) / [configure/client](configure_client.md) / \_internal\_namespace + +# Namespace: \_internal\_namespace + +[configure/client](configure_client.md)._internal_namespace + +## Table of contents + +### Interfaces + +- [CreateMappingsArgs](../interfaces/configure_client._internal_namespace.CreateMappingsArgs.md) +- [MappingsArgs](../interfaces/configure_client._internal_namespace.MappingsArgs.md) +- [UpdateMappingsArgs](../interfaces/configure_client._internal_namespace.UpdateMappingsArgs.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/configure_client.md b/x-pack/plugins/cases/docs/cases_client/modules/configure_client.md index 7cfc43e3d0a88..690afd51a4f65 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/configure_client.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/configure_client.md @@ -1,9 +1,37 @@ -[Cases Client API Interface](../cases_client_api.md) / configure/client +[Cases Client API Interface](../README.md) / configure/client # Module: configure/client ## Table of contents +### Namespaces + +- [\_internal\_namespace](configure_client._internal_namespace.md) + ### Interfaces -- [ConfigureSubClient](../interfaces/configure_client.configuresubclient.md) +- [ConfigureSubClient](../interfaces/configure_client.ConfigureSubClient.md) + +### Functions + +- [getConnectors](configure_client.md#getconnectors) + +## Functions + +### getConnectors + +ā–ø **getConnectors**(`__namedParameters`): `Promise`<[`FindActionResult`](../interfaces/client._internal_namespace.FindActionResult.md)[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | [`CasesClientArgs`](../interfaces/client._internal_namespace.CasesClientArgs.md) | + +#### Returns + +`Promise`<[`FindActionResult`](../interfaces/client._internal_namespace.FindActionResult.md)[]\> + +#### Defined in + +[x-pack/plugins/cases/server/client/configure/client.ts:206](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/server/client/configure/client.ts#L206) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/metrics_client._internal_namespace.md b/x-pack/plugins/cases/docs/cases_client/modules/metrics_client._internal_namespace.md new file mode 100644 index 0000000000000..318b517747494 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/modules/metrics_client._internal_namespace.md @@ -0,0 +1,11 @@ +[Cases Client API Interface](../README.md) / [metrics/client](metrics_client.md) / \_internal\_namespace + +# Namespace: \_internal\_namespace + +[metrics/client](metrics_client.md)._internal_namespace + +## Table of contents + +### Interfaces + +- [CaseMetricsParams](../interfaces/metrics_client._internal_namespace.CaseMetricsParams.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/metrics_client.md b/x-pack/plugins/cases/docs/cases_client/modules/metrics_client.md new file mode 100644 index 0000000000000..c4c7354ba5afe --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/modules/metrics_client.md @@ -0,0 +1,13 @@ +[Cases Client API Interface](../README.md) / metrics/client + +# Module: metrics/client + +## Table of contents + +### Namespaces + +- [\_internal\_namespace](metrics_client._internal_namespace.md) + +### Interfaces + +- [MetricsSubClient](../interfaces/metrics_client.MetricsSubClient.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/stats_client.md b/x-pack/plugins/cases/docs/cases_client/modules/stats_client.md index 992a1a1ab501a..f0632f6ca0069 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/stats_client.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/stats_client.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / stats/client +[Cases Client API Interface](../README.md) / stats/client # Module: stats/client @@ -6,4 +6,4 @@ ### Interfaces -- [StatsSubClient](../interfaces/stats_client.statssubclient.md) +- [StatsSubClient](../interfaces/stats_client.StatsSubClient.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/sub_cases_client.md b/x-pack/plugins/cases/docs/cases_client/modules/sub_cases_client.md deleted file mode 100644 index 6bdf073566b1c..0000000000000 --- a/x-pack/plugins/cases/docs/cases_client/modules/sub_cases_client.md +++ /dev/null @@ -1,9 +0,0 @@ -[Cases Client API Interface](../cases_client_api.md) / sub_cases/client - -# Module: sub\_cases/client - -## Table of contents - -### Interfaces - -- [SubCasesClient](../interfaces/sub_cases_client.subcasesclient.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/typedoc_interfaces._internal_namespace.md b/x-pack/plugins/cases/docs/cases_client/modules/typedoc_interfaces._internal_namespace.md new file mode 100644 index 0000000000000..38b2fc2ea5150 --- /dev/null +++ b/x-pack/plugins/cases/docs/cases_client/modules/typedoc_interfaces._internal_namespace.md @@ -0,0 +1,277 @@ +[Cases Client API Interface](../README.md) / [typedoc\_interfaces](typedoc_interfaces.md) / \_internal\_namespace + +# Namespace: \_internal\_namespace + +[typedoc_interfaces](typedoc_interfaces.md)._internal_namespace + +## Table of contents + +### Type aliases + +- [AllCommentsResponse](typedoc_interfaces._internal_namespace.md#allcommentsresponse) +- [CasePostRequest](typedoc_interfaces._internal_namespace.md#casepostrequest) +- [CaseResolveResponse](typedoc_interfaces._internal_namespace.md#caseresolveresponse) +- [CaseResponse](typedoc_interfaces._internal_namespace.md#caseresponse) +- [CaseUserActionsResponse](typedoc_interfaces._internal_namespace.md#caseuseractionsresponse) +- [CasesConfigurePatch](typedoc_interfaces._internal_namespace.md#casesconfigurepatch) +- [CasesConfigureRequest](typedoc_interfaces._internal_namespace.md#casesconfigurerequest) +- [CasesConfigureResponse](typedoc_interfaces._internal_namespace.md#casesconfigureresponse) +- [CasesFindResponse](typedoc_interfaces._internal_namespace.md#casesfindresponse) +- [CasesPatchRequest](typedoc_interfaces._internal_namespace.md#casespatchrequest) +- [CasesResponse](typedoc_interfaces._internal_namespace.md#casesresponse) +- [CommentsResponse](typedoc_interfaces._internal_namespace.md#commentsresponse) + +### Variables + +- [AllCommentsResponseRt](typedoc_interfaces._internal_namespace.md#allcommentsresponsert) +- [CaseConfigureResponseRt](typedoc_interfaces._internal_namespace.md#caseconfigureresponsert) +- [CasePostRequestRt](typedoc_interfaces._internal_namespace.md#casepostrequestrt) +- [CaseResolveResponseRt](typedoc_interfaces._internal_namespace.md#caseresolveresponsert) +- [CaseResponseRt](typedoc_interfaces._internal_namespace.md#caseresponsert) +- [CaseUserActionsResponseRt](typedoc_interfaces._internal_namespace.md#caseuseractionsresponsert) +- [CasesConfigurePatchRt](typedoc_interfaces._internal_namespace.md#casesconfigurepatchrt) +- [CasesConfigureRequestRt](typedoc_interfaces._internal_namespace.md#casesconfigurerequestrt) +- [CasesFindResponseRt](typedoc_interfaces._internal_namespace.md#casesfindresponsert) +- [CasesPatchRequestRt](typedoc_interfaces._internal_namespace.md#casespatchrequestrt) +- [CasesResponseRt](typedoc_interfaces._internal_namespace.md#casesresponsert) +- [CommentsResponseRt](typedoc_interfaces._internal_namespace.md#commentsresponsert) + +## Type aliases + +### AllCommentsResponse + +ʬ **AllCommentsResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/comment.ts:166](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/comment.ts#L166) + +___ + +### CasePostRequest + +ʬ **CasePostRequest**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:280](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L280) + +___ + +### CaseResolveResponse + +ʬ **CaseResolveResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:282](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L282) + +___ + +### CaseResponse + +ʬ **CaseResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:281](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L281) + +___ + +### CaseUserActionsResponse + +ʬ **CaseUserActionsResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/user_actions/index.ts:82](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/user_actions/index.ts#L82) + +___ + +### CasesConfigurePatch + +ʬ **CasesConfigurePatch**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/configure.ts:81](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/configure.ts#L81) + +___ + +### CasesConfigureRequest + +ʬ **CasesConfigureRequest**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/configure.ts:80](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/configure.ts#L80) + +___ + +### CasesConfigureResponse + +ʬ **CasesConfigureResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/configure.ts:83](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/configure.ts#L83) + +___ + +### CasesFindResponse + +ʬ **CasesFindResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:286](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L286) + +___ + +### CasesPatchRequest + +ʬ **CasesPatchRequest**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:288](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L288) + +___ + +### CasesResponse + +ʬ **CasesResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:283](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L283) + +___ + +### CommentsResponse + +ʬ **CommentsResponse**: `rt.TypeOf` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/comment.ts:167](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/comment.ts#L167) + +## Variables + +### AllCommentsResponseRt + +ā€¢ **AllCommentsResponseRt**: `ArrayC`<`IntersectionC`<[`UnionC`<[`IntersectionC`<[`TypeC`<{ `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`user`](client._internal_namespace.md#user)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `alertId`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `index`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `owner`: `StringC` = rt.string; `rule`: `TypeC`<{ `id`: `UnionC`<[`StringC`, `NullC`]\> ; `name`: `UnionC`<[`StringC`, `NullC`]\> }\> ; `type`: `LiteralC`<[`alert`](client._internal_namespace.md#alert)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `actions`: `TypeC`<{ `targets`: `ArrayC`<`TypeC`<{ `endpointId`: `StringC` = rt.string; `hostname`: `StringC` = rt.string }\>\> ; `type`: `StringC` = rt.string }\> ; `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`actions`](client._internal_namespace.md#actions)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\>\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/comment.ts:150](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/comment.ts#L150) + +___ + +### CaseConfigureResponseRt + +ā€¢ **CaseConfigureResponseRt**: `IntersectionC`<[`IntersectionC`<[`IntersectionC`<[`TypeC`<{ `closure_type`: `UnionC`<[`LiteralC`<``"close-by-user"``\>, `LiteralC`<``"close-by-pushing"``\>]\> = ClosureTypeRT; `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt }\>, `TypeC`<{ `owner`: `StringC` = rt.string }\>]\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `TypeC`<{ `mappings`: `ArrayC`<`TypeC`<{ `action_type`: `UnionC`<[`LiteralC`<``"append"``\>, `LiteralC`<``"nothing"``\>, `LiteralC`<``"overwrite"``\>]\> = ActionTypeRT; `source`: `UnionC`<[`LiteralC`<``"title"``\>, `LiteralC`<``"description"``\>, `LiteralC`<``"comments"``\>]\> = CaseFieldRT; `target`: `UnionC`<[`StringC`, `LiteralC`<``"not_mapped"``\>]\> = ThirdPartyFieldRT }\>\> ; `owner`: `StringC` = rt.string }\>, `TypeC`<{ `error`: `UnionC`<[`StringC`, `NullC`]\> ; `id`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/configure.ts:53](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/configure.ts#L53) + +___ + +### CasePostRequestRt + +ā€¢ **CasePostRequestRt**: `TypeC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt; `description`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsRt; `tags`: `ArrayC`<`StringC`\> ; `title`: `StringC` = rt.string }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:108](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L108) + +___ + +### CaseResolveResponseRt + +ā€¢ **CaseResolveResponseRt**: `IntersectionC`<[`TypeC`<{ `case`: `IntersectionC`<[`IntersectionC`<[`TypeC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt; `description`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsRt; `status`: `UnionC`<[`LiteralC`<[`open`](../enums/client._internal_namespace.CaseStatuses.md#open)\>, `LiteralC`<`any`[`any`]\>, `LiteralC`<[`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed)\>]\> = CaseStatusRt; `tags`: `ArrayC`<`StringC`\> ; `title`: `StringC` = rt.string }\>, `TypeC`<{ `closed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `closed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `external_service`: `UnionC`<[`IntersectionC`<[`TypeC`<{ `connector_id`: `StringC` = rt.string }\>, `TypeC`<{ `connector_name`: `StringC` = rt.string; `external_id`: `StringC` = rt.string; `external_title`: `StringC` = rt.string; `external_url`: `StringC` = rt.string; `pushed_at`: `StringC` = rt.string; `pushed_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT }\>]\>, `NullC`]\> = CaseFullExternalServiceRt; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `totalAlerts`: `NumberC` = rt.number; `totalComment`: `NumberC` = rt.number; `version`: `StringC` = rt.string }\>, `PartialC`<{ `comments`: `ArrayC`<`IntersectionC`<[`UnionC`<[`IntersectionC`<[`TypeC`<{ `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`user`](client._internal_namespace.md#user)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `alertId`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `index`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `owner`: `StringC` = rt.string; `rule`: `TypeC`<{ `id`: `UnionC`<[`StringC`, `NullC`]\> ; `name`: `UnionC`<[`StringC`, `NullC`]\> }\> ; `type`: `LiteralC`<[`alert`](client._internal_namespace.md#alert)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `actions`: `TypeC`<{ `targets`: `ArrayC`<`TypeC`<{ `endpointId`: `StringC` = rt.string; `hostname`: `StringC` = rt.string }\>\> ; `type`: `StringC` = rt.string }\> ; `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`actions`](client._internal_namespace.md#actions)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\>\> }\>]\> = CaseResponseRt; `outcome`: `UnionC`<[`LiteralC`<``"exactMatch"``\>, `LiteralC`<``"aliasMatch"``\>, `LiteralC`<``"conflict"``\>]\> }\>, `PartialC`<{ `alias_target_id`: `StringC` = rt.string }\>]\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:212](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L212) + +___ + +### CaseResponseRt + +ā€¢ **CaseResponseRt**: `IntersectionC`<[`IntersectionC`<[`TypeC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt; `description`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsRt; `status`: `UnionC`<[`LiteralC`<[`open`](../enums/client._internal_namespace.CaseStatuses.md#open)\>, `LiteralC`<`any`[`any`]\>, `LiteralC`<[`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed)\>]\> = CaseStatusRt; `tags`: `ArrayC`<`StringC`\> ; `title`: `StringC` = rt.string }\>, `TypeC`<{ `closed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `closed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `external_service`: `UnionC`<[`IntersectionC`<[`TypeC`<{ `connector_id`: `StringC` = rt.string }\>, `TypeC`<{ `connector_name`: `StringC` = rt.string; `external_id`: `StringC` = rt.string; `external_title`: `StringC` = rt.string; `external_url`: `StringC` = rt.string; `pushed_at`: `StringC` = rt.string; `pushed_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT }\>]\>, `NullC`]\> = CaseFullExternalServiceRt; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `totalAlerts`: `NumberC` = rt.number; `totalComment`: `NumberC` = rt.number; `version`: `StringC` = rt.string }\>, `PartialC`<{ `comments`: `ArrayC`<`IntersectionC`<[`UnionC`<[`IntersectionC`<[`TypeC`<{ `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`user`](client._internal_namespace.md#user)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `alertId`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `index`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `owner`: `StringC` = rt.string; `rule`: `TypeC`<{ `id`: `UnionC`<[`StringC`, `NullC`]\> ; `name`: `UnionC`<[`StringC`, `NullC`]\> }\> ; `type`: `LiteralC`<[`alert`](client._internal_namespace.md#alert)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `actions`: `TypeC`<{ `targets`: `ArrayC`<`TypeC`<{ `endpointId`: `StringC` = rt.string; `hostname`: `StringC` = rt.string }\>\> ; `type`: `StringC` = rt.string }\> ; `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`actions`](client._internal_namespace.md#actions)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\>\> }\>]\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:199](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L199) + +___ + +### CaseUserActionsResponseRt + +ā€¢ **CaseUserActionsResponseRt**: `ArrayC`<`IntersectionC`<[`IntersectionC`<[`UnionC`<[`UnionC`<[`TypeC`<{ `payload`: `TypeC`<{ `description`: `StringC` = rt.string }\> = DescriptionUserActionPayloadRt; `type`: `LiteralC`<``"description"``\> }\>, `TypeC`<{ `payload`: `TypeC`<{ `comment`: `UnionC`<[`TypeC`<{ `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`user`](client._internal_namespace.md#user)\> }\>, `TypeC`<{ `alertId`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `index`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `owner`: `StringC` = rt.string; `rule`: `TypeC`<{ `id`: `UnionC`<[`StringC`, `NullC`]\> ; `name`: `UnionC`<[`StringC`, `NullC`]\> }\> ; `type`: `LiteralC`<[`alert`](client._internal_namespace.md#alert)\> }\>, `TypeC`<{ `actions`: `TypeC`<{ `targets`: `ArrayC`<`TypeC`<{ `endpointId`: `StringC` = rt.string; `hostname`: `StringC` = rt.string }\>\> ; `type`: `StringC` = rt.string }\> ; `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`actions`](client._internal_namespace.md#actions)\> }\>]\> = CommentRequestRt }\> = CommentUserActionPayloadRt; `type`: `LiteralC`<``"comment"``\> }\>, `TypeC`<{ `payload`: `TypeC`<{ `tags`: `ArrayC`<`StringC`\> }\> = TagsUserActionPayloadRt; `type`: `LiteralC`<``"tags"``\> }\>, `TypeC`<{ `payload`: `TypeC`<{ `title`: `StringC` = rt.string }\> = TitleUserActionPayloadRt; `type`: `LiteralC`<``"title"``\> }\>, `TypeC`<{ `payload`: `TypeC`<{ `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsRt }\> = SettingsUserActionPayloadRt; `type`: `LiteralC`<``"settings"``\> }\>, `TypeC`<{ `payload`: `TypeC`<{ `status`: `UnionC`<[`LiteralC`<[`open`](../enums/client._internal_namespace.CaseStatuses.md#open)\>, `LiteralC`<`any`[`any`]\>, `LiteralC`<[`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed)\>]\> = CaseStatusRt }\> = StatusUserActionPayloadRt; `type`: `LiteralC`<``"status"``\> }\>]\>, `IntersectionC`<[`TypeC`<{ `type`: `LiteralC`<``"create_case"``\> }\>, `TypeC`<{ `payload`: `IntersectionC`<[`TypeC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt }\>, `TypeC`<{ `description`: `StringC` = DescriptionUserActionPayloadRt.props.description; `owner`: `StringC` = rt.string; `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsUserActionPayloadRt.props.settings; `status`: `StringC` = rt.string; `tags`: `ArrayC`<`StringC`\> = TagsUserActionPayloadRt.props.tags; `title`: `StringC` = TitleUserActionPayloadRt.props.title }\>]\> }\>]\>, `TypeC`<{ `payload`: `TypeC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt }\> = ConnectorUserActionPayloadRt; `type`: `LiteralC`<``"connector"``\> }\>, `TypeC`<{ `payload`: `TypeC`<{ `externalService`: `IntersectionC`<[`TypeC`<{ `connector_id`: `StringC` = rt.string }\>, `TypeC`<{ `connector_name`: `StringC` = rt.string; `external_id`: `StringC` = rt.string; `external_title`: `StringC` = rt.string; `external_url`: `StringC` = rt.string; `pushed_at`: `StringC` = rt.string; `pushed_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT }\>]\> = CaseExternalServiceBasicRt }\> = PushedUserActionPayloadRt; `type`: `LiteralC`<``"pushed"``\> }\>, `TypeC`<{ `payload`: `TypeC`<{}\> ; `type`: `LiteralC`<``"delete_case"``\> }\>]\>, `TypeC`<{ `action`: `KeyofC`<{ `add`: ``"add"`` = 'add'; `create`: ``"create"`` = 'create'; `delete`: ``"delete"`` = 'delete'; `push_to_service`: ``"push_to_service"`` = 'push\_to\_service'; `update`: ``"update"`` = 'update' }\> = ActionsRt; `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string }\>]\>, `TypeC`<{ `action_id`: `StringC` = rt.string; `case_id`: `StringC` = rt.string; `comment_id`: `UnionC`<[`StringC`, `NullC`]\> }\>]\>\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/user_actions/index.ts:76](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/user_actions/index.ts#L76) + +___ + +### CasesConfigurePatchRt + +ā€¢ **CasesConfigurePatchRt**: `IntersectionC`<[`PartialC`<{ `closure_type`: `UnionC`<[`LiteralC`<``"close-by-user"``\>, `LiteralC`<``"close-by-pushing"``\>]\> = ClosureTypeRT; `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt }\>, `TypeC`<{ `version`: `StringC` = rt.string }\>]\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/configure.ts:38](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/configure.ts#L38) + +___ + +### CasesConfigureRequestRt + +ā€¢ **CasesConfigureRequestRt**: `IntersectionC`<[`TypeC`<{ `closure_type`: `UnionC`<[`LiteralC`<``"close-by-user"``\>, `LiteralC`<``"close-by-pushing"``\>]\> = ClosureTypeRT; `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt }\>, `TypeC`<{ `owner`: `StringC` = rt.string }\>]\> = `CasesConfigureBasicRt` + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/configure.ts:37](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/configure.ts#L37) + +___ + +### CasesFindResponseRt + +ā€¢ **CasesFindResponseRt**: `IntersectionC`<[`TypeC`<{ `cases`: `ArrayC`<`IntersectionC`<[`IntersectionC`<[`TypeC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt; `description`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsRt; `status`: `UnionC`<[`LiteralC`<[`open`](../enums/client._internal_namespace.CaseStatuses.md#open)\>, `LiteralC`<`any`[`any`]\>, `LiteralC`<[`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed)\>]\> = CaseStatusRt; `tags`: `ArrayC`<`StringC`\> ; `title`: `StringC` = rt.string }\>, `TypeC`<{ `closed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `closed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `external_service`: `UnionC`<[`IntersectionC`<[`TypeC`<{ `connector_id`: `StringC` = rt.string }\>, `TypeC`<{ `connector_name`: `StringC` = rt.string; `external_id`: `StringC` = rt.string; `external_title`: `StringC` = rt.string; `external_url`: `StringC` = rt.string; `pushed_at`: `StringC` = rt.string; `pushed_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT }\>]\>, `NullC`]\> = CaseFullExternalServiceRt; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `totalAlerts`: `NumberC` = rt.number; `totalComment`: `NumberC` = rt.number; `version`: `StringC` = rt.string }\>, `PartialC`<{ `comments`: `ArrayC`<`IntersectionC`<[`UnionC`<[`IntersectionC`<[`TypeC`<{ `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`user`](client._internal_namespace.md#user)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `alertId`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `index`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `owner`: `StringC` = rt.string; `rule`: `TypeC`<{ `id`: `UnionC`<[`StringC`, `NullC`]\> ; `name`: `UnionC`<[`StringC`, `NullC`]\> }\> ; `type`: `LiteralC`<[`alert`](client._internal_namespace.md#alert)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `actions`: `TypeC`<{ `targets`: `ArrayC`<`TypeC`<{ `endpointId`: `StringC` = rt.string; `hostname`: `StringC` = rt.string }\>\> ; `type`: `StringC` = rt.string }\> ; `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`actions`](client._internal_namespace.md#actions)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\>\> }\>]\>\> ; `page`: `NumberC` = rt.number; `per_page`: `NumberC` = rt.number; `total`: `NumberC` = rt.number }\>, `TypeC`<{ `count_closed_cases`: `NumberC` = rt.number; `count_in_progress_cases`: `NumberC` = rt.number; `count_open_cases`: `NumberC` = rt.number }\>]\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:222](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L222) + +___ + +### CasesPatchRequestRt + +ā€¢ **CasesPatchRequestRt**: `TypeC`<{ `cases`: `ArrayC`<`IntersectionC`<[`PartialC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt; `description`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsRt; `status`: `UnionC`<[`LiteralC`<[`open`](../enums/client._internal_namespace.CaseStatuses.md#open)\>, `LiteralC`<`any`[`any`]\>, `LiteralC`<[`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed)\>]\> = CaseStatusRt; `tags`: `ArrayC`<`StringC`\> ; `title`: `StringC` = rt.string }\>, `TypeC`<{ `id`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\>\> }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:240](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L240) + +___ + +### CasesResponseRt + +ā€¢ **CasesResponseRt**: `ArrayC`<`IntersectionC`<[`IntersectionC`<[`TypeC`<{ `connector`: `IntersectionC`<[`TypeC`<{ `id`: `StringC` = rt.string }\>, `UnionC`<[`IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `issueType`: `UnionC`<[`StringC`, `NullC`]\> ; `parent`: `UnionC`<[`StringC`, `NullC`]\> ; `priority`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`jira`](client._internal_namespace.md#jira)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `NullC` = rt.null; `type`: `LiteralC`<[`none`](client._internal_namespace.md#none)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>, `IntersectionC`<[`TypeC`<{ `fields`: `UnionC`<[`TypeC`<{ `incidentTypes`: `UnionC`<[`ArrayC`<`StringC`\>, `NullC`]\> ; `severityCode`: `UnionC`<[`StringC`, `NullC`]\> }\>, `NullC`]\> ; `type`: `LiteralC`<[`resilient`](client._internal_namespace.md#resilient)\> }\>, `TypeC`<{ `name`: `StringC` = rt.string }\>]\>]\>]\> = CaseConnectorRt; `description`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `settings`: `TypeC`<{ `syncAlerts`: `BooleanC` = rt.boolean }\> = SettingsRt; `status`: `UnionC`<[`LiteralC`<[`open`](../enums/client._internal_namespace.CaseStatuses.md#open)\>, `LiteralC`<`any`[`any`]\>, `LiteralC`<[`closed`](../enums/client._internal_namespace.CaseStatuses.md#closed)\>]\> = CaseStatusRt; `tags`: `ArrayC`<`StringC`\> ; `title`: `StringC` = rt.string }\>, `TypeC`<{ `closed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `closed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `external_service`: `UnionC`<[`IntersectionC`<[`TypeC`<{ `connector_id`: `StringC` = rt.string }\>, `TypeC`<{ `connector_name`: `StringC` = rt.string; `external_id`: `StringC` = rt.string; `external_title`: `StringC` = rt.string; `external_url`: `StringC` = rt.string; `pushed_at`: `StringC` = rt.string; `pushed_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT }\>]\>, `NullC`]\> = CaseFullExternalServiceRt; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `totalAlerts`: `NumberC` = rt.number; `totalComment`: `NumberC` = rt.number; `version`: `StringC` = rt.string }\>, `PartialC`<{ `comments`: `ArrayC`<`IntersectionC`<[`UnionC`<[`IntersectionC`<[`TypeC`<{ `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`user`](client._internal_namespace.md#user)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `alertId`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `index`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `owner`: `StringC` = rt.string; `rule`: `TypeC`<{ `id`: `UnionC`<[`StringC`, `NullC`]\> ; `name`: `UnionC`<[`StringC`, `NullC`]\> }\> ; `type`: `LiteralC`<[`alert`](client._internal_namespace.md#alert)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `actions`: `TypeC`<{ `targets`: `ArrayC`<`TypeC`<{ `endpointId`: `StringC` = rt.string; `hostname`: `StringC` = rt.string }\>\> ; `type`: `StringC` = rt.string }\> ; `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`actions`](client._internal_namespace.md#actions)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\>\> }\>]\>\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/case.ts:241](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/case.ts#L241) + +___ + +### CommentsResponseRt + +ā€¢ **CommentsResponseRt**: `TypeC`<{ `comments`: `ArrayC`<`IntersectionC`<[`UnionC`<[`IntersectionC`<[`TypeC`<{ `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`user`](client._internal_namespace.md#user)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `alertId`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `index`: `UnionC`<[`ArrayC`<`StringC`\>, `StringC`]\> ; `owner`: `StringC` = rt.string; `rule`: `TypeC`<{ `id`: `UnionC`<[`StringC`, `NullC`]\> ; `name`: `UnionC`<[`StringC`, `NullC`]\> }\> ; `type`: `LiteralC`<[`alert`](client._internal_namespace.md#alert)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>, `IntersectionC`<[`TypeC`<{ `actions`: `TypeC`<{ `targets`: `ArrayC`<`TypeC`<{ `endpointId`: `StringC` = rt.string; `hostname`: `StringC` = rt.string }\>\> ; `type`: `StringC` = rt.string }\> ; `comment`: `StringC` = rt.string; `owner`: `StringC` = rt.string; `type`: `LiteralC`<[`actions`](client._internal_namespace.md#actions)\> }\>, `TypeC`<{ `created_at`: `StringC` = rt.string; `created_by`: `TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\> = UserRT; `owner`: `StringC` = rt.string; `pushed_at`: `UnionC`<[`StringC`, `NullC`]\> ; `pushed_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> ; `updated_at`: `UnionC`<[`StringC`, `NullC`]\> ; `updated_by`: `UnionC`<[`TypeC`<{ `email`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `full_name`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> ; `username`: `UnionC`<[`UndefinedC`, `NullC`, `StringC`]\> }\>, `NullC`]\> }\>]\>]\>, `TypeC`<{ `id`: `StringC` = rt.string; `version`: `StringC` = rt.string }\>]\>\> ; `page`: `NumberC` = rt.number; `per_page`: `NumberC` = rt.number; `total`: `NumberC` = rt.number }\> + +#### Defined in + +[x-pack/plugins/cases/common/api/cases/comment.ts:143](https://github.com/elastic/kibana/blob/c427bf270ae/x-pack/plugins/cases/common/api/cases/comment.ts#L143) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/typedoc_interfaces.md b/x-pack/plugins/cases/docs/cases_client/modules/typedoc_interfaces.md index 4719d2a2719c0..9f9d1f9a8808c 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/typedoc_interfaces.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/typedoc_interfaces.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / typedoc_interfaces +[Cases Client API Interface](../README.md) / typedoc\_interfaces # Module: typedoc\_interfaces @@ -7,20 +7,22 @@ can be very large. These types are equivalent to the io-ts aliases. ## Table of contents +### Namespaces + +- [\_internal\_namespace](typedoc_interfaces._internal_namespace.md) + ### Interfaces -- [IAllCommentsResponse](../interfaces/typedoc_interfaces.iallcommentsresponse.md) -- [ICasePostRequest](../interfaces/typedoc_interfaces.icasepostrequest.md) -- [ICaseResponse](../interfaces/typedoc_interfaces.icaseresponse.md) -- [ICaseUserActionsResponse](../interfaces/typedoc_interfaces.icaseuseractionsresponse.md) -- [ICasesConfigurePatch](../interfaces/typedoc_interfaces.icasesconfigurepatch.md) -- [ICasesConfigureRequest](../interfaces/typedoc_interfaces.icasesconfigurerequest.md) -- [ICasesConfigureResponse](../interfaces/typedoc_interfaces.icasesconfigureresponse.md) -- [ICasesFindRequest](../interfaces/typedoc_interfaces.icasesfindrequest.md) -- [ICasesFindResponse](../interfaces/typedoc_interfaces.icasesfindresponse.md) -- [ICasesPatchRequest](../interfaces/typedoc_interfaces.icasespatchrequest.md) -- [ICasesResponse](../interfaces/typedoc_interfaces.icasesresponse.md) -- [ICommentsResponse](../interfaces/typedoc_interfaces.icommentsresponse.md) -- [ISubCaseResponse](../interfaces/typedoc_interfaces.isubcaseresponse.md) -- [ISubCasesFindResponse](../interfaces/typedoc_interfaces.isubcasesfindresponse.md) -- [ISubCasesResponse](../interfaces/typedoc_interfaces.isubcasesresponse.md) +- [IAllCommentsResponse](../interfaces/typedoc_interfaces.IAllCommentsResponse.md) +- [ICasePostRequest](../interfaces/typedoc_interfaces.ICasePostRequest.md) +- [ICaseResolveResponse](../interfaces/typedoc_interfaces.ICaseResolveResponse.md) +- [ICaseResponse](../interfaces/typedoc_interfaces.ICaseResponse.md) +- [ICaseUserActionsResponse](../interfaces/typedoc_interfaces.ICaseUserActionsResponse.md) +- [ICasesConfigurePatch](../interfaces/typedoc_interfaces.ICasesConfigurePatch.md) +- [ICasesConfigureRequest](../interfaces/typedoc_interfaces.ICasesConfigureRequest.md) +- [ICasesConfigureResponse](../interfaces/typedoc_interfaces.ICasesConfigureResponse.md) +- [ICasesFindRequest](../interfaces/typedoc_interfaces.ICasesFindRequest.md) +- [ICasesFindResponse](../interfaces/typedoc_interfaces.ICasesFindResponse.md) +- [ICasesPatchRequest](../interfaces/typedoc_interfaces.ICasesPatchRequest.md) +- [ICasesResponse](../interfaces/typedoc_interfaces.ICasesResponse.md) +- [ICommentsResponse](../interfaces/typedoc_interfaces.ICommentsResponse.md) diff --git a/x-pack/plugins/cases/docs/cases_client/modules/user_actions_client.md b/x-pack/plugins/cases/docs/cases_client/modules/user_actions_client.md index b48e3faac2135..4ec27e0beee46 100644 --- a/x-pack/plugins/cases/docs/cases_client/modules/user_actions_client.md +++ b/x-pack/plugins/cases/docs/cases_client/modules/user_actions_client.md @@ -1,4 +1,4 @@ -[Cases Client API Interface](../cases_client_api.md) / user_actions/client +[Cases Client API Interface](../README.md) / user\_actions/client # Module: user\_actions/client @@ -6,5 +6,5 @@ ### Interfaces -- [UserActionGet](../interfaces/user_actions_client.useractionget.md) -- [UserActionsSubClient](../interfaces/user_actions_client.useractionssubclient.md) +- [UserActionGet](../interfaces/user_actions_client.UserActionGet.md) +- [UserActionsSubClient](../interfaces/user_actions_client.UserActionsSubClient.md) diff --git a/x-pack/plugins/cases/docs/cases_client_typedoc.json b/x-pack/plugins/cases/docs/cases_client_typedoc.json index 5f67719b47574..a5e1305196491 100644 --- a/x-pack/plugins/cases/docs/cases_client_typedoc.json +++ b/x-pack/plugins/cases/docs/cases_client_typedoc.json @@ -2,15 +2,16 @@ "entryPoints": [ "../server/client/client.ts", "../server/client/typedoc_interfaces.ts", - "../server/client/attachments", + "../server/client/attachments/client.ts", "../server/client/cases/client.ts", "../server/client/cases/get.ts", "../server/client/cases/push.ts", "../server/client/configure/client.ts", + "../server/client/metrics/client.ts", "../server/client/stats/client.ts", - "../server/client/sub_cases/client.ts", "../server/client/user_actions/client.ts" ], + "entryPointStrategy": "expand", "exclude": [ "**/mock.ts", "../server/client/cases/+(mock.ts|utils.ts|utils.test.ts|types.ts)" @@ -18,8 +19,9 @@ "excludeExternals": true, "out": "cases_client", "theme": "markdown", - "plugin": "typedoc-plugin-markdown", - "entryDocument": "cases_client_api.md", + "internalNamespace": "_internal_namespace", + "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-missing-exports"], "readme": "none", - "name": "Cases Client API Interface" + "name": "Cases Client API Interface", + "gitRemote": "upstream" } diff --git a/x-pack/plugins/cases/public/components/case_view/translations.ts b/x-pack/plugins/cases/public/components/case_view/translations.ts index 43fb1cedb13d6..7d6d81a22ca11 100644 --- a/x-pack/plugins/cases/public/components/case_view/translations.ts +++ b/x-pack/plugins/cases/public/components/case_view/translations.ts @@ -17,6 +17,14 @@ export const CHANGED_FIELD = i18n.translate('xpack.cases.caseView.actionLabel.ch defaultMessage: 'changed', }); +export const ENABLED_SETTING = i18n.translate('xpack.cases.caseView.actionLabel.enabledSetting', { + defaultMessage: 'enabled', +}); + +export const DISABLED_SETTING = i18n.translate('xpack.cases.caseView.actionLabel.disableSetting', { + defaultMessage: 'disabled', +}); + export const SELECTED_THIRD_PARTY = (thirdParty: string) => i18n.translate('xpack.cases.caseView.actionLabel.selectedThirdParty', { values: { @@ -119,6 +127,10 @@ export const SYNC_ALERTS = i18n.translate('xpack.cases.caseView.syncAlertsLabel' defaultMessage: `Sync alerts`, }); +export const SYNC_ALERTS_LC = i18n.translate('xpack.cases.caseView.syncAlertsLowercaseLabel', { + defaultMessage: `sync alerts`, +}); + export const DOES_NOT_EXIST_TITLE = i18n.translate('xpack.cases.caseView.doesNotExist.title', { defaultMessage: 'This case does not exist', }); diff --git a/x-pack/plugins/cases/public/components/user_actions/builder.tsx b/x-pack/plugins/cases/public/components/user_actions/builder.tsx index 92f1dd6c123da..5e1c11fbdd2df 100644 --- a/x-pack/plugins/cases/public/components/user_actions/builder.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/builder.tsx @@ -9,6 +9,7 @@ import { createCommentUserActionBuilder } from './comment/comment'; import { createConnectorUserActionBuilder } from './connector'; import { createDescriptionUserActionBuilder } from './description'; import { createPushedUserActionBuilder } from './pushed'; +import { createSettingsUserActionBuilder } from './settings'; import { createStatusUserActionBuilder } from './status'; import { createTagsUserActionBuilder } from './tags'; import { createTitleUserActionBuilder } from './title'; @@ -22,4 +23,5 @@ export const builderMap: UserActionBuilderMap = { pushed: createPushedUserActionBuilder, comment: createCommentUserActionBuilder, description: createDescriptionUserActionBuilder, + settings: createSettingsUserActionBuilder, }; diff --git a/x-pack/plugins/cases/public/components/user_actions/common.tsx b/x-pack/plugins/cases/public/components/user_actions/common.tsx index 2709c89bde3ed..ba7ccabffb9c6 100644 --- a/x-pack/plugins/cases/public/components/user_actions/common.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/common.tsx @@ -51,37 +51,38 @@ export const createCommonUpdateUserActionBuilder = ({ label, icon, handleOutlineComment, -}: BuilderArgs): ReturnType => ({ - // TODO: Fix this manually. Issue #123375 - // eslint-disable-next-line react/display-name - build: () => [ - { - username: ( - - ), - type: 'update' as const, - event: label, - 'data-test-subj': `${userAction.type}-${userAction.action}-action-${userAction.actionId}`, - timestamp: , - timelineIcon: icon, - actions: ( - - - - - {showMoveToReference(userAction.action, userAction.commentId) && ( +}: BuilderArgs): ReturnType => { + return { + // eslint-disable-next-line react/display-name + build: () => [ + { + username: ( + + ), + type: 'update' as const, + event: label, + 'data-test-subj': `${userAction.type}-${userAction.action}-action-${userAction.actionId}`, + timestamp: , + timelineIcon: icon, + actions: ( + - + - )} - - ), - }, - ], -}); + {showMoveToReference(userAction.action, userAction.commentId) && ( + + + + )} + + ), + }, + ], + }; +}; diff --git a/x-pack/plugins/cases/public/components/user_actions/constants.ts b/x-pack/plugins/cases/public/components/user_actions/constants.ts index 4cdc0f4fb5edb..11e16affad7d8 100644 --- a/x-pack/plugins/cases/public/components/user_actions/constants.ts +++ b/x-pack/plugins/cases/public/components/user_actions/constants.ts @@ -11,7 +11,7 @@ import { SupportedUserActionTypes } from './types'; export const DRAFT_COMMENT_STORAGE_ID = 'xpack.cases.commentDraft'; -export const UNSUPPORTED_ACTION_TYPES = ['create_case', 'delete_case', 'settings'] as const; +export const UNSUPPORTED_ACTION_TYPES = ['create_case', 'delete_case'] as const; export const SUPPORTED_ACTION_TYPES: SupportedUserActionTypes[] = Object.keys( omit(ActionTypes, UNSUPPORTED_ACTION_TYPES) ) as SupportedUserActionTypes[]; diff --git a/x-pack/plugins/cases/public/components/user_actions/helpers.test.ts b/x-pack/plugins/cases/public/components/user_actions/helpers.test.ts index 80b68450f9edd..eb2b7297a9e2e 100644 --- a/x-pack/plugins/cases/public/components/user_actions/helpers.test.ts +++ b/x-pack/plugins/cases/public/components/user_actions/helpers.test.ts @@ -61,7 +61,7 @@ describe('helpers', () => { ['tags', true], ['title', true], ['status', true], - ['settings', false], + ['settings', true], ['create_case', false], ['delete_case', false], ]; diff --git a/x-pack/plugins/cases/public/components/user_actions/settings.test.tsx b/x-pack/plugins/cases/public/components/user_actions/settings.test.tsx new file mode 100644 index 0000000000000..12960e8293edc --- /dev/null +++ b/x-pack/plugins/cases/public/components/user_actions/settings.test.tsx @@ -0,0 +1,51 @@ +/* + * 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 { EuiCommentList } from '@elastic/eui'; +import React from 'react'; +import { Actions } from '../../../common/api'; +import { AppMockRenderer, createAppMockRenderer } from '../../common/mock'; +import { getUserAction } from '../../containers/mock'; +import { getMockBuilderArgs } from './mock'; +import { createSettingsUserActionBuilder } from './settings'; + +jest.mock('../../common/lib/kibana'); +jest.mock('../../common/navigation/hooks'); + +describe('createStatusUserActionBuilder ', () => { + const builderArgs = getMockBuilderArgs(); + let appMock: AppMockRenderer; + + beforeEach(() => { + appMock = createAppMockRenderer(); + jest.clearAllMocks(); + }); + + const tests = [ + [false, 'disabled'], + [true, 'enabled'], + ]; + + it.each(tests)( + 'renders correctly when changed setting sync-alerts to %s', + async (syncAlerts, label) => { + const userAction = getUserAction('settings', Actions.update, { + payload: { settings: { syncAlerts } }, + }); + const builder = createSettingsUserActionBuilder({ + ...builderArgs, + userAction, + }); + + const createdUserAction = builder.build(); + const result = appMock.render(); + + expect(result.getByTestId('settings-update-action-settings-update')).toBeTruthy(); + expect(result.getByText(`${label} sync alerts`)).toBeTruthy(); + } + ); +}); diff --git a/x-pack/plugins/cases/public/components/user_actions/settings.tsx b/x-pack/plugins/cases/public/components/user_actions/settings.tsx new file mode 100644 index 0000000000000..40d773a186623 --- /dev/null +++ b/x-pack/plugins/cases/public/components/user_actions/settings.tsx @@ -0,0 +1,43 @@ +/* + * 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 { ReactNode } from 'react'; +import { SettingsUserAction } from '../../../common/api'; +import { UserActionBuilder, UserActionResponse } from './types'; + +import { createCommonUpdateUserActionBuilder } from './common'; +import { DISABLED_SETTING, ENABLED_SETTING, SYNC_ALERTS_LC } from './translations'; + +function getSettingsLabel(userAction: UserActionResponse): ReactNode { + if (userAction.payload.settings.syncAlerts) { + return `${ENABLED_SETTING} ${SYNC_ALERTS_LC}`; + } else { + return `${DISABLED_SETTING} ${SYNC_ALERTS_LC}`; + } +} + +export const createSettingsUserActionBuilder: UserActionBuilder = ({ + userAction, + handleOutlineComment, +}) => ({ + build: () => { + const action = userAction as UserActionResponse; + if (action?.payload?.settings?.syncAlerts !== undefined) { + const commonBuilder = createCommonUpdateUserActionBuilder({ + userAction, + handleOutlineComment, + label: getSettingsLabel(action), + icon: 'gear', + }); + + return commonBuilder.build(); + } + + // if new settings are introduced. they won't be rendered + return []; + }, +}); diff --git a/x-pack/plugins/cases/server/authorization/audit_logger.test.ts b/x-pack/plugins/cases/server/authorization/audit_logger.test.ts index 48c6e9ebcd07a..c2f00e8cfff05 100644 --- a/x-pack/plugins/cases/server/authorization/audit_logger.test.ts +++ b/x-pack/plugins/cases/server/authorization/audit_logger.test.ts @@ -32,6 +32,7 @@ describe('audit_logger', () => { describe('log function', () => { const mockLogger: jest.Mocked = { log: jest.fn(), + enabled: true, }; let logger: AuthorizationAuditLogger; diff --git a/x-pack/plugins/cases/server/authorization/authorization.test.ts b/x-pack/plugins/cases/server/authorization/authorization.test.ts index f644f7366100b..693277161c330 100644 --- a/x-pack/plugins/cases/server/authorization/authorization.test.ts +++ b/x-pack/plugins/cases/server/authorization/authorization.test.ts @@ -24,6 +24,7 @@ describe('authorization', () => { request = httpServerMock.createKibanaRequest(); mockLogger = { log: jest.fn(), + enabled: true, }; }); diff --git a/x-pack/plugins/cases/server/common/utils.test.ts b/x-pack/plugins/cases/server/common/utils.test.ts index 2f0b1ba2fc44e..314f986f831ae 100644 --- a/x-pack/plugins/cases/server/common/utils.test.ts +++ b/x-pack/plugins/cases/server/common/utils.test.ts @@ -822,7 +822,7 @@ describe('common utils', () => { ].join('\n\n'); const extractedReferences = extractLensReferencesFromCommentString( - makeLensEmbeddableFactory({}), + makeLensEmbeddableFactory(() => ({})), commentString ); @@ -921,7 +921,7 @@ describe('common utils', () => { ].join('\n\n'); const updatedReferences = getOrUpdateLensReferences( - makeLensEmbeddableFactory({}), + makeLensEmbeddableFactory(() => ({})), newCommentString, { references: currentCommentReferences, diff --git a/x-pack/plugins/cases/server/saved_object_types/migrations/comments.test.ts b/x-pack/plugins/cases/server/saved_object_types/migrations/comments.test.ts index dcc7b63e53bde..bd48641975247 100644 --- a/x-pack/plugins/cases/server/saved_object_types/migrations/comments.test.ts +++ b/x-pack/plugins/cases/server/saved_object_types/migrations/comments.test.ts @@ -36,7 +36,7 @@ import { GENERATED_ALERT, SUB_CASE_SAVED_OBJECT } from './constants'; describe('comments migrations', () => { const migrations = createCommentsMigrations({ - lensEmbeddableFactory: makeLensEmbeddableFactory({}), + lensEmbeddableFactory: makeLensEmbeddableFactory(() => ({})), }); const contextMock = savedObjectsServiceMock.createMigrationContext(); diff --git a/x-pack/plugins/cloud/server/routes/chat.test.ts b/x-pack/plugins/cloud/server/routes/chat.test.ts index 9ed76eff6d081..e12278e264e5e 100644 --- a/x-pack/plugins/cloud/server/routes/chat.test.ts +++ b/x-pack/plugins/cloud/server/routes/chat.test.ts @@ -44,14 +44,16 @@ describe('chat route', () => { `); }); - test('returns user information and a token', async () => { + test('returns user information taken from saml metadata and a token', async () => { const security = securityMock.createSetup(); const username = 'user.name'; const email = 'user@elastic.co'; security.authc.getCurrentUser.mockReturnValueOnce({ username, - email, + metadata: { + saml_email: [email], + }, }); const router = httpServiceMock.createRouter(); diff --git a/x-pack/plugins/cloud/server/routes/chat.ts b/x-pack/plugins/cloud/server/routes/chat.ts index 62c4475c92ae5..1bc3505c087ae 100644 --- a/x-pack/plugins/cloud/server/routes/chat.ts +++ b/x-pack/plugins/cloud/server/routes/chat.ts @@ -6,11 +6,18 @@ */ import { IRouter } from '../../../../../src/core/server'; -import type { SecurityPluginSetup } from '../../../security/server'; +import type { SecurityPluginSetup, AuthenticatedUser } from '../../../security/server'; import { GET_CHAT_USER_DATA_ROUTE_PATH } from '../../common/constants'; import type { GetChatUserDataResponseBody } from '../../common/types'; import { generateSignedJwt } from '../util/generate_jwt'; +type MetaWithSaml = AuthenticatedUser['metadata'] & { + saml_name: [string]; + saml_email: [string]; + saml_roles: [string]; + saml_principal: [string]; +}; + export const registerChatRoute = ({ router, chatIdentitySecret, @@ -33,7 +40,9 @@ export const registerChatRoute = ({ }, async (_context, request, response) => { const user = security.authc.getCurrentUser(request); - let { email: userEmail, username: userId } = user || {}; + const { metadata, username } = user || {}; + let userId = username; + let [userEmail] = (metadata as MetaWithSaml)?.saml_email || []; // In local development, these values are not populated. This is a workaround // to allow for local testing. diff --git a/x-pack/plugins/data_visualizer/kibana.json b/x-pack/plugins/data_visualizer/kibana.json index ea6f338ca07d0..03f21bcde469d 100644 --- a/x-pack/plugins/data_visualizer/kibana.json +++ b/x-pack/plugins/data_visualizer/kibana.json @@ -20,7 +20,8 @@ "home", "lens", "dataViewFieldEditor", - "customIntegrations" + "customIntegrations", + "cloud" ], "requiredBundles": [ "home", @@ -28,7 +29,8 @@ "maps", "esUiShared", "fieldFormats", - "uiActions" + "uiActions", + "cloud" ], "owner": { "name": "Machine Learning UI", diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/file_data_visualizer_view.js b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/file_data_visualizer_view.js index 9a6507d01067a..1cfc9f150f49d 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/file_data_visualizer_view.js +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/file_data_visualizer_view.js @@ -30,6 +30,8 @@ import { processResults, } from '../../../common/components/utils'; +import { Chat } from '../../../../../../cloud/public'; + import { MODE } from './constants'; export class FileDataVisualizerView extends Component { @@ -383,6 +385,7 @@ export class FileDataVisualizerView extends Component { )} )} +
); } diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx index 7c995e84ebbf1..6b2657bf357b8 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx @@ -23,7 +23,7 @@ interface Props { export type FileDataVisualizerSpec = typeof FileDataVisualizer; export const FileDataVisualizer: FC = ({ additionalLinks }) => { const coreStart = getCoreStart(); - const { data, maps, embeddable, share, security, fileUpload } = getPluginsStart(); + const { data, maps, embeddable, share, security, fileUpload, cloud } = getPluginsStart(); const services = { data, maps, @@ -34,17 +34,22 @@ export const FileDataVisualizer: FC = ({ additionalLinks }) => { ...coreStart, }; + const EmptyContext: FC = ({ children }) => <>{children}; + const CloudContext = cloud?.CloudContextProvider || EmptyContext; + return ( - + + + ); diff --git a/x-pack/plugins/data_visualizer/public/plugin.ts b/x-pack/plugins/data_visualizer/public/plugin.ts index f71e62ed42463..265f7e11e3b09 100644 --- a/x-pack/plugins/data_visualizer/public/plugin.ts +++ b/x-pack/plugins/data_visualizer/public/plugin.ts @@ -7,6 +7,7 @@ import { CoreSetup, CoreStart } from 'kibana/public'; import { ChartsPluginStart } from 'src/plugins/charts/public'; +import type { CloudStart } from '../../cloud/public'; import type { EmbeddableSetup, EmbeddableStart } from '../../../../src/plugins/embeddable/public'; import type { SharePluginSetup, SharePluginStart } from '../../../../src/plugins/share/public'; import { Plugin } from '../../../../src/core/public'; @@ -44,6 +45,7 @@ export interface DataVisualizerStartDependencies { dataViewFieldEditor?: IndexPatternFieldEditorStart; fieldFormats: FieldFormatsStart; uiActions?: UiActionsStart; + cloud?: CloudStart; } export type DataVisualizerPluginSetup = ReturnType; diff --git a/x-pack/plugins/data_visualizer/tsconfig.json b/x-pack/plugins/data_visualizer/tsconfig.json index df41fdbd62663..5d35b5d542b8d 100644 --- a/x-pack/plugins/data_visualizer/tsconfig.json +++ b/x-pack/plugins/data_visualizer/tsconfig.json @@ -25,6 +25,7 @@ { "path": "../file_upload/tsconfig.json" }, { "path": "../lens/tsconfig.json" }, { "path": "../maps/tsconfig.json" }, + { "path": "../cloud/tsconfig.json" }, { "path": "../../../src/plugins/embeddable/tsconfig.json" } ] } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.test.tsx index e259e67dd2e4e..452cfe648e28f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.test.tsx @@ -30,6 +30,7 @@ describe('SchemaCallouts', () => { hasErrors: false, activeReindexJobId: 'some-id', }, + myRole: { canManageEngines: true }, }; beforeEach(() => { @@ -80,6 +81,31 @@ describe('SchemaCallouts', () => { expect(wrapper.find(UnconfirmedFieldsCallout)).toHaveLength(1); }); + describe('non-owner/admins', () => { + it('does not render an unsearched fields callout if user does not have access', () => { + setMockValues({ + ...values, + hasUnconfirmedFields: true, + hasNewUnsearchedFields: true, + myRole: { canManageEngines: false }, + }); + const wrapper = shallow(); + + expect(wrapper.find(UnsearchedFieldsCallout)).toHaveLength(0); + }); + + it('does not render an unconfirmed fields callout if user does not have access', () => { + setMockValues({ + ...values, + hasUnconfirmedFields: true, + myRole: { canManageEngines: false }, + }); + const wrapper = shallow(); + + expect(wrapper.find(UnconfirmedFieldsCallout)).toHaveLength(0); + }); + }); + describe('UnsearchedFieldsCallout', () => { it('renders an info callout about unsearched fields with a link to the relevance tuning page', () => { const wrapper = shallow(); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.tsx index 50a2ee5c83abe..853a1ed785fa4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_callouts.tsx @@ -14,12 +14,16 @@ import { i18n } from '@kbn/i18n'; import { EuiButtonTo } from '../../../../shared/react_router_helpers'; import { SchemaErrorsCallout } from '../../../../shared/schema'; +import { AppLogic } from '../../../app_logic'; import { ENGINE_RELEVANCE_TUNING_PATH, ENGINE_REINDEX_JOB_PATH } from '../../../routes'; import { generateEnginePath } from '../../engine'; import { SchemaLogic } from '../schema_logic'; export const SchemaCallouts: React.FC = () => { + const { + myRole: { canManageEngines }, + } = useValues(AppLogic); const { hasUnconfirmedFields, hasNewUnsearchedFields, @@ -38,7 +42,7 @@ export const SchemaCallouts: React.FC = () => { )} - {hasUnconfirmedFields && ( + {hasUnconfirmedFields && canManageEngines && ( <> {hasNewUnsearchedFields ? : } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.test.tsx index 366558556c6f9..bf9596b061acf 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.test.tsx @@ -21,6 +21,7 @@ describe('SchemaTable', () => { const values = { schema: {}, unconfirmedFields: [], + myRole: { canManageEngines: true }, }; const actions = { updateSchemaFieldType: jest.fn(), @@ -82,4 +83,17 @@ describe('SchemaTable', () => { expect(wrapper.find(EuiHealth)).toHaveLength(1); expect(wrapper.find(EuiHealth).childAt(0).prop('children')).toEqual('Recently added'); }); + + it('disables table actions if access disallowed', () => { + setMockValues({ + ...values, + schema: { + some_text_field: 'text', + }, + myRole: { canManageEngines: false }, + }); + const wrapper = shallow(); + + expect(wrapper.find(SchemaFieldTypeSelect).at(0).prop('disabled')).toEqual(true); + }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.tsx index 8fff01b268b12..3da0fe587c523 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/schema_table.tsx @@ -24,9 +24,14 @@ import { i18n } from '@kbn/i18n'; import { SchemaFieldTypeSelect } from '../../../../shared/schema'; import { FIELD_NAME, FIELD_TYPE } from '../../../../shared/schema/constants'; +import { AppLogic } from '../../../app_logic'; + import { SchemaLogic } from '../schema_logic'; export const SchemaTable: React.FC = () => { + const { + myRole: { canManageEngines }, + } = useValues(AppLogic); const { schema, unconfirmedFields } = useValues(SchemaLogic); const { updateSchemaFieldType } = useActions(SchemaLogic); @@ -75,6 +80,7 @@ export const SchemaTable: React.FC = () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx index cae16d70592fa..9d4f6fc34a8c0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx @@ -29,6 +29,7 @@ describe('Schema', () => { hasSchemaChanged: false, isUpdating: false, isModalOpen: false, + myRole: { canManageEngines: true }, }; const actions = { loadSchema: jest.fn(), @@ -60,13 +61,21 @@ describe('Schema', () => { describe('page action buttons', () => { const subject = () => getPageHeaderActions(shallow()); - it('renders', () => { + it('renders buttons when access allows', () => { const wrapper = subject(); + expect(wrapper.find(EuiButton)).toHaveLength(2); }); + it('does not render buttons when access disallowed', () => { + setMockValues({ ...values, myRole: { canManageEngines: false } }); + const wrapper = subject(); + + expect(wrapper.find(EuiButton)).toHaveLength(0); + }); + it('renders loading/disabled state when schema is updating', () => { - setMockValues({ isUpdating: true }); + setMockValues({ ...values, isUpdating: true }); const wrapper = subject(); expect(wrapper.find('[data-test-subj="updateSchemaButton"]').prop('isLoading')).toBe(true); @@ -115,7 +124,7 @@ describe('Schema', () => { }); it('renders a modal that lets a user add a new schema field', () => { - setMockValues({ isModalOpen: true }); + setMockValues({ ...values, isModalOpen: true }); const wrapper = shallow(); expect(wrapper.find(SchemaAddFieldModal)).toHaveLength(1); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx index 48059d6698fd1..dbf7f0a695a8b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx @@ -13,6 +13,7 @@ import { EuiButton } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { SchemaAddFieldModal } from '../../../../shared/schema'; +import { AppLogic } from '../../../app_logic'; import { getEngineBreadcrumbs } from '../../engine'; import { AppSearchPageTemplate } from '../../layout'; @@ -21,6 +22,9 @@ import { SCHEMA_TITLE } from '../constants'; import { SchemaLogic } from '../schema_logic'; export const Schema: React.FC = () => { + const { + myRole: { canManageEngines }, + } = useValues(AppLogic); const { loadSchema, updateSchema, addSchemaField, openModal, closeModal } = useActions(SchemaLogic); const { dataLoading, isUpdating, hasSchema, hasSchemaChanged, isModalOpen } = @@ -30,6 +34,32 @@ export const Schema: React.FC = () => { loadSchema(); }, []); + const schemaActions = [ + updateSchema()} + data-test-subj="updateSchemaButton" + > + {i18n.translate('xpack.enterpriseSearch.appSearch.engine.schema.updateSchemaButtonLabel', { + defaultMessage: 'Save changes', + })} + , + + {i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.schema.createSchemaFieldButtonLabel', + { defaultMessage: 'Create a schema field' } + )} + , + ]; + return ( { 'xpack.enterpriseSearch.appSearch.engine.schema.pageDescription', { defaultMessage: 'Add new fields or change the types of existing ones.' } ), - rightSideItems: [ - updateSchema()} - data-test-subj="updateSchemaButton" - > - {i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.schema.updateSchemaButtonLabel', - { defaultMessage: 'Save changes' } - )} - , - - {i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.schema.createSchemaFieldButtonLabel', - { defaultMessage: 'Create a schema field' } - )} - , - ], + rightSideItems: canManageEngines ? schemaActions : [], }} isLoading={dataLoading} isEmptyState={!hasSchema} diff --git a/x-pack/plugins/file_upload/public/api/json_upload_and_parse_async_wrapper.tsx b/x-pack/plugins/file_upload/public/api/geo_upload_wizard_async_wrapper.tsx similarity index 62% rename from x-pack/plugins/file_upload/public/api/json_upload_and_parse_async_wrapper.tsx rename to x-pack/plugins/file_upload/public/api/geo_upload_wizard_async_wrapper.tsx index 281ea93b76694..f84eb24585ca4 100644 --- a/x-pack/plugins/file_upload/public/api/json_upload_and_parse_async_wrapper.tsx +++ b/x-pack/plugins/file_upload/public/api/geo_upload_wizard_async_wrapper.tsx @@ -10,15 +10,12 @@ import { EuiLoadingContent } from '@elastic/eui'; import { FileUploadComponentProps, lazyLoadModules } from '../lazy_load_bundle'; interface State { - JsonUploadAndParse: React.ComponentType | null; + GeoUploadWizard: React.ComponentType | null; } -export class JsonUploadAndParseAsyncWrapper extends React.Component< - FileUploadComponentProps, - State -> { +export class GeoUploadWizardAsyncWrapper extends React.Component { state: State = { - JsonUploadAndParse: null, + GeoUploadWizard: null, }; private _isMounted = false; @@ -27,7 +24,7 @@ export class JsonUploadAndParseAsyncWrapper extends React.Component< lazyLoadModules().then((modules) => { if (this._isMounted) { this.setState({ - JsonUploadAndParse: modules.JsonUploadAndParse, + GeoUploadWizard: modules.GeoUploadWizard, }); } }); @@ -38,11 +35,7 @@ export class JsonUploadAndParseAsyncWrapper extends React.Component< } render() { - const { JsonUploadAndParse } = this.state; - return JsonUploadAndParse ? ( - - ) : ( - - ); + const { GeoUploadWizard } = this.state; + return GeoUploadWizard ? : ; } } diff --git a/x-pack/plugins/file_upload/public/api/index.ts b/x-pack/plugins/file_upload/public/api/index.ts index d34cb2099120e..7224eacc08e42 100644 --- a/x-pack/plugins/file_upload/public/api/index.ts +++ b/x-pack/plugins/file_upload/public/api/index.ts @@ -9,11 +9,11 @@ import { lazyLoadModules } from '../lazy_load_bundle'; import type { IImporter, ImportFactoryOptions } from '../importer'; import type { HasImportPermission, FindFileStructureResponse } from '../../common/types'; import type { getMaxBytes, getMaxBytesFormatted } from '../importer/get_max_bytes'; -import { JsonUploadAndParseAsyncWrapper } from './json_upload_and_parse_async_wrapper'; +import { GeoUploadWizardAsyncWrapper } from './geo_upload_wizard_async_wrapper'; import { IndexNameFormAsyncWrapper } from './index_name_form_async_wrapper'; export interface FileUploadStartApi { - FileUploadComponent: typeof JsonUploadAndParseAsyncWrapper; + FileUploadComponent: typeof GeoUploadWizardAsyncWrapper; IndexNameFormComponent: typeof IndexNameFormAsyncWrapper; importerFactory: typeof importerFactory; getMaxBytes: typeof getMaxBytes; @@ -30,7 +30,7 @@ export interface GetTimeFieldRangeResponse { end: { epoch: number; string: string }; } -export const FileUploadComponent = JsonUploadAndParseAsyncWrapper; +export const FileUploadComponent = GeoUploadWizardAsyncWrapper; export const IndexNameFormComponent = IndexNameFormAsyncWrapper; export async function importerFactory( diff --git a/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_file_picker.tsx b/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_file_picker.tsx new file mode 100644 index 0000000000000..a349a5b82d372 --- /dev/null +++ b/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_file_picker.tsx @@ -0,0 +1,173 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { Component } from 'react'; +import { EuiFilePicker, EuiFormRow } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { MB } from '../../../common/constants'; +import { getMaxBytesFormatted } from '../../importer/get_max_bytes'; +import { GEO_FILE_TYPES, geoImporterFactory } from '../../importer/geo'; +import type { GeoFileImporter, GeoFilePreview } from '../../importer/geo'; + +export type OnFileSelectParameters = GeoFilePreview & { + indexName: string; + importer: GeoFileImporter; +}; + +interface Props { + onSelect: (onFileSelectParameters: OnFileSelectParameters) => void; + onClear: () => void; +} + +interface State { + defaultIndexName: string | null; + error: string | null; + isLoadingPreview: boolean; + importer: GeoFileImporter | null; + previewSummary: string | null; +} + +export class GeoFilePicker extends Component { + private _isMounted = false; + + state: State = { + defaultIndexName: null, + error: null, + isLoadingPreview: false, + importer: null, + previewSummary: null, + }; + + async componentDidMount() { + this._isMounted = true; + } + + componentWillUnmount() { + this._isMounted = false; + } + + _onFileSelect = (files: FileList | null) => { + this.props.onClear(); + + this.setState({ + defaultIndexName: null, + error: null, + isLoadingPreview: false, + importer: null, + previewSummary: null, + }); + + if (files && files.length) { + const file = files[0]; + try { + const importer = geoImporterFactory(file); + this.setState( + { + defaultIndexName: file.name.split('.')[0].toLowerCase(), + importer, + }, + this._loadFilePreview + ); + } catch (error) { + this.setState({ error: error.message }); + } + } + }; + + _loadFilePreview = async () => { + if (!this.state.importer || !this.state.importer.canPreview()) { + return; + } + + this.setState({ isLoadingPreview: true }); + + let previewError: string | null = null; + let preview: GeoFilePreview | null = null; + try { + preview = await this.state.importer.previewFile(10000, MB * 3); + if (preview.features.length === 0) { + previewError = i18n.translate('xpack.fileUpload.geoFilePicker.noFeaturesDetected', { + defaultMessage: 'No features found in selected file.', + }); + } + } catch (error) { + previewError = error.message; + } + + if (!this._isMounted) { + return; + } + + this.setState({ + error: previewError, + isLoadingPreview: false, + previewSummary: + !previewError && preview + ? i18n.translate('xpack.fileUpload.geoFilePicker.previewSummary', { + defaultMessage: 'Previewing {numFeatures} features, {previewCoverage}% of file.', + values: { + numFeatures: preview.features.length, + previewCoverage: preview.previewCoverage, + }, + }) + : null, + }); + + if (preview) { + this.props.onSelect({ + ...preview, + importer: this.state.importer, + indexName: this.state.defaultIndexName ? this.state.defaultIndexName : 'features', + }); + } + }; + + _renderHelpText() { + return this.state.previewSummary !== null ? ( + this.state.previewSummary + ) : ( + + {i18n.translate('xpack.fileUpload.geoFilePicker.acceptedFormats', { + defaultMessage: 'Formats accepted: {fileTypes}', + values: { fileTypes: GEO_FILE_TYPES.join(', ') }, + })} +
+ {i18n.translate('xpack.fileUpload.geoFilePicker.maxSize', { + defaultMessage: 'Max size: {maxFileSize}', + values: { maxFileSize: getMaxBytesFormatted() }, + })} +
+ ); + } + + _renderImporterEditor() { + return this.state.importer ? this.state.importer.renderEditor(this._loadFilePreview) : null; + } + + render() { + return ( + <> + + + + {this._renderImporterEditor()} + + ); + } +} diff --git a/x-pack/plugins/file_upload/public/components/geojson_upload_form/geojson_upload_form.tsx b/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_upload_form.tsx similarity index 94% rename from x-pack/plugins/file_upload/public/components/geojson_upload_form/geojson_upload_form.tsx rename to x-pack/plugins/file_upload/public/components/geo_upload_form/geo_upload_form.tsx index ddb0e7d9b2b22..16306673b246c 100644 --- a/x-pack/plugins/file_upload/public/components/geojson_upload_form/geojson_upload_form.tsx +++ b/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_upload_form.tsx @@ -8,7 +8,7 @@ import React, { ChangeEvent, Component } from 'react'; import { EuiForm, EuiFormRow, EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { GeoJsonFilePicker, OnFileSelectParameters } from './geojson_file_picker'; +import { GeoFilePicker, OnFileSelectParameters } from './geo_file_picker'; import { ES_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; import { IndexNameForm } from './index_name_form'; import { validateIndexName } from '../../validate_index_name'; @@ -41,7 +41,7 @@ interface State { isPointsOnly: boolean; } -export class GeoJsonUploadForm extends Component { +export class GeoUploadForm extends Component { private _isMounted = false; state: State = { hasFile: false, @@ -116,7 +116,7 @@ export class GeoJsonUploadForm extends Component { render() { return ( - + {this._renderGeoFieldTypeSelect()} {this.state.hasFile ? ( { - private _geojsonImporter?: GeoJsonImporter; +export class GeoUploadWizard extends Component { + private _geoFileImporter?: GeoFileImporter; private _isMounted = false; state: State = { @@ -60,9 +60,9 @@ export class JsonUploadAndParse extends Component { - if (!this._geojsonImporter) { + if (!this._geoFileImporter) { return; } @@ -115,14 +115,14 @@ export class JsonUploadAndParse extends Component { - this._geojsonImporter = importer; + this._geoFileImporter = importer; this.props.onFileSelect( { @@ -255,9 +255,9 @@ export class JsonUploadAndParse extends Component { - if (this._geojsonImporter) { - this._geojsonImporter.destroy(); - this._geojsonImporter = undefined; + if (this._geoFileImporter) { + this._geoFileImporter.destroy(); + this._geoFileImporter = undefined; } this.props.onFileClear(); @@ -305,7 +305,7 @@ export class JsonUploadAndParse extends Component void; - onClear: () => void; -} - -interface State { - error: string | null; - isLoadingPreview: boolean; - previewSummary: string | null; -} - -export class GeoJsonFilePicker extends Component { - private _isMounted = false; - - state: State = { - error: null, - isLoadingPreview: false, - previewSummary: null, - }; - - async componentDidMount() { - this._isMounted = true; - } - - componentWillUnmount() { - this._isMounted = false; - } - - _onFileSelect = (files: FileList | null) => { - this.props.onClear(); - - this.setState({ - error: null, - isLoadingPreview: false, - previewSummary: null, - }); - - if (files && files.length) { - this._loadFilePreview(files[0]); - } - }; - - async _loadFilePreview(file: File) { - this.setState({ isLoadingPreview: true }); - - let importer: GeoJsonImporter | null = null; - let previewError: string | null = null; - let preview: GeoJsonPreview | null = null; - try { - validateFile(file, GEOJSON_FILE_TYPES); - importer = new GeoJsonImporter(file); - preview = await importer.previewFile(10000, MB * 3); - if (preview.features.length === 0) { - previewError = i18n.translate('xpack.fileUpload.geojsonFilePicker.noFeaturesDetected', { - defaultMessage: 'No GeoJson features found in selected file.', - }); - } - } catch (error) { - previewError = error.message; - } - - if (!this._isMounted) { - return; - } - - this.setState({ - error: previewError, - isLoadingPreview: false, - previewSummary: - !previewError && preview - ? i18n.translate('xpack.fileUpload.geojsonFilePicker.previewSummary', { - defaultMessage: 'Previewing {numFeatures} features, {previewCoverage}% of file.', - values: { - numFeatures: preview.features.length, - previewCoverage: preview.previewCoverage, - }, - }) - : null, - }); - - if (importer && preview) { - this.props.onSelect({ - ...preview, - importer, - indexName: file.name.split('.')[0].toLowerCase(), - }); - } - } - - _renderHelpText() { - return this.state.previewSummary !== null ? ( - this.state.previewSummary - ) : ( - - {i18n.translate('xpack.fileUpload.geojsonFilePicker.acceptedFormats', { - defaultMessage: 'Formats accepted: {fileTypes}', - values: { fileTypes: GEOJSON_FILE_TYPES.join(', ') }, - })} -
- {i18n.translate('xpack.fileUpload.geojsonFilePicker.maxSize', { - defaultMessage: 'Max size: {maxFileSize}', - values: { maxFileSize: getMaxBytesFormatted() }, - })} -
- {i18n.translate('xpack.fileUpload.geojsonFilePicker.acceptedCoordinateSystem', { - defaultMessage: 'Coordinates must be in EPSG:4326 coordinate reference system.', - })} -
- ); - } - - render() { - return ( - - - - ); - } -} diff --git a/x-pack/plugins/file_upload/public/components/import_complete_view.tsx b/x-pack/plugins/file_upload/public/components/import_complete_view.tsx index f9fc46227db76..09f2ad96d11f4 100644 --- a/x-pack/plugins/file_upload/public/components/import_complete_view.tsx +++ b/x-pack/plugins/file_upload/public/components/import_complete_view.tsx @@ -34,6 +34,8 @@ interface Props { indexName: string; } +const STATUS_CALLOUT_DATA_TEST_SUBJ = 'fileUploadStatusCallout'; + export class ImportCompleteView extends Component { _renderCodeEditor(json: object | undefined, title: string, copyButtonDataTestSubj: string) { if (!json) { @@ -103,6 +105,7 @@ export class ImportCompleteView extends Component { })} color="danger" iconType="alert" + data-test-subj={STATUS_CALLOUT_DATA_TEST_SUBJ} >

{i18n.translate('xpack.fileUpload.importComplete.permissionFailureMsg', { @@ -139,6 +142,7 @@ export class ImportCompleteView extends Component { })} color="danger" iconType="alert" + data-test-subj={STATUS_CALLOUT_DATA_TEST_SUBJ} >

{errorMsg}

@@ -166,6 +170,7 @@ export class ImportCompleteView extends Component { title={i18n.translate('xpack.fileUpload.importComplete.uploadSuccessTitle', { defaultMessage: 'File upload complete', })} + data-test-subj={STATUS_CALLOUT_DATA_TEST_SUBJ} >

{`${successMsg} ${failedFeaturesMsg}`}

diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.ts b/x-pack/plugins/file_upload/public/importer/geo/abstract_geo_file_importer.tsx similarity index 65% rename from x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.ts rename to x-pack/plugins/file_upload/public/importer/geo/abstract_geo_file_importer.tsx index 40d6abdb1603a..59262984fd0e2 100644 --- a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.ts +++ b/x-pack/plugins/file_upload/public/importer/geo/abstract_geo_file_importer.tsx @@ -5,32 +5,24 @@ * 2.0. */ -import { Feature, Point } from 'geojson'; +import { ReactNode } from 'react'; +import { Feature } from 'geojson'; import { i18n } from '@kbn/i18n'; -// @ts-expect-error -import { JSONLoader, loadInBatches } from './loaders'; +import { GeoFileImporter, GeoFilePreview } from './types'; import { CreateDocsResponse, ImportResults } from '../types'; import { callImportRoute, Importer, IMPORT_RETRIES, MAX_CHUNK_CHAR_COUNT } from '../importer'; import { ES_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; -// @ts-expect-error -import { geoJsonCleanAndValidate } from './geojson_clean_and_validate'; import { MB } from '../../../common/constants'; import type { ImportDoc, ImportFailure, ImportResponse } from '../../../common/types'; +// @ts-expect-error +import { geoJsonCleanAndValidate } from './geojson_clean_and_validate'; +import { createChunks } from './create_chunks'; const BLOCK_SIZE_MB = 5 * MB; -export const GEOJSON_FILE_TYPES = ['.json', '.geojson']; -export interface GeoJsonPreview { - features: Feature[]; - hasPoints: boolean; - hasShapes: boolean; - previewCoverage: number; -} - -export class GeoJsonImporter extends Importer { +export class AbstractGeoFileImporter extends Importer implements GeoFileImporter { private _file: File; private _isActive = true; - private _iterator?: Iterator; private _hasNext = true; private _features: Feature[] = []; private _totalBytesRead = 0; @@ -40,7 +32,6 @@ export class GeoJsonImporter extends Importer { private _totalFeaturesImported = 0; private _geometryTypesMap = new Map(); private _invalidFeatures: ImportFailure[] = []; - private _prevBatchLastFeature?: Feature; private _geoFieldType: ES_FIELD_TYPES.GEO_POINT | ES_FIELD_TYPES.GEO_SHAPE = ES_FIELD_TYPES.GEO_SHAPE; @@ -54,12 +45,20 @@ export class GeoJsonImporter extends Importer { this._isActive = false; } - public async previewFile(rowLimit?: number, sizeLimit?: number): Promise { + public canPreview() { + return true; + } + + public renderEditor(onChange: () => void): ReactNode { + return null; + } + + public async previewFile(rowLimit?: number, sizeLimit?: number): Promise { await this._readUntil(rowLimit, sizeLimit); return { features: [...this._features], previewCoverage: this._hasNext - ? Math.round((this._blockSizeInBytes / this._file.size) * 100) + ? Math.round(this._getProgress(this._features.length, this._blockSizeInBytes)) : 100, hasPoints: this._geometryTypesMap.has('Point') || this._geometryTypesMap.has('MultiPoint'), hasShapes: @@ -236,8 +235,8 @@ export class GeoJsonImporter extends Importer { // because features are converted to elasticsearch documents which changes the size. const chunkProgress = (i + 1) / chunks.length; const totalBytesImported = this._totalBytesImported + blockSizeInBytes * chunkProgress; - const progressPercent = (totalBytesImported / this._file.size) * 100; - setImportProgress(Math.round(progressPercent * 10) / 10); + const importPercent = this._getProgress(this._totalFeaturesImported, totalBytesImported); + setImportProgress(Math.round(importPercent * 10) / 10); } else { success = false; error = resp.error; @@ -261,125 +260,55 @@ export class GeoJsonImporter extends Importer { (rowLimit === undefined || this._features.length < rowLimit) && (sizeLimit === undefined || this._blockSizeInBytes < sizeLimit) ) { - await this._next(); - } - } - - private async _next() { - if (this._iterator === undefined) { - this._iterator = await loadInBatches(this._file, JSONLoader, { - json: { - jsonpaths: ['$.features'], - _rootObjectBatches: true, - }, + const results = await this._readNext(this._totalFeaturesRead, this._totalBytesRead); + this._hasNext = results.hasNext; + this._blockSizeInBytes = this._blockSizeInBytes + results.bytesRead; + this._features = [ + ...this._features, + ...results.features.map((feature) => { + return geoJsonCleanAndValidate(feature); + }), + ]; + results.geometryTypesMap.forEach((value, key) => { + this._geometryTypesMap.set(key, value); }); + this._invalidFeatures = [...this._invalidFeatures, ...results.invalidFeatures]; + this._totalBytesRead = this._totalBytesRead + results.bytesRead; + this._totalFeaturesRead = + this._totalFeaturesRead + results.features.length + results.invalidFeatures.length; } + } - if (!this._isActive || !this._iterator) { - return; - } - - const { value: batch, done } = await this._iterator.next(); - - if (!this._isActive || done) { - this._hasNext = false; - return; - } - - if ('bytesUsed' in batch) { - const bytesRead = batch.bytesUsed - this._totalBytesRead; - this._blockSizeInBytes += bytesRead; - this._totalBytesRead = batch.bytesUsed; - } + protected _readNext( + prevFeaturesRead: number, + prevBytesRead: number + ): Promise<{ + bytesRead: number; + features: Feature[]; + geometryTypesMap: Map; + invalidFeatures: ImportFailure[]; + hasNext: boolean; + }> { + throw new Error('Should implement AbstractGeoFileImporter._next'); + } - const rawFeatures: unknown[] = this._prevBatchLastFeature ? [this._prevBatchLastFeature] : []; - this._prevBatchLastFeature = undefined; - const isLastBatch = batch.batchType === 'root-object-batch-complete'; - if (isLastBatch) { - // Handle single feature geoJson - if (this._totalFeaturesRead === 0) { - rawFeatures.push(batch.container); - } - } else { - rawFeatures.push(...batch.data); - } + protected _getProgress(featuresProcessed: number, bytesProcessed: number) { + return (bytesProcessed / this._file.size) * 100; + } - for (let i = 0; i < rawFeatures.length; i++) { - const rawFeature = rawFeatures[i] as Feature; - if (!isLastBatch && i === rawFeatures.length - 1) { - // Do not process last feature until next batch is read, features on batch boundary may be incomplete. - this._prevBatchLastFeature = rawFeature; - continue; - } + protected _getIsActive() { + return this._isActive; + } - this._totalFeaturesRead++; - if (!rawFeature.geometry || !rawFeature.geometry.type) { - this._invalidFeatures.push({ - item: this._totalFeaturesRead, - reason: i18n.translate('xpack.fileUpload.geojsonImporter.noGeometry', { - defaultMessage: 'Feature does not contain required field "geometry"', - }), - doc: rawFeature, - }); - } else { - if (!this._geometryTypesMap.has(rawFeature.geometry.type)) { - this._geometryTypesMap.set(rawFeature.geometry.type, true); - } - this._features.push(geoJsonCleanAndValidate(rawFeature)); - } - } + protected _getFile() { + return this._file; } public read(data: ArrayBuffer): { success: boolean } { - throw new Error('read(data: ArrayBuffer) not supported, use readFile instead.'); + throw new Error('read(data: ArrayBuffer) not supported, use previewFile and import instead.'); } protected _createDocs(text: string): CreateDocsResponse { throw new Error('_createDocs not implemented.'); } } - -export function createChunks( - features: Feature[], - geoFieldType: ES_FIELD_TYPES.GEO_POINT | ES_FIELD_TYPES.GEO_SHAPE, - maxChunkCharCount: number -): ImportDoc[][] { - const chunks: ImportDoc[][] = []; - - let chunk: ImportDoc[] = []; - let chunkChars = 0; - for (let i = 0; i < features.length; i++) { - const doc = toEsDoc(features[i], geoFieldType); - const docChars = JSON.stringify(doc).length + 1; // +1 adds CHAR for comma once document is in list - if (chunk.length === 0 || chunkChars + docChars < maxChunkCharCount) { - // add ES document to current chunk - chunk.push(doc); - chunkChars += docChars; - } else { - // chunk boundary found, start new chunk - chunks.push(chunk); - chunk = [doc]; - chunkChars = docChars; - } - } - - if (chunk.length) { - chunks.push(chunk); - } - - return chunks; -} - -export function toEsDoc( - feature: Feature, - geoFieldType: ES_FIELD_TYPES.GEO_POINT | ES_FIELD_TYPES.GEO_SHAPE -) { - const properties = feature.properties ? feature.properties : {}; - return { - geometry: - geoFieldType === ES_FIELD_TYPES.GEO_SHAPE - ? feature.geometry - : (feature.geometry as Point).coordinates, - ...properties, - }; -} diff --git a/x-pack/plugins/file_upload/public/importer/geo/create_chunks.test.ts b/x-pack/plugins/file_upload/public/importer/geo/create_chunks.test.ts new file mode 100644 index 0000000000000..2f244e0fc93dc --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/create_chunks.test.ts @@ -0,0 +1,126 @@ +/* + * 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 { Feature } from 'geojson'; +import { createChunks, toEsDoc } from './create_chunks'; +import { ES_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; + +const FEATURE_COLLECTION = { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: { + population: 200, + }, + geometry: { + type: 'Point', + coordinates: [-112.0372, 46.608058], + }, + } as Feature, + ], +}; + +const GEOMETRY_COLLECTION_FEATURE = { + type: 'Feature', + properties: { + population: 200, + }, + geometry: { + type: 'GeometryCollection', + geometries: [ + { + type: 'Point', + coordinates: [100.0, 0.0], + }, + { + type: 'LineString', + coordinates: [ + [101.0, 0.0], + [102.0, 1.0], + ], + }, + ], + }, +} as Feature; + +describe('toEsDoc', () => { + test('should convert feature to geo_point ES document', () => { + const esDoc = toEsDoc(FEATURE_COLLECTION.features[0], ES_FIELD_TYPES.GEO_POINT); + expect(esDoc).toEqual({ + geometry: [-112.0372, 46.608058], + population: 200, + }); + }); + + test('should convert feature to geo_shape ES document', () => { + const esDoc = toEsDoc(FEATURE_COLLECTION.features[0], ES_FIELD_TYPES.GEO_SHAPE); + expect(esDoc).toEqual({ + geometry: { + type: 'Point', + coordinates: [-112.0372, 46.608058], + }, + population: 200, + }); + }); + + test('should convert GeometryCollection feature to geo_shape ES document', () => { + const esDoc = toEsDoc(GEOMETRY_COLLECTION_FEATURE, ES_FIELD_TYPES.GEO_SHAPE); + expect(esDoc).toEqual({ + geometry: { + type: 'GeometryCollection', + geometries: [ + { + type: 'Point', + coordinates: [100.0, 0.0], + }, + { + type: 'LineString', + coordinates: [ + [101.0, 0.0], + [102.0, 1.0], + ], + }, + ], + }, + population: 200, + }); + }); +}); + +describe('createChunks', () => { + const GEOMETRY_COLLECTION_DOC_CHARS = JSON.stringify( + toEsDoc(GEOMETRY_COLLECTION_FEATURE, ES_FIELD_TYPES.GEO_SHAPE) + ).length; + + const features = [ + GEOMETRY_COLLECTION_FEATURE, + GEOMETRY_COLLECTION_FEATURE, + GEOMETRY_COLLECTION_FEATURE, + GEOMETRY_COLLECTION_FEATURE, + GEOMETRY_COLLECTION_FEATURE, + ]; + + test('should break features into chunks', () => { + const maxChunkCharCount = GEOMETRY_COLLECTION_DOC_CHARS * 3.5; + const chunks = createChunks(features, ES_FIELD_TYPES.GEO_SHAPE, maxChunkCharCount); + expect(chunks.length).toBe(2); + expect(chunks[0].length).toBe(3); + expect(chunks[1].length).toBe(2); + }); + + test('should break features into chunks containing only single feature when feature size is greater than maxChunkCharCount', () => { + const maxChunkCharCount = GEOMETRY_COLLECTION_DOC_CHARS * 0.8; + const chunks = createChunks(features, ES_FIELD_TYPES.GEO_SHAPE, maxChunkCharCount); + expect(chunks.length).toBe(5); + expect(chunks[0].length).toBe(1); + expect(chunks[1].length).toBe(1); + expect(chunks[2].length).toBe(1); + expect(chunks[3].length).toBe(1); + expect(chunks[4].length).toBe(1); + }); +}); diff --git a/x-pack/plugins/file_upload/public/importer/geo/create_chunks.ts b/x-pack/plugins/file_upload/public/importer/geo/create_chunks.ts new file mode 100644 index 0000000000000..cac21001e64a5 --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/create_chunks.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 { Feature, Point } from 'geojson'; +import { ES_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; +import type { ImportDoc } from '../../../common/types'; + +export function createChunks( + features: Feature[], + geoFieldType: ES_FIELD_TYPES.GEO_POINT | ES_FIELD_TYPES.GEO_SHAPE, + maxChunkCharCount: number +): ImportDoc[][] { + const chunks: ImportDoc[][] = []; + + let chunk: ImportDoc[] = []; + let chunkChars = 0; + for (let i = 0; i < features.length; i++) { + const doc = toEsDoc(features[i], geoFieldType); + const docChars = JSON.stringify(doc).length + 1; // +1 adds CHAR for comma once document is in list + if (chunk.length === 0 || chunkChars + docChars < maxChunkCharCount) { + // add ES document to current chunk + chunk.push(doc); + chunkChars += docChars; + } else { + // chunk boundary found, start new chunk + chunks.push(chunk); + chunk = [doc]; + chunkChars = docChars; + } + } + + if (chunk.length) { + chunks.push(chunk); + } + + return chunks; +} + +export function toEsDoc( + feature: Feature, + geoFieldType: ES_FIELD_TYPES.GEO_POINT | ES_FIELD_TYPES.GEO_SHAPE +) { + const properties = feature.properties ? feature.properties : {}; + return { + geometry: + geoFieldType === ES_FIELD_TYPES.GEO_SHAPE + ? feature.geometry + : (feature.geometry as Point).coordinates, + ...properties, + }; +} diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_clean_and_validate.js b/x-pack/plugins/file_upload/public/importer/geo/geojson_clean_and_validate.js similarity index 100% rename from x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_clean_and_validate.js rename to x-pack/plugins/file_upload/public/importer/geo/geojson_clean_and_validate.js diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_clean_and_validate.test.js b/x-pack/plugins/file_upload/public/importer/geo/geojson_clean_and_validate.test.js similarity index 100% rename from x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_clean_and_validate.test.js rename to x-pack/plugins/file_upload/public/importer/geo/geojson_clean_and_validate.test.js diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.test.js b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js similarity index 67% rename from x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.test.js rename to x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js index 0cdd9e8bc7c5d..f5846432161cc 100644 --- a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.test.js +++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js @@ -5,8 +5,7 @@ * 2.0. */ -import { GeoJsonImporter, createChunks, toEsDoc } from './geojson_importer'; -import { ES_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; +import { GeoJsonImporter } from './geojson_importer'; import '@loaders.gl/polyfills'; const FEATURE_COLLECTION = { @@ -220,80 +219,3 @@ describe('previewFile', () => { }); }); }); - -describe('toEsDoc', () => { - test('should convert feature to geo_point ES document', () => { - const esDoc = toEsDoc(FEATURE_COLLECTION.features[0], ES_FIELD_TYPES.GEO_POINT); - expect(esDoc).toEqual({ - geometry: [-112.0372, 46.608058], - population: 200, - }); - }); - - test('should convert feature to geo_shape ES document', () => { - const esDoc = toEsDoc(FEATURE_COLLECTION.features[0], ES_FIELD_TYPES.GEO_SHAPE); - expect(esDoc).toEqual({ - geometry: { - type: 'Point', - coordinates: [-112.0372, 46.608058], - }, - population: 200, - }); - }); - - test('should convert GeometryCollection feature to geo_shape ES document', () => { - const esDoc = toEsDoc(GEOMETRY_COLLECTION_FEATURE, ES_FIELD_TYPES.GEO_SHAPE); - expect(esDoc).toEqual({ - geometry: { - type: 'GeometryCollection', - geometries: [ - { - type: 'Point', - coordinates: [100.0, 0.0], - }, - { - type: 'LineString', - coordinates: [ - [101.0, 0.0], - [102.0, 1.0], - ], - }, - ], - }, - population: 200, - }); - }); -}); - -describe('createChunks', () => { - const GEOMETRY_COLLECTION_DOC_CHARS = JSON.stringify( - toEsDoc(GEOMETRY_COLLECTION_FEATURE, ES_FIELD_TYPES.GEO_SHAPE) - ).length; - - const features = [ - GEOMETRY_COLLECTION_FEATURE, - GEOMETRY_COLLECTION_FEATURE, - GEOMETRY_COLLECTION_FEATURE, - GEOMETRY_COLLECTION_FEATURE, - GEOMETRY_COLLECTION_FEATURE, - ]; - - test('should break features into chunks', () => { - const maxChunkCharCount = GEOMETRY_COLLECTION_DOC_CHARS * 3.5; - const chunks = createChunks(features, ES_FIELD_TYPES.GEO_SHAPE, maxChunkCharCount); - expect(chunks.length).toBe(2); - expect(chunks[0].length).toBe(3); - expect(chunks[1].length).toBe(2); - }); - - test('should break features into chunks containing only single feature when feature size is greater than maxChunkCharCount', () => { - const maxChunkCharCount = GEOMETRY_COLLECTION_DOC_CHARS * 0.8; - const chunks = createChunks(features, ES_FIELD_TYPES.GEO_SHAPE, maxChunkCharCount); - expect(chunks.length).toBe(5); - expect(chunks[0].length).toBe(1); - expect(chunks[1].length).toBe(1); - expect(chunks[2].length).toBe(1); - expect(chunks[3].length).toBe(1); - expect(chunks[4].length).toBe(1); - }); -}); diff --git a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts new file mode 100644 index 0000000000000..8cc39bf0eebd1 --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts @@ -0,0 +1,95 @@ +/* + * 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 { Feature } from 'geojson'; +import { i18n } from '@kbn/i18n'; +// @ts-expect-error +import { JSONLoader, loadInBatches } from '../loaders'; +import type { ImportFailure } from '../../../../common/types'; +import { AbstractGeoFileImporter } from '../abstract_geo_file_importer'; + +export const GEOJSON_FILE_TYPES = ['.json', '.geojson']; + +export class GeoJsonImporter extends AbstractGeoFileImporter { + private _iterator?: Iterator; + private _prevBatchLastFeature?: Feature; + + protected async _readNext(prevTotalFeaturesRead: number, prevTotalBytesRead: number) { + let featureIndex = prevTotalFeaturesRead; + const results = { + bytesRead: 0, + features: [] as Feature[], + geometryTypesMap: new Map(), + invalidFeatures: [] as ImportFailure[], + hasNext: true, + }; + + if (this._iterator === undefined) { + this._iterator = await loadInBatches(this._getFile(), JSONLoader, { + json: { + jsonpaths: ['$.features'], + _rootObjectBatches: true, + }, + }); + } + + if (!this._getIsActive() || !this._iterator) { + results.hasNext = false; + return results; + } + + const { value: batch, done } = await this._iterator.next(); + + if (!this._getIsActive() || done) { + results.hasNext = false; + return results; + } + + if ('bytesUsed' in batch) { + results.bytesRead = batch.bytesUsed - prevTotalBytesRead; + } + + const features: unknown[] = this._prevBatchLastFeature ? [this._prevBatchLastFeature] : []; + this._prevBatchLastFeature = undefined; + const isLastBatch = batch.batchType === 'root-object-batch-complete'; + if (isLastBatch) { + // Handle single feature geoJson + if (featureIndex === 0) { + features.push(batch.container); + } + } else { + features.push(...batch.data); + } + + for (let i = 0; i < features.length; i++) { + const feature = features[i] as Feature; + if (!isLastBatch && i === features.length - 1) { + // Do not process last feature until next batch is read, features on batch boundary may be incomplete. + this._prevBatchLastFeature = feature; + continue; + } + + featureIndex++; + if (!feature.geometry || !feature.geometry.type) { + results.invalidFeatures.push({ + item: featureIndex, + reason: i18n.translate('xpack.fileUpload.geojsonImporter.noGeometry', { + defaultMessage: 'Feature does not contain required field "geometry"', + }), + doc: feature, + }); + } else { + if (!results.geometryTypesMap.has(feature.geometry.type)) { + results.geometryTypesMap.set(feature.geometry.type, true); + } + results.features.push(feature); + } + } + + return results; + } +} diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/index.ts b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/index.ts similarity index 84% rename from x-pack/plugins/file_upload/public/importer/geojson_importer/index.ts rename to x-pack/plugins/file_upload/public/importer/geo/geojson_importer/index.ts index 7d9d8e144fd25..fccf1a5d9ae28 100644 --- a/x-pack/plugins/file_upload/public/importer/geojson_importer/index.ts +++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/index.ts @@ -5,5 +5,4 @@ * 2.0. */ -export type { GeoJsonPreview } from './geojson_importer'; export { GeoJsonImporter, GEOJSON_FILE_TYPES } from './geojson_importer'; diff --git a/x-pack/plugins/file_upload/public/importer/geo/index.ts b/x-pack/plugins/file_upload/public/importer/geo/index.ts new file mode 100644 index 0000000000000..fd75d17ec5e71 --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/index.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { GeoFileImporter } from './types'; +import { GeoJsonImporter, GEOJSON_FILE_TYPES } from './geojson_importer'; +import { ShapefileImporter, SHAPEFILE_TYPES } from './shapefile_importer'; +import { getFileExtension, validateFile } from '../validate_file'; + +export const GEO_FILE_TYPES = [...GEOJSON_FILE_TYPES, ...SHAPEFILE_TYPES]; + +export function geoImporterFactory(file: File): GeoFileImporter { + validateFile(file, GEO_FILE_TYPES); + + const extension = getFileExtension(file); + return GEOJSON_FILE_TYPES.includes(extension) + ? new GeoJsonImporter(file) + : new ShapefileImporter(file); +} + +export type { GeoFileImporter, GeoFilePreview } from './types'; diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/loaders.js b/x-pack/plugins/file_upload/public/importer/geo/loaders.js similarity index 71% rename from x-pack/plugins/file_upload/public/importer/geojson_importer/loaders.js rename to x-pack/plugins/file_upload/public/importer/geo/loaders.js index eb6d69a4b57b7..327a46c3a6d94 100644 --- a/x-pack/plugins/file_upload/public/importer/geojson_importer/loaders.js +++ b/x-pack/plugins/file_upload/public/importer/geo/loaders.js @@ -7,4 +7,5 @@ // Loading @loaders.gl from javascriopt file to typescript compilation failures within @loaders.gl. export { JSONLoader } from '@loaders.gl/json'; -export { loadInBatches } from '@loaders.gl/core'; +export { _BrowserFileSystem as BrowserFileSystem, loadInBatches } from '@loaders.gl/core'; +export { DBFLoader, ShapefileLoader } from '@loaders.gl/shapefile'; diff --git a/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/index.ts b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/index.ts new file mode 100644 index 0000000000000..e7cd16057f3c5 --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/index.ts @@ -0,0 +1,8 @@ +/* + * 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 { ShapefileImporter, SHAPEFILE_TYPES } from './shapefile_importer'; diff --git a/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/shapefile_editor.tsx b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/shapefile_editor.tsx new file mode 100644 index 0000000000000..2fa6688cc210f --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/shapefile_editor.tsx @@ -0,0 +1,38 @@ +/* + * 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 { SideCarFilePicker } from './side_car_file_picker'; + +interface Props { + shapefileName: string; + onDbfSelect: (file: File | null) => void; + onPrjSelect: (file: File | null) => void; + onShxSelect: (file: File | null) => void; +} + +export function ShapefileEditor(props: Props) { + return ( + <> + + + + + ); +} diff --git a/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/shapefile_importer.tsx b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/shapefile_importer.tsx new file mode 100644 index 0000000000000..86877a7a4ff67 --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/shapefile_importer.tsx @@ -0,0 +1,131 @@ +/* + * 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 { Feature } from 'geojson'; +// @ts-expect-error +import { BrowserFileSystem, DBFLoader, loadInBatches, ShapefileLoader } from '../loaders'; +import type { ImportFailure } from '../../../../common/types'; +import { ShapefileEditor } from './shapefile_editor'; +import { AbstractGeoFileImporter } from '../abstract_geo_file_importer'; + +export const SHAPEFILE_TYPES = ['.shp']; + +export class ShapefileImporter extends AbstractGeoFileImporter { + private _tableRowCount: number | null = null; + private _dbfFile: File | null = null; + private _prjFile: File | null = null; + private _shxFile: File | null = null; + private _iterator?: Iterator<{ data: Feature[] }>; + + public canPreview() { + return this._dbfFile !== null && this._prjFile !== null && this._shxFile !== null; + } + + public renderEditor(onChange: () => void) { + return !this.canPreview() ? ( + { + this._dbfFile = file; + onChange(); + }} + onPrjSelect={(file) => { + this._prjFile = file; + onChange(); + }} + onShxSelect={(file) => { + this._shxFile = file; + onChange(); + }} + /> + ) : null; + } + + private async _setTableRowCount() { + if (!this._dbfFile) { + return; + } + + // read header from dbf file to get number of records in data file + const dbfIterator = (await loadInBatches(this._dbfFile, DBFLoader, { + metadata: false, + dbf: { encoding: 'latin1' }, + })) as unknown as Iterator<{ nRecords: number }>; + const { value } = await dbfIterator.next(); + if (value.nRecords && typeof value.nRecords === 'number') { + this._tableRowCount = value.nRecords; + } + } + + protected _getProgress(featuresProcessed: number, bytesProcessed: number) { + if (this._tableRowCount === null || this._tableRowCount === 0) { + return 0; + } + + if (featuresProcessed > this._tableRowCount) { + return 100; + } + + return (featuresProcessed / this._tableRowCount) * 100; + } + + protected async _readNext(prevTotalFeaturesRead: number, prevTotalBytesRead: number) { + const results = { + bytesRead: 0, + features: [] as Feature[], + geometryTypesMap: new Map(), + invalidFeatures: [] as ImportFailure[], + hasNext: true, + }; + + if (this._iterator === undefined) { + const sideCarFiles: File[] = []; + if (this._dbfFile) { + sideCarFiles.push(this._dbfFile); + } + if (this._prjFile) { + sideCarFiles.push(this._prjFile); + } + if (this._shxFile) { + sideCarFiles.push(this._shxFile); + } + const fileSystem = new BrowserFileSystem([this._getFile(), ...sideCarFiles]); + this._iterator = (await loadInBatches(this._getFile().name, ShapefileLoader, { + fetch: fileSystem.fetch, + // Reproject shapefiles to WGS84 + gis: { reproject: true, _targetCrs: 'EPSG:4326' }, + // Only parse the X & Y coordinates. Other coords not supported by Elasticsearch. + shp: { _maxDimensions: 2 }, + metadata: false, + })) as unknown as Iterator<{ data: Feature[] }>; + await this._setTableRowCount(); + } + + const { value: batch, done } = await this._iterator.next(); + + if (!this._getIsActive() || done) { + results.hasNext = false; + return results; + } + + for (let i = 0; i < batch.data.length; i++) { + const feature = batch.data[i]; + if (!results.geometryTypesMap.has(feature.geometry.type)) { + results.geometryTypesMap.set(feature.geometry.type, true); + } + results.features.push(feature); + + // Instead of tracking bytes read, which is difficult since reading from multiple binary files + // track size by features + const featureChars = JSON.stringify(feature).length; + results.bytesRead = results.bytesRead + featureChars; + } + + return results; + } +} diff --git a/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/side_car_file_picker.test.ts b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/side_car_file_picker.test.ts new file mode 100644 index 0000000000000..7c692886c9462 --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/side_car_file_picker.test.ts @@ -0,0 +1,14 @@ +/* + * 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 { getFileNameWithoutExt } from './side_car_file_picker'; + +test('getFileNameWithoutExt', () => { + expect(getFileNameWithoutExt('foo')).toBe('foo'); + expect(getFileNameWithoutExt('foo.shp')).toBe('foo'); + expect(getFileNameWithoutExt('foo.bar.shp')).toBe('foo.bar'); +}); diff --git a/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/side_car_file_picker.tsx b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/side_car_file_picker.tsx new file mode 100644 index 0000000000000..c7ae240e3c702 --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/shapefile_importer/side_car_file_picker.tsx @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { Component } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiFilePicker, EuiFormRow } from '@elastic/eui'; + +export function getFileNameWithoutExt(fileName: string) { + const splits = fileName.split('.'); + if (splits.length > 1) { + splits.pop(); + } + return splits.join('.'); +} + +interface Props { + ext: '.dbf' | '.prj' | '.shx'; + onSelect: (file: File | null) => void; + shapefileName: string; +} + +interface State { + error: string; + isInvalid: boolean; +} + +export class SideCarFilePicker extends Component { + state: State = { + error: '', + isInvalid: false, + }; + + _isSideCarFileValid(sideCarFile: File) { + return ( + getFileNameWithoutExt(this.props.shapefileName) === getFileNameWithoutExt(sideCarFile.name) + ); + } + + _getSideCarFileNameError() { + return i18n.translate('xpack.fileUpload.shapefile.sideCarFilePicker.error', { + defaultMessage: '{ext} expected to be {shapefileName}{ext}', + values: { + ext: this.props.ext, + shapefileName: getFileNameWithoutExt(this.props.shapefileName), + }, + }); + } + + _onSelect = (files: FileList | null) => { + if (!files || files.length === 0) { + this.setState({ error: '', isInvalid: false }); + this.props.onSelect(null); + return; + } + + const file = files[0]; + if (!this._isSideCarFileValid(file)) { + this.setState({ error: this._getSideCarFileNameError(), isInvalid: true }); + this.props.onSelect(null); + return; + } + + this.setState({ error: '', isInvalid: false }); + this.props.onSelect(file); + }; + + render() { + return ( + + + + ); + } +} diff --git a/x-pack/plugins/file_upload/public/importer/geo/types.ts b/x-pack/plugins/file_upload/public/importer/geo/types.ts new file mode 100644 index 0000000000000..c616324f7e9be --- /dev/null +++ b/x-pack/plugins/file_upload/public/importer/geo/types.ts @@ -0,0 +1,26 @@ +/* + * 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 { Feature } from 'geojson'; +import { ReactNode } from 'react'; +import { IImporter } from '../types'; +import { ES_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; + +export interface GeoFilePreview { + features: Feature[]; + hasPoints: boolean; + hasShapes: boolean; + previewCoverage: number; +} + +export interface GeoFileImporter extends IImporter { + destroy(): void; + canPreview(): boolean; + previewFile(rowLimit?: number, sizeLimit?: number): Promise; + renderEditor(onChange: () => void): ReactNode; + setGeoFieldType(geoFieldType: ES_FIELD_TYPES.GEO_POINT | ES_FIELD_TYPES.GEO_SHAPE): void; +} diff --git a/x-pack/plugins/file_upload/public/importer/validate_file.ts b/x-pack/plugins/file_upload/public/importer/validate_file.ts index 60d93ad552d0d..0a087e91a63f3 100644 --- a/x-pack/plugins/file_upload/public/importer/validate_file.ts +++ b/x-pack/plugins/file_upload/public/importer/validate_file.ts @@ -8,6 +8,14 @@ import { i18n } from '@kbn/i18n'; import { getMaxBytes, getMaxBytesFormatted } from './get_max_bytes'; +/* + * Extract file extension from file. Example: file.name "points.geojson" returns ".geojson" + */ +export function getFileExtension(file: File) { + const extension = file.name.split('.').pop(); + return '.' + extension; +} + export function validateFile(file: File, types: string[]) { if (file.size > getMaxBytes()) { throw new Error( @@ -29,9 +37,7 @@ export function validateFile(file: File, types: string[]) { ); } - const nameSplit = file.name.split('.'); - const fileType = nameSplit.pop(); - if (!types.includes(`.${fileType}`)) { + if (!types.includes(getFileExtension(file))) { throw new Error( i18n.translate('xpack.fileUpload.fileTypeError', { defaultMessage: 'File is not one of acceptable types: {types}', diff --git a/x-pack/plugins/file_upload/public/index.ts b/x-pack/plugins/file_upload/public/index.ts index ba591b5c8d942..135f26c69ad2f 100644 --- a/x-pack/plugins/file_upload/public/index.ts +++ b/x-pack/plugins/file_upload/public/index.ts @@ -11,7 +11,7 @@ export function plugin() { return new FileUploadPlugin(); } -export type { Props as IndexNameFormProps } from './components/geojson_upload_form/index_name_form'; +export type { Props as IndexNameFormProps } from './components/geo_upload_form/index_name_form'; export type { FileUploadPluginStart } from './plugin'; export type { FileUploadComponentProps, FileUploadGeoResults } from './lazy_load_bundle'; diff --git a/x-pack/plugins/file_upload/public/lazy_load_bundle/index.ts b/x-pack/plugins/file_upload/public/lazy_load_bundle/index.ts index 192a7ffb5e782..97aef4365c508 100644 --- a/x-pack/plugins/file_upload/public/lazy_load_bundle/index.ts +++ b/x-pack/plugins/file_upload/public/lazy_load_bundle/index.ts @@ -33,7 +33,7 @@ export interface FileUploadComponentProps { let loadModulesPromise: Promise; export interface LazyLoadedFileUploadModules { - JsonUploadAndParse: React.ComponentType; + GeoUploadWizard: React.ComponentType; IndexNameForm: React.ComponentType; importerFactory: (format: string, options: ImportFactoryOptions) => IImporter | undefined; getHttp: () => HttpStart; @@ -46,9 +46,9 @@ export async function lazyLoadModules(): Promise { loadModulesPromise = new Promise(async (resolve, reject) => { try { - const { JsonUploadAndParse, importerFactory, IndexNameForm } = await import('./lazy'); + const { GeoUploadWizard, importerFactory, IndexNameForm } = await import('./lazy'); resolve({ - JsonUploadAndParse, + GeoUploadWizard, importerFactory, getHttp, IndexNameForm, diff --git a/x-pack/plugins/file_upload/public/lazy_load_bundle/lazy/index.ts b/x-pack/plugins/file_upload/public/lazy_load_bundle/lazy/index.ts index 85333227a36d8..4ce4f3d5d67c8 100644 --- a/x-pack/plugins/file_upload/public/lazy_load_bundle/lazy/index.ts +++ b/x-pack/plugins/file_upload/public/lazy_load_bundle/lazy/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export { JsonUploadAndParse } from '../../components/json_upload_and_parse'; -export { IndexNameForm } from '../../components/geojson_upload_form/index_name_form'; +export { GeoUploadWizard } from '../../components/geo_upload_wizard'; +export { IndexNameForm } from '../../components/geo_upload_form/index_name_form'; export { importerFactory } from '../../importer'; diff --git a/x-pack/plugins/fleet/common/constants/epm.ts b/x-pack/plugins/fleet/common/constants/epm.ts index 12885be5a8aea..fba5893400d8c 100644 --- a/x-pack/plugins/fleet/common/constants/epm.ts +++ b/x-pack/plugins/fleet/common/constants/epm.ts @@ -60,4 +60,5 @@ export const installationStatuses = { Installing: 'installing', InstallFailed: 'install_failed', NotInstalled: 'not_installed', + InstalledBundled: 'installed_bundled', } as const; diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index 98824ccdbfbcf..0be8b335ed549 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -3764,6 +3764,9 @@ "title": "New agent policy", "type": "object", "properties": { + "id": { + "type": "string" + }, "name": { "type": "string" }, @@ -3783,7 +3786,11 @@ ] } } - } + }, + "required": [ + "name", + "namespace" + ] }, "new_package_policy": { "title": "New package policy", diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index 6af428f3c3522..0659352deb1d9 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -2363,6 +2363,8 @@ components: title: New agent policy type: object properties: + id: + type: string name: type: string namespace: @@ -2376,6 +2378,9 @@ components: enum: - metrics - logs + required: + - name + - namespace new_package_policy: title: New package policy type: object diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml index 1184e41c5fded..7b9e7f43c8ab0 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml @@ -1,6 +1,8 @@ title: New agent policy type: object properties: + id: + type: string name: type: string namespace: @@ -14,3 +16,6 @@ properties: enum: - metrics - logs +required: + - name + - namespace \ No newline at end of file diff --git a/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts b/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts index 98056d6906c59..afb6a2f806f9a 100644 --- a/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts +++ b/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts @@ -606,6 +606,132 @@ describe('Fleet - validatePackagePolicy()', () => { }, }); }); + + it('returns package policy validation error if input var does not exist', () => { + expect( + validatePackagePolicy( + { + description: 'Linux Metrics', + enabled: true, + inputs: [ + { + enabled: true, + streams: [ + { + data_stream: { + dataset: 'linux.memory', + type: 'metrics', + }, + enabled: true, + }, + ], + type: 'linux/metrics', + vars: { + period: { + type: 'string', + value: '1s', + }, + }, + }, + ], + name: 'linux-3d13ada6-a9ae-46df-8e57-ff5050f4b671', + namespace: 'default', + output_id: '', + package: { + name: 'linux', + title: 'Linux Metrics', + version: '0.6.2', + }, + policy_id: 'b25cb6e0-8347-11ec-96f9-6590c25bacf9', + }, + { + ...mockPackage, + name: 'linux', + policy_templates: [ + { + name: 'system', + title: 'Linux kernel metrics', + description: 'Collect system metrics from Linux operating systems', + inputs: [ + { + title: 'Collect system metrics from Linux instances', + vars: [ + { + name: 'system.hostfs', + type: 'text', + title: 'Proc Filesystem Directory', + multi: false, + required: false, + show_user: true, + description: 'The proc filesystem base directory.', + }, + ], + type: 'system/metrics', + description: + 'Collecting Linux entropy, Network Summary, RAID, service, socket, and users metrics', + }, + { + title: 'Collect low-level system metrics from Linux instances', + vars: [], + type: 'linux/metrics', + description: 'Collecting Linux conntrack, ksm, pageinfo metrics.', + }, + ], + multiple: true, + }, + ], + data_streams: [ + { + dataset: 'linux.memory', + package: 'linux', + path: 'memory', + streams: [ + { + input: 'linux/metrics', + title: 'Linux memory metrics', + vars: [ + { + name: 'period', + type: 'text', + title: 'Period', + multi: false, + required: true, + show_user: true, + default: '10s', + }, + ], + template_path: 'stream.yml.hbs', + description: 'Linux paging and memory management metrics', + }, + ], + title: 'Linux-only memory metrics', + release: 'experimental', + type: 'metrics', + }, + ], + }, + safeLoad + ) + ).toEqual({ + description: null, + inputs: { + 'linux/metrics': { + streams: { + 'linux.memory': { + vars: { + period: ['Period is required'], + }, + }, + }, + vars: { + period: ['period var definition does not exist'], + }, + }, + }, + name: null, + namespace: null, + }); + }); }); describe('works for packages with multiple policy templates (aka integrations)', () => { diff --git a/x-pack/plugins/fleet/common/services/validate_package_policy.ts b/x-pack/plugins/fleet/common/services/validate_package_policy.ts index b6befdf8c790e..f1e28bfbe4e55 100644 --- a/x-pack/plugins/fleet/common/services/validate_package_policy.ts +++ b/x-pack/plugins/fleet/common/services/validate_package_policy.ts @@ -143,7 +143,7 @@ export const validatePackagePolicy = ( results[name] = input.enabled ? validatePackagePolicyConfig( configEntry, - inputVarDefsByPolicyTemplateAndType[inputKey][name], + (inputVarDefsByPolicyTemplateAndType[inputKey] ?? {})[name], name, safeLoadYaml ) @@ -210,10 +210,15 @@ export const validatePackagePolicyConfig = ( } if (varDef === undefined) { - // eslint-disable-next-line no-console - console.debug(`No variable definition for ${varName} found`); - - return null; + errors.push( + i18n.translate('xpack.fleet.packagePolicyValidation.nonExistentVarMessage', { + defaultMessage: '{varName} var definition does not exist', + values: { + varName, + }, + }) + ); + return errors; } if (varDef.required) { diff --git a/x-pack/plugins/fleet/common/types/models/agent_policy.ts b/x-pack/plugins/fleet/common/types/models/agent_policy.ts index 6e59cf0d50006..d8dec7e64a6af 100644 --- a/x-pack/plugins/fleet/common/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/agent_policy.ts @@ -14,6 +14,7 @@ import type { Output } from './output'; export type AgentPolicyStatus = typeof agentPolicyStatuses; export interface NewAgentPolicy { + id?: string; name: string; namespace: string; description?: string; @@ -28,7 +29,7 @@ export interface NewAgentPolicy { monitoring_output_id?: string; } -export interface AgentPolicy extends NewAgentPolicy { +export interface AgentPolicy extends Omit { id: string; status: ValueOf; package_policies: string[] | PackagePolicy[]; diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index de92ddf1fcfae..983ee7fff3db1 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -45,7 +45,11 @@ export interface DefaultPackagesInstallationError { export type InstallType = 'reinstall' | 'reupdate' | 'rollback' | 'update' | 'install' | 'unknown'; export type InstallSource = 'registry' | 'upload'; -export type EpmPackageInstallStatus = 'installed' | 'installing' | 'install_failed'; +export type EpmPackageInstallStatus = + | 'installed' + | 'installing' + | 'install_failed' + | 'installed_bundled'; export type DetailViewPanelName = 'overview' | 'policies' | 'assets' | 'settings' | 'custom'; export type ServiceName = 'kibana' | 'elasticsearch'; @@ -410,13 +414,22 @@ export interface PackageUsageStats { agent_policy_count: number; } -export type Installable = Installed | Installing | NotInstalled | InstallFailed; +export type Installable = + | InstalledRegistry + | Installing + | NotInstalled + | InstallFailed + | InstalledBundled; -export type Installed = T & { +export type InstalledRegistry = T & { status: InstallationStatus['Installed']; savedObject: SavedObject; }; +export type InstalledBundled = T & { + status: InstallationStatus['InstalledBundled']; +}; + export type Installing = T & { status: InstallationStatus['Installing']; savedObject: SavedObject; diff --git a/x-pack/plugins/fleet/common/types/models/preconfiguration.ts b/x-pack/plugins/fleet/common/types/models/preconfiguration.ts index 04e7e13b95d47..89b5c382a65fd 100644 --- a/x-pack/plugins/fleet/common/types/models/preconfiguration.ts +++ b/x-pack/plugins/fleet/common/types/models/preconfiguration.ts @@ -20,7 +20,7 @@ export type InputsOverride = Partial & { vars?: Array; }; -export interface PreconfiguredAgentPolicy extends Omit { +export interface PreconfiguredAgentPolicy extends Omit { id: string | number; namespace?: string; package_policies: Array< diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/components/fleet_server_on_prem_instructions.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/components/fleet_server_on_prem_instructions.tsx index c3f532da862ed..cf023f122f21a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/components/fleet_server_on_prem_instructions.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/components/fleet_server_on_prem_instructions.tsx @@ -461,7 +461,7 @@ export const AddFleetServerHostStepContent = ({ theme.eui.euiSizeL}; `; -export const DeploymentDetails = ({ endpointUrl, cloudId, learnMoreUrl, managementUrl }: Props) => { +export const DeploymentDetails = ({ cloudId, learnMoreUrl, managementUrl }: Props) => { const [isOpen, setIsOpen] = React.useState(false); const button = ( @@ -74,25 +73,6 @@ export const DeploymentDetails = ({ endpointUrl, cloudId, learnMoreUrl, manageme Elasticsearch information. - - - - - - - - {(copy) => ( - - )} - - - - diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.stories.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.stories.tsx index 445bf471c0fe9..5b311b3443e36 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.stories.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.stories.tsx @@ -50,7 +50,6 @@ export const Component = (props: PureComponentProps) => { Component.args = { cloudId: 'cloud-id', - endpointUrl: 'https://endpoint-url', learnMoreUrl: 'https://learn-more-url', managementUrl: 'https://management-url', }; diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.tsx index 79175d241c29f..968d596a5f9d5 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.tsx @@ -19,34 +19,18 @@ export const DeploymentDetails = () => { return null; } - const { isCloudEnabled, cloudId, cname } = cloud; + const { isCloudEnabled, cloudId } = cloud; - // If cloud isn't enabled, we don't have a cloudId or a cname, we can't display the flyout. - if (!isCloudEnabled || !cloudId || !cname) { + // If cloud isn't enabled or we don't have a cloudId we can't display the flyout. + if (!isCloudEnabled || !cloudId) { return null; } - // If the cname doesn't start with a known prefix, we can't display the flyout. - // TODO: dover - this is a short term solution, see https://github.com/elastic/kibana/pull/114287#issuecomment-940111026 - if ( - !( - cname.endsWith('elastic-cloud.com') || - cname.endsWith('found.io') || - cname.endsWith('found.no') || - cname.endsWith('foundit.no') - ) - ) { - return null; - } - - const cnameNormalized = cname.startsWith('.') ? cname.substring(1) : cname; - const endpointUrl = `https://${cloudId}.${cnameNormalized}`; - const managementUrl = share.url.locators .get('MANAGEMENT_APP_LOCATOR') ?.useUrl({ sectionId: 'security', appId: 'api_keys' }); const learnMoreUrl = docLinks.links.fleet.apiKeysLearnMore; - return ; + return ; }; diff --git a/x-pack/plugins/fleet/server/services/agent_policy_create.test.ts b/x-pack/plugins/fleet/server/services/agent_policy_create.test.ts index 57398f053b269..8ee6f2e69052f 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy_create.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy_create.test.ts @@ -208,4 +208,35 @@ describe('createAgentPolicyWithPackages', () => { expect.anything() ); }); + + it('should create policy with id', async () => { + const response = await createAgentPolicyWithPackages({ + esClient: esClientMock, + soClient: soClientMock, + newPolicy: { id: 'policy-1', name: 'Agent policy 1', namespace: 'default' }, + withSysMonitoring: false, + spaceId: 'default', + monitoringEnabled: [], + }); + + expect(response.id).toEqual('policy-1'); + }); + + it('should create policy with fleet_server and id', async () => { + const response = await createAgentPolicyWithPackages({ + esClient: esClientMock, + soClient: soClientMock, + newPolicy: { + id: 'new_fleet_server_policy', + name: 'Fleet Server policy', + namespace: 'default', + }, + hasFleetServer: true, + withSysMonitoring: false, + monitoringEnabled: [], + spaceId: 'default', + }); + + expect(response.id).toEqual('new_fleet_server_policy'); + }); }); diff --git a/x-pack/plugins/fleet/server/services/agent_policy_create.ts b/x-pack/plugins/fleet/server/services/agent_policy_create.ts index 9bbf2889357a3..30ee5b162a74d 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy_create.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy_create.ts @@ -94,12 +94,12 @@ export async function createAgentPolicyWithPackages({ spaceId, user, }: CreateAgentPolicyParams) { - let agentPolicyId; + let agentPolicyId = newPolicy.id; const packagesToInstall = []; if (hasFleetServer) { packagesToInstall.push(FLEET_SERVER_PACKAGE); - agentPolicyId = await getFleetServerAgentPolicyId(soClient); + agentPolicyId = agentPolicyId || (await getFleetServerAgentPolicyId(soClient)); if (agentPolicyId === FLEET_SERVER_POLICY_ID) { // setting first fleet server policy to default, so that fleet server can enroll without setting policy_id newPolicy.is_default_fleet_server = true; @@ -120,7 +120,9 @@ export async function createAgentPolicyWithPackages({ }); } - const agentPolicy = await agentPolicyService.create(soClient, esClient, newPolicy, { + const { id, ...policy } = newPolicy; // omit id from create object + + const agentPolicy = await agentPolicyService.create(soClient, esClient, policy, { user, id: agentPolicyId, }); diff --git a/x-pack/plugins/fleet/server/services/epm/archive/validation.ts b/x-pack/plugins/fleet/server/services/epm/archive/validation.ts index 8d20d88c7a9aa..5fdbdc5b17332 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/validation.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/validation.ts @@ -209,9 +209,9 @@ export function parseAndVerifyDataStreams( streams: manifestStreams, ...restOfProps } = manifest; - if (!(dataStreamTitle && release && type)) { + if (!(dataStreamTitle && type)) { throw new PackageInvalidArchiveError( - `Invalid manifest for data stream '${dataStreamPath}': one or more fields missing of 'title', 'release', 'type'` + `Invalid manifest for data stream '${dataStreamPath}': one or more fields missing of 'title', 'type'` ); } const streams = parseAndVerifyStreams(manifestStreams, dataStreamPath); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts b/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts index 3178881b7ce09..a32809672e1b4 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts @@ -14,6 +14,7 @@ import type { InstallResult } from '../../../types'; import { installPackage, isPackageVersionOrLaterInstalled } from './install'; import type { BulkInstallResponse, IBulkInstallPackageError } from './install'; +import { getBundledPackages } from './get_bundled_packages'; interface BulkInstallPackagesParams { savedObjectsClient: SavedObjectsClientContract; @@ -21,6 +22,7 @@ interface BulkInstallPackagesParams { esClient: ElasticsearchClient; force?: boolean; spaceId: string; + preferredSource?: 'registry' | 'bundled'; } export async function bulkInstallPackages({ @@ -29,9 +31,12 @@ export async function bulkInstallPackages({ esClient, spaceId, force, + preferredSource = 'registry', }: BulkInstallPackagesParams): Promise { const logger = appContextService.getLogger(); - const installSource = 'registry'; + + const bundledPackages = await getBundledPackages(); + const packagesResults = await Promise.allSettled( packagesToInstall.map((pkg) => { if (typeof pkg === 'string') return Registry.fetchFindLatestPackage(pkg); @@ -39,57 +44,113 @@ export async function bulkInstallPackages({ }) ); - logger.debug(`kicking off bulk install of ${packagesToInstall.join(', ')} from registry`); + logger.debug( + `kicking off bulk install of ${packagesToInstall.join( + ', ' + )} with preferred source of "${preferredSource}"` + ); + const bulkInstallResults = await Promise.allSettled( packagesResults.map(async (result, index) => { const packageName = getNameFromPackagesToInstall(packagesToInstall, index); - if (result.status === 'fulfilled') { - const pkgKeyProps = result.value; - const installedPackageResult = await isPackageVersionOrLaterInstalled({ - savedObjectsClient, - pkgName: pkgKeyProps.name, - pkgVersion: pkgKeyProps.version, - }); - if (installedPackageResult) { - const { - name, - version, - installed_es: installedEs, - installed_kibana: installedKibana, - } = installedPackageResult.package; - return { - name, - version, - result: { - assets: [...installedEs, ...installedKibana], - status: 'already_installed', - installType: installedPackageResult.installType, - } as InstallResult, - }; + + if (result.status === 'rejected') { + return { name: packageName, error: result.reason }; + } + + const pkgKeyProps = result.value; + const installedPackageResult = await isPackageVersionOrLaterInstalled({ + savedObjectsClient, + pkgName: pkgKeyProps.name, + pkgVersion: pkgKeyProps.version, + }); + + if (installedPackageResult) { + const { + name, + version, + installed_es: installedEs, + installed_kibana: installedKibana, + } = installedPackageResult.package; + return { + name, + version, + result: { + assets: [...installedEs, ...installedKibana], + status: 'already_installed', + installType: installedPackageResult.installType, + } as InstallResult, + }; + } + + let installResult: InstallResult; + const pkgkey = Registry.pkgToPkgKey(pkgKeyProps); + + const bundledPackage = bundledPackages.find((pkg) => pkg.name === pkgkey); + + // If preferred source is bundled packages on disk, attempt to install from disk first, then fall back to registry + if (preferredSource === 'bundled') { + if (bundledPackage) { + logger.debug( + `kicking off install of ${pkgKeyProps.name}-${pkgKeyProps.version} from bundled package on disk` + ); + installResult = await installPackage({ + savedObjectsClient, + esClient, + installSource: 'upload', + archiveBuffer: bundledPackage.buffer, + contentType: 'application/zip', + spaceId, + }); + } else { + installResult = await installPackage({ + savedObjectsClient, + esClient, + pkgkey, + installSource: 'registry', + spaceId, + force, + }); } - const installResult = await installPackage({ + } else { + // If preferred source is registry, attempt to install from registry first, then fall back to bundled packages on disk + installResult = await installPackage({ savedObjectsClient, esClient, - pkgkey: Registry.pkgToPkgKey(pkgKeyProps), - installSource, + pkgkey, + installSource: 'registry', spaceId, force, }); - if (installResult.error) { - return { - name: packageName, - error: installResult.error, - installType: installResult.installType, - }; - } else { - return { - name: packageName, - version: pkgKeyProps.version, - result: installResult, - }; + + // If we initially errored, try to install from bundled package on disk + if (installResult.error && bundledPackage) { + logger.debug( + `kicking off install of ${pkgKeyProps.name}-${pkgKeyProps.version} from bundled package on disk` + ); + installResult = await installPackage({ + savedObjectsClient, + esClient, + installSource: 'upload', + archiveBuffer: bundledPackage.buffer, + contentType: 'application/zip', + spaceId, + }); } } - return { name: packageName, error: result.reason }; + + if (installResult.error) { + return { + name: packageName, + error: installResult.error, + installType: installResult.installType, + }; + } + return { + name: packageName, + version: pkgKeyProps.version, + result: installResult, + }; }) ); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get_bundled_packages.ts b/x-pack/plugins/fleet/server/services/epm/packages/get_bundled_packages.ts new file mode 100644 index 0000000000000..a9f9b754640cb --- /dev/null +++ b/x-pack/plugins/fleet/server/services/epm/packages/get_bundled_packages.ts @@ -0,0 +1,43 @@ +/* + * 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 path from 'path'; +import fs from 'fs/promises'; + +import { appContextService } from '../../app_context'; + +const BUNDLED_PACKAGE_DIRECTORY = path.join(__dirname, '../../../bundled_packages'); + +interface BundledPackage { + name: string; + buffer: Buffer; +} + +export async function getBundledPackages(): Promise { + try { + const dirContents = await fs.readdir(BUNDLED_PACKAGE_DIRECTORY); + const zipFiles = dirContents.filter((file) => file.endsWith('.zip')); + + const result = await Promise.all( + zipFiles.map(async (zipFile) => { + const file = await fs.readFile(path.join(BUNDLED_PACKAGE_DIRECTORY, zipFile)); + + return { + name: zipFile.replace(/\.zip$/, ''), + buffer: file, + }; + }) + ); + + return result; + } catch (err) { + const logger = appContextService.getLogger(); + logger.debug(`Unable to read bundled packages from ${BUNDLED_PACKAGE_DIRECTORY}`); + + return []; + } +} diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts index cb04b5f583c5a..b74466bc6271a 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts @@ -190,10 +190,11 @@ describe('install', () => { }); describe('upload', () => { - it('should send telemetry on install failure', async () => { + it('should send telemetry on update', async () => { jest .spyOn(obj, 'getInstallationObject') .mockImplementationOnce(() => Promise.resolve({ attributes: { version: '1.2.0' } } as any)); + jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); await installPackage({ spaceId: DEFAULT_SPACE_ID, installSource: 'upload', @@ -206,13 +207,11 @@ describe('install', () => { expect(sendTelemetryEvents).toHaveBeenCalledWith(expect.anything(), undefined, { currentVersion: '1.2.0', dryRun: false, - errorMessage: - 'Package upload only supports fresh installations. Package apache is already installed, please uninstall first.', eventType: 'package-install', installType: 'update', newVersion: '1.3.0', packageName: 'apache', - status: 'failure', + status: 'success', }); }); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.ts index a42e71022e052..21f0ae25d6faf 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.ts @@ -19,11 +19,7 @@ import type { InstallSource, } from '../../../../common'; import { AUTO_UPGRADE_POLICIES_PACKAGES } from '../../../../common'; -import { - IngestManagerError, - PackageOperationNotSupportedError, - PackageOutdatedError, -} from '../../../errors'; +import { IngestManagerError, PackageOutdatedError } from '../../../errors'; import { PACKAGES_SAVED_OBJECT_TYPE, MAX_TIME_COMPLETE_INSTALL } from '../../../constants'; import type { KibanaAssetType } from '../../../types'; import { licenseService } from '../../'; @@ -402,12 +398,6 @@ async function installPackageByUpload({ telemetryEvent.installType = installType; telemetryEvent.currentVersion = installedPkg?.attributes.version || 'not_installed'; - if (installType !== 'install') { - throw new PackageOperationNotSupportedError( - `Package upload only supports fresh installations. Package ${packageInfo.name} is already installed, please uninstall first.` - ); - } - const installSource = 'upload'; const paths = await unpackBufferToCache({ name: packageInfo.name, @@ -463,7 +453,9 @@ async function installPackageByUpload({ } } -export type InstallPackageParams = { spaceId: string } & ( +export type InstallPackageParams = { + spaceId: string; +} & ( | ({ installSource: Extract } & InstallRegistryPackageParams) | ({ installSource: Extract } & InstallUploadedArchiveParams) ); @@ -472,6 +464,7 @@ export async function installPackage(args: InstallPackageParams) { if (!('installSource' in args)) { throw new Error('installSource is required'); } + const logger = appContextService.getLogger(); const { savedObjectsClient, esClient } = args; @@ -488,7 +481,6 @@ export async function installPackage(args: InstallPackageParams) { return response; } else if (args.installSource === 'upload') { const { archiveBuffer, contentType, spaceId } = args; - logger.debug(`kicking off install of uploaded package`); const response = installPackageByUpload({ savedObjectsClient, esClient, diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts index 3bba721d0dffb..89b8098f477fd 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts @@ -6,6 +6,7 @@ */ import uuid from 'uuid'; + import { elasticsearchServiceMock, savedObjectsClientMock } from 'src/core/server/mocks'; import { SavedObjectsErrorHelpers } from '../../../../../src/core/server'; @@ -16,6 +17,7 @@ import type { PackagePolicy, PreconfiguredAgentPolicy, PreconfiguredOutput, + RegistrySearchResult, } from '../../common/types'; import type { AgentPolicy, NewPackagePolicy, Output } from '../types'; @@ -31,12 +33,19 @@ import { } from './preconfiguration'; import { outputService } from './output'; import { packagePolicyService } from './package_policy'; +import { getBundledPackages } from './epm/packages/get_bundled_packages'; +import type { InstallPackageParams } from './epm/packages/install'; jest.mock('./agent_policy_update'); jest.mock('./output'); +jest.mock('./epm/packages/get_bundled_packages'); +jest.mock('./epm/archive'); const mockedOutputService = outputService as jest.Mocked; const mockedPackagePolicyService = packagePolicyService as jest.Mocked; +const mockedGetBundledPackages = getBundledPackages as jest.MockedFunction< + typeof getBundledPackages +>; const mockInstalledPackages = new Map(); const mockInstallPackageErrors = new Map(); @@ -110,42 +119,104 @@ function getPutPreconfiguredPackagesMock() { return soClient; } +jest.mock('./epm/registry', () => ({ + ...jest.requireActual('./epm/registry'), + async fetchFindLatestPackage(packageName: string): Promise { + return { + name: packageName, + version: '1.0.0', + description: '', + release: 'experimental', + title: '', + path: '', + download: '', + }; + }, +})); + jest.mock('./epm/packages/install', () => ({ - async installPackage({ - pkgkey, - force, - }: { - pkgkey: string; - force?: boolean; - }): Promise { - const [pkgName, pkgVersion] = pkgkey.split('-'); - const installError = mockInstallPackageErrors.get(pkgName); - if (installError) { + async installPackage(args: InstallPackageParams): Promise { + if (args.installSource === 'registry') { + const [pkgName, pkgVersion] = args.pkgkey.split('-'); + const installError = mockInstallPackageErrors.get(pkgName); + if (installError) { + return { + error: new Error(installError), + installType: 'install', + }; + } + + const installedPackage = mockInstalledPackages.get(pkgName); + if (installedPackage) { + if (installedPackage.version === pkgVersion) return installedPackage; + } + + const packageInstallation = { name: pkgName, version: pkgVersion, title: pkgName }; + mockInstalledPackages.set(pkgName, packageInstallation); + return { - error: new Error(installError), + status: 'installed', installType: 'install', }; - } + } else if (args.installSource === 'upload') { + const { archiveBuffer } = args; - const installedPackage = mockInstalledPackages.get(pkgName); - if (installedPackage) { - if (installedPackage.version === pkgVersion) return installedPackage; - } + // Treat the buffer value passed in tests as the package's name for simplicity + const pkgName = archiveBuffer.toString('utf8'); - const packageInstallation = { name: pkgName, version: pkgVersion, title: pkgName }; - mockInstalledPackages.set(pkgName, packageInstallation); + const installedPackage = mockInstalledPackages.get(pkgName); - return { - status: 'installed', - installType: 'install', - }; + if (installedPackage) { + return installedPackage; + } + + // Just install every bundled package at version '1.0.0' + const packageInstallation = { name: pkgName, version: '1.0.0', title: pkgName }; + mockInstalledPackages.set(pkgName, packageInstallation); + + return { status: 'installed', installType: 'install' }; + } }, ensurePackagesCompletedInstall() { return []; }, - isPackageVersionOrLaterInstalled() { + isPackageVersionOrLaterInstalled({ + soClient, + pkgName, + pkgVersion, + }: { + soClient: any; + pkgName: string; + pkgVersion: string; + }) { + const installedPackage = mockInstalledPackages.get(pkgName); + + if (installedPackage) { + if (installedPackage.version === pkgVersion) { + return { package: installedPackage, installType: 'reinstall' }; + } + + // Importing semver methods throws an error in jest, so just use a rough check instead + if (installedPackage.version < pkgVersion) { + return false; + } + if (installedPackage.version > pkgVersion) { + return { package: installedPackage, installType: 'rollback' }; + } + } + return false; }, + getInstallType: jest.fn(), + async updateInstallStatus(soClient: any, pkgName: string, status: string) { + const installedPackage = mockInstalledPackages.get(pkgName); + + if (!installedPackage) { + return; + } + + installedPackage.install_status = status; + }, })); jest.mock('./epm/packages/get', () => ({ @@ -160,6 +231,9 @@ jest.mock('./epm/packages/get', () => ({ getInstallation({ pkgName }: { pkgName: string }) { return mockInstalledPackages.get(pkgName) ?? false; }, + getInstallationObject({ pkgName }: { pkgName: string }) { + return mockInstalledPackages.get(pkgName) ?? false; + }, })); jest.mock('./epm/kibana/index_pattern/install'); @@ -217,271 +291,50 @@ describe('policy preconfiguration', () => { spyAgentPolicyServicBumpAllAgentPoliciesForOutput.mockClear(); }); - it('should perform a no-op when passed no policies or packages', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - - const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( - soClient, - esClient, - [], - [], - mockDefaultOutput, - DEFAULT_SPACE_ID - ); - - expect(policies.length).toBe(0); - expect(packages.length).toBe(0); - expect(nonFatalErrors.length).toBe(0); - }); - - it('should install packages successfully', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - - const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( - soClient, - esClient, - [], - [{ name: 'test_package', version: '3.0.0' }], - mockDefaultOutput, - DEFAULT_SPACE_ID - ); - - expect(policies.length).toBe(0); - expect(packages).toEqual(expect.arrayContaining(['test_package-3.0.0'])); - expect(nonFatalErrors.length).toBe(0); - }); - - it('should install packages and configure agent policies successfully', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - - const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( - soClient, - esClient, - [ - { - name: 'Test policy', - namespace: 'default', - id: 'test-id', - package_policies: [ - { - package: { name: 'test_package' }, - name: 'Test package', - }, - ], - }, - ] as PreconfiguredAgentPolicy[], - [{ name: 'test_package', version: '3.0.0' }], - mockDefaultOutput, - DEFAULT_SPACE_ID - ); - - expect(policies.length).toEqual(1); - expect(policies[0].id).toBe('test-id'); - expect(packages).toEqual(expect.arrayContaining(['test_package-3.0.0'])); - expect(nonFatalErrors.length).toBe(0); - }); - - it('should not add new package policy to existing non managed policies', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - mockedPackagePolicyService.getByIDs.mockResolvedValue([ - { name: 'test_package1' } as PackagePolicy, - ]); - - mockConfiguredPolicies.set('test-id', { - name: 'Test policy', - description: 'Test policy description', - unenroll_timeout: 120, - namespace: 'default', - id: 'test-id', - package_policies: [ - { - name: 'test_package1', - }, - ], - } as PreconfiguredAgentPolicy); - - await ensurePreconfiguredPackagesAndPolicies( - soClient, - esClient, - [ - { - name: 'Test policy', - namespace: 'default', - id: 'test-id', - is_managed: false, - package_policies: [ - { - package: { name: 'test_package' }, - name: 'test_package1', - }, - { - package: { name: 'test_package' }, - name: 'test_package2', - }, - ], - }, - ] as PreconfiguredAgentPolicy[], - [{ name: 'test_package', version: '3.0.0' }], - mockDefaultOutput, - DEFAULT_SPACE_ID - ); - - expect(mockedPackagePolicyService.create).not.toBeCalled(); - }); - - it('should add new package policy to existing managed policies', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - mockedPackagePolicyService.getByIDs.mockResolvedValue([ - { name: 'test_package1' } as PackagePolicy, - ]); - - mockConfiguredPolicies.set('test-id', { - name: 'Test policy', - description: 'Test policy description', - unenroll_timeout: 120, - namespace: 'default', - id: 'test-id', - package_policies: [ - { - name: 'test_package1', - }, - ], - is_managed: true, - } as PreconfiguredAgentPolicy); - - await ensurePreconfiguredPackagesAndPolicies( - soClient, - esClient, - [ - { - name: 'Test policy', - namespace: 'default', - id: 'test-id', - is_managed: true, - package_policies: [ - { - package: { name: 'test_package' }, - name: 'test_package1', - }, - { - package: { name: 'test_package' }, - name: 'test_package2', - }, - ], - }, - ] as PreconfiguredAgentPolicy[], - [{ name: 'test_package', version: '3.0.0' }], - mockDefaultOutput, - DEFAULT_SPACE_ID - ); - - expect(mockedPackagePolicyService.create).toBeCalledTimes(1); - expect(mockedPackagePolicyService.create).toBeCalledWith( - expect.anything(), // so client - expect.anything(), // es client - expect.objectContaining({ - name: 'test_package2', - }), - expect.anything() // options - ); - }); + describe('with no bundled packages', () => { + mockedGetBundledPackages.mockResolvedValue([]); - it('should throw an error when trying to install duplicate packages', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + it('should perform a no-op when passed no policies or packages', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - await expect( - ensurePreconfiguredPackagesAndPolicies( + const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( soClient, esClient, [], - [ - { name: 'test_package', version: '3.0.0' }, - { name: 'test_package', version: '2.0.0' }, - ], + [], mockDefaultOutput, DEFAULT_SPACE_ID - ) - ).rejects.toThrow( - 'Duplicate packages specified in configuration: test_package-3.0.0, test_package-2.0.0' - ); - }); + ); - it('should not create a policy and throw an error if install fails for required package', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - const policies: PreconfiguredAgentPolicy[] = [ - { - name: 'Test policy', - namespace: 'default', - id: 'test-id', - package_policies: [ - { - package: { name: 'test_package' }, - name: 'Test package', - }, - ], - }, - ]; - mockInstallPackageErrors.set('test_package', 'REGISTRY ERROR'); + expect(policies.length).toBe(0); + expect(packages.length).toBe(0); + expect(nonFatalErrors.length).toBe(0); + }); + + it('should install packages successfully', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - await expect( - ensurePreconfiguredPackagesAndPolicies( + const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( soClient, esClient, - policies, + [], [{ name: 'test_package', version: '3.0.0' }], mockDefaultOutput, DEFAULT_SPACE_ID - ) - ).rejects.toThrow( - '[Test policy] could not be added. [test_package] could not be installed due to error: [Error: REGISTRY ERROR]' - ); - }); - - it('should not create a policy and throw an error if package is not installed for an unknown reason', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - const policies: PreconfiguredAgentPolicy[] = [ - { - name: 'Test policy', - namespace: 'default', - id: 'test-id', - package_policies: [ - { - id: 'test-package', - package: { name: 'test_package' }, - name: 'Test package', - }, - ], - }, - ]; + ); - await expect( - ensurePreconfiguredPackagesAndPolicies( - soClient, - esClient, - policies, - [{ name: 'CANNOT_MATCH', version: 'x.y.z' }], - mockDefaultOutput, - DEFAULT_SPACE_ID - ) - ).rejects.toThrow( - '[Test policy] could not be added. [test_package] is not installed, add [test_package] to [xpack.fleet.packages] or remove it from [Test package].' - ); - }); + expect(policies.length).toBe(0); + expect(packages).toEqual(expect.arrayContaining(['test_package-3.0.0'])); + expect(nonFatalErrors.length).toBe(0); + }); - it('should not attempt to recreate or modify an agent policy if its ID is unchanged', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + it('should install packages and configure agent policies successfully', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - const { policies: policiesA, nonFatalErrors: nonFatalErrorsA } = - await ensurePreconfiguredPackagesAndPolicies( + const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( soClient, esClient, [ @@ -489,120 +342,476 @@ describe('policy preconfiguration', () => { name: 'Test policy', namespace: 'default', id: 'test-id', - package_policies: [], + package_policies: [ + { + package: { name: 'test_package' }, + name: 'Test package', + }, + ], }, ] as PreconfiguredAgentPolicy[], - [], + [{ name: 'test_package', version: '3.0.0' }], mockDefaultOutput, DEFAULT_SPACE_ID ); - expect(policiesA.length).toEqual(1); - expect(policiesA[0].id).toBe('test-id'); - expect(nonFatalErrorsA.length).toBe(0); + expect(policies.length).toEqual(1); + expect(policies[0].id).toBe('test-id'); + expect(packages).toEqual(expect.arrayContaining(['test_package-3.0.0'])); + expect(nonFatalErrors.length).toBe(0); + }); + + it('should not add new package policy to existing non managed policies', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + mockedPackagePolicyService.getByIDs.mockResolvedValue([ + { name: 'test_package1' } as PackagePolicy, + ]); + + mockConfiguredPolicies.set('test-id', { + name: 'Test policy', + description: 'Test policy description', + unenroll_timeout: 120, + namespace: 'default', + id: 'test-id', + package_policies: [ + { + name: 'test_package1', + }, + ], + } as PreconfiguredAgentPolicy); - const { policies: policiesB, nonFatalErrors: nonFatalErrorsB } = await ensurePreconfiguredPackagesAndPolicies( soClient, esClient, [ { - name: 'Test policy redo', + name: 'Test policy', namespace: 'default', id: 'test-id', + is_managed: false, package_policies: [ { - package: { name: 'some-uninstalled-package' }, - name: 'This package is not installed', + package: { name: 'test_package' }, + name: 'test_package1', + }, + { + package: { name: 'test_package' }, + name: 'test_package2', }, ], }, ] as PreconfiguredAgentPolicy[], - [], + [{ name: 'test_package', version: '3.0.0' }], mockDefaultOutput, DEFAULT_SPACE_ID ); - expect(policiesB.length).toEqual(1); - expect(policiesB[0].id).toBe('test-id'); - expect(policiesB[0].updated_at).toEqual(policiesA[0].updated_at); - expect(nonFatalErrorsB.length).toBe(0); - }); + expect(mockedPackagePolicyService.create).not.toBeCalled(); + }); - it('should update a managed policy if top level fields are changed', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + it('should add new package policy to existing managed policies', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + mockedPackagePolicyService.getByIDs.mockResolvedValue([ + { name: 'test_package1' } as PackagePolicy, + ]); + + mockConfiguredPolicies.set('test-id', { + name: 'Test policy', + description: 'Test policy description', + unenroll_timeout: 120, + namespace: 'default', + id: 'test-id', + package_policies: [ + { + name: 'test_package1', + }, + ], + is_managed: true, + } as PreconfiguredAgentPolicy); - mockConfiguredPolicies.set('test-id', { - name: 'Test policy', - description: 'Test policy description', - unenroll_timeout: 120, - namespace: 'default', - id: 'test-id', - package_policies: [], - is_managed: true, - } as PreconfiguredAgentPolicy); - - const { policies, nonFatalErrors: nonFatalErrorsB } = await ensurePreconfiguredPackagesAndPolicies( soClient, esClient, [ { - name: 'Renamed Test policy', - description: 'Renamed Test policy description', - unenroll_timeout: 999, + name: 'Test policy', namespace: 'default', id: 'test-id', is_managed: true, - package_policies: [], + package_policies: [ + { + package: { name: 'test_package' }, + name: 'test_package1', + }, + { + package: { name: 'test_package' }, + name: 'test_package2', + }, + ], }, ] as PreconfiguredAgentPolicy[], - [], + [{ name: 'test_package', version: '3.0.0' }], mockDefaultOutput, DEFAULT_SPACE_ID ); - expect(spyAgentPolicyServiceUpdate).toBeCalled(); - expect(spyAgentPolicyServiceUpdate).toBeCalledWith( - expect.anything(), // soClient - expect.anything(), // esClient - 'test-id', - expect.objectContaining({ - name: 'Renamed Test policy', - description: 'Renamed Test policy description', - unenroll_timeout: 999, - }) - ); - expect(policies.length).toEqual(1); - expect(policies[0].id).toBe('test-id'); - expect(nonFatalErrorsB.length).toBe(0); + + expect(mockedPackagePolicyService.create).toBeCalledTimes(1); + expect(mockedPackagePolicyService.create).toBeCalledWith( + expect.anything(), // so client + expect.anything(), // es client + expect.objectContaining({ + name: 'test_package2', + }), + expect.anything() // options + ); + }); + + it('should throw an error when trying to install duplicate packages', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + await expect( + ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [], + [ + { name: 'test_package', version: '3.0.0' }, + { name: 'test_package', version: '2.0.0' }, + ], + mockDefaultOutput, + DEFAULT_SPACE_ID + ) + ).rejects.toThrow( + 'Duplicate packages specified in configuration: test_package-3.0.0, test_package-2.0.0' + ); + }); + + it('should not create a policy and throw an error if install fails for required package', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + const policies: PreconfiguredAgentPolicy[] = [ + { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + package_policies: [ + { + package: { name: 'test_package' }, + name: 'Test package', + }, + ], + }, + ]; + mockInstallPackageErrors.set('test_package', 'REGISTRY ERROR'); + + await expect( + ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + policies, + [{ name: 'test_package', version: '3.0.0' }], + mockDefaultOutput, + DEFAULT_SPACE_ID + ) + ).rejects.toThrow( + '[Test policy] could not be added. [test_package] could not be installed due to error: [Error: REGISTRY ERROR]' + ); + }); + + it('should not create a policy and throw an error if package is not installed for an unknown reason', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + const policies: PreconfiguredAgentPolicy[] = [ + { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + package_policies: [ + { + id: 'test-package', + package: { name: 'test_package' }, + name: 'Test package', + }, + ], + }, + ]; + + await expect( + ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + policies, + [{ name: 'CANNOT_MATCH', version: 'x.y.z' }], + mockDefaultOutput, + DEFAULT_SPACE_ID + ) + ).rejects.toThrow( + '[Test policy] could not be added. [test_package] is not installed, add [test_package] to [xpack.fleet.packages] or remove it from [Test package].' + ); + }); + + it('should not attempt to recreate or modify an agent policy if its ID is unchanged', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + const { policies: policiesA, nonFatalErrors: nonFatalErrorsA } = + await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [ + { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + package_policies: [], + }, + ] as PreconfiguredAgentPolicy[], + [], + mockDefaultOutput, + DEFAULT_SPACE_ID + ); + + expect(policiesA.length).toEqual(1); + expect(policiesA[0].id).toBe('test-id'); + expect(nonFatalErrorsA.length).toBe(0); + + const { policies: policiesB, nonFatalErrors: nonFatalErrorsB } = + await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [ + { + name: 'Test policy redo', + namespace: 'default', + id: 'test-id', + package_policies: [ + { + package: { name: 'some-uninstalled-package' }, + name: 'This package is not installed', + }, + ], + }, + ] as PreconfiguredAgentPolicy[], + [], + mockDefaultOutput, + DEFAULT_SPACE_ID + ); + + expect(policiesB.length).toEqual(1); + expect(policiesB[0].id).toBe('test-id'); + expect(policiesB[0].updated_at).toEqual(policiesA[0].updated_at); + expect(nonFatalErrorsB.length).toBe(0); + }); + + it('should update a managed policy if top level fields are changed', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + mockConfiguredPolicies.set('test-id', { + name: 'Test policy', + description: 'Test policy description', + unenroll_timeout: 120, + namespace: 'default', + id: 'test-id', + package_policies: [], + is_managed: true, + } as PreconfiguredAgentPolicy); + + const { policies, nonFatalErrors: nonFatalErrorsB } = + await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [ + { + name: 'Renamed Test policy', + description: 'Renamed Test policy description', + unenroll_timeout: 999, + namespace: 'default', + id: 'test-id', + is_managed: true, + package_policies: [], + }, + ] as PreconfiguredAgentPolicy[], + [], + mockDefaultOutput, + DEFAULT_SPACE_ID + ); + expect(spyAgentPolicyServiceUpdate).toBeCalled(); + expect(spyAgentPolicyServiceUpdate).toBeCalledWith( + expect.anything(), // soClient + expect.anything(), // esClient + 'test-id', + expect.objectContaining({ + name: 'Renamed Test policy', + description: 'Renamed Test policy description', + unenroll_timeout: 999, + }) + ); + expect(policies.length).toEqual(1); + expect(policies[0].id).toBe('test-id'); + expect(nonFatalErrorsB.length).toBe(0); + }); + + it('should not update a managed policy if a top level field has not changed', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + const policy: PreconfiguredAgentPolicy = { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + package_policies: [], + is_managed: true, + }; + mockConfiguredPolicies.set('test-id', policy); + + const { policies, nonFatalErrors: nonFatalErrorsB } = + await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [policy], + [], + mockDefaultOutput, + DEFAULT_SPACE_ID + ); + expect(spyAgentPolicyServiceUpdate).not.toBeCalled(); + expect(policies.length).toEqual(1); + expect(policies[0].id).toBe('test-id'); + expect(nonFatalErrorsB.length).toBe(0); + }); }); - it('should not update a managed policy if a top level field has not changed', async () => { - const soClient = getPutPreconfiguredPackagesMock(); - const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - const policy: PreconfiguredAgentPolicy = { - name: 'Test policy', - namespace: 'default', - id: 'test-id', - package_policies: [], - is_managed: true, - }; - mockConfiguredPolicies.set('test-id', policy); + describe('with bundled packages', () => { + beforeEach(() => { + mockInstalledPackages.clear(); + mockedGetBundledPackages.mockReset(); + }); - const { policies, nonFatalErrors: nonFatalErrorsB } = - await ensurePreconfiguredPackagesAndPolicies( + it('should install each bundled package', async () => { + mockedGetBundledPackages.mockResolvedValue([ + { + name: 'test_package', + buffer: Buffer.from('test_package'), + }, + + { + name: 'test_package_2', + buffer: Buffer.from('test_package_2'), + }, + ]); + + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( soClient, esClient, - [policy], [], + [ + { + name: 'test_package', + version: 'latest', + }, + { + name: 'test_package_2', + version: 'latest', + }, + ], mockDefaultOutput, DEFAULT_SPACE_ID ); - expect(spyAgentPolicyServiceUpdate).not.toBeCalled(); - expect(policies.length).toEqual(1); - expect(policies[0].id).toBe('test-id'); - expect(nonFatalErrorsB.length).toBe(0); + + expect(policies).toEqual([]); + expect(packages).toEqual(['test_package-1.0.0', 'test_package_2-1.0.0']); + expect(nonFatalErrors).toEqual([]); + }); + + describe('package updates', () => { + describe('when bundled package is a newer version', () => { + it('installs new version of package from disk', async () => { + mockedGetBundledPackages.mockResolvedValue([ + { + name: 'test_package', + buffer: Buffer.from('test_package'), + }, + ]); + + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + // Install an older version of a test package + mockInstalledPackages.set('test_package', { version: '0.9.0' }); + + const { policies, packages, nonFatalErrors } = + await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [], + [ + { + name: 'test_package', + version: 'latest', + }, + ], + mockDefaultOutput, + DEFAULT_SPACE_ID + ); + + // Package version should be updated + expect(mockInstalledPackages.get('test_package').version).toEqual('1.0.0'); + + expect(policies).toEqual([]); + expect(packages).toEqual(['test_package-1.0.0']); + expect(nonFatalErrors).toEqual([]); + }); + }); + + describe('when bundled package is not a newer version', () => { + it('does not install package from disk', async () => { + mockedGetBundledPackages.mockResolvedValue([ + { + name: 'test_package', + buffer: Buffer.from('test_package'), + }, + ]); + + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + // Install an newer version of a test package + mockInstalledPackages.set('test_package', { + version: '2.0.0', + name: 'test_package', + installed_es: [], + installed_kibana: [], + }); + + const { policies, packages, nonFatalErrors } = + await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [], + [ + { + name: 'test_package', + version: 'latest', + }, + ], + mockDefaultOutput, + DEFAULT_SPACE_ID + ); + + // Package version should be unchanged + expect(mockInstalledPackages.get('test_package').version).toEqual('2.0.0'); + + expect(packages).toEqual(['test_package-2.0.0']); + expect(policies).toEqual([]); + expect(nonFatalErrors).toEqual([]); + }); + }); + }); }); }); diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index ae69b7bd91101..06d700c3577b5 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -21,11 +21,9 @@ import type { PreconfiguredOutput, PackagePolicy, } from '../../common'; +import { PRECONFIGURATION_LATEST_KEYWORD } from '../../common'; import { SO_SEARCH_LIMIT, normalizeHostsForAgents } from '../../common'; -import { - PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, - PRECONFIGURATION_LATEST_KEYWORD, -} from '../constants'; +import { PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE } from '../constants'; import { escapeSearchQueryPhrase } from './saved_object'; import { pkgToPkgKey } from './epm/registry'; @@ -172,19 +170,25 @@ export async function ensurePreconfiguredPackagesAndPolicies( ); } + const packagesToInstall = packages.map((pkg) => + pkg.version === PRECONFIGURATION_LATEST_KEYWORD ? pkg.name : pkg + ); + // Preinstall packages specified in Kibana config const preconfiguredPackages = await bulkInstallPackages({ savedObjectsClient: soClient, esClient, - packagesToInstall: packages.map((pkg) => - pkg.version === PRECONFIGURATION_LATEST_KEYWORD ? pkg.name : pkg - ), + packagesToInstall, force: true, // Always force outdated packages to be installed if a later version isn't installed spaceId, + // During setup, we'll try to install preconfigured packages from the versions bundled with Kibana + // whenever possible + preferredSource: 'bundled', }); const fulfilledPackages = []; const rejectedPackages: PreconfigurationError[] = []; + for (let i = 0; i < preconfiguredPackages.length; i++) { const packageResult = preconfiguredPackages[i]; if ('error' in packageResult) { @@ -381,7 +385,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( }), } ), - packages: fulfilledPackages.map((pkg) => pkgToPkgKey(pkg)), + packages: fulfilledPackages.map((pkg) => ('version' in pkg ? pkgToPkgKey(pkg) : pkg.name)), nonFatalErrors: [...rejectedPackages, ...rejectedPolicies, ...packagePolicyUpgradeResults], }; } diff --git a/x-pack/plugins/fleet/server/types/models/agent_policy.ts b/x-pack/plugins/fleet/server/types/models/agent_policy.ts index bc89861928cc1..e1398aea63634 100644 --- a/x-pack/plugins/fleet/server/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/agent_policy.ts @@ -12,6 +12,7 @@ import { agentPolicyStatuses, dataTypes } from '../../../common'; import { PackagePolicySchema, NamespaceSchema } from './package_policy'; export const AgentPolicyBaseSchema = { + id: schema.maybe(schema.string()), name: schema.string({ minLength: 1 }), namespace: NamespaceSchema, description: schema.maybe(schema.string()), diff --git a/x-pack/plugins/index_management/server/lib/fetch_indices.ts b/x-pack/plugins/index_management/server/lib/fetch_indices.ts index 5050353f992b6..7b25956703db2 100644 --- a/x-pack/plugins/index_management/server/lib/fetch_indices.ts +++ b/x-pack/plugins/index_management/server/lib/fetch_indices.ts @@ -30,6 +30,9 @@ async function fetchIndicesCall( '*.settings.index.hidden', '*.data_stream', ], + // for better performance only compute aliases and settings of indices but not mappings + // @ts-expect-error new param https://github.com/elastic/elasticsearch-specification/issues/1382 + features: ['aliases', 'settings'], }); if (!Object.keys(indices).length) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx index 079580ce69896..45bdfd2091a3b 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx @@ -638,7 +638,6 @@ export function DimensionEditor(props: DimensionEditorProps) { () => String( selectedColumn && - !selectedColumn.customLabel && operationDefinitionMap[selectedColumn.operationType].getDefaultLabel( selectedColumn, state.indexPatterns[state.layers[layerId].indexPatternId], @@ -767,6 +766,7 @@ export function DimensionEditor(props: DimensionEditorProps) { // re-render the input from scratch to obtain new "initial value" if the underlying default label changes key={defaultLabel} value={selectedColumn.label} + defaultValue={defaultLabel} onChange={(value) => { updateLayer({ columns: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimensions_editor_helpers.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimensions_editor_helpers.tsx index 033ac9c707151..cbe158372e5a2 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimensions_editor_helpers.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimensions_editor_helpers.tsx @@ -33,11 +33,17 @@ export function isQuickFunction(operationType: string) { export const LabelInput = ({ value, onChange, + defaultValue, }: { value: string; onChange: (value: string) => void; + defaultValue?: string; }) => { - const { inputValue, handleInputChange, initialValue } = useDebouncedValue({ onChange, value }); + const { inputValue, handleInputChange, initialValue } = useDebouncedValue({ + onChange, + value, + defaultValue, + }); return ( diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx index 84bcb48f95234..8a35a093f4ac0 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx @@ -134,6 +134,7 @@ export const RangePopover = ({ compressed placeholder={FROM_PLACEHOLDER} isInvalid={!isValidRange(tempRange)} + step={1} /> @@ -164,6 +165,7 @@ export const RangePopover = ({ onSubmit(); } }} + step={1} /> diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/static_value.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/static_value.tsx index 0adaf8ea00640..d41ddaf26fb3f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/static_value.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/static_value.tsx @@ -215,6 +215,7 @@ export const staticValueOperation: OperationDefinition< compressed value={inputValue ?? ''} onChange={onChangeHandler} + step="any" /> ); diff --git a/x-pack/plugins/lens/public/mocks/data_plugin_mock.ts b/x-pack/plugins/lens/public/mocks/data_plugin_mock.ts index e740c789a4874..881b8fa887c66 100644 --- a/x-pack/plugins/lens/public/mocks/data_plugin_mock.ts +++ b/x-pack/plugins/lens/public/mocks/data_plugin_mock.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { isEqual } from 'lodash'; import { Observable, Subject } from 'rxjs'; import moment from 'moment'; import { isFilterPinned, Filter } from '@kbn/es-query'; @@ -79,8 +80,9 @@ export function mockDataPlugin( if (subscriber) subscriber(); }), setAppFilters: jest.fn((newFilters: unknown[]) => { + const isDifferent = !isEqual(newFilters, filters); filters = newFilters; - if (subscriber) subscriber(); + if (isDifferent && subscriber) subscriber(); }), getFilters: () => filters, getGlobalFilters: () => { diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.test.tsx b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.test.tsx index 872bff882fbff..3010c9fcc47e9 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.test.tsx +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.test.tsx @@ -14,18 +14,18 @@ import { PaletteRegistry } from 'src/plugins/charts/public'; import { ColorRangesContext } from './color_ranges_context'; const extraActionSelectors = { - addColorRange: '[data-test-subj^="lnsPalettePanel_dynamicColoring_addColorRange"]', + addColor: '[data-test-subj^="lnsPalettePanel_dynamicColoring_addColor"]', reverseColors: '[data-test-subj^="lnsPalettePanel_dynamicColoring_reverseColors"]', - distributeEqually: '[data-test-subj="lnsPalettePanel_dynamicColoring_distributeEqually"]', + distributeValues: '[data-test-subj="lnsPalettePanel_dynamicColoring_distributeValues"]', }; const pageObjects = { getAddColorRangeButton: (component: ReactWrapper) => - component.find(extraActionSelectors.addColorRange).first(), + component.find(extraActionSelectors.addColor).first(), reverseColors: (component: ReactWrapper) => component.find(extraActionSelectors.reverseColors).first(), - distributeEqually: (component: ReactWrapper) => - component.find(extraActionSelectors.distributeEqually).first(), + distributeValues: (component: ReactWrapper) => + component.find(extraActionSelectors.distributeValues).first(), }; function renderColorRanges(props: ColorRangesProps) { @@ -142,7 +142,7 @@ describe('Color Ranges', () => { }); }); - it('should distribute equally ranges when use click on "Distribute equally" button', () => { + it('should distribute equally ranges when use click on "Distribute values" button', () => { props.colorRanges = [ { color: '#aaa', start: 0, end: 2 }, { color: '#bbb', start: 3, end: 4 }, @@ -153,7 +153,7 @@ describe('Color Ranges', () => { const component = renderColorRanges(props); act(() => { - pageObjects.distributeEqually(component).simulate('click'); + pageObjects.distributeValues(component).simulate('click'); }); component.update(); diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.tsx b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.tsx index 76cab5ba743d3..c22ac8f1d860b 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.tsx +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useState, useEffect, Dispatch, useContext } from 'react'; +import React, { useState, useEffect, Dispatch } from 'react'; import { EuiFlexGroup, EuiTextColor, EuiFlexItem } from '@elastic/eui'; @@ -22,8 +22,6 @@ import type { PaletteConfigurationActions } from '../types'; import { defaultPaletteParams } from '../constants'; -import { ColorRangesContext } from './color_ranges_context'; - export interface ColorRangesProps { colorRanges: ColorRange[]; paletteConfiguration: CustomPaletteParamsConfig | undefined; @@ -37,7 +35,6 @@ export function ColorRanges({ showExtraActions = true, dispatch, }: ColorRangesProps) { - const { dataBounds } = useContext(ColorRangesContext); const [colorRangesValidity, setColorRangesValidity] = useState< Record >({}); @@ -48,8 +45,8 @@ export function ColorRanges({ const rangeType = paletteConfiguration?.rangeType ?? defaultPaletteParams.rangeType; useEffect(() => { - setColorRangesValidity(validateColorRanges(colorRanges, dataBounds, rangeType)); - }, [colorRanges, rangeType, dataBounds]); + setColorRangesValidity(validateColorRanges(colorRanges)); + }, [colorRanges]); return ( { + const onDistributeValues = useCallback(() => { dispatch({ type: 'distributeEqually', payload: { dataBounds, palettes } }); }, [dataBounds, dispatch, palettes]); + const oneColorRangeWarn = i18n.translate( + 'xpack.lens.dynamicColoring.customPalette.oneColorRange', + { + defaultMessage: `Requires more than one color`, + } + ); + return ( @@ -59,13 +66,13 @@ export function ColorRangesExtraActions({ delay="regular" > - - - + + + + - - - + + + + ); diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item.tsx b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item.tsx index a6d66a9177ad5..604ecdb363522 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item.tsx +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item.tsx @@ -17,7 +17,6 @@ import { EuiIcon, EuiColorPickerSwatch, EuiButtonIcon, - EuiToolTip, EuiFieldNumberProps, } from '@elastic/eui'; @@ -39,7 +38,6 @@ import { checkIsMaxContinuity, checkIsMinContinuity, } from '../../../../../../../src/plugins/charts/common'; -import { getOutsideDataBoundsWarningMessage } from './color_ranges_validation'; export interface ColorRangesItemProps { colorRange: ColorRange; @@ -81,25 +79,13 @@ const getActionButton = (mode: ColorRangeItemMode) => { return mode === 'edit' ? ColorRangeAutoDetectButton : ColorRangeEditButton; }; -const getAppend = ( - rangeType: CustomPaletteParams['rangeType'], - mode: ColorRangeItemMode, - validation?: ColorRangeValidation -) => { +const getAppend = (rangeType: CustomPaletteParams['rangeType'], mode: ColorRangeItemMode) => { const items: EuiFieldNumberProps['append'] = []; - if (rangeType === 'percent') { + if (rangeType === 'percent' && mode !== 'auto') { items.push('%'); } - if (mode !== 'auto' && validation?.warnings.length) { - items.push( - - - - ); - } - return items; }; @@ -127,8 +113,12 @@ export function ColorRangeItem({ (e: FocusEvent) => { const prevStartValue = colorRanges[index - 1]?.start ?? Number.NEGATIVE_INFINITY; const nextStartValue = colorRanges[index + 1]?.start ?? Number.POSITIVE_INFINITY; + const lastEndValue = colorRanges[colorRanges.length - 1]?.end ?? Number.POSITIVE_INFINITY; - const shouldSort = colorRange.start > nextStartValue || prevStartValue > colorRange.start; + const shouldSort = + colorRange.start > nextStartValue || + prevStartValue > colorRange.start || + (!isLast && colorRange.start > lastEndValue); const isFocusStillInContent = (e.currentTarget as Node)?.contains(e.relatedTarget as Node) || popoverInFocus; @@ -136,7 +126,7 @@ export function ColorRangeItem({ dispatch({ type: 'sortColorRanges', payload: { dataBounds, palettes } }); } }, - [colorRange.start, colorRanges, dispatch, index, popoverInFocus, dataBounds, palettes] + [colorRange.start, colorRanges, dispatch, index, popoverInFocus, dataBounds, palettes, isLast] ); const onValueChange = useCallback( @@ -190,6 +180,7 @@ export function ColorRangeItem({ } secondaryInputDisplay="top" color={colorRange.color} + showAlpha={true} onFocus={() => setPopoverInFocus(true)} onBlur={() => { setPopoverInFocus(false); @@ -205,11 +196,13 @@ export function ColorRangeItem({ compressed fullWidth={true} isInvalid={!isValid} - value={mode !== 'auto' ? localValue : ''} + value={ + mode !== 'auto' && localValue !== undefined && isFinite(localValue) ? localValue : '' + } disabled={isDisabled} onChange={onValueChange} placeholder={mode === 'auto' ? getPlaceholderForAutoMode(isLast) : ''} - append={getAppend(rangeType, mode, validation)} + append={getAppend(rangeType, mode)} onBlur={onLeaveFocus} data-test-subj={`lnsPalettePanel_dynamicColoring_range_value_${index}`} prepend={{isLast ? '\u2264' : '\u2265'}} @@ -219,6 +212,7 @@ export function ColorRangeItem({ index: index + 1, }, })} + step="any" /> {ActionButton ? ( diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item_buttons.tsx b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item_buttons.tsx index 3f289395f7b7d..8e29a4fa2c6bf 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item_buttons.tsx +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_item_buttons.tsx @@ -82,26 +82,28 @@ export function ColorRangeEditButton({ }); }, [isLast, dispatch, continuity, dataBounds, palettes]); - const title = i18n.translate('xpack.lens.dynamicColoring.customPalette.editButtonAriaLabel', { - defaultMessage: 'Edit', - }); + let tooltipContent = isLast + ? i18n.translate('xpack.lens.dynamicColoring.customPalette.setCustomMinValue', { + defaultMessage: `Set custom maximum value`, + }) + : i18n.translate('xpack.lens.dynamicColoring.customPalette.setCustomMaxValue', { + defaultMessage: `Set custom minimum value`, + }); + + if (disableSwitchingContinuity) { + tooltipContent = i18n.translate( + 'xpack.lens.dynamicColoring.customPalette.disallowedEditMinMaxValues', + { + defaultMessage: `You cannot set custom value for current configuration`, + } + ); + } return ( - + + + + ); } diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.test.ts b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.test.ts index a645d637bc6a5..d32936f89ebfa 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.test.ts +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.test.ts @@ -27,99 +27,20 @@ describe('Color ranges validation', () => { color: '#aaa', }, ]; - const validation = validateColorRanges(colorRanges, { min: 0, max: 100 }, 'number'); + const validation = validateColorRanges(colorRanges); expect(validation['0']).toEqual({ errors: [], - warnings: [], isValid: true, }); expect(validation['1']).toEqual({ errors: ['invalidColor'], - warnings: [], isValid: false, }); expect(validation.last).toEqual({ errors: ['greaterThanMaxValue'], - warnings: [], isValid: false, }); }); - - it('should return correct warnings for color ranges', () => { - const colorRanges = [ - { - start: 0, - end: 10, - color: '#aaa', - }, - { - start: 10, - end: 20, - color: '#bbb', - }, - { - start: 20, - end: 35, - color: '#ccc', - }, - ]; - const validation = validateColorRanges(colorRanges, { min: 5, max: 30 }, 'number'); - expect(validation['0']).toEqual({ - errors: [], - warnings: ['lowerThanDataBounds'], - isValid: true, - }); - expect(validation['1']).toEqual({ - errors: [], - warnings: [], - isValid: true, - }); - expect(validation.last).toEqual({ - errors: [], - warnings: ['greaterThanDataBounds'], - isValid: true, - }); - }); - - it('should not return warnings for color ranges in number mode if we get fallback as data bounds', () => { - const colorRanges = [ - { - start: 0, - end: 10, - color: '#aaa', - }, - { - start: 10, - end: 20, - color: '#bbb', - }, - { - start: 20, - end: 35, - color: '#ccc', - }, - ]; - const validation = validateColorRanges( - colorRanges, - { min: 5, max: 30, fallback: true }, - 'number' - ); - expect(validation['0']).toEqual({ - errors: [], - warnings: [], - isValid: true, - }); - expect(validation['1']).toEqual({ - errors: [], - warnings: [], - isValid: true, - }); - expect(validation.last).toEqual({ - errors: [], - warnings: [], - isValid: true, - }); - }); }); describe('isAllColorRangesValid', () => { @@ -141,10 +62,10 @@ describe('Color ranges validation', () => { color: '#ccc', }, ]; - let isValid = isAllColorRangesValid(colorRanges, { min: 5, max: 40 }, 'number'); + let isValid = isAllColorRangesValid(colorRanges); expect(isValid).toBeFalsy(); colorRanges[colorRanges.length - 1].end = 30; - isValid = isAllColorRangesValid(colorRanges, { min: 5, max: 40 }, 'number'); + isValid = isAllColorRangesValid(colorRanges); expect(isValid).toBeTruthy(); }); }); diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.tsx b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.tsx index 30cfe38066378..d8e5083f5e971 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.tsx +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.tsx @@ -5,23 +5,16 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import { getDataMinMax, isValidColor } from '../utils'; +import { isValidColor } from '../utils'; import type { ColorRange, ColorRangeAccessor } from './types'; -import type { DataBounds } from '../types'; - -import { CustomPaletteParams } from '../../../../common'; /** @internal **/ type ColorRangeValidationErrors = 'invalidColor' | 'invalidValue' | 'greaterThanMaxValue'; -/** @internal **/ -type ColorRangeValidationWarnings = 'lowerThanDataBounds' | 'greaterThanDataBounds'; - /** @internal **/ export interface ColorRangeValidation { errors: ColorRangeValidationErrors[]; - warnings: ColorRangeValidationWarnings[]; isValid: boolean; } @@ -44,7 +37,7 @@ export const getErrorMessages = (colorRangesValidity: Record { - for (const warning of warnings) { - switch (warning) { - case 'lowerThanDataBounds': - return i18n.translate('xpack.lens.dynamicColoring.customPalette.lowerThanDataBounds', { - defaultMessage: 'This value is outside the minimum data bound', - }); - case 'greaterThanDataBounds': - return i18n.translate('xpack.lens.dynamicColoring.customPalette.greaterThanDataBounds', { - defaultMessage: 'This value is outside the maximum data bound', - }); - } - } -}; - -const checkForComplianceWithDataBounds = (value: number, minMax?: [number, number]) => { - const warnings: ColorRangeValidationWarnings[] = []; - if (minMax) { - const [min, max] = minMax; - - if (value < min) { - warnings.push('lowerThanDataBounds'); - } - if (value > max) { - warnings.push('greaterThanDataBounds'); - } - } - - return warnings; -}; - /** @internal **/ -export const validateColorRange = ( - colorRange: ColorRange, - accessor: ColorRangeAccessor, - minMax?: [number, number] -) => { +export const validateColorRange = (colorRange: ColorRange, accessor: ColorRangeAccessor) => { const errors: ColorRangeValidationErrors[] = []; - let warnings: ColorRangeValidationWarnings[] = []; if (Number.isNaN(colorRange[accessor])) { errors.push('invalidValue'); @@ -102,53 +59,33 @@ export const validateColorRange = ( if (colorRange.start > colorRange.end) { errors.push('greaterThanMaxValue'); } - warnings = [...warnings, ...checkForComplianceWithDataBounds(colorRange.end, minMax)]; - } else { - if (!isValidColor(colorRange.color)) { - errors.push('invalidColor'); - } - warnings = [...warnings, ...checkForComplianceWithDataBounds(colorRange.start, minMax)]; + } else if (!isValidColor(colorRange.color)) { + errors.push('invalidColor'); } return { isValid: !errors.length, errors, - warnings, } as ColorRangeValidation; }; export const validateColorRanges = ( - colorRanges: ColorRange[], - dataBounds: DataBounds, - rangeType: CustomPaletteParams['rangeType'] + colorRanges: ColorRange[] ): Record => { - let minMax: [number, number] | undefined; - - if ((dataBounds.fallback && rangeType === 'percent') || !dataBounds.fallback) { - const { min, max } = getDataMinMax(rangeType, dataBounds); - minMax = [min, max]; - } - const validations = colorRanges.reduce>( (acc, item, index) => ({ ...acc, - [index]: validateColorRange(item, 'start', minMax), + [index]: validateColorRange(item, 'start'), }), {} ); return { ...validations, - last: validateColorRange(colorRanges[colorRanges.length - 1], 'end', minMax), + last: validateColorRange(colorRanges[colorRanges.length - 1], 'end'), }; }; -export const isAllColorRangesValid = ( - colorRanges: ColorRange[], - dataBounds: DataBounds, - rangeType: CustomPaletteParams['rangeType'] -) => { - return Object.values(validateColorRanges(colorRanges, dataBounds, rangeType)).every( - (colorRange) => colorRange.isValid - ); +export const isAllColorRangesValid = (colorRanges: ColorRange[]) => { + return Object.values(validateColorRanges(colorRanges)).every((colorRange) => colorRange.isValid); }; diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.test.ts b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.test.ts index 837c66eeb1e5e..abfd64c6a84a9 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.test.ts +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.test.ts @@ -23,16 +23,7 @@ describe('addColorRange', () => { ]; }); - it('should add new color range with the corresponding interval', () => { - expect(addColorRange(colorRanges, 'number', { min: 0, max: 81 })).toEqual([ - { color: '#aaa', start: 20, end: 40 }, - { color: '#bbb', start: 40, end: 60 }, - { color: '#ccc', start: 60, end: 80 }, - { color: '#ccc', start: 80, end: 81 }, - ]); - }); - - it('should add new color range with the interval equal 1 if new range out of max bound', () => { + it('should add new color range with the corresponding interva', () => { colorRanges[colorRanges.length - 1].end = 80; expect(addColorRange(colorRanges, 'number', { min: 0, max: 80 })).toEqual([ { color: '#aaa', start: 20, end: 40 }, diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.ts b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.ts index 6a2e92d284f01..b391c2bfac28e 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.ts +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/color_ranges_crud.ts @@ -5,7 +5,6 @@ * 2.0. */ import { getDataMinMax, roundValue } from '../../utils'; -import { calculateMaxStep } from './utils'; import type { ColorRange, ColorRangeAccessor } from '../types'; import type { DataBounds } from '../../types'; @@ -43,12 +42,7 @@ export const addColorRange = ( const { max: dataMax } = getDataMinMax(rangeType, dataBounds); const max = Math.max(dataMax, lastEnd); - const step = calculateMaxStep( - newColorRanges.map((item) => item.start), - max - ); - - let insertEnd = roundValue(Math.min(lastStart + step, max)); + let insertEnd = roundValue(Math.min(lastStart + 1, max)); if (insertEnd === Number.NEGATIVE_INFINITY) { insertEnd = 1; diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.test.ts b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.test.ts index daebb02e44e46..582ca454f82ce 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.test.ts +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.test.ts @@ -9,7 +9,7 @@ import { sortColorRanges, calculateMaxStep, toColorStops, getValueForContinuity describe('utils', () => { it('sortColorRanges', () => { - const colorRanges = [ + let colorRanges = [ { color: '#aaa', start: 55, end: 40 }, { color: '#bbb', start: 40, end: 60 }, { color: '#ccc', start: 60, end: 80 }, @@ -19,6 +19,17 @@ describe('utils', () => { { color: '#aaa', start: 55, end: 60 }, { color: '#ccc', start: 60, end: 80 }, ]); + + colorRanges = [ + { color: '#aaa', start: 55, end: 90 }, + { color: '#bbb', start: 90, end: 60 }, + { color: '#ccc', start: 60, end: 80 }, + ]; + expect(sortColorRanges(colorRanges)).toEqual([ + { color: '#aaa', start: 55, end: 60 }, + { color: '#ccc', start: 60, end: 80 }, + { color: '#bbb', start: 80, end: 90 }, + ]); }); it('calculateMaxStep', () => { diff --git a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.ts b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.ts index 300df9b3b317b..6f0f3d5038916 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.ts +++ b/x-pack/plugins/lens/public/shared_components/coloring/color_ranges/utils/utils.ts @@ -25,15 +25,21 @@ export const isLastItem = (accessor: ColorRangeAccessor) => accessor === 'end'; * @internal */ export const sortColorRanges = (colorRanges: ColorRange[]) => { - const maxValue = colorRanges[colorRanges.length - 1].end; + const lastRange = colorRanges[colorRanges.length - 1]; - return [...colorRanges] + return [...colorRanges, { start: lastRange.end, color: lastRange.color }] .sort(({ start: startA }, { start: startB }) => Number(startA) - Number(startB)) - .map((newColorRange, i, array) => ({ - color: newColorRange.color, - start: newColorRange.start, - end: i !== array.length - 1 ? array[i + 1].start : maxValue, - })); + .reduce((sortedColorRange, newColorRange, i, array) => { + const color = i === array.length - 2 ? array[i + 1].color : newColorRange.color; + if (i !== array.length - 1) { + sortedColorRange.push({ + color, + start: newColorRange.start, + end: array[i + 1].start, + }); + } + return sortedColorRange; + }, [] as ColorRange[]); }; /** @@ -91,16 +97,17 @@ export const getValueForContinuity = ( if (checkIsMaxContinuity(continuity)) { value = Number.POSITIVE_INFINITY; } else { - value = + value = roundValue( colorRanges[colorRanges.length - 1].start > max ? colorRanges[colorRanges.length - 1].start + 1 - : max; + : max + ); } } else { if (checkIsMinContinuity(continuity)) { value = Number.NEGATIVE_INFINITY; } else { - value = colorRanges[0].end < min ? colorRanges[0].end - 1 : min; + value = roundValue(colorRanges[0].end < min ? colorRanges[0].end - 1 : min); } } diff --git a/x-pack/plugins/lens/public/shared_components/coloring/palette_configuration.tsx b/x-pack/plugins/lens/public/shared_components/coloring/palette_configuration.tsx index 104b8e4319e40..46aede7432b04 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/palette_configuration.tsx +++ b/x-pack/plugins/lens/public/shared_components/coloring/palette_configuration.tsx @@ -17,7 +17,6 @@ import './palette_configuration.scss'; import type { CustomPaletteParams, RequiredPaletteParamTypes } from '../../../common'; import { toColorRanges, getFallbackDataBounds } from './utils'; -import { defaultPaletteParams } from './constants'; import { ColorRanges, ColorRangesContext } from './color_ranges'; import { isAllColorRangesValid } from './color_ranges/color_ranges_validation'; import { paletteConfigurationReducer } from './palette_configuration_reducer'; @@ -52,12 +51,10 @@ export function CustomizablePalette({ useDebounce( () => { - const rangeType = - localState.activePalette?.params?.rangeType ?? defaultPaletteParams.rangeType; if ( (localState.activePalette !== activePalette || colorRangesToShow !== localState.colorRanges) && - isAllColorRangesValid(localState.colorRanges, dataBounds, rangeType) + isAllColorRangesValid(localState.colorRanges) ) { setPalette(localState.activePalette); } diff --git a/x-pack/plugins/lens/public/shared_components/coloring/utils.ts b/x-pack/plugins/lens/public/shared_components/coloring/utils.ts index 16cb843f3dfb4..d855999ecfcb6 100644 --- a/x-pack/plugins/lens/public/shared_components/coloring/utils.ts +++ b/x-pack/plugins/lens/public/shared_components/coloring/utils.ts @@ -248,6 +248,9 @@ export function calculateStop( oldInterval: number, newInterval: number ) { + if (oldInterval === 0) { + return newInterval + newMin; + } return roundValue(newMin + ((stopValue - oldMin) * newInterval) / oldInterval); } diff --git a/x-pack/plugins/lens/public/shared_components/debounced_value.ts b/x-pack/plugins/lens/public/shared_components/debounced_value.ts index 412199a371f1f..77848e678b135 100644 --- a/x-pack/plugins/lens/public/shared_components/debounced_value.ts +++ b/x-pack/plugins/lens/public/shared_components/debounced_value.ts @@ -21,9 +21,11 @@ export const useDebouncedValue = ( { onChange, value, + defaultValue, }: { onChange: (val: T) => void; value: T; + defaultValue?: T; }, { allowFalsyValue }: { allowFalsyValue?: boolean } = {} ) => { @@ -32,7 +34,7 @@ export const useDebouncedValue = ( const shouldUpdateWithFalsyValue = Boolean(allowFalsyValue); // Save the initial value - const initialValue = useRef(value); + const initialValue = useRef(defaultValue ?? value); const flushChangesTimeout = useRef(); diff --git a/x-pack/plugins/lens/public/shared_components/legend_location_settings.tsx b/x-pack/plugins/lens/public/shared_components/legend_location_settings.tsx index 4265dee2251b5..6791d5586d327 100644 --- a/x-pack/plugins/lens/public/shared_components/legend_location_settings.tsx +++ b/x-pack/plugins/lens/public/shared_components/legend_location_settings.tsx @@ -170,6 +170,7 @@ const FloatingColumnsInput = ({ onChange={(e) => { handleInputChange(Number(e.target.value)); }} + step={1} /> ); }; diff --git a/x-pack/plugins/lens/public/shared_components/legend_settings_popover.tsx b/x-pack/plugins/lens/public/shared_components/legend_settings_popover.tsx index ba5e93c3f8952..875fd2ab26313 100644 --- a/x-pack/plugins/lens/public/shared_components/legend_settings_popover.tsx +++ b/x-pack/plugins/lens/public/shared_components/legend_settings_popover.tsx @@ -140,6 +140,7 @@ export const MaxLinesInput = ({ value={inputValue} min={MIN_TRUNCATE_LINES} max={MAX_TRUNCATE_LINES} + step={1} compressed disabled={isDisabled} onChange={(e) => { diff --git a/x-pack/plugins/lens/public/visualizations/gauge/dimension_editor.tsx b/x-pack/plugins/lens/public/visualizations/gauge/dimension_editor.tsx index 18084a8c3db51..a6da226e654de 100644 --- a/x-pack/plugins/lens/public/visualizations/gauge/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/visualizations/gauge/dimension_editor.tsx @@ -167,7 +167,6 @@ export function GaugeDimensionEditor( palettes={props.paletteService} activePalette={activePalette} dataBounds={currentMinMax} - disableSwitchingContinuity={true} setPalette={(newPalette) => { // if the new palette is not custom, replace the rangeMin with the artificial one if ( diff --git a/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/axis_settings_popover.tsx b/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/axis_settings_popover.tsx index 6f0adf3d33810..20d2bd31c7c64 100644 --- a/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/axis_settings_popover.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/axis_settings_popover.tsx @@ -459,6 +459,7 @@ export const AxisSettingsPopover: React.FunctionComponent @@ -504,6 +505,7 @@ export const AxisSettingsPopover: React.FunctionComponent diff --git a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.test.ts b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.test.ts index a1773c5c482c8..397853ee2183c 100644 --- a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.test.ts +++ b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.test.ts @@ -9,13 +9,16 @@ import semverGte from 'semver/functions/gte'; import { makeLensEmbeddableFactory } from './make_lens_embeddable_factory'; import { getAllMigrations } from '../migrations/saved_object_migrations'; import { Filter } from '@kbn/es-query'; +import { GetMigrationFunctionObjectFn } from 'src/plugins/kibana_utils/common'; describe('embeddable migrations', () => { test('should have all saved object migrations versions (>7.13.0)', () => { const savedObjectMigrationVersions = Object.keys(getAllMigrations({})).filter((version) => { return semverGte(version, '7.13.1'); }); - const embeddableMigrationVersions = makeLensEmbeddableFactory({})()?.migrations; + const embeddableMigrationVersions = ( + makeLensEmbeddableFactory(() => ({}))()?.migrations as GetMigrationFunctionObjectFn + )(); if (embeddableMigrationVersions) { expect(savedObjectMigrationVersions.sort()).toEqual( Object.keys(embeddableMigrationVersions).sort() @@ -43,19 +46,17 @@ describe('embeddable migrations', () => { }, }; - const embeddableMigrationVersions = makeLensEmbeddableFactory({ - [migrationVersion]: (filters: Filter[]) => { - return filters.map((filterState) => ({ - ...filterState, - migrated: true, - })); - }, - })()?.migrations; + const migrations = ( + makeLensEmbeddableFactory(() => ({ + [migrationVersion]: (filters: Filter[]) => { + return filters.map((filterState) => ({ + ...filterState, + migrated: true, + })); + }, + }))()?.migrations as GetMigrationFunctionObjectFn + )(); - const migrations = - typeof embeddableMigrationVersions === 'function' - ? embeddableMigrationVersions() - : embeddableMigrationVersions || {}; const migratedLensDoc = migrations[migrationVersion](lensVisualizationDoc); expect(migratedLensDoc).toEqual({ diff --git a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts index 332f20a00f66d..db912584fdcdb 100644 --- a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts +++ b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts @@ -31,54 +31,55 @@ import { import { extract, inject } from '../../common/embeddable_factory'; export const makeLensEmbeddableFactory = - (filterMigrations: MigrateFunctionsObject) => (): EmbeddableRegistryDefinition => { + (getFilterMigrations: () => MigrateFunctionsObject) => (): EmbeddableRegistryDefinition => { return { id: DOC_TYPE, - migrations: mergeMigrationFunctionMaps(getLensFilterMigrations(filterMigrations), { - // This migration is run in 7.13.1 for `by value` panels because the 7.13 release window was missed. - '7.13.1': (state) => { - const lensState = state as unknown as { attributes: LensDocShapePre712 }; - const migratedLensState = commonRenameOperationsForFormula(lensState.attributes); - return { - ...lensState, - attributes: migratedLensState, - } as unknown as SerializableRecord; - }, - '7.14.0': (state) => { - const lensState = state as unknown as { attributes: LensDocShape713 }; - const migratedLensState = commonRemoveTimezoneDateHistogramParam(lensState.attributes); - return { - ...lensState, - attributes: migratedLensState, - } as unknown as SerializableRecord; - }, - '7.15.0': (state) => { - const lensState = state as unknown as { attributes: LensDocShape715 }; - const migratedLensState = commonUpdateVisLayerType(lensState.attributes); - return { - ...lensState, - attributes: migratedLensState, - } as unknown as SerializableRecord; - }, - '7.16.0': (state) => { - const lensState = state as unknown as { attributes: LensDocShape715 }; - const migratedLensState = commonMakeReversePaletteAsCustom(lensState.attributes); - return { - ...lensState, - attributes: migratedLensState, - } as unknown as SerializableRecord; - }, - '8.1.0': (state) => { - const lensState = state as unknown as { attributes: LensDocShape715 }; - const migratedLensState = commonRenameRecordsField( - commonRenameFilterReferences(lensState.attributes) - ); - return { - ...lensState, - attributes: migratedLensState, - } as unknown as SerializableRecord; - }, - }), + migrations: () => + mergeMigrationFunctionMaps(getLensFilterMigrations(getFilterMigrations()), { + // This migration is run in 7.13.1 for `by value` panels because the 7.13 release window was missed. + '7.13.1': (state) => { + const lensState = state as unknown as { attributes: LensDocShapePre712 }; + const migratedLensState = commonRenameOperationsForFormula(lensState.attributes); + return { + ...lensState, + attributes: migratedLensState, + } as unknown as SerializableRecord; + }, + '7.14.0': (state) => { + const lensState = state as unknown as { attributes: LensDocShape713 }; + const migratedLensState = commonRemoveTimezoneDateHistogramParam(lensState.attributes); + return { + ...lensState, + attributes: migratedLensState, + } as unknown as SerializableRecord; + }, + '7.15.0': (state) => { + const lensState = state as unknown as { attributes: LensDocShape715 }; + const migratedLensState = commonUpdateVisLayerType(lensState.attributes); + return { + ...lensState, + attributes: migratedLensState, + } as unknown as SerializableRecord; + }, + '7.16.0': (state) => { + const lensState = state as unknown as { attributes: LensDocShape715 }; + const migratedLensState = commonMakeReversePaletteAsCustom(lensState.attributes); + return { + ...lensState, + attributes: migratedLensState, + } as unknown as SerializableRecord; + }, + '8.1.0': (state) => { + const lensState = state as unknown as { attributes: LensDocShape715 }; + const migratedLensState = commonRenameRecordsField( + commonRenameFilterReferences(lensState.attributes) + ); + return { + ...lensState, + attributes: migratedLensState, + } as unknown as SerializableRecord; + }, + }), extract, inject, }; diff --git a/x-pack/plugins/lens/server/migrations/common_migrations.ts b/x-pack/plugins/lens/server/migrations/common_migrations.ts index 5f3ea4d57fa2c..ad4f3406c5b3b 100644 --- a/x-pack/plugins/lens/server/migrations/common_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/common_migrations.ts @@ -5,13 +5,9 @@ * 2.0. */ -import { cloneDeep } from 'lodash'; +import { cloneDeep, mapValues } from 'lodash'; import { PaletteOutput } from 'src/plugins/charts/common'; -import { Filter } from '@kbn/es-query'; -import { - MigrateFunction, - MigrateFunctionsObject, -} from '../../../../../src/plugins/kibana_utils/common'; +import { MigrateFunctionsObject } from '../../../../../src/plugins/kibana_utils/common'; import { LensDocShapePre712, OperationTypePre712, @@ -190,30 +186,16 @@ export const commonRenameFilterReferences = (attributes: LensDocShape715): LensD return newAttributes as LensDocShape810; }; -const getApplyFilterMigrationToLens = (filterMigration: MigrateFunction) => { - return (savedObject: { attributes: LensDocShape }) => { - return { - ...savedObject, - attributes: { - ...savedObject.attributes, - state: { - ...savedObject.attributes.state, - filters: filterMigration(savedObject.attributes.state.filters as unknown as Filter[]), - }, - }, - }; - }; -}; - /** * This creates a migration map that applies filter migrations to Lens visualizations */ -export const getLensFilterMigrations = (filterMigrations: MigrateFunctionsObject) => { - const migrationMap: MigrateFunctionsObject = {}; - for (const version in filterMigrations) { - if (filterMigrations.hasOwnProperty(version)) { - migrationMap[version] = getApplyFilterMigrationToLens(filterMigrations[version]); - } - } - return migrationMap; -}; +export const getLensFilterMigrations = ( + filterMigrations: MigrateFunctionsObject +): MigrateFunctionsObject => + mapValues(filterMigrations, (migrate) => (lensDoc: { attributes: LensDocShape }) => ({ + ...lensDoc, + attributes: { + ...lensDoc.attributes, + state: { ...lensDoc.attributes.state, filters: migrate(lensDoc.attributes.state.filters) }, + }, + })); diff --git a/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts b/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts index d3efb4df44575..d0abe3877c1df 100644 --- a/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { cloneDeep, flow, mergeWith } from 'lodash'; +import { cloneDeep, flow } from 'lodash'; import { fromExpression, toExpression, Ast, AstFunction } from '@kbn/interpreter'; import { SavedObjectMigrationMap, SavedObjectMigrationFn, SavedObjectReference, SavedObjectUnsanitizedDoc, - SavedObjectMigrationContext, } from 'src/core/server'; import { Filter } from '@kbn/es-query'; import { Query } from 'src/plugins/data/public'; +import { mergeSavedObjectMigrationMaps } from '../../../../../src/core/server'; import { MigrateFunctionsObject } from '../../../../../src/plugins/kibana_utils/common'; import { PersistableFilter } from '../../common'; import { @@ -472,22 +472,10 @@ const lensMigrations: SavedObjectMigrationMap = { '8.1.0': flow(renameFilterReferences, renameRecordsField), }; -export const mergeSavedObjectMigrationMaps = ( - obj1: SavedObjectMigrationMap, - obj2: SavedObjectMigrationMap -): SavedObjectMigrationMap => { - const customizer = (objValue: SavedObjectMigrationFn, srcValue: SavedObjectMigrationFn) => { - if (!srcValue || !objValue) { - return srcValue || objValue; - } - return (state: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => - objValue(srcValue(state, context), context); - }; - - return mergeWith({ ...obj1 }, obj2, customizer); -}; - export const getAllMigrations = ( filterMigrations: MigrateFunctionsObject ): SavedObjectMigrationMap => - mergeSavedObjectMigrationMaps(lensMigrations, getLensFilterMigrations(filterMigrations)); + mergeSavedObjectMigrationMaps( + lensMigrations, + getLensFilterMigrations(filterMigrations) as unknown as SavedObjectMigrationMap + ); diff --git a/x-pack/plugins/lens/server/plugin.tsx b/x-pack/plugins/lens/server/plugin.tsx index 5f8f15b21ff94..13def5c0557c0 100644 --- a/x-pack/plugins/lens/server/plugin.tsx +++ b/x-pack/plugins/lens/server/plugin.tsx @@ -54,8 +54,10 @@ export class LensServerPlugin implements Plugin, plugins: PluginSetupContract) { - const filterMigrations = plugins.data.query.filterManager.getAllMigrations(); - setupSavedObjects(core, filterMigrations); + const getFilterMigrations = plugins.data.query.filterManager.getAllMigrations.bind( + plugins.data.query.filterManager + ); + setupSavedObjects(core, getFilterMigrations); setupRoutes(core, this.initializerContext.logger.get()); setupExpressions(core, plugins.expressions); core.uiSettings.register(getUiSettings()); @@ -70,7 +72,7 @@ export class LensServerPlugin implements Plugin MigrateFunctionsObject +) { core.savedObjects.registerType({ name: 'lens', hidden: false, @@ -26,7 +29,7 @@ export function setupSavedObjects(core: CoreSetup, filterMigrations: MigrateFunc uiCapabilitiesPath: 'visualize.show', }), }, - migrations: getAllMigrations(filterMigrations), + migrations: () => getAllMigrations(getFilterMigrations()), mappings: { properties: { title: { diff --git a/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts b/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts index 2412dd12199a3..248ac6e91f3a1 100644 --- a/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts +++ b/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts @@ -8,8 +8,9 @@ /* eslint-disable @typescript-eslint/consistent-type-definitions */ import type { Query } from 'src/plugins/data/common'; +import type { Filter } from '@kbn/es-query'; import { MapExtent } from './map_descriptor'; -import { Filter, TimeRange } from '../../../../../src/plugins/data/common'; +import { TimeRange } from '../../../../../src/plugins/data/common'; export type Timeslice = { from: number; diff --git a/x-pack/plugins/maps/common/elasticsearch_util/types.ts b/x-pack/plugins/maps/common/elasticsearch_util/types.ts index bbb508ce69275..aced59008ff5e 100644 --- a/x-pack/plugins/maps/common/elasticsearch_util/types.ts +++ b/x-pack/plugins/maps/common/elasticsearch_util/types.ts @@ -6,7 +6,7 @@ */ import { Polygon, Position } from 'geojson'; -import { Filter } from '../../../../../src/plugins/data/common'; +import type { Filter } from '@kbn/es-query'; import { ES_SPATIAL_RELATIONS } from '../constants'; export type Coordinates = Position | Position[] | Position[][] | Position[][][]; diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx index e7fa87435cf09..ebcd4e23c5375 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx @@ -43,8 +43,6 @@ import { syncGeojsonSourceData } from './geojson_source_data'; import { JoinState, performInnerJoins } from './perform_inner_joins'; import { buildVectorRequestMeta } from '../../build_vector_request_meta'; -export const SUPPORTS_FEATURE_EDITING_REQUEST_ID = 'SUPPORTS_FEATURE_EDITING_REQUEST_ID'; - export class GeoJsonVectorLayer extends AbstractVectorLayer { static createDescriptor( options: Partial, @@ -65,12 +63,6 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer { return layerDescriptor; } - supportsFeatureEditing(): boolean { - const dataRequest = this.getDataRequest(SUPPORTS_FEATURE_EDITING_REQUEST_ID); - const data = dataRequest?.getData() as { supportsFeatureEditing: boolean } | undefined; - return data ? data.supportsFeatureEditing : false; - } - async getBounds(syncContext: DataRequestContext) { const isStaticLayer = !this.getSource().isBoundsAware(); return isStaticLayer || this.hasJoins() @@ -380,33 +372,6 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer { }); } - async _syncSupportsFeatureEditing({ - syncContext, - source, - }: { - syncContext: DataRequestContext; - source: IVectorSource; - }) { - if (syncContext.dataFilters.isReadOnly) { - return; - } - const { startLoading, stopLoading, onLoadError } = syncContext; - const dataRequestId = SUPPORTS_FEATURE_EDITING_REQUEST_ID; - const requestToken = Symbol(`layer-${this.getId()}-${dataRequestId}`); - const prevDataRequest = this.getDataRequest(dataRequestId); - if (prevDataRequest) { - return; - } - try { - startLoading(dataRequestId, requestToken); - const supportsFeatureEditing = await source.supportsFeatureEditing(); - stopLoading(dataRequestId, requestToken, { supportsFeatureEditing }); - } catch (error) { - onLoadError(dataRequestId, requestToken, error.message); - throw error; - } - } - _getSourceFeatureCollection() { const sourceDataRequest = this.getSourceDataRequest(); return sourceDataRequest ? (sourceDataRequest.getData() as FeatureCollection) : null; diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.test.ts b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.test.ts index e56884298a0b6..4b45adc8848bd 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.test.ts +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.test.ts @@ -118,6 +118,47 @@ describe('syncMvtSourceData', () => { sinon.assert.notCalled(syncContext.stopLoading); }); + test('Should re-sync with forceRefreshDueToDrawing when there are no changes in source state or search state', async () => { + const syncContext = { + ...new MockSyncContext({ dataFilters: {} }), + forceRefreshDueToDrawing: true, + }; + const prevRequestMeta = { + ...syncContext.dataFilters, + applyGlobalQuery: true, + applyGlobalTime: true, + applyForceRefresh: true, + fieldNames: [], + sourceMeta: {}, + isForceRefresh: false, + }; + + await syncMvtSourceData({ + layerId: 'layer1', + prevDataRequest: { + getMeta: () => { + return prevRequestMeta; + }, + getData: () => { + return { + tileMinZoom: 4, + tileMaxZoom: 14, + tileSourceLayer: 'aggs', + tileUrl: 'https://example.com/{x}/{y}/{z}.pbf?token=12345', + refreshToken: '12345', + }; + }, + } as unknown as DataRequest, + requestMeta: { ...prevRequestMeta }, + source: mockSource, + syncContext, + }); + // @ts-expect-error + sinon.assert.calledOnce(syncContext.startLoading); + // @ts-expect-error + sinon.assert.calledOnce(syncContext.stopLoading); + }); + test('Should re-sync when there are changes to search state', async () => { const syncContext = new MockSyncContext({ dataFilters: {} }); const prevRequestMeta = { diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.ts b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.ts index 5d4008fc19220..f20ab0b5d200f 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.ts +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_source_data.ts @@ -53,7 +53,8 @@ export async function syncMvtSourceData({ return true; }, }); - const canSkip = noChangesInSourceState && noChangesInSearchState; + const canSkip = + !syncContext.forceRefreshDueToDrawing && noChangesInSourceState && noChangesInSearchState; if (canSkip) { return; @@ -63,7 +64,9 @@ export async function syncMvtSourceData({ syncContext.startLoading(SOURCE_DATA_REQUEST_ID, requestToken, requestMeta); try { const refreshToken = - !prevData || (requestMeta.isForceRefresh && requestMeta.applyForceRefresh) + !prevData || + syncContext.forceRefreshDueToDrawing || + (requestMeta.isForceRefresh && requestMeta.applyForceRefresh) ? uuid() : prevData.refreshToken; diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx index 796f37d4ce915..5947013dc39f1 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx @@ -189,6 +189,7 @@ export class MvtVectorLayer extends AbstractVectorLayer { } await this._syncSourceStyleMeta(syncContext, this.getSource(), this.getCurrentStyle()); await this._syncSourceFormatters(syncContext, this.getSource(), this.getCurrentStyle()); + await this._syncSupportsFeatureEditing({ syncContext, source: this.getSource() }); await syncMvtSourceData({ layerId: this.getId(), diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx index 0384517bf9834..b8b90fdf75ff4 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx @@ -60,6 +60,8 @@ import { buildVectorRequestMeta } from '../build_vector_request_meta'; import { getJoinAggKey } from '../../../../common/get_agg_key'; import { syncBoundsData } from './bounds_data'; +const SUPPORTS_FEATURE_EDITING_REQUEST_ID = 'SUPPORTS_FEATURE_EDITING_REQUEST_ID'; + export function isVectorLayer(layer: ILayer) { return (layer as IVectorLayer).canShowTooltip !== undefined; } @@ -242,7 +244,9 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer { } supportsFeatureEditing(): boolean { - return false; + const dataRequest = this.getDataRequest(SUPPORTS_FEATURE_EDITING_REQUEST_ID); + const data = dataRequest?.getData() as { supportsFeatureEditing: boolean } | undefined; + return data ? data.supportsFeatureEditing : false; } hasJoins() { @@ -522,6 +526,33 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer { } } + async _syncSupportsFeatureEditing({ + syncContext, + source, + }: { + syncContext: DataRequestContext; + source: IVectorSource; + }) { + if (syncContext.dataFilters.isReadOnly) { + return; + } + const { startLoading, stopLoading, onLoadError } = syncContext; + const dataRequestId = SUPPORTS_FEATURE_EDITING_REQUEST_ID; + const requestToken = Symbol(`layer-${this.getId()}-${dataRequestId}`); + const prevDataRequest = this.getDataRequest(dataRequestId); + if (prevDataRequest) { + return; + } + try { + startLoading(dataRequestId, requestToken); + const supportsFeatureEditing = await source.supportsFeatureEditing(); + stopLoading(dataRequestId, requestToken, { supportsFeatureEditing }); + } catch (error) { + onLoadError(dataRequestId, requestToken, error.message); + throw error; + } + } + _setMbPointsProperties( mbMap: MbMap, mvtSourceLayer?: string, diff --git a/x-pack/plugins/maps/public/classes/layers/wizards/file_upload_wizard/config.tsx b/x-pack/plugins/maps/public/classes/layers/wizards/file_upload_wizard/config.tsx index 9be1639f7cb39..1dc94c37437eb 100644 --- a/x-pack/plugins/maps/public/classes/layers/wizards/file_upload_wizard/config.tsx +++ b/x-pack/plugins/maps/public/classes/layers/wizards/file_upload_wizard/config.tsx @@ -15,7 +15,7 @@ export const uploadLayerWizardConfig: LayerWizard = { order: 10, categories: [], description: i18n.translate('xpack.maps.fileUploadWizard.description', { - defaultMessage: 'Index GeoJSON data in Elasticsearch', + defaultMessage: 'Index GeoJSON and Shapefile data in Elasticsearch', }), disabledReason: i18n.translate('xpack.maps.fileUploadWizard.disabledDesc', { defaultMessage: @@ -53,6 +53,6 @@ export const uploadLayerWizardConfig: LayerWizard = { return ; }, title: i18n.translate('xpack.maps.fileUploadWizard.title', { - defaultMessage: 'Upload GeoJSON', + defaultMessage: 'Upload file', }), }; diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx index e98b45e407087..4409271260499 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { GeoJsonProperties } from 'geojson'; import { i18n } from '@kbn/i18n'; -import { Filter } from '@kbn/es-query'; +import { type Filter, buildPhraseFilter } from '@kbn/es-query'; import { EMPTY_FEATURE_COLLECTION, FIELD_ORIGIN, @@ -36,7 +36,6 @@ import { isValidStringConfig } from '../../util/valid_string_config'; import { Adapters } from '../../../../../../../src/plugins/inspector/common/adapters'; import { IField } from '../../fields/field'; import { ITooltipProperty, TooltipProperty } from '../../tooltips/tooltip_property'; -import { esFilters } from '../../../../../../../src/plugins/data/public'; import { getIsGoldPlus } from '../../../licensed_features'; import { LICENSED_FEATURES } from '../../../licensed_features'; import { makePublicExecutionContext } from '../../../util'; @@ -204,7 +203,7 @@ export class ESGeoLineSource extends AbstractESAggSource { }, }); if (splitField.type === 'string') { - const entityIsNotEmptyFilter = esFilters.buildPhraseFilter(splitField, '', indexPattern); + const entityIsNotEmptyFilter = buildPhraseFilter(splitField, '', indexPattern); entityIsNotEmptyFilter.meta.negate = true; entitySearchSource.setField('filter', [ ...(entitySearchSource.getField('filter') as Filter[]), @@ -253,7 +252,7 @@ export class ESGeoLineSource extends AbstractESAggSource { // const entityFilters: { [key: string]: unknown } = {}; for (let i = 0; i < entityBuckets.length; i++) { - entityFilters[entityBuckets[i].key] = esFilters.buildPhraseFilter( + entityFilters[entityBuckets[i].key] = buildPhraseFilter( splitField, entityBuckets[i].key, indexPattern diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx index a9fdc7458bfd0..e165fdcdaac5f 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx @@ -10,9 +10,8 @@ import React, { ReactElement } from 'react'; import rison from 'rison-node'; import { i18n } from '@kbn/i18n'; import { GeoJsonProperties, Geometry, Position } from 'geojson'; -import { Filter } from '@kbn/es-query'; +import { type Filter, buildPhraseFilter } from '@kbn/es-query'; import type { IndexPatternField, IndexPattern } from 'src/plugins/data/public'; -import { esFilters } from '../../../../../../../src/plugins/data/public'; import { AbstractESSource } from '../es_source'; import { getHttp, @@ -339,11 +338,7 @@ export class ESSearchSource extends AbstractESSource implements IMvtVectorSource }, }); if (topHitsSplitField.type === 'string') { - const entityIsNotEmptyFilter = esFilters.buildPhraseFilter( - topHitsSplitField, - '', - indexPattern - ); + const entityIsNotEmptyFilter = buildPhraseFilter(topHitsSplitField, '', indexPattern); entityIsNotEmptyFilter.meta.negate = true; searchSource.setField('filter', [ ...(searchSource.getField('filter') as Filter[]), diff --git a/x-pack/plugins/maps/public/classes/sources/wms_source/wms_client.js b/x-pack/plugins/maps/public/classes/sources/wms_source/wms_client.js index d71c329ee7d3e..0cbcbcd7ab8fe 100644 --- a/x-pack/plugins/maps/public/classes/sources/wms_source/wms_client.js +++ b/x-pack/plugins/maps/public/classes/sources/wms_source/wms_client.js @@ -122,13 +122,17 @@ function reduceLayers(path, layers) { const updatedStyles = [...accumulatedCapabilities.styles]; if (_.has(layer, 'Style[0]')) { updatedStyles.push( - createOption(path, _.get(layer, 'Style[0].Title[0]'), _.get(layer, 'Style[0].Name[0]')) + createOption( + path, + _.get(layer, 'Style[0].Title[0]', ''), + _.get(layer, 'Style[0].Name[0]', '') + ) ); } return { layers: [ ...accumulatedCapabilities.layers, - createOption(path, layer.Title[0], layer.Name[0]), + createOption(path, _.get(layer, 'Title[0]', ''), _.get(layer, 'Name[0]', '')), ], styles: updatedStyles, }; diff --git a/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.ts b/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.ts index 2705510089f09..ab42e9a12f420 100644 --- a/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.ts +++ b/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.ts @@ -6,14 +6,10 @@ */ import _ from 'lodash'; -import { Filter } from '@kbn/es-query'; +import { type Filter, buildExistsFilter, buildPhraseFilter } from '@kbn/es-query'; import { ITooltipProperty } from './tooltip_property'; import { IField } from '../fields/field'; -import { - esFilters, - IndexPattern, - IndexPatternField, -} from '../../../../../../src/plugins/data/public'; +import { IndexPattern, IndexPatternField } from '../../../../../../src/plugins/data/public'; export class ESTooltipProperty implements ITooltipProperty { private readonly _tooltipProperty: ITooltipProperty; @@ -98,13 +94,13 @@ export class ESTooltipProperty implements ITooltipProperty { const rawValue = this.getRawValue(); if (rawValue == null) { - const existsFilter = esFilters.buildExistsFilter(indexPatternField, this._indexPattern); + const existsFilter = buildExistsFilter(indexPatternField, this._indexPattern); existsFilter.meta.negate = true; return [existsFilter]; } else { const values = Array.isArray(rawValue) ? (rawValue as string[]) : [rawValue as string]; return values.map((value) => { - return esFilters.buildPhraseFilter(indexPatternField, value, this._indexPattern); + return buildPhraseFilter(indexPatternField, value, this._indexPattern); }); } } diff --git a/x-pack/plugins/maps/public/embeddable/map_component.tsx b/x-pack/plugins/maps/public/embeddable/map_component.tsx index 437dc13394316..6399cb327c14d 100644 --- a/x-pack/plugins/maps/public/embeddable/map_component.tsx +++ b/x-pack/plugins/maps/public/embeddable/map_component.tsx @@ -8,7 +8,8 @@ import React, { Component, RefObject } from 'react'; import uuid from 'uuid/v4'; import { EuiLoadingChart } from '@elastic/eui'; -import type { Filter, Query, TimeRange } from '../../../../../src/plugins/data/common'; +import type { Filter } from '@kbn/es-query'; +import type { Query, TimeRange } from '../../../../../src/plugins/data/common'; import type { LayerDescriptor, MapCenterAndZoom } from '../../common/descriptor_types'; import type { MapEmbeddableType } from './types'; import type { LazyLoadedMapModules } from '../lazy_load_bundle'; diff --git a/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx b/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx index af2d1577834b7..e4903ad8b70f4 100644 --- a/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx +++ b/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx @@ -14,7 +14,7 @@ import { render, unmountComponentAtNode } from 'react-dom'; import { Subscription } from 'rxjs'; import { Unsubscribe } from 'redux'; import { EuiEmptyPrompt } from '@elastic/eui'; -import { Filter } from '@kbn/es-query'; +import { type Filter, compareFilters } from '@kbn/es-query'; import { KibanaThemeProvider } from '../../../../../src/plugins/kibana_react/public'; import { Embeddable, @@ -28,7 +28,6 @@ import { ActionExecutionContext } from '../../../../../src/plugins/ui_actions/pu import { ACTION_GLOBAL_APPLY_FILTER, APPLY_FILTER_TRIGGER, - esFilters, TimeRange, Query, } from '../../../../../src/plugins/data/public'; @@ -284,7 +283,7 @@ export class MapEmbeddable if ( !_.isEqual(this.input.timeRange, this._prevTimeRange) || !_.isEqual(this.input.query, this._prevQuery) || - !esFilters.compareFilters(this._getFilters(), this._prevFilters) || + !compareFilters(this._getFilters(), this._prevFilters) || this._getSearchSessionId() !== this._prevSearchSessionId ) { this._dispatchSetQuery({ diff --git a/x-pack/plugins/maps/public/embeddable/types.ts b/x-pack/plugins/maps/public/embeddable/types.ts index 7214aa78e04d3..ce1856123d6ed 100644 --- a/x-pack/plugins/maps/public/embeddable/types.ts +++ b/x-pack/plugins/maps/public/embeddable/types.ts @@ -5,6 +5,7 @@ * 2.0. */ +import type { Filter } from '@kbn/es-query'; import type { IndexPattern } from '../../../../../src/plugins/data/common'; import { Embeddable, @@ -12,7 +13,7 @@ import { EmbeddableOutput, SavedObjectEmbeddableInput, } from '../../../../../src/plugins/embeddable/public'; -import { Query, Filter, TimeRange } from '../../../../../src/plugins/data/common'; +import { Query, TimeRange } from '../../../../../src/plugins/data/common'; import { MapCenterAndZoom, MapExtent } from '../../common/descriptor_types'; import { MapSavedObjectAttributes } from '../../common/map_saved_object_type'; import { MapSettings } from '../reducers/map'; diff --git a/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_fn.ts b/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_fn.ts index f5329aa4212bf..8a6c3fcc5c3c3 100644 --- a/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_fn.ts +++ b/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_fn.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import type { Filter, Query, TimeRange } from '../../../../../../src/plugins/data/common'; +import type { Filter } from '@kbn/es-query'; +import type { Query, TimeRange } from '../../../../../../src/plugins/data/common'; import type { ExpressionValueSearchContext } from '../../../../../../src/plugins/data/common/search/expressions/kibana_context_type'; import type { ExpressionFunctionDefinition, diff --git a/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_visualization.tsx b/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_visualization.tsx index 50294e69868c4..efbf93931cbad 100644 --- a/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_visualization.tsx +++ b/x-pack/plugins/maps/public/legacy_visualizations/region_map/region_map_visualization.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import type { Filter, Query, TimeRange } from '../../../../../../src/plugins/data/common'; +import type { Filter } from '@kbn/es-query'; +import type { Query, TimeRange } from '../../../../../../src/plugins/data/common'; import { RegionMapVisConfig } from './types'; import type { LazyLoadedMapModules } from '../../lazy_load_bundle'; import { MapComponent } from '../../embeddable/map_component'; diff --git a/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_fn.ts b/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_fn.ts index 96c962be0c31b..e71efccf68d3b 100644 --- a/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_fn.ts +++ b/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_fn.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import type { Filter, Query, TimeRange } from '../../../../../../src/plugins/data/common'; +import type { Filter } from '@kbn/es-query'; +import type { Query, TimeRange } from '../../../../../../src/plugins/data/common'; import type { ExpressionValueSearchContext } from '../../../../../../src/plugins/data/common/search/expressions/kibana_context_type'; import type { ExpressionFunctionDefinition, diff --git a/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_visualization.tsx b/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_visualization.tsx index a6f3d7aa843fc..3213e4053cb5b 100644 --- a/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_visualization.tsx +++ b/x-pack/plugins/maps/public/legacy_visualizations/tile_map/tile_map_visualization.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import type { Filter, Query, TimeRange } from '../../../../../../src/plugins/data/common'; +import type { Filter } from '@kbn/es-query'; +import type { Query, TimeRange } from '../../../../../../src/plugins/data/common'; import { TileMapVisConfig } from './types'; import type { LazyLoadedMapModules } from '../../lazy_load_bundle'; import { MapComponent } from '../../embeddable/map_component'; diff --git a/x-pack/plugins/maps/public/locators.ts b/x-pack/plugins/maps/public/locators.ts index e1507b8b24d26..cebd9289c44b9 100644 --- a/x-pack/plugins/maps/public/locators.ts +++ b/x-pack/plugins/maps/public/locators.ts @@ -9,14 +9,13 @@ import rison from 'rison-node'; import type { SerializableRecord } from '@kbn/utility-types'; -import { Filter } from '@kbn/es-query'; +import { type Filter, isFilterPinned } from '@kbn/es-query'; import type { TimeRange, Query, QueryState, RefreshInterval, } from '../../../../src/plugins/data/public'; -import { esFilters } from '../../../../src/plugins/data/public'; import { setStateToKbnUrl } from '../../../../src/plugins/kibana_utils/public'; import type { LocatorDefinition, LocatorPublic } from '../../../../src/plugins/share/public'; import type { LayerDescriptor } from '../common/descriptor_types'; @@ -87,11 +86,9 @@ export class MapsAppLocatorDefinition implements LocatorDefinition !esFilters.isFilterPinned(f)); + if (filters && filters.length) appState.filters = filters?.filter((f) => !isFilterPinned(f)); if (timeRange) queryState.time = timeRange; - if (filters && filters.length) - queryState.filters = filters?.filter((f) => esFilters.isFilterPinned(f)); + if (filters && filters.length) queryState.filters = filters?.filter((f) => isFilterPinned(f)); if (refreshInterval) queryState.refreshInterval = refreshInterval; let path = `/map#/${mapId || ''}`; diff --git a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx index 7765b3467a805..6a2881a5dd274 100644 --- a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx +++ b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx @@ -12,7 +12,8 @@ import { i18n } from '@kbn/i18n'; import { AppLeaveAction, AppMountParameters } from 'kibana/public'; import { Adapters } from 'src/plugins/embeddable/public'; import { Subscription } from 'rxjs'; -import type { Query, Filter, TimeRange, IndexPattern } from 'src/plugins/data/common'; +import { type Filter, FilterStateStore } from '@kbn/es-query'; +import type { Query, TimeRange, IndexPattern } from 'src/plugins/data/common'; import { getData, getCoreChrome, @@ -31,7 +32,6 @@ import { MapsGlobalState, } from '../url_state'; import { - esFilters, SavedQuery, QueryStateChange, QueryState, @@ -446,7 +446,7 @@ export class MapApp extends React.Component { _addFilter = async (newFilters: Filter[]) => { newFilters.forEach((filter) => { - filter.$state = { store: esFilters.FilterStateStore.APP_STATE }; + filter.$state = { store: FilterStateStore.APP_STATE }; }); this._onFiltersChange([...this.props.filters, ...newFilters]); }; diff --git a/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts b/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts index f05836dff2bd9..a0e7399bae492 100644 --- a/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts +++ b/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts @@ -6,7 +6,8 @@ */ import { map } from 'rxjs/operators'; -import { connectToQueryState, esFilters } from '../../../../../../../src/plugins/data/public'; +import { FilterStateStore } from '@kbn/es-query'; +import { connectToQueryState } from '../../../../../../../src/plugins/data/public'; import { syncState, BaseStateContainer, @@ -39,7 +40,7 @@ export function startAppStateSyncing(appStateManager: AppStateManager) { ), }; const stopSyncingQueryAppStateWithStateContainer = connectToQueryState(query, stateContainer, { - filters: esFilters.FilterStateStore.APP_STATE, + filters: FilterStateStore.APP_STATE, query: true, }); diff --git a/x-pack/plugins/ml/kibana.json b/x-pack/plugins/ml/kibana.json index 6c76a61139714..54ef526fb511b 100644 --- a/x-pack/plugins/ml/kibana.json +++ b/x-pack/plugins/ml/kibana.json @@ -29,7 +29,8 @@ "licenseManagement", "maps", "usageCollection", - "dashboard" + "dashboard", + "charts" ], "server": true, "ui": true, @@ -42,7 +43,8 @@ "home", "maps", "usageCollection", - "fieldFormats" + "fieldFormats", + "charts" ], "extraPublicDirs": [ "common" diff --git a/x-pack/plugins/ml/public/application/app.tsx b/x-pack/plugins/ml/public/application/app.tsx index d38a37716b82c..3c39f0367c54f 100644 --- a/x-pack/plugins/ml/public/application/app.tsx +++ b/x-pack/plugins/ml/public/application/app.tsx @@ -88,6 +88,7 @@ const App: FC = ({ coreStart, deps, appMountParams }) => { usageCollection: deps.usageCollection, fieldFormats: deps.fieldFormats, dashboard: deps.dashboard, + charts: deps.charts, ...coreStart, }; diff --git a/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx b/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx index 29b5e54956199..7ea7a5a21382b 100644 --- a/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx +++ b/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx @@ -21,6 +21,7 @@ import { KibanaPageTemplate, RedirectAppLinks, } from '../../../../../../../src/plugins/kibana_react/public'; +import { useDocTitle } from '../../routing/use_doc_title'; export const MlPageControlsContext = createContext<{ setPageTitle: (v?: React.ReactNode | undefined) => void; @@ -79,6 +80,8 @@ export const MlPage: FC<{ pageDeps: PageDependencies }> = React.memo(({ pageDeps const activeRoute = useActiveRoute(routeList); + useDocTitle(activeRoute); + return ( = { - overview: { - name: i18n.translate('xpack.ml.overviewTabLabel', { - defaultMessage: 'Overview', - }), - }, - // Note that anomaly detection jobs list is mapped to ml#/jobs. - anomaly_detection: { - name: i18n.translate('xpack.ml.anomalyDetectionTabLabel', { - defaultMessage: 'Anomaly Detection', - }), - }, - data_frame_analytics: { - name: i18n.translate('xpack.ml.dataFrameAnalyticsTabLabel', { - defaultMessage: 'Data Frame Analytics', - }), - }, - trained_models: { - name: i18n.translate('xpack.ml.trainedModelsTabLabel', { - defaultMessage: 'Trained Models', - }), - }, - datavisualizer: { - name: i18n.translate('xpack.ml.dataVisualizerTabLabel', { - defaultMessage: 'Data Visualizer', - }), - }, - data_view_datavisualizer: { - name: i18n.translate('xpack.ml.dataViewDataVisualizerTabLabel', { - defaultMessage: 'Data View', - }), - }, - filedatavisualizer: { - name: i18n.translate('xpack.ml.fileDataVisualizerTabLabel', { - defaultMessage: 'File', - }), - }, - settings: { - name: i18n.translate('xpack.ml.settingsTabLabel', { - defaultMessage: 'Settings', - }), - }, - 'access-denied': { - name: i18n.translate('xpack.ml.accessDeniedTabLabel', { - defaultMessage: 'Access Denied', - }), - }, -}; - export function useSideNavItems(activeRoute: MlRoute | undefined) { - const activeRouteId = activeRoute?.id; - const { - services: { - chrome: { docTitle }, - }, - } = useMlKibana(); const mlLocator = useMlLocator(); const navigateToPath = useNavigateToPath(); const mlFeaturesDisabled = !isFullLicense(); const canViewMlNodes = checkPermission('canViewMlNodes'); - useEffect(() => { - const title = TAB_DATA[activeRouteId!]?.name; - if (title) { - docTitle.change([title, ML_APP_NAME]); - } - }, [activeRouteId]); - const [globalState] = useUrlState('_g'); const pageState = useMemo(() => { diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts index 4c12d05c1f2b7..33694824a5514 100644 --- a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts +++ b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts @@ -6,7 +6,30 @@ */ import { dataPluginMock } from '../../../../../../../../src/plugins/data/public/mocks'; +import { BehaviorSubject } from 'rxjs'; +export const chartsServiceMock = { + theme: { + useChartsTheme: jest.fn(() => { + return { + crosshair: { + line: { + stroke: 'black', + strokeWidth: 1, + dash: [4, 4], + }, + }, + }; + }), + }, + activeCursor: { + activeCursor$: new BehaviorSubject({ + cursor: { + x: 10432423, + }, + }), + }, +}; export const kibanaContextMock = { services: { uiSettings: { get: jest.fn() }, @@ -21,6 +44,7 @@ export const kibanaContextMock = { urlGenerators: { getUrlGenerator: jest.fn() }, }, data: dataPluginMock.createStartContract(), + charts: chartsServiceMock, }, }; diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts b/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts index a72ce380eef85..b1a0a6df62045 100644 --- a/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts +++ b/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts @@ -23,6 +23,7 @@ import type { DataVisualizerPluginStart } from '../../../../../data_visualizer/p import type { TriggersAndActionsUIPublicPluginStart } from '../../../../../triggers_actions_ui/public'; import type { FieldFormatsRegistry } from '../../../../../../../src/plugins/field_formats/common'; import type { DashboardSetup } from '../../../../../../../src/plugins/dashboard/public'; +import type { ChartsPluginStart } from '../../../../../../../src/plugins/charts/public'; interface StartPlugins { data: DataPublicPluginStart; @@ -36,6 +37,7 @@ interface StartPlugins { usageCollection?: UsageCollectionSetup; fieldFormats: FieldFormatsRegistry; dashboard: DashboardSetup; + charts?: ChartsPluginStart; } export type StartServices = CoreStart & StartPlugins & { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/empty_prompt/empty_prompt.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/empty_prompt/empty_prompt.tsx index e576c7284fc98..8d1af66ebfed5 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/empty_prompt/empty_prompt.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/empty_prompt/empty_prompt.tsx @@ -63,7 +63,7 @@ export const AnalyticsEmptyPrompt: FC = ({ disabled, onCreateFirstJobClic

= ({ disabled, onCreateFirstJobClic title={ + + ), + sourcedata: ( + + ), diff --git a/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx b/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx index 60f5de6a7335a..2d307adce1076 100644 --- a/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx +++ b/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx @@ -39,6 +39,7 @@ export const AnomalyContextMenu: FC = ({ application: { capabilities }, }, } = useMlKibana(); + const [isMenuOpen, setIsMenuOpen] = useState(false); const [isAddDashboardsActive, setIsAddDashboardActive] = useState(false); diff --git a/x-pack/plugins/ml/public/application/explorer/explorer.js b/x-pack/plugins/ml/public/application/explorer/explorer.js index 7305b8a347c59..b96cd164e3dcd 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer.js @@ -205,7 +205,7 @@ export class ExplorerUI extends React.Component { updateLanguage = (language) => this.setState({ language }); render() { - const { share } = this.props.kibana.services; + const { share, charts: chartsService } = this.props.kibana.services; const mlLocator = share.url.locators.get(ML_APP_LOCATOR); @@ -497,6 +497,7 @@ export class ExplorerUI extends React.Component { mlLocator, timeBuckets, onSelectEntity: this.applyFilter, + chartsService, }} /> ) : null} diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/constants.ts b/x-pack/plugins/ml/public/application/explorer/explorer_charts/constants.ts new file mode 100644 index 0000000000000..37ef9bbc72898 --- /dev/null +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/constants.ts @@ -0,0 +1,8 @@ +/* + * 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 TRANSPARENT_BACKGROUND = 'rgba(0, 0, 0, 0)'; diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_anomalies_container.tsx b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_anomalies_container.tsx index dc40ec144ef6c..aaad9c35d740f 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_anomalies_container.tsx +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_anomalies_container.tsx @@ -20,6 +20,7 @@ import type { TimefilterContract } from '../../../../../../../src/plugins/data/p import type { EntityFieldOperation } from '../../../../common/util/anomaly_utils'; import type { ExplorerChartsData } from './explorer_charts_container_service'; import type { MlLocator } from '../../../../common/types/locator'; +import { ChartsPluginStart } from '../../../../../../../src/plugins/charts/public'; interface ExplorerAnomaliesContainerProps { id: string; @@ -32,6 +33,7 @@ interface ExplorerAnomaliesContainerProps { timefilter: TimefilterContract; onSelectEntity: (fieldName: string, fieldValue: string, operation: EntityFieldOperation) => void; showSelectedInterval?: boolean; + chartsService: ChartsPluginStart; } const tooManyBucketsCalloutMsg = i18n.translate( @@ -53,6 +55,7 @@ export const ExplorerAnomaliesContainer: FC = ( timefilter, onSelectEntity, showSelectedInterval, + chartsService, }) => { return ( <> @@ -87,6 +90,7 @@ export const ExplorerAnomaliesContainer: FC = ( onSelectEntity, tooManyBucketsCalloutMsg, showSelectedInterval, + chartsService, }} /> )} diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.js index 27a934fa841fe..204a4f3677579 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.js @@ -36,6 +36,7 @@ import { LoadingIndicator } from '../../components/loading_indicator/loading_ind import { mlFieldFormatService } from '../../services/field_format_service'; import { CHART_TYPE } from '../explorer_constants'; +import { TRANSPARENT_BACKGROUND } from './constants'; const CONTENT_WRAPPER_HEIGHT = 215; @@ -62,7 +63,15 @@ export class ExplorerChartDistribution extends React.Component { } renderChart() { - const { tooManyBuckets, tooltipService, timeBuckets, showSelectedInterval } = this.props; + const { + tooManyBuckets, + tooltipService, + timeBuckets, + showSelectedInterval, + onPointerUpdate, + chartTheme, + cursor, + } = this.props; const element = this.rootNode; const config = this.props.seriesConfig; @@ -256,10 +265,73 @@ export class ExplorerChartDistribution extends React.Component { drawRareChartAxes(); drawRareChartHighlightedSpan(); + drawSyncedCursorLine(lineChartGroup); drawRareChartDots(data, lineChartGroup, lineChartValuesLine); drawRareChartMarkers(data); } + function drawSyncedCursorLine(lineChartGroup) { + lineChartGroup + .append('rect') + .attr('x', 0) + .attr('y', 0) + .attr('height', chartHeight) + .attr('width', vizWidth) + .on('mouseout', function () { + onPointerUpdate({ + chartId: 'ml-anomaly-chart-metric', + scale: 'time', + smHorizontalValue: null, + smVerticalValue: null, + type: 'Out', + unit: undefined, + }); + }) + .on('mousemove', function () { + const mouse = d3.mouse(this); + + onPointerUpdate({ + chartId: 'ml-anomaly-chart-metric', + scale: 'time', + smHorizontalValue: null, + smVerticalValue: null, + type: 'Over', + unit: undefined, + x: moment(lineChartXScale.invert(mouse[0])).unix() * 1000, + }); + }) + .style('fill', TRANSPARENT_BACKGROUND); + + const cursorData = + cursor && + cursor.type === 'Over' && + cursor.x >= config.plotEarliest && + cursor.x <= config.plotLatest + ? [cursor.x] + : []; + + const cursorMouseLine = lineChartGroup + .append('g') + .attr('class', 'ml-anomaly-chart-cursor') + .selectAll('.ml-anomaly-chart-cursor-line') + .data(cursorData); + + cursorMouseLine + .enter() + .append('path') + .attr('class', 'ml-anomaly-chart-cursor-line') + .attr('d', (ts) => { + const xPosition = lineChartXScale(ts); + return `M${xPosition},${chartHeight} ${xPosition},0`; + }) + // Use elastic chart's cursor line style if possible + .style('stroke', `${chartTheme.crosshair.line.stroke ?? 'black'}`) + .style('stroke-width', `${chartTheme.crosshair.line.strokeWidth ?? '1'}px`) + .style('stroke-dasharray', chartTheme.crosshair.line.dash ?? '4,4'); + + cursorMouseLine.exit().remove(); + } + function drawRareChartAxes() { // Get the scaled date format to use for x axis tick labels. const bounds = { min: moment(config.plotEarliest), max: moment(config.plotLatest) }; diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.test.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.test.js index 8d2f66a870c75..8f089ab8c07ce 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.test.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_distribution.test.js @@ -19,8 +19,14 @@ import React from 'react'; import { ExplorerChartDistribution } from './explorer_chart_distribution'; import { chartLimits } from '../../util/chart_utils'; import { timeBucketsMock } from '../../util/__mocks__/time_buckets'; +import { kibanaContextMock } from '../../contexts/kibana/__mocks__/kibana_context'; const utilityProps = { timeBuckets: timeBucketsMock, + chartTheme: kibanaContextMock.services.charts.theme.useChartsTheme(), + onPointerUpdate: jest.fn(), + cursor: { + x: 10432423, + }, }; describe('ExplorerChart', () => { const mlSelectSeverityServiceMock = { @@ -126,7 +132,7 @@ describe('ExplorerChart', () => { expect(lineChart).toHaveLength(1); const rects = lineChart[0].getElementsByTagName('rect'); - expect(rects).toHaveLength(2); + expect(rects).toHaveLength(3); const chartBorder = rects[0]; expect(+chartBorder.getAttribute('x')).toBe(0); diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.js index 19390017244a8..6ce196393b97e 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.js @@ -39,6 +39,7 @@ import { } from '../../util/chart_utils'; import { LoadingIndicator } from '../../components/loading_indicator/loading_indicator'; import { mlFieldFormatService } from '../../services/field_format_service'; +import { TRANSPARENT_BACKGROUND } from './constants'; const CONTENT_WRAPPER_HEIGHT = 215; const CONTENT_WRAPPER_CLASS = 'ml-explorer-chart-content-wrapper'; @@ -50,6 +51,9 @@ export class ExplorerChartSingleMetric extends React.Component { severity: PropTypes.number.isRequired, tooltipService: PropTypes.object.isRequired, timeBuckets: PropTypes.object.isRequired, + onPointerUpdate: PropTypes.func.isRequired, + chartTheme: PropTypes.object.isRequired, + cursor: PropTypes.object.isRequired, }; componentDidMount() { @@ -61,7 +65,15 @@ export class ExplorerChartSingleMetric extends React.Component { } renderChart() { - const { tooManyBuckets, tooltipService, timeBuckets, showSelectedInterval } = this.props; + const { + tooManyBuckets, + tooltipService, + timeBuckets, + showSelectedInterval, + onPointerUpdate, + chartTheme, + cursor, + } = this.props; const element = this.rootNode; const config = this.props.seriesConfig; @@ -181,11 +193,76 @@ export class ExplorerChartSingleMetric extends React.Component { drawLineChartAxes(); drawLineChartHighlightedSpan(); + drawSyncedCursorLine(lineChartGroup); drawLineChartPaths(data); drawLineChartDots(data, lineChartGroup, lineChartValuesLine); drawLineChartMarkers(data); } + function drawSyncedCursorLine(lineChartGroup) { + lineChartGroup + .append('rect') + .attr('x', 0) + .attr('y', 0) + .attr('height', chartHeight) + .attr('width', vizWidth) + .on('mouseout', function () { + onPointerUpdate({ + chartId: 'ml-anomaly-chart-metric', + scale: 'time', + smHorizontalValue: null, + smVerticalValue: null, + type: 'Out', + unit: undefined, + }); + }) + .on('mousemove', function () { + const mouse = d3.mouse(this); + + if (onPointerUpdate) { + onPointerUpdate({ + chartId: 'ml-anomaly-chart-metric', + scale: 'time', + smHorizontalValue: null, + smVerticalValue: null, + type: 'Over', + unit: undefined, + x: moment(lineChartXScale.invert(mouse[0])).unix() * 1000, + }); + } + }) + .style('fill', TRANSPARENT_BACKGROUND); + + const cursorData = + cursor && + cursor.type === 'Over' && + cursor.x >= config.plotEarliest && + cursor.x <= config.plotLatest + ? [cursor.x] + : []; + + const cursorMouseLine = lineChartGroup + .append('g') + .attr('class', 'ml-anomaly-chart-cursor') + .selectAll('.ml-anomaly-chart-cursor-line') + .data(cursorData); + + cursorMouseLine + .enter() + .append('path') + .attr('class', 'ml-anomaly-chart-cursor-line') + .attr('d', (ts) => { + const xPosition = lineChartXScale(ts); + return `M${xPosition},${chartHeight} ${xPosition},0`; + }) + // Use elastic chart's cursor line style if possible + .style('stroke', `${chartTheme.crosshair.line.stroke ?? 'black'}`) + .style('stroke-width', `${chartTheme.crosshair.line.strokeWidth ?? '1'}px`) + .style('stroke-dasharray', chartTheme.crosshair.line.dash ?? '4,4'); + + cursorMouseLine.exit().remove(); + } + function drawLineChartAxes() { // Get the scaled date format to use for x axis tick labels. const bounds = { min: moment(config.plotEarliest), max: moment(config.plotLatest) }; diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.test.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.test.js index 00172965bc216..133ca3e8eb628 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.test.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_single_metric.test.js @@ -19,9 +19,15 @@ import React from 'react'; import { ExplorerChartSingleMetric } from './explorer_chart_single_metric'; import { chartLimits } from '../../util/chart_utils'; import { timeBucketsMock } from '../../util/__mocks__/time_buckets'; +import { kibanaContextMock } from '../../contexts/kibana/__mocks__/kibana_context'; const utilityProps = { timeBuckets: timeBucketsMock, + chartTheme: kibanaContextMock.services.charts.theme.useChartsTheme(), + onPointerUpdate: jest.fn(), + cursor: { + x: 10432423, + }, }; describe('ExplorerChart', () => { @@ -131,7 +137,7 @@ describe('ExplorerChart', () => { expect(lineChart).toHaveLength(1); const rects = lineChart[0].getElementsByTagName('rect'); - expect(rects).toHaveLength(2); + expect(rects).toHaveLength(3); const chartBorder = rects[0]; expect(+chartBorder.getAttribute('x')).toBe(0); diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.js index 5d3ef7611bd09..2029211c98970 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.js @@ -6,7 +6,7 @@ */ import './_index.scss'; -import React, { useEffect, useState, useCallback } from 'react'; +import React, { useEffect, useState, useCallback, useRef } from 'react'; import { EuiButtonEmpty, @@ -35,6 +35,10 @@ import { ML_JOB_AGGREGATION } from '../../../../common/constants/aggregation_typ import { ExplorerChartsErrorCallOuts } from './explorer_charts_error_callouts'; import { addItemToRecentlyAccessed } from '../../util/recently_accessed'; import { EmbeddedMapComponentWrapper } from './explorer_chart_embedded_map'; +import { useActiveCursor } from '../../../../../../../src/plugins/charts/public'; +import { Chart, Settings } from '@elastic/charts'; +import useObservable from 'react-use/lib/useObservable'; + const textTooManyBuckets = i18n.translate('xpack.ml.explorer.charts.tooManyBucketsDescription', { defaultMessage: 'This selection contains too many buckets to be displayed. You should shorten the time range of the view or narrow the selection in the timeline.', @@ -72,6 +76,7 @@ function ExplorerChartContainer({ recentlyAccessed, tooManyBucketsCalloutMsg, showSelectedInterval, + chartsService, }) { const [explorerSeriesLink, setExplorerSeriesLink] = useState(''); @@ -93,6 +98,16 @@ function ExplorerChartContainer({ }; }, [mlLocator, series]); + const chartRef = useRef(null); + + const chartTheme = chartsService.theme.useChartsTheme(); + + const handleCursorUpdate = useActiveCursor(chartsService.activeCursor, chartRef, { + isDateHistogram: true, + }); + + const cursor = useObservable(chartsService.activeCursor.activeCursor$)?.cursor; + const addToRecentlyAccessed = useCallback(() => { if (recentlyAccessed) { addItemToRecentlyAccessed( @@ -130,6 +145,13 @@ function ExplorerChartContainer({ return ( + {/* Creating an empty elastic chart container here */} + {/* so that we can use chart's ref which controls the activeCursor api */} +
+ + } /> + +
)} @@ -216,6 +241,9 @@ function ExplorerChartContainer({ severity={severity} tooltipService={tooltipService} showSelectedInterval={showSelectedInterval} + onPointerUpdate={handleCursorUpdate} + chartTheme={chartTheme} + cursor={cursor} /> )} @@ -240,6 +268,7 @@ export const ExplorerChartsContainerUI = ({ onSelectEntity, tooManyBucketsCalloutMsg, showSelectedInterval, + chartsService, }) => { const { services: { @@ -298,6 +327,7 @@ export const ExplorerChartsContainerUI = ({ recentlyAccessed={recentlyAccessed} tooManyBucketsCalloutMsg={tooManyBucketsCalloutMsg} showSelectedInterval={showSelectedInterval} + chartsService={chartsService} /> ))} diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.test.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.test.js index 4d3e4c0f3b8a1..fbb869cf34aa3 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.test.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container.test.js @@ -48,6 +48,8 @@ const getUtilityProps = () => { timefilter: timefilterMock, timeBuckets: timeBucketsMock, kibana: kibanaContextMock, + onPointerUpdate: jest.fn(), + chartsService: kibanaContextMock.services.charts, }; }; diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js index 86b38f88c7199..e77f2d6c2aab9 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js @@ -7,7 +7,6 @@ import React, { Component } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import { debounce } from 'lodash'; import { ml } from '../../../../services/ml_api_service'; import { checkForAutoStartDatafeed, filterJobs, loadFullJob } from '../utils'; @@ -35,11 +34,6 @@ import { AnomalyDetectionEmptyState } from '../anomaly_detection_empty_state'; let blockingJobsRefreshTimeout = null; -const filterJobsDebounce = debounce((jobsSummaryList, filterClauses, callback) => { - const ss = filterJobs(jobsSummaryList, filterClauses); - callback(ss); -}, 500); - // 'isManagementTable' bool prop to determine when to configure table for use in Kibana management page export class JobsListView extends Component { constructor(props) { @@ -291,19 +285,10 @@ export class JobsListView extends Component { return; } - if (this._isFiltersSet === true) { - filterJobsDebounce(this.state.jobsSummaryList, filterClauses, (jobsSummaryList) => { - this.setState({ filteredJobsSummaryList: jobsSummaryList, filterClauses }, () => { - this.refreshSelectedJobs(); - }); - }); - } else { - // first use after page load, do not debounce. - const filteredJobsSummaryList = filterJobs(this.state.jobsSummaryList, filterClauses); - this.setState({ filteredJobsSummaryList, filterClauses }, () => { - this.refreshSelectedJobs(); - }); - } + const filteredJobsSummaryList = filterJobs(this.state.jobsSummaryList, filterClauses); + this.setState({ filteredJobsSummaryList, filterClauses }, () => { + this.refreshSelectedJobs(); + }); this._isFiltersSet = true; }; diff --git a/x-pack/plugins/ml/public/application/routing/routes/access_denied.tsx b/x-pack/plugins/ml/public/application/routing/routes/access_denied.tsx index 10b2d1438c32b..ee89ddcad8f60 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/access_denied.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/access_denied.tsx @@ -16,12 +16,14 @@ const breadcrumbs = [ text: i18n.translate('xpack.ml.accessDeniedLabel', { defaultMessage: 'Access denied', }), - href: '', }, ]; export const accessDeniedRouteFactory = (): MlRoute => ({ path: '/access-denied', + title: i18n.translate('xpack.ml.accessDeniedLabel', { + defaultMessage: 'Access denied', + }), render: (props, deps) => , breadcrumbs, }); diff --git a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_creation.tsx b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_creation.tsx index 335b041c816a4..68927001ece60 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_creation.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_creation.tsx @@ -28,12 +28,15 @@ export const analyticsJobsCreationRouteFactory = ( ): MlRoute => ({ path: '/data_frame_analytics/new_job', render: (props, deps) => , + title: i18n.translate('xpack.ml.dataFrameAnalytics.createJob.docTitle', { + defaultMessage: 'Create Job', + }), breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), getBreadcrumbWithUrlForApp('DATA_FRAME_ANALYTICS_BREADCRUMB', navigateToPath, basePath), { text: i18n.translate('xpack.ml.dataFrameAnalyticsBreadcrumbs.dataFrameCreationLabel', { - defaultMessage: 'Create job', + defaultMessage: 'Create Job', }), }, ], diff --git a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_exploration.tsx b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_exploration.tsx index 88502bd86f08c..5b35223dd95de 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_exploration.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_exploration.tsx @@ -26,6 +26,9 @@ export const analyticsJobExplorationRouteFactory = ( ): MlRoute => ({ path: '/data_frame_analytics/exploration', render: (props, deps) => , + title: i18n.translate('xpack.ml.dataFrameAnalytics.exploration.docTitle', { + defaultMessage: 'Exploration', + }), breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), getBreadcrumbWithUrlForApp('DATA_FRAME_ANALYTICS_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_jobs_list.tsx b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_jobs_list.tsx index 475530684d5f9..044c16cc7f7e0 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_jobs_list.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_jobs_list.tsx @@ -20,6 +20,9 @@ export const analyticsJobsListRouteFactory = ( ): MlRoute => ({ id: 'data_frame_analytics', path: '/data_frame_analytics', + title: i18n.translate('xpack.ml.dataFrameAnalytics.jobs.docTitle', { + defaultMessage: 'Data Frame Analytics Jobs', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_map.tsx b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_map.tsx index dc2383f004470..e915204482ab0 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_map.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_map.tsx @@ -22,6 +22,9 @@ export const analyticsMapRouteFactory = ( ): MlRoute => ({ path: '/data_frame_analytics/map', render: (props, deps) => , + title: i18n.translate('xpack.ml.dataFrameAnalytics.analyticsMap.docTitle', { + defaultMessage: 'Analytics Map', + }), breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), getBreadcrumbWithUrlForApp('DATA_FRAME_ANALYTICS_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/datavisualizer.tsx b/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/datavisualizer.tsx index c45d5f94c238f..1c1edb35fca14 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/datavisualizer.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/datavisualizer.tsx @@ -6,13 +6,11 @@ */ import React, { FC } from 'react'; - +import { i18n } from '@kbn/i18n'; import { NavigateToPath } from '../../../contexts/kibana'; - import { MlRoute, PageLoader, PageProps } from '../../router'; import { useResolver } from '../../use_resolver'; import { DatavisualizerSelector } from '../../../datavisualizer'; - import { checkBasicLicense } from '../../../license'; import { checkFindFileStructurePrivilegeResolver } from '../../../capabilities/check_capabilities'; import { getBreadcrumbWithUrlForApp } from '../../breadcrumbs'; @@ -23,6 +21,9 @@ export const selectorRouteFactory = ( ): MlRoute => ({ id: 'datavisualizer', path: '/datavisualizer', + title: i18n.translate('xpack.ml.dataVisualizer.docTitle', { + defaultMessage: 'Data Visualizer', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/file_based.tsx b/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/file_based.tsx index f91b206e14f3a..1ef046e4c3c84 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/file_based.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/file_based.tsx @@ -26,6 +26,9 @@ export const fileBasedRouteFactory = ( ): MlRoute => ({ id: 'filedatavisualizer', path: '/filedatavisualizer', + title: i18n.translate('xpack.ml.dataVisualizer.file.docTitle', { + defaultMessage: 'File Data Visualizer', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), @@ -34,7 +37,6 @@ export const fileBasedRouteFactory = ( text: i18n.translate('xpack.ml.dataVisualizer.fileBasedLabel', { defaultMessage: 'File', }), - href: '', }, ], }); diff --git a/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/index_based.tsx b/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/index_based.tsx index 1ae2445e19a1c..28fef8b3786b7 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/index_based.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/datavisualizer/index_based.tsx @@ -27,6 +27,9 @@ export const indexBasedRouteFactory = ( ): MlRoute => ({ id: 'data_view_datavisualizer', path: '/jobs/new_job/datavisualizer', + title: i18n.translate('xpack.ml.dataVisualizer.dataView.docTitle', { + defaultMessage: 'Index Data Visualizer', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), @@ -35,7 +38,6 @@ export const indexBasedRouteFactory = ( text: i18n.translate('xpack.ml.dataFrameAnalyticsBreadcrumbs.dataViewLabel', { defaultMessage: 'Data View', }), - href: '', }, ], }); diff --git a/x-pack/plugins/ml/public/application/routing/routes/explorer.tsx b/x-pack/plugins/ml/public/application/routing/routes/explorer.tsx index fa5f63792fce9..d25d28248bd81 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/explorer.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/explorer.tsx @@ -49,6 +49,9 @@ export const explorerRouteFactory = ( ): MlRoute => ({ id: 'explorer', path: '/explorer', + title: i18n.translate('xpack.ml.anomalyDetection.anomalyExplorer.docTitle', { + defaultMessage: 'Anomaly Explorer', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), @@ -57,7 +60,6 @@ export const explorerRouteFactory = ( text: i18n.translate('xpack.ml.anomalyDetection.anomalyExplorerLabel', { defaultMessage: 'Anomaly Explorer', }), - href: '', }, ], enableDatePicker: true, diff --git a/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx b/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx index be9a7e1f3d935..397ce5bef4259 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx @@ -8,9 +8,7 @@ import React, { useEffect, FC, useMemo } from 'react'; import useObservable from 'react-use/lib/useObservable'; import { i18n } from '@kbn/i18n'; - import { NavigateToPath } from '../../contexts/kibana'; - import { DEFAULT_REFRESH_INTERVAL_MS } from '../../../../common/constants/jobs_list'; import { mlTimefilterRefresh$ } from '../../services/timefilter_refresh_service'; import { useUrlState } from '../../util/url_state'; @@ -25,8 +23,8 @@ import { MlAnnotationUpdatesContext } from '../../contexts/ml/ml_annotation_upda export const jobListRouteFactory = (navigateToPath: NavigateToPath, basePath: string): MlRoute => ({ id: 'anomaly_detection', - title: i18n.translate('xpack.ml.overview.anomalyDetection.panelTitle', { - defaultMessage: 'Anomaly Detection', + title: i18n.translate('xpack.ml.anomalyDetection.jobs.docTitle', { + defaultMessage: 'Anomaly Detection Jobs', }), path: '/jobs', render: (props, deps) => , diff --git a/x-pack/plugins/ml/public/application/routing/routes/new_job/index_or_search.tsx b/x-pack/plugins/ml/public/application/routing/routes/new_job/index_or_search.tsx index 69246ad69965a..d1d547ca8bc90 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/new_job/index_or_search.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/new_job/index_or_search.tsx @@ -37,7 +37,6 @@ const getBreadcrumbs = (navigateToPath: NavigateToPath, basePath: string) => [ text: i18n.translate('xpack.ml.jobsBreadcrumbs.createJobLabel', { defaultMessage: 'Create job', }), - href: '', }, ]; @@ -48,7 +47,6 @@ const getDataVisBreadcrumbs = (navigateToPath: NavigateToPath, basePath: string) text: i18n.translate('xpack.ml.jobsBreadcrumbs.selectDateViewLabel', { defaultMessage: 'Data View', }), - href: '', }, ]; @@ -74,6 +72,9 @@ export const dataVizIndexOrSearchRouteFactory = ( ): MlRoute => ({ id: 'data_view_datavisualizer', path: '/datavisualizer_index_select', + title: i18n.translate('xpack.ml.selectDataViewLabel', { + defaultMessage: 'Select Data View', + }), render: (props, deps) => ( ({ path: '/settings/calendars_list', + title: i18n.translate('xpack.ml.settings.calendarList.docTitle', { + defaultMessage: 'Calendars', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/settings/calendar_new_edit.tsx b/x-pack/plugins/ml/public/application/routing/routes/settings/calendar_new_edit.tsx index ba5c9cf5a337b..c3fe9f03ebf61 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/settings/calendar_new_edit.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/settings/calendar_new_edit.tsx @@ -7,13 +7,9 @@ import React, { FC } from 'react'; import { i18n } from '@kbn/i18n'; - -import { NavigateToPath } from '../../../contexts/kibana'; - +import { NavigateToPath, useTimefilter } from '../../../contexts/kibana'; import { MlRoute, PageLoader, PageProps } from '../../router'; import { useResolver } from '../../use_resolver'; - -import { useTimefilter } from '../../../contexts/kibana'; import { checkFullLicense } from '../../../license'; import { checkGetJobsCapabilitiesResolver, @@ -39,6 +35,9 @@ export const newCalendarRouteFactory = ( basePath: string ): MlRoute => ({ path: '/settings/calendars_list/new_calendar', + title: i18n.translate('xpack.ml.settings.createCalendar.docTitle', { + defaultMessage: 'Create Calendar', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), @@ -58,6 +57,9 @@ export const editCalendarRouteFactory = ( basePath: string ): MlRoute => ({ path: '/settings/calendars_list/edit_calendar/:calendarId', + title: i18n.translate('xpack.ml.settings.editCalendar.docTitle', { + defaultMessage: 'Edit Calendar', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list.tsx b/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list.tsx index 11599f01e74b9..55e14172b656a 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list.tsx @@ -6,13 +6,10 @@ */ import React, { FC } from 'react'; - -import { NavigateToPath } from '../../../contexts/kibana'; - +import { i18n } from '@kbn/i18n'; +import { NavigateToPath, useTimefilter } from '../../../contexts/kibana'; import { MlRoute, PageLoader, PageProps } from '../../router'; import { useResolver } from '../../use_resolver'; - -import { useTimefilter } from '../../../contexts/kibana'; import { checkFullLicense } from '../../../license'; import { checkGetJobsCapabilitiesResolver, @@ -20,7 +17,6 @@ import { } from '../../../capabilities/check_capabilities'; import { getMlNodeCount } from '../../../ml_nodes_check/check_ml_nodes'; import { FilterLists } from '../../../settings/filter_lists'; - import { getBreadcrumbWithUrlForApp } from '../../breadcrumbs'; export const filterListRouteFactory = ( @@ -28,6 +24,9 @@ export const filterListRouteFactory = ( basePath: string ): MlRoute => ({ path: '/settings/filter_lists', + title: i18n.translate('xpack.ml.settings.filterList.docTitle', { + defaultMessage: 'Filters', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list_new_edit.tsx b/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list_new_edit.tsx index 0c372e58e2f98..d105d3d3aac5e 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list_new_edit.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/settings/filter_list_new_edit.tsx @@ -40,6 +40,9 @@ export const newFilterListRouteFactory = ( basePath: string ): MlRoute => ({ path: '/settings/filter_lists/new_filter_list', + title: i18n.translate('xpack.ml.settings.createFilter.docTitle', { + defaultMessage: 'Create Filter', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), @@ -59,6 +62,9 @@ export const editFilterListRouteFactory = ( basePath: string ): MlRoute => ({ path: '/settings/filter_lists/edit_filter_list/:filterId', + title: i18n.translate('xpack.ml.settings.editFilter.docTitle', { + defaultMessage: 'Edit Filter', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/settings/settings.tsx b/x-pack/plugins/ml/public/application/routing/routes/settings/settings.tsx index 2611674f0d869..ca8215b320eeb 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/settings/settings.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/settings/settings.tsx @@ -6,13 +6,10 @@ */ import React, { FC } from 'react'; - -import { NavigateToPath } from '../../../contexts/kibana'; - +import { i18n } from '@kbn/i18n'; +import { NavigateToPath, useTimefilter } from '../../../contexts/kibana'; import { MlRoute, PageLoader, PageProps } from '../../router'; import { useResolver } from '../../use_resolver'; - -import { useTimefilter } from '../../../contexts/kibana'; import { checkFullLicense } from '../../../license'; import { checkGetJobsCapabilitiesResolver, @@ -28,6 +25,9 @@ export const settingsRouteFactory = ( ): MlRoute => ({ id: 'settings', path: '/settings', + title: i18n.translate('xpack.ml.settings.docTitle', { + defaultMessage: 'Settings', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx index 6a9b38ca2938b..ff7ee1c1a0933 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx @@ -53,6 +53,9 @@ export const timeSeriesExplorerRouteFactory = ( ): MlRoute => ({ id: 'timeseriesexplorer', path: '/timeseriesexplorer', + title: i18n.translate('xpack.ml.anomalyDetection.singleMetricViewerLabel', { + defaultMessage: 'Single Metric Viewer', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), @@ -61,7 +64,6 @@ export const timeSeriesExplorerRouteFactory = ( text: i18n.translate('xpack.ml.anomalyDetection.singleMetricViewerLabel', { defaultMessage: 'Single Metric Viewer', }), - href: '', }, ], enableDatePicker: true, diff --git a/x-pack/plugins/ml/public/application/routing/routes/trained_models/models_list.tsx b/x-pack/plugins/ml/public/application/routing/routes/trained_models/models_list.tsx index eba100e95b025..21d30ef76c458 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/trained_models/models_list.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/trained_models/models_list.tsx @@ -23,6 +23,9 @@ export const modelsListRouteFactory = ( ): MlRoute => ({ id: 'trained_models', path: '/trained_models', + title: i18n.translate('xpack.ml.modelManagement.trainedModels.docTitle', { + defaultMessage: 'Trained Models', + }), render: (props, deps) => , breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/routes/trained_models/nodes_list.tsx b/x-pack/plugins/ml/public/application/routing/routes/trained_models/nodes_list.tsx index 7085864a2301a..88df1e0b07f58 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/trained_models/nodes_list.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/trained_models/nodes_list.tsx @@ -23,6 +23,9 @@ export const nodesListRouteFactory = ( ): MlRoute => ({ path: '/trained_models/nodes', render: (props, deps) => , + title: i18n.translate('xpack.ml.modelManagement.nodesOverview.docTitle', { + defaultMessage: 'Nodes', + }), breadcrumbs: [ getBreadcrumbWithUrlForApp('ML_BREADCRUMB', navigateToPath, basePath), getBreadcrumbWithUrlForApp('TRAINED_MODELS', navigateToPath, basePath), diff --git a/x-pack/plugins/ml/public/application/routing/use_active_route.ts b/x-pack/plugins/ml/public/application/routing/use_active_route.ts index fbc3949390dc8..5cb97e15a1d69 100644 --- a/x-pack/plugins/ml/public/application/routing/use_active_route.ts +++ b/x-pack/plugins/ml/public/application/routing/use_active_route.ts @@ -5,16 +5,31 @@ * 2.0. */ -import { useLocation } from 'react-router-dom'; +import { useLocation, useRouteMatch } from 'react-router-dom'; import { keyBy } from 'lodash'; import { useMemo } from 'react'; import type { MlRoute } from './router'; export const useActiveRoute = (routesList: MlRoute[]): MlRoute => { const { pathname } = useLocation(); + + /** + * Temp fix for routes with params. + */ + const editCalendarMatch = useRouteMatch('/settings/calendars_list/edit_calendar/:calendarId'); + const editFilterMatch = useRouteMatch('/settings/filter_lists/edit_filter_list/:filterId'); + const routesMap = useMemo(() => keyBy(routesList, 'path'), []); - const activeRoute = useMemo(() => routesMap[pathname], [pathname]); + const activeRoute = useMemo(() => { + if (editCalendarMatch) { + return routesMap[editCalendarMatch.path]; + } + if (editFilterMatch) { + return routesMap[editFilterMatch.path]; + } + return routesMap[pathname]; + }, [pathname]); return activeRoute ?? routesMap['/overview']; }; diff --git a/x-pack/plugins/ml/public/application/routing/use_doc_title.ts b/x-pack/plugins/ml/public/application/routing/use_doc_title.ts new file mode 100644 index 0000000000000..0646ee1e1e5a8 --- /dev/null +++ b/x-pack/plugins/ml/public/application/routing/use_doc_title.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useCallback, useEffect } from 'react'; +import { ML_APP_NAME } from '../../../common/constants/app'; +import type { MlRoute } from './router'; +import { useMlKibana } from '../contexts/kibana'; + +/** + * Handles document title automatically based on the active route. + * Returns a callback for manual title updates. + */ +export const useDocTitle = (activeRoute: MlRoute | undefined) => { + const activeRouteTitle = activeRoute?.title; + + const { + services: { + chrome: { docTitle }, + }, + } = useMlKibana(); + + const updateDocTitle = useCallback( + (title: string) => { + docTitle.change([title, ML_APP_NAME]); + }, + [docTitle] + ); + + useEffect(() => { + if (activeRouteTitle) { + updateDocTitle(activeRouteTitle); + } + }, [updateDocTitle, activeRouteTitle]); + + return updateDocTitle; +}; diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_charts/__snapshots__/embeddable_anomaly_charts_container.test.tsx.snap b/x-pack/plugins/ml/public/embeddables/anomaly_charts/__snapshots__/embeddable_anomaly_charts_container.test.tsx.snap index 703a3778ebfb9..ca474c90859d7 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_charts/__snapshots__/embeddable_anomaly_charts_container.test.tsx.snap +++ b/x-pack/plugins/ml/public/embeddables/anomaly_charts/__snapshots__/embeddable_anomaly_charts_container.test.tsx.snap @@ -9,6 +9,7 @@ Object { "timeFieldName": "@timestamp", "tooManyBuckets": false, }, + "chartsService": undefined, "id": "test-explorer-charts-embeddable", "mlLocator": undefined, "onSelectEntity": [Function], diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_charts/embeddable_anomaly_charts_container.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_charts/embeddable_anomaly_charts_container.tsx index 729838f83e979..923014a5c4d4d 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_charts/embeddable_anomaly_charts_container.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_charts/embeddable_anomaly_charts_container.tsx @@ -56,7 +56,8 @@ export const EmbeddableAnomalyChartsContainer: FC(); - const [{ uiSettings }, { data: dataServices, share, uiActions }] = services; + const [{ uiSettings }, { data: dataServices, share, uiActions, charts: chartsService }] = + services; const { timefilter } = dataServices.query.timefilter; const mlLocator = useMemo( @@ -183,6 +184,7 @@ export const EmbeddableAnomalyChartsContainer: FC )} diff --git a/x-pack/plugins/ml/public/plugin.ts b/x-pack/plugins/ml/public/plugin.ts index 6563a7bc5b551..f580423e80543 100644 --- a/x-pack/plugins/ml/public/plugin.ts +++ b/x-pack/plugins/ml/public/plugin.ts @@ -50,6 +50,7 @@ import type { FieldFormatsStart, } from '../../../../src/plugins/field_formats/public'; import type { DashboardSetup, DashboardStart } from '../../../../src/plugins/dashboard/public'; +import type { ChartsPluginStart } from '../../../../src/plugins/charts/public'; export interface MlStartDependencies { data: DataPublicPluginStart; @@ -62,6 +63,7 @@ export interface MlStartDependencies { dataVisualizer: DataVisualizerPluginStart; fieldFormats: FieldFormatsStart; dashboard: DashboardStart; + charts: ChartsPluginStart; } export interface MlSetupDependencies { @@ -109,7 +111,9 @@ export class MlPlugin implements Plugin { return renderApp( coreStart, { + charts: pluginsStart.charts, data: pluginsStart.data, + dashboard: pluginsStart.dashboard, share: pluginsStart.share, security: pluginsSetup.security, licensing: pluginsSetup.licensing, @@ -124,7 +128,6 @@ export class MlPlugin implements Plugin { dataVisualizer: pluginsStart.dataVisualizer, usageCollection: pluginsSetup.usageCollection, fieldFormats: pluginsStart.fieldFormats, - dashboard: pluginsStart.dashboard, }, params ); diff --git a/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx b/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx index 1a4d88d690b84..1f133176a743e 100644 --- a/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx +++ b/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx @@ -5,15 +5,16 @@ * 2.0. */ +import { DataViewFieldBase } from '@kbn/es-query'; import { useEffect, useState } from 'react'; -import { DataPublicPluginStart, IFieldType, IIndexPattern } from 'src/plugins/data/public'; +import { DataPublicPluginStart, IIndexPattern } from 'src/plugins/data/public'; +import { prefixIndexPattern } from '../../../../common/ccs_utils'; import { INDEX_PATTERN_BEATS, INDEX_PATTERN_ELASTICSEARCH, INDEX_PATTERN_KIBANA, INDEX_PATTERN_LOGSTASH, } from '../../../../common/constants'; -import { prefixIndexPattern } from '../../../../common/ccs_utils'; import { MonitoringConfig } from '../../../types'; const INDEX_PATTERNS = `${INDEX_PATTERN_ELASTICSEARCH},${INDEX_PATTERN_KIBANA},${INDEX_PATTERN_LOGSTASH},${INDEX_PATTERN_BEATS}`; @@ -24,7 +25,7 @@ export const useDerivedIndexPattern = ( ): { loading: boolean; derivedIndexPattern: IIndexPattern } => { const indexPattern = prefixIndexPattern(config || ({} as MonitoringConfig), INDEX_PATTERNS, '*'); const [loading, setLoading] = useState(true); - const [fields, setFields] = useState([]); + const [fields, setFields] = useState([]); useEffect(() => { (async function fetchData() { const result = await data.indexPatterns.getFieldsForWildcard({ diff --git a/x-pack/plugins/monitoring/public/application/pages/page_template.tsx b/x-pack/plugins/monitoring/public/application/pages/page_template.tsx index c951d325c13f4..37ac69a56e40d 100644 --- a/x-pack/plugins/monitoring/public/application/pages/page_template.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/page_template.tsx @@ -20,8 +20,9 @@ import { } from '../../lib/setup_mode'; import { SetupModeFeature } from '../../../common/enums'; import { AlertsDropdown } from '../../alerts/alerts_dropdown'; -import { ActionMenu } from '../../components/action_menu'; import { useRequestErrorHandler } from '../hooks/use_request_error_handler'; +import { HeaderMenuPortal } from '../../../../observability/public'; +import { HeaderActionMenuContext } from '../../application/contexts/header_action_menu_context'; export interface TabMenuItem { id: string; @@ -53,6 +54,7 @@ export const PageTemplate: React.FC = ({ const history = useHistory(); const [hasError, setHasError] = useState(false); const handleRequestError = useRequestErrorHandler(); + const { setHeaderActionMenu, theme$ } = useContext(HeaderActionMenuContext); const getPageDataResponseHandler = useCallback( (result: any) => { @@ -104,9 +106,11 @@ export const PageTemplate: React.FC = ({ return (
- - - + {setHeaderActionMenu && theme$ && ( + + + + )} {tabs && ( diff --git a/x-pack/plugins/monitoring/public/components/action_menu/index.tsx b/x-pack/plugins/monitoring/public/components/action_menu/index.tsx deleted file mode 100644 index c1de80ccaf242..0000000000000 --- a/x-pack/plugins/monitoring/public/components/action_menu/index.tsx +++ /dev/null @@ -1,35 +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, { useContext, useEffect } from 'react'; -import { - KibanaContextProvider, - toMountPoint, - useKibana, -} from '../../../../../../src/plugins/kibana_react/public'; -import { HeaderActionMenuContext } from '../../application/contexts/header_action_menu_context'; - -export const ActionMenu: React.FC<{}> = ({ children }) => { - const { services } = useKibana(); - const { setHeaderActionMenu } = useContext(HeaderActionMenuContext); - useEffect(() => { - if (setHeaderActionMenu) { - setHeaderActionMenu((element) => { - const mount = toMountPoint( - {children}, - { theme$: services.theme?.theme$ } - ); - return mount(element); - }); - return () => { - setHeaderActionMenu(undefined); - }; - } - }, [children, setHeaderActionMenu, services]); - - return null; -}; diff --git a/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx b/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx index ca0a8122772f3..6d79266fe3cc6 100644 --- a/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx +++ b/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx @@ -5,12 +5,12 @@ * 2.0. */ +import { fromKueryExpression } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; - import React, { useEffect, useState } from 'react'; -import { WithKueryAutocompletion } from './with_kuery_autocompletion'; +import { IIndexPattern, QuerySuggestion } from '../../../../../../src/plugins/data/public'; import { AutocompleteField } from './autocomplete_field'; -import { esKuery, IIndexPattern, QuerySuggestion } from '../../../../../../src/plugins/data/public'; +import { WithKueryAutocompletion } from './with_kuery_autocompletion'; type LoadSuggestionsFn = ( e: string, @@ -31,7 +31,7 @@ interface Props { function validateQuery(query: string) { try { - esKuery.fromKueryExpression(query); + fromKueryExpression(query); } catch (err) { return false; } diff --git a/x-pack/plugins/monitoring/public/lib/kuery.ts b/x-pack/plugins/monitoring/public/lib/kuery.ts index 19706d7664c22..67f58360bc27a 100644 --- a/x-pack/plugins/monitoring/public/lib/kuery.ts +++ b/x-pack/plugins/monitoring/public/lib/kuery.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { esKuery, IIndexPattern } from '../../../../../src/plugins/data/public'; +import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; +import { IIndexPattern } from '../../../../../src/plugins/data/public'; export const convertKueryToElasticSearchQuery = ( kueryExpression: string, @@ -13,9 +14,7 @@ export const convertKueryToElasticSearchQuery = ( ) => { try { return kueryExpression - ? JSON.stringify( - esKuery.toElasticsearchQuery(esKuery.fromKueryExpression(kueryExpression), indexPattern) - ) + ? JSON.stringify(toElasticsearchQuery(fromKueryExpression(kueryExpression), indexPattern)) : ''; } catch (err) { return ''; diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts new file mode 100644 index 0000000000000..da94cc5f975d9 --- /dev/null +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts @@ -0,0 +1,115 @@ +/* + * 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. + */ + +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { elasticsearchClientMock } from '../../../../../../src/core/server/elasticsearch/client/mocks'; +import { fetchCCRReadExceptions } from './fetch_ccr_read_exceptions'; + +jest.mock('../../static_globals', () => ({ + Globals: { + app: { + config: { + ui: { + ccs: { enabled: true }, + }, + }, + }, + }, +})); +import { Globals } from '../../static_globals'; + +describe('fetchCCReadExceptions', () => { + const esRes = { + aggregations: { + remote_clusters: { + buckets: [], + }, + }, + }; + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.search.mockReturnValue( + // @ts-expect-error not full response interface + elasticsearchClientMock.createSuccessTransportRequestPromise(esRes) + ); + it('should call ES with correct query', async () => { + await fetchCCRReadExceptions(esClient, 1643306331418, 1643309869056, 10000); + expect(esClient.search).toHaveBeenCalledWith({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.ccr-*,metrics-elasticsearch.ccr-*', + filter_path: ['aggregations.remote_clusters.buckets'], + body: { + size: 0, + query: { + bool: { + filter: [ + { + nested: { + path: 'ccr_stats.read_exceptions', + query: { exists: { field: 'ccr_stats.read_exceptions.exception' } }, + }, + }, + { + bool: { + should: [ + { term: { type: 'ccr_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.ccr' } }, + ], + minimum_should_match: 1, + }, + }, + { + range: { + timestamp: { format: 'epoch_millis', gte: 1643306331418, lte: 1643309869056 }, + }, + }, + ], + }, + }, + aggs: { + remote_clusters: { + terms: { field: 'ccr_stats.remote_cluster', size: 10000 }, + aggs: { + follower_indices: { + terms: { field: 'ccr_stats.follower_index', size: 10000 }, + aggs: { + hits: { + top_hits: { + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + _source: { + includes: [ + 'cluster_uuid', + 'ccr_stats.read_exceptions', + 'ccr_stats.shard_id', + 'ccr_stats.leader_index', + ], + }, + size: 1, + }, + }, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise(esRes as any); + }); + + await fetchCCRReadExceptions(esClient, 1643306331418, 1643309869056, 10000); + + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.ccr-*'); + }); +}); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts index ea87608a14ef0..46299ff994f6b 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts @@ -9,7 +9,6 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { elasticsearchClientMock } from '../../../../../../src/core/server/elasticsearch/client/mocks'; import { fetchClusterHealth } from './fetch_cluster_health'; - jest.mock('../../static_globals', () => ({ Globals: { app: { @@ -21,12 +20,14 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; describe('fetchClusterHealth', () => { it('should return the cluster health', async () => { - const status = 'green'; - const clusterUuid = 'sdfdsaj34434'; const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const clusterUuid = 'sdfdsaj34434'; + const clusters = [{ clusterUuid, clusterName: 'foo' }]; + const status = 'green'; esClient.search.mockReturnValue( elasticsearchClientMock.createSuccessTransportRequestPromise({ hits: { @@ -45,8 +46,6 @@ describe('fetchClusterHealth', () => { } as estypes.SearchResponse) ); - const clusters = [{ clusterUuid, clusterName: 'foo' }]; - const health = await fetchClusterHealth(esClient, clusters); expect(health).toEqual([ { @@ -56,4 +55,58 @@ describe('fetchClusterHealth', () => { }, ]); }); + it('should call ES with correct query', async () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + await fetchClusterHealth(esClient, [ + { clusterUuid: '1', clusterName: 'foo1' }, + { clusterUuid: '2', clusterName: 'foo2' }, + ]); + expect(esClient.search).toHaveBeenCalledWith({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.cluster_stats-*,metrics-elasticsearch.cluster_stats-*', + filter_path: [ + 'hits.hits._source.cluster_state.status', + 'hits.hits._source.cluster_uuid', + 'hits.hits._index', + ], + body: { + size: 2, + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['1', '2'] } }, + { + bool: { + should: [ + { term: { type: 'cluster_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.cluster_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-2m' } } }, + ], + }, + }, + collapse: { field: 'cluster_uuid' }, + }, + }); + }); + + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + + await fetchClusterHealth(esClient, [{ clusterUuid: '1', clusterName: 'foo1' }]); + + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.cluster_stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.test.ts index fa4fa0269fb1b..5c4f44df4ac7c 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.test.ts @@ -22,6 +22,7 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; describe('fetchClusters', () => { const clusterUuid = '1sdfds734'; @@ -81,4 +82,51 @@ describe('fetchClusters', () => { const params = esClient.search.mock.calls[0][0] as any; expect(params?.body?.query.bool.filter[1].range.timestamp.gte).toBe('now-2m'); }); + + it('should call ES with correct query', async () => { + const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; + await fetchClusters(esClient); + expect(esClient.search).toHaveBeenCalledWith({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.cluster_stats-*,metrics-elasticsearch.cluster_stats-*', + filter_path: [ + 'hits.hits._source.cluster_settings.cluster.metadata.display_name', + 'hits.hits._source.cluster_uuid', + 'hits.hits._source.cluster_name', + ], + body: { + size: 1000, + query: { + bool: { + filter: [ + { + bool: { + should: [ + { term: { type: 'cluster_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.cluster_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-2m' } } }, + ], + }, + }, + collapse: { field: 'cluster_uuid' }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + await fetchClusters(esClient); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.cluster_stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts index 76bd81c24145f..159fe205df291 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts @@ -27,6 +27,7 @@ export async function fetchClusters( const indexPatterns = getNewIndexPatterns({ config: Globals.app.config, moduleType: 'elasticsearch', + dataset: 'cluster_stats', ccs: getConfigCcs(Globals.app.config) ? '*' : undefined, }); const params = { diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.test.ts index d4bbbe71e9c41..5c7e57818f713 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.test.ts @@ -21,6 +21,7 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; describe('fetchDiskUsageNodeStats', () => { const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; @@ -34,44 +35,45 @@ describe('fetchDiskUsageNodeStats', () => { const duration = '5m'; const size = 10; - it('fetch normal stats', async () => { - esClient.search.mockReturnValue( - // @ts-expect-error not full response interface - elasticsearchClientMock.createSuccessTransportRequestPromise({ - aggregations: { - clusters: { - buckets: [ - { - key: clusters[0].clusterUuid, - nodes: { - buckets: [ - { - key: 'theNodeId', - index: { - buckets: [ - { - key: '.monitoring-es-*', - }, - ], + const esRes = { + aggregations: { + clusters: { + buckets: [ + { + key: clusters[0].clusterUuid, + nodes: { + buckets: [ + { + key: 'theNodeId', + index: { + buckets: [ + { + key: '.monitoring-es-*', }, - name: { - buckets: [ - { - key: 'theNodeName', - }, - ], + ], + }, + name: { + buckets: [ + { + key: 'theNodeName', }, - usage_ratio_percentile: { - value: 10, - }, - }, - ], + ], + }, + usage_ratio_percentile: { + value: 10, + }, }, - }, - ], + ], + }, }, - }, - }) + ], + }, + }, + }; + it('fetch normal stats', async () => { + esClient.search.mockReturnValue( + // @ts-expect-error not full response interface + elasticsearchClientMock.createSuccessTransportRequestPromise(esRes) ); const result = await fetchDiskUsageNodeStats(esClient, clusters, duration, size); @@ -85,4 +87,70 @@ describe('fetchDiskUsageNodeStats', () => { }, ]); }); + it('should call ES with correct query', async () => { + await fetchDiskUsageNodeStats(esClient, clusters, duration, size); + expect(esClient.search).toHaveBeenCalledWith({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.node_stats-*,metrics-elasticsearch.node_stats-*', + filter_path: ['aggregations'], + body: { + size: 0, + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['cluster123'] } }, + { + bool: { + should: [ + { term: { type: 'node_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.node_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-5m' } } }, + ], + }, + }, + aggs: { + clusters: { + terms: { field: 'cluster_uuid', size: 10, include: ['cluster123'] }, + aggs: { + nodes: { + terms: { field: 'node_stats.node_id', size: 10 }, + aggs: { + index: { terms: { field: '_index', size: 1 } }, + total_in_bytes: { max: { field: 'node_stats.fs.total.total_in_bytes' } }, + available_in_bytes: { max: { field: 'node_stats.fs.total.available_in_bytes' } }, + usage_ratio_percentile: { + bucket_script: { + buckets_path: { + available_in_bytes: 'available_in_bytes', + total_in_bytes: 'total_in_bytes', + }, + script: + '100 - Math.floor((params.available_in_bytes / params.total_in_bytes) * 100)', + }, + }, + name: { terms: { field: 'source_node.name', size: 1 } }, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise(esRes as any); + }); + await fetchDiskUsageNodeStats(esClient, clusters, duration, size); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.node_stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.test.ts index c8505a82614db..ca57ddd007cab 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.test.ts @@ -22,6 +22,7 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; describe('fetchElasticsearchVersions', () => { const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; @@ -66,4 +67,52 @@ describe('fetchElasticsearchVersions', () => { }, ]); }); + it('should call ES with correct query', async () => { + await fetchElasticsearchVersions(esClient, clusters, size); + expect(esClient.search).toHaveBeenCalledWith({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.cluster_stats-*,metrics-elasticsearch.cluster_stats-*', + filter_path: [ + 'hits.hits._source.cluster_stats.nodes.versions', + 'hits.hits._index', + 'hits.hits._source.cluster_uuid', + ], + body: { + size: 1, + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['cluster123'] } }, + { + bool: { + should: [ + { term: { type: 'cluster_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.cluster_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-2m' } } }, + ], + }, + }, + collapse: { field: 'cluster_uuid' }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise( + {} as estypes.SearchResponse + ); + }); + await fetchElasticsearchVersions(esClient, clusters, size); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.cluster_stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_index_shard_size.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_index_shard_size.test.ts new file mode 100644 index 0000000000000..65b8be811fff3 --- /dev/null +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_index_shard_size.test.ts @@ -0,0 +1,215 @@ +/* + * 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. + */ + +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { elasticsearchClientMock } from '../../../../../../src/core/server/elasticsearch/client/mocks'; +import { elasticsearchServiceMock } from 'src/core/server/mocks'; +import { fetchIndexShardSize } from './fetch_index_shard_size'; + +jest.mock('../../static_globals', () => ({ + Globals: { + app: { + getKeyStoreValue: () => '*', + config: { + ui: { + ccs: { enabled: true }, + }, + }, + }, + }, +})); +import { Globals } from '../../static_globals'; + +describe('fetchIndexShardSize', () => { + const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; + + const clusters = [ + { + clusterUuid: 'cluster123', + clusterName: 'test-cluster', + }, + ]; + const size = 10; + const shardIndexPatterns = '*'; + const threshold = 0.00000001; + const esRes = { + aggregations: { + clusters: { + buckets: [ + { + key: 'NG2d5jHiSBGPE6HLlUN2Bg', + doc_count: 60, + index: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: '.monitoring-es-7-2022.01.27', + doc_count: 30, + hits: { + hits: { + total: { + value: 30, + relation: 'eq', + }, + max_score: null, + hits: [ + { + _index: '.monitoring-es-7-2022.01.27', + _id: 'JVkunX4BfK-FILsH9Wr_', + _score: null, + _source: { + index_stats: { + shards: { + primaries: 1, + }, + primaries: { + store: { + size_in_bytes: 3537949, + }, + }, + }, + }, + sort: [1643314607570], + }, + ], + }, + }, + }, + { + key: '.monitoring-kibana-7-2022.01.27', + doc_count: 30, + hits: { + hits: { + total: { + value: 30, + relation: 'eq', + }, + max_score: null, + hits: [ + { + _index: '.monitoring-es-7-2022.01.27', + _id: 'JFkunX4BfK-FILsH9Wr_', + _score: null, + _source: { + index_stats: { + shards: { + primaries: 1, + }, + primaries: { + store: { + size_in_bytes: 1017426, + }, + }, + }, + }, + sort: [1643314607570], + }, + ], + }, + }, + }, + ], + }, + }, + ], + }, + }, + }; + it('fetch as expected', async () => { + esClient.search.mockReturnValue( + // @ts-expect-error not full response interface + elasticsearchClientMock.createSuccessTransportRequestPromise(esRes) + ); + + const result = await fetchIndexShardSize( + esClient, + clusters, + threshold, + shardIndexPatterns, + size + ); + expect(result).toEqual([ + { + ccs: undefined, + shardIndex: '.monitoring-es-7-2022.01.27', + shardSize: 0, + clusterUuid: 'NG2d5jHiSBGPE6HLlUN2Bg', + }, + { + ccs: undefined, + shardIndex: '.monitoring-kibana-7-2022.01.27', + shardSize: 0, + clusterUuid: 'NG2d5jHiSBGPE6HLlUN2Bg', + }, + ]); + }); + it('should call ES with correct query', async () => { + await fetchIndexShardSize(esClient, clusters, threshold, shardIndexPatterns, size); + expect(esClient.search).toHaveBeenCalledWith({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.index-*,metrics-elasticsearch.index-*', + filter_path: ['aggregations.clusters.buckets'], + body: { + size: 0, + query: { + bool: { + filter: [ + { + bool: { + should: [ + { term: { type: 'index_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.index' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-5m' } } }, + ], + }, + }, + aggs: { + clusters: { + terms: { include: ['cluster123'], field: 'cluster_uuid', size: 10 }, + aggs: { + index: { + terms: { field: 'index_stats.index', size: 10 }, + aggs: { + hits: { + top_hits: { + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + _source: { + includes: [ + '_index', + 'index_stats.shards.primaries', + 'index_stats.primaries.store.size_in_bytes', + ], + }, + size: 1, + }, + }, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise(esRes as any); + }); + await fetchIndexShardSize(esClient, clusters, threshold, shardIndexPatterns, size); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.index-*'); + }); +}); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.test.ts index 6bdecaf6f83ed..2e12f0741715b 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.test.ts @@ -21,6 +21,7 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; describe('fetchKibanaVersions', () => { const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; @@ -87,4 +88,65 @@ describe('fetchKibanaVersions', () => { }, ]); }); + it('should call ES with correct query', async () => { + await fetchKibanaVersions(esClient, clusters, size); + expect(esClient.search).toHaveBeenCalledWith({ + index: + '*:.monitoring-kibana-*,.monitoring-kibana-*,*:metrics-kibana.stats-*,metrics-kibana.stats-*', + filter_path: ['aggregations'], + body: { + size: 0, + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['cluster123'] } }, + { + bool: { + should: [ + { term: { type: 'kibana_stats' } }, + { term: { 'data_stream.dataset': 'kibana.stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-2m' } } }, + ], + }, + }, + aggs: { + index: { terms: { field: '_index', size: 1 } }, + cluster: { + terms: { field: 'cluster_uuid', size: 1 }, + aggs: { + group_by_kibana: { + terms: { field: 'kibana_stats.kibana.uuid', size: 10 }, + aggs: { + group_by_version: { + terms: { + field: 'kibana_stats.kibana.version', + size: 1, + order: { latest_report: 'desc' }, + }, + aggs: { latest_report: { max: { field: 'timestamp' } } }, + }, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + await fetchKibanaVersions(esClient, clusters, size); + // @ts-ignore + expect(params.index).toBe('.monitoring-kibana-*,metrics-kibana.stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.test.ts index fbfe6ba58d540..190b5956925b1 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.test.ts @@ -8,7 +8,6 @@ import { fetchLicenses } from './fetch_licenses'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { elasticsearchClientMock } from '../../../../../../src/core/server/elasticsearch/client/mocks'; import { elasticsearchServiceMock } from 'src/core/server/mocks'; -import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; jest.mock('../../static_globals', () => ({ Globals: { @@ -21,6 +20,7 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; describe('fetchLicenses', () => { const clusterName = 'MyCluster'; @@ -45,11 +45,10 @@ describe('fetchLicenses', () => { }, ], }, - } as estypes.SearchResponse) + } as any) ); const clusters = [{ clusterUuid, clusterName }]; - const index = '.monitoring-es-*'; - const result = await fetchLicenses(esClient, clusters, index); + const result = await fetchLicenses(esClient, clusters); expect(result).toEqual([ { status: license.status, @@ -63,8 +62,7 @@ describe('fetchLicenses', () => { it('should only search for the clusters provided', async () => { const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; const clusters = [{ clusterUuid, clusterName }]; - const index = '.monitoring-es-*'; - await fetchLicenses(esClient, clusters, index); + await fetchLicenses(esClient, clusters); const params = esClient.search.mock.calls[0][0] as any; expect(params?.body?.query.bool.filter[0].terms.cluster_uuid).toEqual([clusterUuid]); }); @@ -72,9 +70,63 @@ describe('fetchLicenses', () => { it('should limit the time period in the query', async () => { const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; const clusters = [{ clusterUuid, clusterName }]; - const index = '.monitoring-es-*'; - await fetchLicenses(esClient, clusters, index); + await fetchLicenses(esClient, clusters); const params = esClient.search.mock.calls[0][0] as any; expect(params?.body?.query.bool.filter[2].range.timestamp.gte).toBe('now-2m'); }); + it('should call ES with correct query', async () => { + const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + const clusters = [{ clusterUuid, clusterName }]; + await fetchLicenses(esClient, clusters); + expect(params).toStrictEqual({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.cluster_stats-*,metrics-elasticsearch.cluster_stats-*', + filter_path: [ + 'hits.hits._source.license.*', + 'hits.hits._source.cluster_uuid', + 'hits.hits._index', + ], + body: { + size: 1, + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['clusterA'] } }, + { + bool: { + should: [ + { term: { type: 'cluster_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.cluster_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-2m' } } }, + ], + }, + }, + collapse: { field: 'cluster_uuid' }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + const clusters = [{ clusterUuid, clusterName }]; + await fetchLicenses(esClient, clusters); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.cluster_stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.test.ts index a1df1a56ad3b5..754c5d3500dc1 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.test.ts @@ -21,6 +21,7 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; describe('fetchLogstashVersions', () => { const esClient = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; @@ -87,4 +88,70 @@ describe('fetchLogstashVersions', () => { }, ]); }); + it('should call ES with correct query', async () => { + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + await fetchLogstashVersions(esClient, clusters, size); + expect(params).toStrictEqual({ + index: + '*:.monitoring-logstash-*,.monitoring-logstash-*,*:metrics-logstash.node_stats-*,metrics-logstash.node_stats-*', + filter_path: ['aggregations'], + body: { + size: 0, + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['cluster123'] } }, + { + bool: { + should: [ + { term: { type: 'logstash_stats' } }, + { term: { 'data_stream.dataset': 'logstash.node_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-2m' } } }, + ], + }, + }, + aggs: { + index: { terms: { field: '_index', size: 1 } }, + cluster: { + terms: { field: 'cluster_uuid', size: 1 }, + aggs: { + group_by_logstash: { + terms: { field: 'logstash_stats.logstash.uuid', size: 10 }, + aggs: { + group_by_version: { + terms: { + field: 'logstash_stats.logstash.version', + size: 1, + order: { latest_report: 'desc' }, + }, + aggs: { latest_report: { max: { field: 'timestamp' } } }, + }, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + await fetchLogstashVersions(esClient, clusters, size); + // @ts-ignore + expect(params.index).toBe('.monitoring-logstash-*,metrics-logstash.node_stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts new file mode 100644 index 0000000000000..c2cecd4f21fa5 --- /dev/null +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts @@ -0,0 +1,173 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { elasticsearchClientMock } from '../../../../../../src/core/server/elasticsearch/client/mocks'; +import { fetchMemoryUsageNodeStats } from './fetch_memory_usage_node_stats'; + +jest.mock('../../static_globals', () => ({ + Globals: { + app: { + config: { + ui: { + ccs: { enabled: true }, + }, + }, + }, + }, +})); +import { Globals } from '../../static_globals'; + +describe('fetchMemoryUsageNodeStats', () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const clusters = [ + { + clusterUuid: 'abc123', + clusterName: 'test', + }, + ]; + const startMs = 0; + const endMs = 0; + const size = 10; + + const esRes = { + aggregations: { + clusters: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'NG2d5jHiSBGPE6HLlUN2Bg', + doc_count: 30, + nodes: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'qrLmmSBMSXGSfciYLjL3GA', + doc_count: 30, + cluster_uuid: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'NG2d5jHiSBGPE6HLlUN2Bg', + doc_count: 30, + }, + ], + }, + avg_heap: { + value: 46.3, + }, + name: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'desktop-dca-192-168-162-170.endgames.local', + doc_count: 30, + }, + ], + }, + index: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: '.monitoring-es-7-2022.01.27', + doc_count: 30, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + }; + + it('fetch stats', async () => { + esClient.search.mockReturnValue( + // @ts-expect-error not full response interface + elasticsearchClientMock.createSuccessTransportRequestPromise(esRes) + ); + const result = await fetchMemoryUsageNodeStats(esClient, clusters, startMs, endMs, size); + expect(result).toEqual([ + { + memoryUsage: 46, + clusterUuid: 'NG2d5jHiSBGPE6HLlUN2Bg', + nodeId: 'qrLmmSBMSXGSfciYLjL3GA', + nodeName: 'desktop-dca-192-168-162-170.endgames.local', + ccs: null, + }, + ]); + }); + + it('should call ES with correct query', async () => { + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise(esRes as any); + }); + await fetchMemoryUsageNodeStats(esClient, clusters, startMs, endMs, size); + expect(params).toStrictEqual({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.node_stats-*,metrics-elasticsearch.node_stats-*', + filter_path: ['aggregations'], + body: { + size: 0, + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['abc123'] } }, + { + bool: { + should: [ + { term: { type: 'node_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.node_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { format: 'epoch_millis', gte: 0, lte: 0 } } }, + ], + }, + }, + aggs: { + clusters: { + terms: { field: 'cluster_uuid', size: 10 }, + aggs: { + nodes: { + terms: { field: 'source_node.uuid', size: 10 }, + aggs: { + index: { terms: { field: '_index', size: 1 } }, + avg_heap: { avg: { field: 'node_stats.jvm.mem.heap_used_percent' } }, + cluster_uuid: { terms: { field: 'cluster_uuid', size: 1 } }, + name: { terms: { field: 'source_node.name', size: 1 } }, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise(esRes as any); + }); + await fetchMemoryUsageNodeStats(esClient, clusters, startMs, endMs, size); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.node_stats-*'); + }); +}); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts index a51cced18fd7b..e47c48d28d19d 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts @@ -20,6 +20,7 @@ jest.mock('../../static_globals', () => ({ }, }, })); +import { Globals } from '../../static_globals'; function getResponse( index: string, @@ -159,4 +160,84 @@ describe('fetchMissingMonitoringData', () => { }, ]); }); + + it('should call ES with correct query', async () => { + const now = 10; + const clusters = [ + { + clusterUuid: 'clusterUuid1', + clusterName: 'clusterName1', + }, + ]; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + await fetchMissingMonitoringData(esClient, clusters, size, now, startMs); + expect(params).toStrictEqual({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.node_stats-*,metrics-elasticsearch.node_stats-*', + filter_path: ['aggregations.clusters.buckets'], + body: { + size: 0, + query: { + bool: { + filter: [ + { terms: { cluster_uuid: ['clusterUuid1'] } }, + { + bool: { + should: [ + { term: { type: 'node_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.node_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { format: 'epoch_millis', gte: 100, lte: 10 } } }, + ], + }, + }, + aggs: { + clusters: { + terms: { field: 'cluster_uuid', size: 10 }, + aggs: { + es_uuids: { + terms: { field: 'node_stats.node_id', size: 10 }, + aggs: { + most_recent: { max: { field: 'timestamp' } }, + document: { + top_hits: { + size: 1, + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + _source: { includes: ['_index', 'source_node.name'] }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + const now = 10; + const clusters = [ + { + clusterUuid: 'clusterUuid1', + clusterName: 'clusterName1', + }, + ]; + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise({} as any); + }); + await fetchMissingMonitoringData(esClient, clusters, size, now, startMs); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.node_stats-*'); + }); }); diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.ts index 93ad44a5fd44b..9119792dbd988 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.ts @@ -11,6 +11,7 @@ import { AlertCluster, AlertMissingData } from '../../../common/types/alerts'; import { Globals } from '../../static_globals'; import { getConfigCcs } from '../../../common/ccs_utils'; import { getNewIndexPatterns } from '../cluster/get_index_patterns'; +import { createDatasetFilter } from './create_dataset_query_filter'; interface ClusterBucketESResponse { key: string; @@ -73,6 +74,7 @@ export async function fetchMissingMonitoringData( cluster_uuid: clusters.map((cluster) => cluster.clusterUuid), }, }, + createDatasetFilter('node_stats', 'elasticsearch.node_stats'), { range: { timestamp: { diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts new file mode 100644 index 0000000000000..285baa75375ec --- /dev/null +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts @@ -0,0 +1,213 @@ +/* + * 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. + */ + +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { elasticsearchClientMock } from '../../../../../../src/core/server/elasticsearch/client/mocks'; +import { fetchNodesFromClusterStats } from './fetch_nodes_from_cluster_stats'; + +jest.mock('../../static_globals', () => ({ + Globals: { + app: { + config: { + ui: { + ccs: { enabled: true }, + }, + }, + }, + }, +})); +import { Globals } from '../../static_globals'; + +describe('fetchNodesFromClusterStats', () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const clusters = [ + { + clusterUuid: 'NG2d5jHiSBGPE6HLlUN2Bg', + clusterName: 'elasticsearch', + }, + ]; + + const esRes = { + aggregations: { + clusters: { + buckets: [ + { + key: 'NG2d5jHiSBGPE6HLlUN2Bg', + doc_count: 12, + top: { + hits: { + total: { value: 12, relation: 'eq' }, + max_score: null, + hits: [ + { + _index: '.monitoring-es-7-2022.01.27', + _id: 'IlmvnX4BfK-FILsH34eS', + _score: null, + _source: { + cluster_state: { + nodes_hash: 858284333, + nodes: { + qrLmmSBMSXGSfciYLjL3GA: { + transport_address: '127.0.0.1:9300', + roles: [ + 'data', + 'data_cold', + 'data_content', + 'data_frozen', + 'data_hot', + 'data_warm', + 'ingest', + 'master', + 'ml', + 'remote_cluster_client', + 'transform', + ], + name: 'desktop-dca-192-168-162-170.endgames.local', + attributes: { + 'ml.machine_memory': '34359738368', + 'xpack.installed': 'true', + 'ml.max_jvm_size': '1610612736', + }, + ephemeral_id: 'cCXPWB3nSoKkl_m_q2nPFQ', + }, + }, + }, + }, + sort: [1643323056014], + }, + { + _index: '.monitoring-es-7-2022.01.27', + _id: 'GVmvnX4BfK-FILsHuIeF', + _score: null, + _source: { + cluster_state: { + nodes_hash: 858284333, + nodes: { + qrLmmSBMSXGSfciYLjL3GA: { + transport_address: '127.0.0.1:9300', + roles: [ + 'data', + 'data_cold', + 'data_content', + 'data_frozen', + 'data_hot', + 'data_warm', + 'ingest', + 'master', + 'ml', + 'remote_cluster_client', + 'transform', + ], + name: 'desktop-dca-192-168-162-170.endgames.local', + attributes: { + 'ml.machine_memory': '34359738368', + 'xpack.installed': 'true', + 'ml.max_jvm_size': '1610612736', + }, + ephemeral_id: 'cCXPWB3nSoKkl_m_q2nPFQ', + }, + }, + }, + }, + sort: [1643323046019], + }, + ], + }, + }, + }, + ], + }, + }, + }; + + it('fetch stats', async () => { + esClient.search.mockReturnValue( + // @ts-expect-error not full response interface + elasticsearchClientMock.createSuccessTransportRequestPromise(esRes) + ); + const result = await fetchNodesFromClusterStats(esClient, clusters); + expect(result).toEqual([ + { + clusterUuid: 'NG2d5jHiSBGPE6HLlUN2Bg', + recentNodes: [ + { + nodeUuid: 'qrLmmSBMSXGSfciYLjL3GA', + nodeEphemeralId: 'cCXPWB3nSoKkl_m_q2nPFQ', + nodeName: 'desktop-dca-192-168-162-170.endgames.local', + }, + ], + priorNodes: [ + { + nodeUuid: 'qrLmmSBMSXGSfciYLjL3GA', + nodeEphemeralId: 'cCXPWB3nSoKkl_m_q2nPFQ', + nodeName: 'desktop-dca-192-168-162-170.endgames.local', + }, + ], + }, + ]); + }); + + it('should call ES with correct query', async () => { + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise(esRes as any); + }); + await fetchNodesFromClusterStats(esClient, clusters); + expect(params).toStrictEqual({ + index: + '*:.monitoring-es-*,.monitoring-es-*,*:metrics-elasticsearch.cluster_stats-*,metrics-elasticsearch.cluster_stats-*', + filter_path: ['aggregations.clusters.buckets'], + body: { + size: 0, + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + query: { + bool: { + filter: [ + { + bool: { + should: [ + { term: { type: 'cluster_stats' } }, + { term: { 'data_stream.dataset': 'elasticsearch.cluster_stats' } }, + ], + minimum_should_match: 1, + }, + }, + { range: { timestamp: { gte: 'now-2m' } } }, + ], + }, + }, + aggs: { + clusters: { + terms: { include: ['NG2d5jHiSBGPE6HLlUN2Bg'], field: 'cluster_uuid' }, + aggs: { + top: { + top_hits: { + sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }], + _source: { includes: ['cluster_state.nodes_hash', 'cluster_state.nodes'] }, + size: 2, + }, + }, + }, + }, + }, + }, + }); + }); + it('should call ES with correct query when ccs disabled', async () => { + // @ts-ignore + Globals.app.config.ui.ccs.enabled = false; + let params = null; + esClient.search.mockImplementation((...args) => { + params = args[0]; + return elasticsearchClientMock.createSuccessTransportRequestPromise(esRes as any); + }); + await fetchNodesFromClusterStats(esClient, clusters); + // @ts-ignore + expect(params.index).toBe('.monitoring-es-*,metrics-elasticsearch.cluster_stats-*'); + }); +}); diff --git a/x-pack/plugins/monitoring/server/lib/details/get_series.ts b/x-pack/plugins/monitoring/server/lib/details/get_series.ts index 3a053b16aad7c..58e1aac0884b6 100644 --- a/x-pack/plugins/monitoring/server/lib/details/get_series.ts +++ b/x-pack/plugins/monitoring/server/lib/details/get_series.ts @@ -22,28 +22,10 @@ import { import { formatUTCTimestampForTimezone } from '../format_timezone'; import { getNewIndexPatterns } from '../cluster/get_index_patterns'; import { Globals } from '../../static_globals'; +import type { Metric } from '../metrics/metrics'; type SeriesBucket = Bucket & { metric_mb_deriv?: { normalized_value: number } }; -interface Metric { - app: string; - derivative: boolean; - mbField?: string; - aggs: any; - getDateHistogramSubAggs?: Function; - dateHistogramSubAggs?: any; - metricAgg: string; - field: string; - timestampField: string; - calculation: ( - b: SeriesBucket, - key: string, - metric: Metric, - defaultSizeInSeconds: number - ) => number | null; - serialize: () => string; -} - /** * Derivative metrics for the first two agg buckets are unusable. For the first bucket, there * simply is no derivative metric (as calculating a derivative requires two adjacent buckets). For @@ -72,7 +54,12 @@ function getUuid(req: LegacyRequest, metric: Metric) { } } -function defaultCalculation(bucket: SeriesBucket, key: string) { +function defaultCalculation( + bucket: SeriesBucket, + key: string, + metric?: Metric, + defaultSizeInSeconds?: number +) { const legacyValue: number = get(bucket, key, null); const mbValue = bucket.metric_mb_deriv?.normalized_value ?? null; let value; @@ -142,7 +129,7 @@ async function fetchSeries( } else { dateHistogramSubAggs = { metric: { - [metric.metricAgg]: { + [metric.metricAgg!]: { field: metric.field, }, }, @@ -150,7 +137,7 @@ async function fetchSeries( }; if (metric.mbField) { Reflect.set(dateHistogramSubAggs, 'metric_mb', { - [metric.metricAgg]: { + [metric.metricAgg!]: { field: metric.mbField, }, }); diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.ts b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.ts index ea2940ee1589c..4ed6e8970edad 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.ts +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.ts @@ -33,7 +33,7 @@ export function getMetricAggs(listingMetrics: string[]) { // if metric does not have custom agg defined metricAgg = { metric: { - [metric.metricAgg]: { + [metric.metricAgg!]: { // max, sum, etc field: metric.field, }, @@ -49,7 +49,7 @@ export function getMetricAggs(listingMetrics: string[]) { aggItems = { ...aggItems, - ...convertMetricNames(metricName, metric.aggs || metricAgg), + ...convertMetricNames(metricName, metric.aggs ? metric.aggs : metricAgg!), }; }); diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/map_nodes_metrics.ts b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/map_nodes_metrics.ts index 099b32dc1e65d..8313689b38fec 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/map_nodes_metrics.ts +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/map_nodes_metrics.ts @@ -8,6 +8,7 @@ import { get, map, min, max, last } from 'lodash'; import { filterPartialBuckets } from '../../../filter_partial_buckets'; import { metrics } from '../../../metrics'; +import { Metric } from '../../../metrics/metrics'; import { Bucket } from '../../../../types'; type MetricBucket = Bucket & { metric_deriv?: { value: number; normalized_value: number } }; @@ -35,10 +36,7 @@ function calcSlope(data: Array<{ x: number; y: number }>) { return null; // convert possible NaN to `null` for JSON-friendliness } -const mapBuckets = ( - bucket: MetricBucket, - metric: { derivative: boolean; calculation: (b: Bucket) => number | null } -) => { +const mapBuckets = (bucket: MetricBucket, metric: Metric) => { const x = bucket.key; if (metric.calculation) { diff --git a/x-pack/plugins/monitoring/server/lib/logstash/get_nodes.test.ts b/x-pack/plugins/monitoring/server/lib/logstash/get_nodes.test.ts new file mode 100644 index 0000000000000..24e3a84921464 --- /dev/null +++ b/x-pack/plugins/monitoring/server/lib/logstash/get_nodes.test.ts @@ -0,0 +1,72 @@ +/* + * 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 { getNodes } from './get_nodes'; +import { STANDALONE_CLUSTER_CLUSTER_UUID } from '../../../common/constants'; +import { LegacyRequest } from '../../types'; + +jest.mock('../../static_globals', () => ({ + Globals: { + app: { + config: { + ui: { + ccs: { enabled: true }, + }, + }, + }, + }, +})); + +describe('getNodes', () => { + it('ensures collapse key is present query responses', async () => { + const configs: { [key: string]: number } = { 'monitoring.ui.max_bucket_size': 10000 }; + const config = { + get: jest.fn().mockImplementation((key: string) => configs[key]), + }; + + const response = {}; + const callWithRequest = jest.fn().mockResolvedValue(response); + + const req = { + server: { + config() { + return config; + }, + plugins: { + elasticsearch: { + getCluster: () => ({ + callWithRequest, + }), + }, + }, + }, + payload: { + // borrowed from detail_drawer.test.js + timeRange: { + min: 1516131138639, + max: 1516135440463, + }, + }, + } as unknown as LegacyRequest; + + await getNodes(req, { + clusterUuid: STANDALONE_CLUSTER_CLUSTER_UUID, + }); + + expect(callWithRequest.mock.calls.length).toBe(1); + expect(callWithRequest.mock.calls[0].length).toBe(3); + + const filters = callWithRequest.mock.calls[0][2].body.query.bool.filter; + expect(filters).toContainEqual( + expect.objectContaining({ + exists: { + field: 'logstash_stats.logstash.uuid', + }, + }) + ); + }); +}); diff --git a/x-pack/plugins/monitoring/server/lib/logstash/get_nodes.ts b/x-pack/plugins/monitoring/server/lib/logstash/get_nodes.ts index d7c490b1d2fd6..e5ee6ebda9150 100644 --- a/x-pack/plugins/monitoring/server/lib/logstash/get_nodes.ts +++ b/x-pack/plugins/monitoring/server/lib/logstash/get_nodes.ts @@ -81,6 +81,8 @@ export async function getNodes(req: LegacyRequest, { clusterUuid }: { clusterUui const start = moment.utc(req.payload.timeRange.min).valueOf(); const end = moment.utc(req.payload.timeRange.max).valueOf(); + const filters = [{ exists: { field: 'logstash_stats.logstash.uuid' } }]; + const params = { index: indexPatterns, size: config.get('monitoring.ui.max_bucket_size'), // FIXME @@ -90,6 +92,7 @@ export async function getNodes(req: LegacyRequest, { clusterUuid }: { clusterUui type, dsDataset: `${moduleType}.${dataset}`, metricset: dataset, + filters, start, end, clusterUuid, diff --git a/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap b/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap index edb76085e6834..50fff3734b1a5 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap +++ b/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap @@ -32,15 +32,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests received by agent configuration managemen", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.request.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Requests Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_count": ApmEventsRateClusterMetric { @@ -73,15 +82,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP requests responded to by APM Server", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Count Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_errors_count": ApmEventsRateClusterMetric { @@ -114,15 +132,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP errors count", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.errors.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Error Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Error Count Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_errors_forbidden": ApmEventsRateClusterMetric { @@ -155,15 +182,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Forbidden HTTP requests rejected count", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.errors.forbidden", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Errors Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_errors_invalidquery": ApmEventsRateClusterMetric { @@ -196,15 +232,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Invalid HTTP query", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.errors.invalidquery", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Invalid Query", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Invalid Query Errors Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_errors_method": ApmEventsRateClusterMetric { @@ -237,15 +282,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP requests rejected due to incorrect HTTP method", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.errors.method", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Method", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Method Errors Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_errors_unauthorized": ApmEventsRateClusterMetric { @@ -278,15 +332,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Unauthorized HTTP requests rejected count", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.errors.unauthorized", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Unauthorized", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Unauthorized Errors Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_errors_unavailable": ApmEventsRateClusterMetric { @@ -319,15 +382,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Unavailable HTTP response count. Possible misconfiguration or unsupported version of Kibana", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.errors.unavailable", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Unavailable", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Unavailable Errors Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_valid_notmodified": ApmEventsRateClusterMetric { @@ -360,15 +432,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "304 Not modified response count", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.valid.notmodified", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Not Modified", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Not Modified Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_acm_response_valid_ok": ApmEventsRateClusterMetric { @@ -401,15 +482,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "200 OK response count", + "docType": undefined, "field": "beats_stats.metrics.apm-server.acm.response.valid.ok", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "OK", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response OK Count Agent Configuration Management", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_cgroup_cpu": QuotaMetric { @@ -446,12 +536,16 @@ Object { }, "app": "apm", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": true, "description": "CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.", + "docType": undefined, "field": "beats_stats.metrics.beat.cpu.total.value", "fieldSource": "beats_stats.metrics.beat.cgroup", "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Cgroup CPU Utilization", + "mbField": undefined, "metricAgg": "max", "periodsField": "cpu.stats.periods", "quotaField": "cpu.cfs.quota.us", @@ -462,82 +556,141 @@ Object { "uuidField": "beats_stats.beat.uuid", }, "apm_cgroup_memory_limit": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Memory limit of the container", + "docType": undefined, "field": "beats_stats.metrics.beat.cgroup.memory.mem.limit.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Memory Limit", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_cgroup_memory_usage": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Memory usage of the container", + "docType": undefined, "field": "beats_stats.metrics.beat.cgroup.memory.mem.usage.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Memory Utilization (cgroup)", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_cpu_total": ApmCpuUtilizationMetric { + "aggs": undefined, "app": "apm", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Percentage of CPU time spent executing (user+kernel mode) for the APM process", + "docType": undefined, "field": "beats_stats.metrics.beat.cpu.total.value", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "CPU Utilization", "units": "%", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_mem_alloc": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Allocated memory", + "docType": undefined, "field": "beats_stats.metrics.beat.memstats.memory_alloc", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Allocated Memory", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_mem_gc_next": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Limit of allocated memory at which garbage collection will occur", + "docType": undefined, "field": "beats_stats.metrics.beat.memstats.gc_next", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "GC Next", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_mem_rss": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Resident set size of memory reserved by the APM service from the OS", + "docType": undefined, "field": "beats_stats.metrics.beat.memstats.rss", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Process Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_output_events_acked": ApmEventsRateClusterMetric { @@ -570,15 +723,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events processed by the output (including retries)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.acked", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Acked", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Acked Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_output_events_active": ApmEventsRateClusterMetric { @@ -611,15 +773,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events processed by the output (including retries)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.active", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Active", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Active Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_output_events_dropped": ApmEventsRateClusterMetric { @@ -652,15 +823,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events processed by the output (including retries)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.dropped", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Dropped", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Dropped Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_output_events_failed": ApmEventsRateClusterMetric { @@ -693,15 +873,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events processed by the output (including retries)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.failed", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Failed", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Failed Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_output_events_total": ApmEventsRateClusterMetric { @@ -734,15 +923,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events processed by the output (including retries)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_processor_error_transformations": ApmEventsRateClusterMetric { @@ -775,15 +973,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Error events processed", + "docType": undefined, "field": "beats_stats.metrics.apm-server.processor.error.transformations", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Error", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Transformations", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_processor_metric_transformations": ApmEventsRateClusterMetric { @@ -816,15 +1023,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Metric events processed", + "docType": undefined, "field": "beats_stats.metrics.apm-server.processor.metric.transformations", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Metric", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Transformations", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_processor_span_transformations": ApmEventsRateClusterMetric { @@ -857,15 +1073,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Span events processed", + "docType": undefined, "field": "beats_stats.metrics.apm-server.processor.span.transformations", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Span", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Transformations", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_processor_transaction_transformations": ApmEventsRateClusterMetric { @@ -898,15 +1123,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Transaction events processed", + "docType": undefined, "field": "beats_stats.metrics.apm-server.processor.transaction.transformations", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Transaction", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Processed Events", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_requests": ApmEventsRateClusterMetric { @@ -939,15 +1173,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests received by server", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.request.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Requested", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Request Count Intake API", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_count": ApmEventsRateClusterMetric { @@ -980,15 +1223,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests responded to by server", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Count Intake API", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_closed": ApmEventsRateClusterMetric { @@ -1021,15 +1273,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected during server shutdown", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.closed", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Closed", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Closed", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_concurrency": ApmEventsRateClusterMetric { @@ -1062,15 +1323,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected due to overall concurrency limit breach", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.concurrency", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Concurrency", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Concurrency", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_decode": ApmEventsRateClusterMetric { @@ -1103,15 +1373,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected to due decoding errors - invalid json, incorrect data type for entity", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.decode", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Decode", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Decode", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_forbidden": ApmEventsRateClusterMetric { @@ -1144,15 +1423,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Forbidden HTTP Requests rejected - CORS violation, disabled enpoint", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.forbidden", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Forbidden", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Forbidden", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_internal": ApmEventsRateClusterMetric { @@ -1185,15 +1473,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected due to a miscellaneous internal error", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.internal", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Internal", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Internal", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_method": ApmEventsRateClusterMetric { @@ -1226,15 +1523,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected due to incorrect HTTP method", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.method", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Method", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Method", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_queue": ApmEventsRateClusterMetric { @@ -1267,15 +1573,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected to due internal queue filling up", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.queue", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Queue", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Queue", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_ratelimit": ApmEventsRateClusterMetric { @@ -1308,15 +1623,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected to due excessive rate limit", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.ratelimit", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Rate limit", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Rate limit", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_toolarge": ApmEventsRateClusterMetric { @@ -1349,15 +1673,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected due to excessive payload size", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.toolarge", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Too large", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Response Errors Intake API", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_unauthorized": ApmEventsRateClusterMetric { @@ -1390,15 +1723,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected due to invalid secret token", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.unauthorized", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Unauthorized", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Unauthorized", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_errors_validate": ApmEventsRateClusterMetric { @@ -1431,15 +1773,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests rejected due to payload validation error", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.errors.validate", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Validate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Validate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_valid_accepted": ApmEventsRateClusterMetric { @@ -1472,15 +1823,24 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "HTTP Requests successfully reporting new events", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.valid.accepted", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Accepted", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Accepted", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_responses_valid_ok": ApmEventsRateClusterMetric { @@ -1513,79 +1873,138 @@ Object { }, }, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "200 OK response count", + "docType": undefined, "field": "beats_stats.metrics.apm-server.server.response.valid.ok", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Ok", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Ok", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "apm_system_os_load_1": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 1 minute", + "docType": undefined, "field": "beats_stats.metrics.system.load.1", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "1m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_system_os_load_15": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 15 minutes", + "docType": undefined, "field": "beats_stats.metrics.system.load.15", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "15m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "apm_system_os_load_5": ApmMetric { + "aggs": undefined, "app": "apm", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 5 minutes", + "docType": undefined, "field": "beats_stats.metrics.system.load.5", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "5m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "app_search_total_engines": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Current number of App Search engines within the Enterprise Search deployment.", + "docType": undefined, "field": "enterprisesearch.stats.product_usage.app_search.total_engines", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "App Search Engines", + "mbField": undefined, "metricAgg": "avg", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "beat_bytes_written": BeatsByteRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Bytes written to the output (consists of size of network headers and compressed payload)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.write.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Bytes Sent", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Throughput", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_cluster_output_events_ack_rate": BeatsEventsRateClusterMetric { @@ -1618,15 +2037,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events acknowledged by the output (includes events dropped by the output)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.acked", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Acknowledged", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_output_events_dropped_rate": BeatsEventsRateClusterMetric { @@ -1659,15 +2087,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "(Fatal drop) Events dropped by the output as being \\"invalid.\\" The output still acknowledges the event for the Beat to remove it from the queue.", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.dropped", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Dropped in Output", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_output_events_total": BeatsEventsRateClusterMetric { @@ -1700,15 +2137,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events processed by the output (including retries)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Emitted", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_output_read_bytes_rate": BeatsByteRateClusterMetric { @@ -1741,15 +2187,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Bytes read in response from the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.read.bytes", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Bytes Received", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Throughput", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_output_receiving_errors": BeatsEventsRateClusterMetric { @@ -1782,15 +2237,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Errors in reading the response from the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.read.errors", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Receiving", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Errors", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_output_sending_errors": BeatsEventsRateClusterMetric { @@ -1823,15 +2287,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Errors in writing the response from the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.write.errors", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Sending", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Errors", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_output_write_bytes_rate": BeatsByteRateClusterMetric { @@ -1864,15 +2337,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Bytes written to the output (consists of size of network headers and compressed payload)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.write.bytes", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Bytes Sent", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Throughput", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_pipeline_events_dropped_rate": BeatsEventsRateClusterMetric { @@ -1905,15 +2387,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events that have been dropped after N retries (N = max_retries setting)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.dropped", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Dropped in Pipeline", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_pipeline_events_emitted_rate": BeatsEventsRateClusterMetric { @@ -1946,15 +2437,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events added to the event pipeline queue", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.published", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Queued", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_pipeline_events_failed_rate": BeatsEventsRateClusterMetric { @@ -1987,15 +2487,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Failures that happened before event was added to the publishing pipeline (output was disabled or publisher client closed)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.failed", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Failed in Pipeline", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_pipeline_events_retry_rate": BeatsEventsRateClusterMetric { @@ -2028,15 +2537,24 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events in the pipeline that are trying again to be sent to the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.retry", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Retry in Pipeline", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cluster_pipeline_events_total_rate": BeatsEventsRateClusterMetric { @@ -2069,263 +2587,461 @@ Object { }, }, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "All events newly created in the publishing pipeline", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "beat_cpu_utilization": BeatsCpuUtilizationMetric { + "aggs": undefined, "app": "beats", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Percentage of CPU time spent executing (user+kernel mode) for the Beat process", + "docType": undefined, "field": "beats_stats.metrics.beat.cpu.total.value", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "CPU Utilization", "units": "%", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_handles_open": BeatsMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Count of open file handlers", + "docType": undefined, "field": "beats_stats.metrics.beat.handles.open", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Open Handles", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Open Handles", "units": "", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_mem_alloc": BeatsMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Private memory in active use by the Beat", + "docType": undefined, "field": "beats_stats.metrics.beat.memstats.memory_alloc", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Active", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_mem_gc_next": BeatsMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Limit of allocated memory at which garbage collection will occur", + "docType": undefined, "field": "beats_stats.metrics.beat.memstats.gc_next", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "GC Next", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_mem_rss": BeatsMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Resident set size of memory reserved by the Beat from the OS", + "docType": undefined, "field": "beats_stats.metrics.beat.memstats.rss", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Process Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Memory", "units": "B", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_output_events_ack_rate": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events acknowledged by the output (includes events dropped by the output)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.acked", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Acknowledged", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_output_events_dropped_rate": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "(Fatal drop) Events dropped by the output as being \\"invalid.\\" The output still acknowledges the event for the Beat to remove it from the queue.", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.dropped", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Dropped in Output", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_output_events_total": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events processed by the output (including retries)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.events.total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Emitted", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_output_receiving_errors": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Errors in reading the response from the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.read.errors", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Receiving", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Errors", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_output_sending_errors": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Errors in writing the response from the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.write.errors", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Sending", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Output Errors", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_output_write_bytes_rate": BeatsByteRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Bytes read in response from the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.output.read.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Bytes Received", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Throughput", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_pipeline_events_dropped_rate": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events that have been dropped after N retries (N = max_retries setting)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.dropped", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Dropped in Pipeline", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_pipeline_events_emitted_rate": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events added to the event pipeline queue", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.published", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Queued", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_pipeline_events_failed_rate": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Failures that happened before event was added to the publishing pipeline (output was disabled or publisher client closed)", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.failed", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Failed in Pipeline", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_pipeline_events_retry_rate": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Events in the pipeline that are trying again to be sent to the output", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.retry", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Retry in Pipeline", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Fail Rates", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_pipeline_events_total_rate": BeatsEventsRateMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "New events sent to the publishing pipeline", + "docType": undefined, "field": "beats_stats.metrics.libbeat.pipeline.events.total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "New", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "Events Rate", "units": "/s", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_system_os_load_1": BeatsMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 1 minute", + "docType": undefined, "field": "beats_stats.metrics.system.load.1", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "1m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_system_os_load_15": BeatsMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 15 minutes", + "docType": undefined, "field": "beats_stats.metrics.system.load.15", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "15m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "beat_system_os_load_5": BeatsMetric { + "aggs": undefined, "app": "beats", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 5 minutes", + "docType": undefined, "field": "beats_stats.metrics.system.load.5", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "5m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "beats_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "beats_stats.beat.uuid", }, "ccr_sync_lag_ops": DifferenceMetric { @@ -2343,32 +3059,49 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "The number of operations the follower index is lagging behind the leader.", + "docType": undefined, "field": "", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "getFields": [Function], "label": "Ops delay", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Ops delay", "type": "ccr", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "ccr_sync_lag_time": MillisecondsToSecondsMetric { + "aggs": undefined, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "The amount of time the follower index is lagging behind the leader.", + "docType": undefined, "field": "ccr_stats.time_since_last_read_millis", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Fetch delay", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Fetch delay", "type": "ccr", "units": "s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "cluster_index_latency": LatencyMetric { @@ -2400,43 +3133,71 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average latency for indexing documents, which is time it takes to index documents divided by number that were indexed. This only considers primary shards.", + "docType": undefined, "field": "indices_stats._all.primaries.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing Latency", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "cluster", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "cluster_index_request_rate_primary": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of documents being indexed for primary shards.", + "docType": undefined, "field": "indices_stats._all.primaries.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Primary Shards", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Rate", "type": "index", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "cluster_index_request_rate_total": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of documents being indexed for primary and replica shards.", + "docType": undefined, "field": "indices_stats._all.total.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Shards", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Rate", "type": "index", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "cluster_query_latency": LatencyMetric { @@ -2468,311 +3229,559 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average latency for searching, which is time it takes to execute searches divided by number of searches submitted. This considers primary and replica shards.", + "docType": undefined, "field": "indices_stats._all.total.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search Latency", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "cluster", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "cluster_search_request_rate": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!", + "docType": undefined, "field": "indices_stats._all.total.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Shards", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Search Rate", "type": "cluster", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "crawler_workers_active": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Currently active App Search crawler workers.", + "docType": undefined, "field": "enterprisesearch.health.crawler.workers.active", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Active", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "crawler_workers_total": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "The number of crawler workers configured across all instances of App Search.", + "docType": undefined, "field": "enterprisesearch.health.crawler.workers.pool_size", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "title": "Crawler Workers", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_daemon_threads_current": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Currently running JVM daemon threads used by the application.", + "docType": undefined, "field": "enterprisesearch.health.jvm.threads.daemon", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Daemon Threads", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_gc_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The rate of JVM garbage collector invocations across the fleet.", + "docType": undefined, "field": "enterprisesearch.health.jvm.gc.collection_count", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "JVM GC Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_gc_time": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Time spent performing JVM garbage collections.", + "docType": undefined, "field": "enterprisesearch.health.jvm.gc.collection_time.ms", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Time spent on JVM garbage collection", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "ms", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_heap_committed": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "The amount of memory JVM has allocated from the OS and is available to the application.", + "docType": undefined, "field": "enterprisesearch.health.jvm.memory_usage.heap_committed.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Committed", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "bytes", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_heap_total": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Maximum amount of JVM heap memory available to the application.", + "docType": undefined, "field": "enterprisesearch.health.jvm.memory_usage.heap_max.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "title": "JVM Heap Usage", "units": "bytes", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_heap_used": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Current amount of JVM Heam memory used by the application.", + "docType": undefined, "field": "enterprisesearch.health.jvm.memory_usage.heap_used.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Used", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "bytes", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_1xx_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Outgoing HTTP 1xx responses across all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.responses.1xx", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "1xx", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "title": "HTTP Responses", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_2xx_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Outgoing HTTP 2xx responses across all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.responses.2xx", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "2xx", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_3xx_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Outgoing HTTP 3xx responses across all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.responses.3xx", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "3xx", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_4xx_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Outgoing HTTP 4xx responses across all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.responses.4xx", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "4xx", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_5xx_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Outgoing HTTP 5xx responses across all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.responses.5xx", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "5xx", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_bytes_received_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Incoming HTTP traffic rate across all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.network.received.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Received", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "title": "HTTP Traffic", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_bytes_received_total": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total number of bytes received by all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.network.received.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "HTTP Bytes Received", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "bytes", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_bytes_sent_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Outgoing HTTP traffic across all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.network.sent.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Sent", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_bytes_sent_total": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total number of bytes sent by all instances in the deployment.", + "docType": undefined, "field": "enterprisesearch.stats.http.network.sent.bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "HTTP Bytes Sent", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "bytes", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_connections_current": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Currently open incoming HTTP connections across all instances.", + "docType": undefined, "field": "enterprisesearch.stats.http.connections.current", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Open HTTP Connections", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_http_connections_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The rate of incoming HTTP connections across all instances.", + "docType": undefined, "field": "enterprisesearch.stats.http.connections.total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "HTTP Connections Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_jvm_finalizer_queue": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of objects within the JVM heap waiting for the finalizer thread.", + "docType": undefined, "field": "enterprisesearch.health.jvm.memory_usage.object_pending_finalization_count", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "JVM Objects Pending Finalization", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_threads_current": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Currently running JVM threads used by the application.", + "docType": undefined, "field": "enterprisesearch.health.jvm.threads.current", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Active Threads", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "title": "JVM Threads", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "enterprise_search_threads_rate": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Currently running JVM threads used by the application.", + "docType": undefined, "field": "enterprisesearch.health.jvm.threads.total_started", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Thread Creation Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "/s", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "index_document_count": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total number of documents, only including primary shards.", + "docType": undefined, "field": "index_stats.primaries.docs.count", + "fieldSource": undefined, "format": "0,0.[0]a", + "getDateHistogramSubAggs": undefined, "label": "Document Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "index", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_index_latency": LatencyMetric { @@ -2804,155 +3813,263 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average latency for indexing documents, which is time it takes to index documents divided by number that were indexed. This only considers primary shards.", + "docType": undefined, "field": "index_stats.primaries.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing Latency", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Latency", "type": "cluster", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_indexing_primaries_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent performing index operations on primary shards only.", + "docType": undefined, "field": "index_stats.primaries.indexing.index_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing (Primaries)", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Request Time", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_indexing_total": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of indexing operations.", + "docType": undefined, "field": "index_stats.primaries.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Index Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Request Rate", "type": "index", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_indexing_total_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent performing index operations on primary and replica shards.", + "docType": undefined, "field": "index_stats.total.indexing.index_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Request Time", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_mem_fielddata": IndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Fielddata (e.g., global ordinals or explicitly enabled fielddata on text fields). This is for the same shards, but not a part of Lucene Total.", + "docType": undefined, "field": "index_stats.total.fielddata.memory_size_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Fielddata", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_mem_fixed_bit_set": SingleIndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Fixed Bit Sets (e.g., deeply nested documents). This is a part of Lucene Total.", + "docType": undefined, "field": "index_stats.total.segments.fixed_bit_set_memory_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Fixed Bitsets", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory - Lucene", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_mem_query_cache": IndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Query Cache (e.g., cached filters). This is for the same shards, but not a part of Lucene Total.", + "docType": undefined, "field": "index_stats.total.query_cache.memory_size_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Query Cache", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory - Elasticsearch", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_mem_request_cache": IndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Request Cache (e.g., instant aggregations). This is for the same shards, but not a part of Lucene Total.", + "docType": undefined, "field": "index_stats.total.request_cache.memory_size_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Request Cache", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_mem_versions": SingleIndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Versioning (e.g., updates and deletes). This is NOT a part of Lucene Total.", + "docType": undefined, "field": "index_stats.total.segments.version_map_memory_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Version Map", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_mem_writer": SingleIndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by the Index Writer. This is NOT a part of Lucene Total.", + "docType": undefined, "field": "index_stats.total.segments.index_writer_memory_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Index Writer", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_merge_rate": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount in bytes of merged segments. Larger numbers indicate heavier disk activity.", + "docType": undefined, "field": "index_stats.total.merges.total_size_in_bytes", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Merge Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "index", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_query_latency": LatencyMetric { @@ -2984,276 +4101,474 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average latency for searching, which is time it takes to execute searches divided by number of searches submitted. This considers primary and replica shards.", + "docType": undefined, "field": "index_stats.total.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search Latency", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "cluster", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_refresh_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Time spent on Elasticsearch refresh for primary and replica shards.", + "docType": undefined, "field": "index_stats.total.refresh.total_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Refresh Time", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "index", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_request_rate_primary": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of documents being indexed for primary shards.", + "docType": undefined, "field": "index_stats.primaries.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Primary Shards", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Rate", "type": "index", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_request_rate_total": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of documents being indexed for primary and replica shards.", + "docType": undefined, "field": "index_stats.total.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Shards", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Rate", "type": "index", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_search_request_rate": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!", + "docType": undefined, "field": "index_stats.total.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Shards", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Search Rate", "type": "index", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_searching_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent performing search operations (per shard).", + "docType": undefined, "field": "index_stats.total.search.query_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Request Time", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_searching_total": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of search operations (per shard).", + "docType": undefined, "field": "index_stats.total.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Request Rate", "type": "index", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_segment_count_primaries": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of segments for primary shards.", + "docType": undefined, "field": "index_stats.primaries.segments.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Primaries", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Segment Count", "type": "index", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_segment_count_total": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of segments for primary and replica shards.", + "docType": undefined, "field": "index_stats.total.segments.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Segment Count", "type": "index", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_segment_merge_primaries_size": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Size of merges on primary shards.", + "docType": undefined, "field": "index_stats.primaries.merges.total_size_in_bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Merges (Primaries)", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Disk", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_segment_merge_total_size": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Size of merges on primary and replica shards.", + "docType": undefined, "field": "index_stats.total.merges.total_size_in_bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Merges", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Disk", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_segment_refresh_primaries_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent to perform refresh operations on primary shards.", + "docType": undefined, "field": "index_stats.primaries.refresh.total_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Primaries", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Refresh Time", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_segment_refresh_total_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent to perform refresh operations on primary and replica shards.", + "docType": undefined, "field": "index_stats.total.refresh.total_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Refresh Time", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_store_primaries_size": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Size of primary shards on disk.", + "docType": undefined, "field": "index_stats.primaries.store.size_in_bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Store (Primaries)", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Disk", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_store_total_size": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Size of primary and replica shards on disk.", + "docType": undefined, "field": "index_stats.total.store.size_in_bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Store", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Disk", "type": "index", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_throttle_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent with index throttling, which indicates slow merging.", + "docType": undefined, "field": "index_stats.primaries.indexing.throttle_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Index Throttling Time", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_throttling_indexing_primaries_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent throttling index operations on primary shards.", + "docType": undefined, "field": "index_stats.primaries.indexing.throttle_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing (Primaries)", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Throttle Time", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "index_throttling_indexing_total_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent throttling index operations on primary and replica shards.", + "docType": undefined, "field": "index_stats.total.indexing.throttle_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Throttle Time", "type": "index", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "kibana_average_concurrent_connections": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total number of open socket connections to the Kibana instance.", + "docType": undefined, "field": "kibana_stats.concurrent_connections", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "HTTP Connections", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "units": "", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_average_response_times": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average response time for client requests to the Kibana instance.", + "docType": undefined, "field": "kibana_stats.response_times.average", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Average", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "Client Response Time", "units": "ms", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_cluster_average_response_times": KibanaEventsRateClusterMetric { @@ -3286,15 +4601,24 @@ Object { }, }, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average response time for client requests to the Kibana instance.", + "docType": undefined, "field": "kibana_stats.response_times.average", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Average", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "Client Response Time", "units": "ms", + "usageField": undefined, "uuidField": "cluster_uuid", }, "kibana_cluster_max_response_times": KibanaEventsRateClusterMetric { @@ -3327,15 +4651,24 @@ Object { }, }, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Maximum response time for client requests to the Kibana instance.", + "docType": undefined, "field": "kibana_stats.response_times.max", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Max", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "Client Response Time", "units": "ms", + "usageField": undefined, "uuidField": "cluster_uuid", }, "kibana_cluster_requests": KibanaEventsRateClusterMetric { @@ -3368,128 +4701,227 @@ Object { }, }, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total number of client requests received by the Kibana instance.", + "docType": undefined, "field": "kibana_stats.requests.total", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Client Requests", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "units": "", + "usageField": undefined, "uuidField": "cluster_uuid", }, "kibana_max_response_times": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Maximum response time for client requests to the Kibana instance.", + "docType": undefined, "field": "kibana_stats.response_times.max", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Max", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "Client Response Time", "units": "ms", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_memory_heap_size_limit": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Limit of memory usage before garbage collection.", + "docType": undefined, "field": "kibana_stats.process.memory.heap.size_limit", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Heap Size Limit", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "Memory Size", "units": "B", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_memory_size": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total heap used by Kibana running in Node.js.", + "docType": undefined, "field": "kibana_stats.process.memory.resident_set_size_in_bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Memory Size", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "Memory Size", "units": "B", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_os_load_15m": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 15 minutes.", + "docType": undefined, "field": "kibana_stats.os.load.15m", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "15m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_os_load_1m": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last minute.", + "docType": undefined, "field": "kibana_stats.os.load.1m", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "1m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_os_load_5m": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 5 minutes.", + "docType": undefined, "field": "kibana_stats.os.load.5m", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "5m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_process_delay": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Delay in Kibana server event loops. Longer delays may indicate blocking events in server thread, such as synchronous functions taking large amount of CPU time.", + "docType": undefined, "field": "kibana_stats.process.event_loop_delay", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Event Loop Delay", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "units": "ms", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_requests_disconnects": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total number of client disconnects to the Kibana instance.", + "docType": undefined, "field": "kibana_stats.requests.disconnects", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Client Disconnects", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "units": "", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "kibana_requests_total": KibanaMetric { + "aggs": undefined, "app": "kibana", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total number of client requests received by the Kibana instance.", + "docType": undefined, "field": "kibana_stats.requests.total", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Client Requests", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "kibana_stats.timestamp", "units": "", + "usageField": undefined, "uuidField": "kibana_stats.kibana.uuid", }, "logstash_cluster_events_input_rate": LogstashEventsRateClusterMetric { @@ -3522,14 +4954,23 @@ Object { }, }, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of events received per second by all Logstash nodes at the inputs stage.", + "docType": undefined, "field": "logstash_stats.events.in", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Events Received Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "logstash_cluster_events_latency": LogstashEventsLatencyClusterMetric { @@ -3581,14 +5022,22 @@ Object { }, "app": "logstash", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average time spent by events in the filter and output stages, which is the total time it takes to process events divided by number of events emitted.", + "docType": undefined, "field": "logstash_stats.events.out", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Event Latency", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "ms", + "usageField": undefined, "uuidField": "cluster_uuid", }, "logstash_cluster_events_output_rate": LogstashEventsRateClusterMetric { @@ -3621,52 +5070,89 @@ Object { }, }, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of events emitted per second by all Logstash nodes at the outputs stage.", + "docType": undefined, "field": "logstash_stats.events.out", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Events Emitted Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "/s", + "usageField": undefined, "uuidField": "cluster_uuid", }, "logstash_cluster_pipeline_nodes_count": LogstashPipelineNodeCountMetric { + "aggs": undefined, "app": "logstash", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of nodes on which the Logstash pipeline is running.", + "docType": undefined, "field": "logstash_stats.logstash.uuid", + "fieldSource": undefined, "format": "0,0.[00]", "getDateHistogramSubAggs": [Function], "label": "Pipeline Node Count", + "mbField": undefined, + "metricAgg": undefined, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_cluster_pipeline_throughput": LogstashPipelineThroughputMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of events emitted per second by the Logstash pipeline at the outputs stage.", + "docType": undefined, "field": "logstash_stats.pipelines.events.out", + "fieldSource": undefined, "format": "0,0.[00]", "getDateHistogramSubAggs": [Function], "label": "Pipeline Throughput", "mbField": "logstash.node.stats.pipelines.events.out", + "metricAgg": undefined, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "e/s", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_events_input_rate": LogstashEventsRateMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of events received per second by the Logstash node at the inputs stage.", + "docType": undefined, "field": "logstash_stats.events.in", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Events Received Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "/s", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_events_latency": LogstashEventsLatencyMetric { @@ -3698,39 +5184,67 @@ Object { }, "app": "logstash", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average time spent by events in the filter and output stages, which is the total time it takes to process events divided by number of events emitted.", + "docType": undefined, "field": "logstash_stats.events.out", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Event Latency", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "ms", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_events_output_rate": LogstashEventsRateMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of events emitted per second by the Logstash node at the outputs stage.", + "docType": undefined, "field": "logstash_stats.events.out", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Events Emitted Rate", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "/s", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_cgroup_periods": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.", + "docType": undefined, "field": "logstash_stats.os.cgroup.cpu.stat.number_of_elapsed_periods", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Elapsed Periods", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "Cgroup CFS Stats", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_cgroup_quota": QuotaMetric { @@ -3767,12 +5281,16 @@ Object { }, "app": "logstash", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": true, "description": "CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.", + "docType": undefined, "field": "logstash_stats.process.cpu.percent", "fieldSource": "logstash_stats.os.cgroup", "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Cgroup CPU Utilization", + "mbField": undefined, "metricAgg": "max", "periodsField": "cpu.stat.number_of_elapsed_periods", "quotaField": "cpu.cfs_quota_micros", @@ -3816,12 +5334,16 @@ Object { }, "app": "logstash", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": true, "description": "CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.", + "docType": undefined, "field": "logstash_stats.process.cpu.percent", "fieldSource": "logstash_stats.os.cgroup", "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "CPU Utilization", + "mbField": undefined, "metricAgg": "max", "periodsField": "cpu.stat.number_of_elapsed_periods", "quotaField": "cpu.cfs_quota_micros", @@ -3831,148 +5353,257 @@ Object { "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_cgroup_throttled": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The amount of throttled time, reported in nanoseconds, of the Cgroup.", + "docType": undefined, "field": "logstash_stats.os.cgroup.cpu.stat.time_throttled_nanos", + "fieldSource": undefined, "format": "0,0.[0]a", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Throttling", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "Cgroup CPU Performance", "units": "ns", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_cgroup_throttled_count": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The number of times that the CPU was throttled by the Cgroup.", + "docType": undefined, "field": "logstash_stats.os.cgroup.cpu.stat.number_of_times_throttled", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Throttled Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "Cgroup CFS Stats", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_cgroup_usage": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The usage, reported in nanoseconds, of the Cgroup. Compare this with the throttling to discover issues.", + "docType": undefined, "field": "logstash_stats.os.cgroup.cpuacct.usage_nanos", + "fieldSource": undefined, "format": "0,0.[0]a", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Usage", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "Cgroup CPU Performance", "units": "ns", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_cpu_utilization": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Percentage of CPU usage reported by the OS (100% is the max).", + "docType": undefined, "field": "logstash_stats.process.cpu.percent", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "CPU Utilization", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "%", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_jvm_mem_max_in_bytes": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total heap available to Logstash running in the JVM.", + "docType": undefined, "field": "logstash_stats.jvm.mem.heap_max_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Max Heap", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "JVM Heap", "units": "B", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_jvm_mem_used_in_bytes": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total heap used by Logstash running in the JVM.", + "docType": undefined, "field": "logstash_stats.jvm.mem.heap_used_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Used Heap", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "JVM Heap", "units": "B", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_pipeline_nodes_count": LogstashPipelineNodeCountMetric { + "aggs": undefined, "app": "logstash", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of nodes on which the Logstash pipeline is running.", + "docType": undefined, "field": "logstash_stats.logstash.uuid", + "fieldSource": undefined, "format": "0,0.[00]", "getDateHistogramSubAggs": [Function], "label": "Pipeline Node Count", + "mbField": undefined, + "metricAgg": undefined, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_node_pipeline_throughput": LogstashPipelineThroughputMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of events emitted per second by the Logstash pipeline at the outputs stage.", + "docType": undefined, "field": "logstash_stats.pipelines.events.out", + "fieldSource": undefined, "format": "0,0.[00]", "getDateHistogramSubAggs": [Function], "label": "Pipeline Throughput", "mbField": "logstash.node.stats.pipelines.events.out", + "metricAgg": undefined, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "e/s", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_os_load_15m": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 15 minutes.", + "docType": undefined, "field": "logstash_stats.os.cpu.load_average.15m", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "15m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_os_load_1m": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last minute.", + "docType": undefined, "field": "logstash_stats.os.cpu.load_average.1m", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "1m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_os_load_5m": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last 5 minutes.", + "docType": undefined, "field": "logstash_stats.os.cpu.load_average.5m", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "5m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "System Load", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_pipeline_max_queue_size": LogstashPipelineQueueSizeMetric { + "aggs": undefined, "app": "logstash", "calculation": [Function], "dateHistogramSubAggs": Object { @@ -4004,14 +5635,23 @@ Object { }, "derivative": false, "description": "Maximum size set for the persistent queues on this node.", + "docType": undefined, "field": "logstash_stats.pipelines.queue.max_queue_size_in_bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Max Queue Size", + "mbField": undefined, + "metricAgg": undefined, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "units": "B", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_pipeline_queue_size": LogstashPipelineQueueSizeMetric { + "aggs": undefined, "app": "logstash", "calculation": [Function], "dateHistogramSubAggs": Object { @@ -4043,39 +5683,67 @@ Object { }, "derivative": false, "description": "Current size of all persistent queues in the Logstash pipelines on this node.", + "docType": undefined, "field": "logstash_stats.pipelines.queue.queue_size_in_bytes", + "fieldSource": undefined, "format": "0,0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Queue Size", + "mbField": undefined, + "metricAgg": undefined, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "Persistent Queue Size", "units": "B", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "logstash_queue_events_count": LogstashMetric { + "aggs": undefined, "app": "logstash", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average number of events in the persistent queue waiting to be processed by the filter and output stages.", + "docType": undefined, "field": "logstash_stats.queue.events_count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Events Queued", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "logstash_stats.timestamp", "title": "Persistent Queue Events", "units": "", + "usageField": undefined, "uuidField": "logstash_stats.logstash.uuid", }, "node_cgroup_periods": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.", + "docType": undefined, "field": "node_stats.os.cgroup.cpu.stat.number_of_elapsed_periods", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Elapsed Periods", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Cgroup CFS Stats", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_cgroup_quota": QuotaMetric { @@ -4112,12 +5780,16 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": true, "description": "CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.", + "docType": undefined, "field": "node_stats.process.cpu.percent", "fieldSource": "node_stats.os.cgroup", "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Cgroup CPU Utilization", + "mbField": undefined, "metricAgg": "max", "periodsField": "cpu.stat.number_of_elapsed_periods", "quotaField": "cpu.cfs_quota_micros", @@ -4162,12 +5834,16 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": true, "description": "CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.", + "docType": undefined, "field": "node_stats.process.cpu.percent", "fieldSource": "node_stats.os.cgroup", "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "CPU Utilization", + "mbField": undefined, "metricAgg": "max", "periodsField": "cpu.stat.number_of_elapsed_periods", "quotaField": "cpu.cfs_quota_micros", @@ -4178,71 +5854,121 @@ Object { "uuidField": "source_node.uuid", }, "node_cgroup_throttled": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The amount of throttled time, reported in nanoseconds, of the cgroup.", + "docType": undefined, "field": "node_stats.os.cgroup.cpu.stat.time_throttled_nanos", + "fieldSource": undefined, "format": "0,0.[0]a", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Throttling", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Cgroup CPU Performance", "type": "node", "units": "ns", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_cgroup_throttled_count": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The number of times that the CPU was throttled by the cgroup.", + "docType": undefined, "field": "node_stats.os.cgroup.cpu.stat.number_of_times_throttled", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Throttled Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Cgroup CFS Stats", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_cgroup_usage": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "The usage, reported in nanoseconds, of the cgroup. Compare this with the throttling to discover issues.", + "docType": undefined, "field": "node_stats.os.cgroup.cpuacct.usage_nanos", + "fieldSource": undefined, "format": "0,0.[0]a", + "getDateHistogramSubAggs": undefined, "label": "Cgroup Usage", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Cgroup CPU Performance", "type": "node", "units": "ns", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_cpu_utilization": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Percentage of CPU usage for the Elasticsearch process.", + "docType": undefined, "field": "node_stats.process.cpu.percent", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "CPU Utilization", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "node", "units": "%", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_free_space": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Free disk space available on the node.", + "docType": undefined, "field": "node_stats.fs.total.available_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Disk Free Space", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_latency": LatencyMetric { @@ -4274,163 +6000,272 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average latency for indexing documents, which is time it takes to index documents divided by number that were indexed. This considers any shard located on this node, including replicas.", + "docType": undefined, "field": "node_stats.indices.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Latency", "type": "node", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_mem_fielddata": IndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Fielddata (e.g., global ordinals or explicitly enabled fielddata on text fields). This is for the same shards, but not a part of Lucene Total.", + "docType": undefined, "field": "node_stats.indices.fielddata.memory_size_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Fielddata", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_mem_fixed_bit_set": NodeIndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Fixed Bit Sets (e.g., deeply nested documents). This is a part of Lucene Total.", + "docType": undefined, "field": "node_stats.indices.segments.fixed_bit_set_memory_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Fixed Bitsets", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory - Lucene", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_mem_query_cache": IndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Query Cache (e.g., cached filters). This is for the same shards, but not a part of Lucene Total.", + "docType": undefined, "field": "node_stats.indices.query_cache.memory_size_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Query Cache", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory - Elasticsearch", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_mem_request_cache": IndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Request Cache (e.g., instant aggregations). This is for the same shards, but not a part of Lucene Total.", + "docType": undefined, "field": "node_stats.indices.request_cache.memory_size_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Request Cache", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_mem_versions": NodeIndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by Versioning (e.g., updates and deletes). This is NOT a part of Lucene Total.", + "docType": undefined, "field": "node_stats.indices.segments.version_map_memory_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Version Map", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_mem_writer": NodeIndexMemoryMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Heap memory used by the Index Writer. This is NOT a part of Lucene Total.", + "docType": undefined, "field": "node_stats.indices.segments.index_writer_memory_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Index Writer", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Index Memory", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_threads_get_queue": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of GET operations in the queue.", + "docType": undefined, "field": "node_stats.thread_pool.get.queue", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "GET Queue", + "mbField": undefined, "metricAgg": "max", "min": 0, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Read Threads", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_threads_get_rejected": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of GET operations that have been rejected, which occurs when the queue is full.", + "docType": undefined, "field": "node_stats.thread_pool.get.rejected", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "GET Rejections", + "mbField": undefined, "metricAgg": "max", "min": 0, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Read Threads", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_threads_search_queue": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of search operations in the queue (e.g., shard level searches).", + "docType": undefined, "field": "node_stats.thread_pool.search.queue", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search Queue", + "mbField": undefined, "metricAgg": "max", "min": 0, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Read Threads", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_threads_search_rejected": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of search operations that have been rejected, which occurs when the queue is full.", + "docType": undefined, "field": "node_stats.thread_pool.search.rejected", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search Rejections", + "mbField": undefined, "metricAgg": "max", "min": 0, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Read Threads", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_threads_write_queue": WriteThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", "calculation": [Function], "dateHistogramSubAggs": Object { @@ -4452,17 +6287,25 @@ Object { }, "derivative": false, "description": "Number of index, bulk, and write operations in the queue. The bulk threadpool was renamed to write in 6.3, and the index threadpool is deprecated.", + "docType": undefined, "field": "node_stats.thread_pool.write.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Write Queue", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Threads", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_threads_write_rejected": WriteThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", "calculation": [Function], "dateHistogramSubAggs": Object { @@ -4505,154 +6348,261 @@ Object { }, "derivative": false, "description": "Number of index, bulk, and write operations that have been rejected, which occurs when the queue is full. The bulk threadpool was renamed to write in 6.3, and the index threadpool is deprecated.", + "docType": undefined, "field": "node_stats.thread_pool.write.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Write Rejections", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Threads", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent on indexing operations.", + "docType": undefined, "field": "node_stats.indices.indexing.index_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Index Time", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Time", "type": "node", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_index_total": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of indexing operations.", + "docType": undefined, "field": "node_stats.indices.indexing.index_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Indexing Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Request Rate", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_jvm_gc_old_count": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of old Garbage Collections.", + "docType": undefined, "field": "node_stats.jvm.gc.collectors.old.collection_count", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Old", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "GC Rate", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_jvm_gc_old_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Time spent performing old Garbage Collections.", + "docType": undefined, "field": "node_stats.jvm.gc.collectors.old.collection_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Old", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "GC Duration", "type": "node", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_jvm_gc_young_count": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of young Garbage Collections.", + "docType": undefined, "field": "node_stats.jvm.gc.collectors.young.collection_count", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Young", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "GC Rate", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_jvm_gc_young_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Time spent performing young Garbage Collections.", + "docType": undefined, "field": "node_stats.jvm.gc.collectors.young.collection_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Young", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "GC Duration", "type": "node", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_jvm_mem_max_in_bytes": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total heap available to Elasticsearch running in the JVM.", + "docType": undefined, "field": "node_stats.jvm.mem.heap_max_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Max Heap", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "JVM Heap", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_jvm_mem_percent": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total heap used by Elasticsearch running in the JVM.", + "docType": undefined, "field": "node_stats.jvm.mem.heap_used_percent", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Used Heap", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "JVM Heap", "type": "node", "units": "%", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_jvm_mem_used_in_bytes": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Total heap used by Elasticsearch running in the JVM.", + "docType": undefined, "field": "node_stats.jvm.mem.heap_used_in_bytes", + "fieldSource": undefined, "format": "0.0 b", + "getDateHistogramSubAggs": undefined, "label": "Used Heap", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "JVM Heap", "type": "node", "units": "B", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_load_average": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Load average over the last minute.", + "docType": undefined, "field": "node_stats.os.cpu.load_average.1m", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "1m", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "System Load", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_query_latency": LatencyMetric { @@ -4684,335 +6634,573 @@ Object { }, "app": "elasticsearch", "calculation": [Function], + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Average latency for searching, which is time it takes to execute searches divided by number of searches submitted. This considers primary and replica shards.", + "docType": undefined, "field": "node_stats.indices.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search", + "mbField": undefined, "metricAgg": "sum", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Latency", "type": "node", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_search_total": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of search operations (per shard).", + "docType": undefined, "field": "node_stats.indices.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search Total", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Request Rate", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_segment_count": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Maximum segment count for primary and replica shards on this node.", + "docType": undefined, "field": "node_stats.indices.segments.count", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Segment Count", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_queued_bulk": ThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of bulk indexing operations waiting to be processed on this node. A single bulk request can create multiple bulk operations.", + "docType": undefined, "field": "node_stats.thread_pool.bulk.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Bulk", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Queue", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_queued_generic": ThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of generic (internal) operations waiting to be processed on this node.", + "docType": undefined, "field": "node_stats.thread_pool.generic.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Generic", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Queue", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_queued_get": ThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of get operations waiting to be processed on this node.", + "docType": undefined, "field": "node_stats.thread_pool.get.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Get", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Queue", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_queued_index": ThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of non-bulk, index operations waiting to be processed on this node.", + "docType": undefined, "field": "node_stats.thread_pool.index.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Index", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Queue", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_queued_management": ThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of management (internal) operations waiting to be processed on this node.", + "docType": undefined, "field": "node_stats.thread_pool.management.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Management", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Queue", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_queued_search": ThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of search operations waiting to be processed on this node. A single search request can create multiple search operations.", + "docType": undefined, "field": "node_stats.thread_pool.search.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Queue", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_queued_watcher": ThreadPoolQueueMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Number of Watcher operations waiting to be processed on this node.", + "docType": undefined, "field": "node_stats.thread_pool.watcher.queue", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Watcher", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Queue", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_rejected_bulk": ThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Bulk rejections. These occur when the queue is full.", + "docType": undefined, "field": "node_stats.thread_pool.bulk.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Bulk", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Rejections", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_rejected_generic": ThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Generic (internal) rejections. These occur when the queue is full.", + "docType": undefined, "field": "node_stats.thread_pool.generic.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Generic", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Rejections", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_rejected_get": ThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Get rejections. These occur when the queue is full.", + "docType": undefined, "field": "node_stats.thread_pool.get.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Get", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Rejections", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_rejected_index": ThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Index rejections. These occur when the queue is full. You should look at bulk indexing.", + "docType": undefined, "field": "node_stats.thread_pool.index.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Index", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Rejections", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_rejected_management": ThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Get (internal) rejections. These occur when the queue is full.", + "docType": undefined, "field": "node_stats.thread_pool.management.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Management", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Rejections", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_rejected_search": ThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Search rejections. These occur when the queue is full. This can indicate over-sharding.", + "docType": undefined, "field": "node_stats.thread_pool.search.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Search", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Rejections", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_threads_rejected_watcher": ThreadPoolRejectedMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Watch rejections. These occur when the queue is full. This can indicate stuck-Watches.", + "docType": undefined, "field": "node_stats.thread_pool.watcher.rejected", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Watcher", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Thread Rejections", "type": "node", "units": "", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_throttle_index_time": ElasticsearchMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Amount of time spent with index throttling, which indicates slow disks on a node.", + "docType": undefined, "field": "node_stats.indices.indexing.throttle_time_in_millis", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Index Throttling Time", + "mbField": undefined, "metricAgg": "max", "min": 0, + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Indexing Time", "type": "node", "units": "ms", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_total_cumul_io": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Total I/O. (This metric is not supported on all platforms and may display N/A if I/O data is unavailable.)", + "docType": undefined, "field": "node_stats.fs.io_stats.total.operations", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total I/O", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "I/O Operations Rate", "type": "node", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_total_read_io": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Total Read I/O. (This metric is not supported on all platforms and may display N/A if I/O data is unavailable.)", + "docType": undefined, "field": "node_stats.fs.io_stats.total.read_operations", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Read I/O", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "I/O Operations Rate", "type": "node", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "node_total_write_io": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Total Write I/O. (This metric is not supported on all platforms and may display N/A if I/O data is unavailable.)", + "docType": undefined, "field": "node_stats.fs.io_stats.total.write_operations", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Write I/O", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "I/O Operations Rate", "type": "node", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "search_request_rate": RequestRateMetric { + "aggs": undefined, "app": "elasticsearch", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": true, "description": "Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!", + "docType": undefined, "field": "index_stats.total.search.query_total", + "fieldSource": undefined, "format": "0,0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Total Shards", + "mbField": undefined, "metricAgg": "max", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "timestamp", "title": "Search Rate", "type": "cluster", "units": "/s", + "usageField": undefined, "uuidField": "source_node.uuid", }, "workplace_search_total_org_sources": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Current number of Workplace Search org-wide content sources within the Enterprise Search deployment.", + "docType": undefined, "field": "enterprisesearch.stats.product_usage.workplace_search.total_org_sources", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Org Sources", + "mbField": undefined, "metricAgg": "avg", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "title": "Workpace Search Content Sources", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, "workplace_search_total_private_sources": EnterpriseSearchMetric { + "aggs": undefined, "app": "enterprise_search", + "calculation": undefined, + "dateHistogramSubAggs": undefined, "derivative": false, "description": "Current number of Workplace Search private content sources within the Enterprise Search deployment.", + "docType": undefined, "field": "enterprisesearch.stats.product_usage.workplace_search.total_private_sources", + "fieldSource": undefined, "format": "0.[00]", + "getDateHistogramSubAggs": undefined, "label": "Private Sources", + "mbField": undefined, "metricAgg": "avg", + "periodsField": undefined, + "quotaField": undefined, "timestampField": "@timestamp", "units": "", + "usageField": undefined, "uuidField": "enterprisesearch.cluster_uuid", }, } diff --git a/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.ts b/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.ts index 4a97e7823999b..89decb1ed0762 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.ts +++ b/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.ts @@ -8,14 +8,17 @@ /* eslint-disable max-classes-per-file */ import { i18n } from '@kbn/i18n'; -// @ts-ignore -import { ClusterMetric, Metric } from '../classes'; + +import { ClusterMetric, Metric, MetricOptions } from '../classes'; import { SMALL_FLOAT, LARGE_FLOAT } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; +type ApmClusterMetricOptions = Pick< + MetricOptions, + 'field' | 'title' | 'label' | 'description' | 'derivative' | 'format' | 'metricAgg' | 'units' +>; export class ApmClusterMetric extends ClusterMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: ApmClusterMetricOptions) { super({ ...opts, app: 'apm', @@ -31,9 +34,12 @@ export class ApmClusterMetric extends ClusterMetric { } } +type ApmMetricOptions = Pick< + MetricOptions, + 'title' | 'label' | 'description' | 'field' | 'format' | 'metricAgg' | 'units' | 'derivative' +>; export class ApmMetric extends Metric { - // @ts-ignore - constructor(opts) { + constructor(opts: ApmMetricOptions) { super({ ...opts, app: 'apm', @@ -51,9 +57,12 @@ export class ApmMetric extends Metric { export type ApmMetricFields = ReturnType; +type ApmCpuUtilizationMetricOptions = Pick< + MetricOptions, + 'title' | 'label' | 'description' | 'field' +>; export class ApmCpuUtilizationMetric extends ApmMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: ApmCpuUtilizationMetricOptions) { super({ ...opts, format: SMALL_FLOAT, @@ -62,12 +71,13 @@ export class ApmCpuUtilizationMetric extends ApmMetric { derivative: true, }); - /* - * Convert a counter of milliseconds of utilization time into a percentage of the bucket size - */ - // @ts-ignore - this.calculation = ({ metric_deriv: metricDeriv } = {}, _key, _metric, bucketSizeInSeconds) => { - if (metricDeriv) { + this.calculation = ( + { metric_deriv: metricDeriv } = { metric_deriv: undefined }, + _key, + _metric, + bucketSizeInSeconds + ) => { + if (metricDeriv && bucketSizeInSeconds) { const { value: metricDerivValue } = metricDeriv; const bucketSizeInMillis = bucketSizeInSeconds * 1000; @@ -80,9 +90,13 @@ export class ApmCpuUtilizationMetric extends ApmMetric { } } +type ApmEventsRateClusterMetricOptions = Pick< + ApmClusterMetricOptions, + 'field' | 'title' | 'label' | 'description' +>; + export class ApmEventsRateClusterMetric extends ApmClusterMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: ApmEventsRateClusterMetricOptions) { super({ ...opts, derivative: true, @@ -93,7 +107,6 @@ export class ApmEventsRateClusterMetric extends ApmClusterMetric { }), }); - // @ts-ignore this.aggs = { beats_uuids: { terms: { @@ -103,7 +116,6 @@ export class ApmEventsRateClusterMetric extends ApmClusterMetric { aggs: { event_rate_per_beat: { max: { - // @ts-ignore field: this.field, }, }, diff --git a/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.ts similarity index 100% rename from x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.js rename to x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.ts index 7c779f31c684b..8cd3941be1338 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.ts @@ -5,9 +5,9 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { LARGE_BYTES, LARGE_FLOAT } from '../../../../common/formatting'; import { ApmMetric, ApmCpuUtilizationMetric, ApmEventsRateClusterMetric } from './classes'; -import { i18n } from '@kbn/i18n'; import { QuotaMetric } from '../classes'; const instanceSystemLoadTitle = i18n.translate( diff --git a/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.ts b/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.ts index 78e731cee8881..44241882d5077 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.ts +++ b/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.ts @@ -8,8 +8,8 @@ /* eslint-disable max-classes-per-file */ import { i18n } from '@kbn/i18n'; -// @ts-ignore -import { ClusterMetric, Metric } from '../classes'; + +import { ClusterMetric, ClusterMetricOptions, Metric, MetricOptions } from '../classes'; import { SMALL_FLOAT, LARGE_FLOAT, LARGE_BYTES } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; @@ -17,9 +17,13 @@ const perSecondUnitLabel = i18n.translate('xpack.monitoring.metrics.beats.perSec defaultMessage: '/s', }); +type BeatsClusterMetricOptions = Pick< + ClusterMetricOptions, + 'derivative' | 'format' | 'metricAgg' | 'units' | 'field' | 'label' | 'description' +>; + export class BeatsClusterMetric extends ClusterMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: BeatsClusterMetricOptions) { super({ ...opts, app: 'beats', @@ -35,9 +39,14 @@ export class BeatsClusterMetric extends ClusterMetric { } } +type BeatsEventsRateClusterMetricOptions = Pick< + ClusterMetricOptions, + 'field' | 'title' | 'label' | 'description' +> & + Partial>; + export class BeatsEventsRateClusterMetric extends BeatsClusterMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: BeatsEventsRateClusterMetricOptions) { super({ ...opts, derivative: true, @@ -45,7 +54,6 @@ export class BeatsEventsRateClusterMetric extends BeatsClusterMetric { metricAgg: 'max', units: perSecondUnitLabel, }); - // @ts-ignore this.aggs = { beats_uuids: { @@ -56,7 +64,6 @@ export class BeatsEventsRateClusterMetric extends BeatsClusterMetric { aggs: { event_rate_per_beat: { max: { - // @ts-ignore field: this.field, }, }, @@ -79,9 +86,13 @@ export class BeatsEventsRateClusterMetric extends BeatsClusterMetric { } } +type BeatsMetricOptions = Pick< + MetricOptions, + 'field' | 'title' | 'label' | 'description' | 'format' | 'metricAgg' | 'units' | 'derivative' +>; + export class BeatsMetric extends Metric { - // @ts-ignore - constructor(opts) { + constructor(opts: BeatsMetricOptions) { super({ ...opts, app: 'beats', @@ -99,9 +110,12 @@ export class BeatsMetric extends Metric { export type BeatsMetricFields = ReturnType; +type BeatsByteRateClusterMetricOptions = Pick< + ClusterMetricOptions, + 'field' | 'title' | 'label' | 'description' +>; export class BeatsByteRateClusterMetric extends BeatsEventsRateClusterMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: BeatsByteRateClusterMetricOptions) { super({ ...opts, format: LARGE_BYTES, @@ -109,9 +123,12 @@ export class BeatsByteRateClusterMetric extends BeatsEventsRateClusterMetric { } } +type BeatsEventsRateMetricOptions = Pick< + MetricOptions, + 'field' | 'title' | 'label' | 'description' +>; export class BeatsEventsRateMetric extends BeatsMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: BeatsEventsRateMetricOptions) { super({ ...opts, format: LARGE_FLOAT, @@ -122,9 +139,10 @@ export class BeatsEventsRateMetric extends BeatsMetric { } } +type BeatsByteRateMetricOptions = Pick; + export class BeatsByteRateMetric extends BeatsMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: BeatsByteRateMetricOptions) { super({ ...opts, format: LARGE_BYTES, @@ -135,9 +153,13 @@ export class BeatsByteRateMetric extends BeatsMetric { } } +type BeatsCpuUtilizationMetricOptions = Pick< + MetricOptions, + 'field' | 'title' | 'label' | 'description' +>; + export class BeatsCpuUtilizationMetric extends BeatsMetric { - // @ts-ignore - constructor(opts) { + constructor(opts: BeatsCpuUtilizationMetricOptions) { super({ ...opts, format: SMALL_FLOAT, @@ -149,9 +171,14 @@ export class BeatsCpuUtilizationMetric extends BeatsMetric { /* * Convert a counter of milliseconds of utilization time into a percentage of the bucket size */ - // @ts-ignore - this.calculation = ({ metric_deriv: metricDeriv } = {}, _key, _metric, bucketSizeInSeconds) => { - if (metricDeriv) { + + this.calculation = ( + { metric_deriv: metricDeriv } = { metric_deriv: undefined }, + _key, + _metric, + bucketSizeInSeconds + ) => { + if (metricDeriv && bucketSizeInSeconds) { const { value } = metricDeriv; const bucketSizeInMillis = bucketSizeInSeconds * 1000; diff --git a/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.ts similarity index 100% rename from x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.js rename to x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.ts index c9d1c015e22d6..6bf7cf67208b1 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { BeatsEventsRateClusterMetric, BeatsByteRateClusterMetric, @@ -14,7 +15,6 @@ import { BeatsMetric, } from './classes'; import { LARGE_FLOAT, LARGE_BYTES, SMALL_FLOAT } from '../../../../common/formatting'; -import { i18n } from '@kbn/i18n'; const eventsRateTitle = i18n.translate('xpack.monitoring.metrics.beats.eventsRateTitle', { defaultMessage: 'Events Rate', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/classes/cluster_metric.js b/x-pack/plugins/monitoring/server/lib/metrics/classes/cluster_metric.ts similarity index 68% rename from x-pack/plugins/monitoring/server/lib/metrics/classes/cluster_metric.js rename to x-pack/plugins/monitoring/server/lib/metrics/classes/cluster_metric.ts index 984b896052c47..bf995ffa592a7 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/classes/cluster_metric.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/classes/cluster_metric.ts @@ -5,10 +5,14 @@ * 2.0. */ -import { Metric } from './metric'; +import { Metric, MetricOptions } from './metric'; + +export type ClusterMetricOptions = MetricOptions & { + uuidField: string; +}; export class ClusterMetric extends Metric { - constructor(opts) { + constructor(opts: ClusterMetricOptions) { super({ ...opts, uuidField: 'cluster_uuid', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/classes/index.js b/x-pack/plugins/monitoring/server/lib/metrics/classes/index.ts similarity index 77% rename from x-pack/plugins/monitoring/server/lib/metrics/classes/index.js rename to x-pack/plugins/monitoring/server/lib/metrics/classes/index.ts index e0f19d47c964e..ae8fb55b173ca 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/classes/index.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/classes/index.ts @@ -8,3 +8,6 @@ export { Metric } from './metric'; export { ClusterMetric } from './cluster_metric'; export { QuotaMetric } from './quota_metric'; + +export type { MetricOptions } from './metric'; +export type { ClusterMetricOptions } from './cluster_metric'; diff --git a/x-pack/plugins/monitoring/server/lib/metrics/classes/metric.js b/x-pack/plugins/monitoring/server/lib/metrics/classes/metric.ts similarity index 57% rename from x-pack/plugins/monitoring/server/lib/metrics/classes/metric.js rename to x-pack/plugins/monitoring/server/lib/metrics/classes/metric.ts index ba175ad35988b..8c2c54cd2f4ed 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/classes/metric.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/classes/metric.ts @@ -8,9 +8,57 @@ import _ from 'lodash'; import { MissingRequiredError } from '../../error_missing_required'; +interface RequiredMetricOptions { + field: string; + label: string; + description: string; + format: string; + units: string; + timestampField: string; + [key: string]: string | boolean | number; +} + +interface OptionalMetricOptions { + app?: string; + metricAgg?: string; + mbField?: string; + type?: string; +} + +interface DefaultMetricOptions { + derivative?: boolean; +} + +export type MetricOptions = RequiredMetricOptions & OptionalMetricOptions & DefaultMetricOptions; + export class Metric { - constructor(opts) { - const props = { + public field!: string; + public docType?: string; + public label!: string; + public description!: string; + public format!: string; + public units!: string; + public timestampField!: string; + public app?: string; + public metricAgg?: string; + public mbField?: string; + public derivative: boolean = false; + public aggs?: object; + public dateHistogramSubAggs?: object; + public getDateHistogramSubAggs?: (options: any) => object; + public calculation?: ( + bucket: any, + key?: string, + metric?: Metric, + defaultSizeInSeconds?: number + ) => number | null; + public fieldSource?: string; + public usageField?: string; + public periodsField?: string; + public quotaField?: string; + + constructor(opts: MetricOptions) { + const props: Required = { derivative: false, }; @@ -22,14 +70,15 @@ export class Metric { units: opts.units, timestampField: opts.timestampField, }; + this.checkRequiredParams(requireds); + _.assign(this, _.defaults(opts, props)); } - checkRequiredParams(requireds) { + checkRequiredParams(requireds: RequiredParams) { const undefKey = _.findKey(requireds, _.isUndefined); if (undefKey) { - console.log(`Missing required field: [${undefKey}]`); throw new MissingRequiredError(undefKey); } } @@ -68,7 +117,7 @@ export class Metric { return fields && fields.length ? fields[0].split('.')[0] : null; } - static calculateLatency(timeInMillis, totalEvents) { + static calculateLatency(timeInMillis: number | null, totalEvents: number | null) { if (timeInMillis === null || totalEvents === null) { return null; } else if (timeInMillis < 0 || totalEvents < 0) { diff --git a/x-pack/plugins/monitoring/server/lib/metrics/classes/quota_metric.js b/x-pack/plugins/monitoring/server/lib/metrics/classes/quota_metric.ts similarity index 85% rename from x-pack/plugins/monitoring/server/lib/metrics/classes/quota_metric.js rename to x-pack/plugins/monitoring/server/lib/metrics/classes/quota_metric.ts index 4912338bcb335..8e1cb8930f804 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/classes/quota_metric.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/classes/quota_metric.ts @@ -6,12 +6,26 @@ */ import { get } from 'lodash'; -import { Metric } from './metric'; +import { Metric, MetricOptions } from './metric'; import { LARGE_FLOAT } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; +type QuotaMetricOptions = Pick< + MetricOptions, + | 'fieldSource' + | 'usageField' + | 'periodsField' + | 'quotaField' + | 'field' + | 'label' + | 'description' + | 'app' + | 'timestampField' +> & + Partial>; + export class QuotaMetric extends Metric { - constructor(opts) { + constructor(opts: QuotaMetricOptions) { super({ ...opts, format: LARGE_FLOAT, @@ -51,7 +65,7 @@ export class QuotaMetric extends Metric { }, }; - this.calculation = (bucket) => { + this.calculation = (bucket: object) => { const quota = get(bucket, 'quota.value'); const deltaUsageDerivNormalizedValue = get(bucket, 'usage_deriv.normalized_value'); const periodsDerivNormalizedValue = get(bucket, 'periods_deriv.normalized_value'); diff --git a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.ts similarity index 71% rename from x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js rename to x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.ts index 2141b30b37290..a70299c3fa42d 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.ts @@ -5,14 +5,22 @@ * 2.0. */ +/* eslint-disable max-classes-per-file */ + import _ from 'lodash'; -import { Metric } from '../classes'; +import { i18n } from '@kbn/i18n'; +import { Metric, MetricOptions } from '../classes'; import { LARGE_FLOAT, SMALL_FLOAT, SMALL_BYTES } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; -import { i18n } from '@kbn/i18n'; + +type ElasticsearchMetricOptions = Pick< + MetricOptions, + 'format' | 'metricAgg' | 'field' | 'label' | 'description' | 'units' | 'derivative' +> & + Partial> & { type: string; min?: number }; export class ElasticsearchMetric extends Metric { - constructor(opts) { + constructor(opts: ElasticsearchMetricOptions) { super({ ...opts, app: 'elasticsearch', @@ -31,8 +39,18 @@ export class ElasticsearchMetric extends Metric { } } +type DifferenceMetricOptions = Pick< + MetricOptions, + 'description' | 'format' | 'metricAgg' | 'units' | 'label' | 'title' +> & { + type: string; + fieldSource: string; + metric: string; + metric2: string; +}; + export class DifferenceMetric extends ElasticsearchMetric { - constructor({ fieldSource, metric, metric2, ...opts }) { + constructor({ fieldSource, metric, metric2, ...opts }: DifferenceMetricOptions) { super({ ...opts, field: '', // NOTE: this is not used for this @@ -56,14 +74,21 @@ export class DifferenceMetric extends ElasticsearchMetric { this.getFields = () => [`${fieldSource}.${metric}`, `${fieldSource}.${metric2}`]; - this.calculation = (bucket) => { + this.calculation = (bucket: object) => { return _.get(bucket, 'metric_max.value') - _.get(bucket, 'metric2_max.value'); }; } } +type LatencyMetricOptions = Pick & + Partial> & { + type: string; + fieldSource: string; + metric: string; + }; + export class LatencyMetric extends ElasticsearchMetric { - constructor({ metric, fieldSource, ...opts }) { + constructor({ metric, fieldSource, ...opts }: LatencyMetricOptions) { super({ ...opts, format: LARGE_FLOAT, @@ -117,7 +142,7 @@ export class LatencyMetric extends ElasticsearchMetric { }, }; - this.calculation = (bucket) => { + this.calculation = (bucket: object) => { const timeInMillisDeriv = _.get(bucket, 'event_time_in_millis_deriv.normalized_value', null); const totalEventsDeriv = _.get(bucket, 'event_total_deriv.normalized_value', null); @@ -126,8 +151,12 @@ export class LatencyMetric extends ElasticsearchMetric { } } +type RequestRateMetricOptions = Pick & + Partial> & { + type: string; + }; export class RequestRateMetric extends ElasticsearchMetric { - constructor(opts) { + constructor(opts: RequestRateMetricOptions) { super({ ...opts, derivative: true, @@ -140,8 +169,10 @@ export class RequestRateMetric extends ElasticsearchMetric { } } +type ThreadPoolQueueMetricOptions = Pick & + Partial>; export class ThreadPoolQueueMetric extends ElasticsearchMetric { - constructor(opts) { + constructor(opts: ThreadPoolQueueMetricOptions) { super({ ...opts, title: 'Thread Queue', @@ -153,8 +184,11 @@ export class ThreadPoolQueueMetric extends ElasticsearchMetric { } } +type ThreadPoolRejectedMetricOptions = Pick & + Partial>; + export class ThreadPoolRejectedMetric extends ElasticsearchMetric { - constructor(opts) { + constructor(opts: ThreadPoolRejectedMetricOptions) { super({ ...opts, title: 'Thread Rejections', @@ -174,8 +208,11 @@ export class ThreadPoolRejectedMetric extends ElasticsearchMetric { * @see NodeIndexMemoryMetric * @see SingleIndexMemoryMetric */ + +type IndexMemoryMetricOptions = Pick & + Partial> & { type: string }; export class IndexMemoryMetric extends ElasticsearchMetric { - constructor(opts) { + constructor(opts: IndexMemoryMetricOptions) { super({ title: 'Index Memory', ...opts, @@ -186,8 +223,11 @@ export class IndexMemoryMetric extends ElasticsearchMetric { } } +type NodeIndexMemoryMetricOptions = Pick & + Partial>; + export class NodeIndexMemoryMetric extends IndexMemoryMetric { - constructor(opts) { + constructor(opts: NodeIndexMemoryMetricOptions) { super({ ...opts, type: 'node', @@ -198,8 +238,11 @@ export class NodeIndexMemoryMetric extends IndexMemoryMetric { } } +type IndicesMemoryMetricOptions = Pick & + Partial>; + export class IndicesMemoryMetric extends IndexMemoryMetric { - constructor(opts) { + constructor(opts: IndicesMemoryMetricOptions) { super({ ...opts, type: 'cluster', @@ -210,8 +253,11 @@ export class IndicesMemoryMetric extends IndexMemoryMetric { } } +type SingleIndexMemoryMetricOptions = Pick & + Partial>; + export class SingleIndexMemoryMetric extends IndexMemoryMetric { - constructor(opts) { + constructor(opts: SingleIndexMemoryMetricOptions) { super({ ...opts, type: 'index', @@ -222,8 +268,11 @@ export class SingleIndexMemoryMetric extends IndexMemoryMetric { } } +type WriteThreadPoolQueueMetricOptions = Pick & + Partial>; + export class WriteThreadPoolQueueMetric extends ElasticsearchMetric { - constructor(opts) { + constructor(opts: WriteThreadPoolQueueMetricOptions) { super({ ...opts, field: 'node_stats.thread_pool.write.queue', // in 7.0, we can only check for this threadpool @@ -244,8 +293,7 @@ export class WriteThreadPoolQueueMetric extends ElasticsearchMetric { max: { field: 'node_stats.thread_pool.write.queue' }, }, }; - - this.calculation = (bucket) => { + this.calculation = (bucket: object) => { const index = _.get(bucket, 'index.value', null); const bulk = _.get(bucket, 'bulk.value', null); const write = _.get(bucket, 'write.value', null); @@ -260,8 +308,13 @@ export class WriteThreadPoolQueueMetric extends ElasticsearchMetric { } } +type WriteThreadPoolRejectedMetricOptions = Pick< + MetricOptions, + 'label' | 'description' | 'field' | 'title' +>; + export class WriteThreadPoolRejectedMetric extends ElasticsearchMetric { - constructor(opts) { + constructor(opts: WriteThreadPoolRejectedMetricOptions) { super({ ...opts, field: 'node_stats.thread_pool.write.rejected', // in 7.0, we can only check for this threadpool @@ -303,14 +356,13 @@ export class WriteThreadPoolRejectedMetric extends ElasticsearchMetric { }, }, }; - - this.calculation = (bucket) => { + this.calculation = (bucket: object) => { const index = _.get(bucket, 'index_deriv.normalized_value', null); const bulk = _.get(bucket, 'bulk_deriv.normalized_value', null); const write = _.get(bucket, 'write_deriv.normalized_value', null); if (index !== null || bulk !== null || write !== null) { - const valueOrZero = (value) => (value < 0 ? 0 : value || 0); + const valueOrZero = (value: number) => (value < 0 ? 0 : value || 0); return valueOrZero(index) + valueOrZero(bulk) + valueOrZero(write); } @@ -321,16 +373,20 @@ export class WriteThreadPoolRejectedMetric extends ElasticsearchMetric { } } +type MillisecondsToSecondsMetricOptions = Pick< + MetricOptions, + 'label' | 'description' | 'field' | 'title' | 'format' | 'metricAgg' | 'units' +> & { type: string }; + export class MillisecondsToSecondsMetric extends ElasticsearchMetric { - constructor(opts) { + constructor(opts: MillisecondsToSecondsMetricOptions) { super({ ...opts, units: i18n.translate('xpack.monitoring.metrics.es.secondsUnitLabel', { defaultMessage: 's', }), }); - - this.calculation = (bucket) => { + this.calculation = (bucket: object) => { return _.get(bucket, 'metric.value') / 1000; }; } diff --git a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.ts similarity index 100% rename from x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js rename to x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.ts index 83841b0ecb39e..c62a27000c878 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { QuotaMetric } from '../classes'; import { RequestRateMetric, @@ -27,7 +28,6 @@ import { LARGE_BYTES, LARGE_ABBREVIATED, } from '../../../../common/formatting'; -import { i18n } from '@kbn/i18n'; const indexingRateTitle = i18n.translate('xpack.monitoring.metrics.es.indexingRateTitle', { defaultMessage: 'Indexing Rate', // title to use for the chart diff --git a/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/classes.ts b/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/classes.ts index b1e2ab691c0e7..a97aa7d91f88a 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/classes.ts +++ b/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/classes.ts @@ -5,12 +5,16 @@ * 2.0. */ -// @ts-ignore -import { Metric } from '../classes'; +import { Metric, MetricOptions } from '../classes'; + +type EnterpriseSearchMetricOptions = Pick< + MetricOptions, + 'field' | 'metricAgg' | 'label' | 'description' | 'format' | 'units' +> & + Partial>; export class EnterpriseSearchMetric extends Metric { - // @ts-ignore - constructor(opts) { + constructor(opts: EnterpriseSearchMetricOptions) { super({ ...opts, app: 'enterprise_search', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/metrics.ts similarity index 100% rename from x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/metrics.js rename to x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/metrics.ts index 39a8475471d12..8955bfe59bf11 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/enterprise_search/metrics.ts @@ -5,9 +5,9 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { EnterpriseSearchMetric } from './classes'; import { LARGE_BYTES, SMALL_FLOAT, LARGE_FLOAT } from '../../../../common/formatting'; -import { i18n } from '@kbn/i18n'; const perSecondUnitLabel = i18n.translate('xpack.monitoring.metrics.entSearch.perSecondUnitLabel', { defaultMessage: '/s', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/index.ts b/x-pack/plugins/monitoring/server/lib/metrics/index.ts index 50f477c27f49a..12c19cdd4b870 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/index.ts +++ b/x-pack/plugins/monitoring/server/lib/metrics/index.ts @@ -5,17 +5,13 @@ * 2.0. */ -// @ts-ignore export { ElasticsearchMetric } from './elasticsearch/classes'; -// @ts-ignore export { KibanaClusterMetric, KibanaMetric } from './kibana/classes'; export type { ApmMetricFields } from './apm/classes'; export { ApmMetric, ApmClusterMetric } from './apm/classes'; -// @ts-ignore export { LogstashClusterMetric, LogstashMetric } from './logstash/classes'; export type { BeatsMetricFields } from './beats/classes'; export { BeatsClusterMetric, BeatsMetric } from './beats/classes'; export { EnterpriseSearchMetric } from './enterprise_search/classes'; export type { EnterpriseSearchMetricFields } from './enterprise_search/classes'; -// @ts-ignore export { metrics } from './metrics'; diff --git a/x-pack/plugins/monitoring/server/lib/metrics/kibana/classes.js b/x-pack/plugins/monitoring/server/lib/metrics/kibana/classes.ts similarity index 68% rename from x-pack/plugins/monitoring/server/lib/metrics/kibana/classes.js rename to x-pack/plugins/monitoring/server/lib/metrics/kibana/classes.ts index fccd50c8e763c..84c2d60b43fe2 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/kibana/classes.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/kibana/classes.ts @@ -5,11 +5,19 @@ * 2.0. */ -import { ClusterMetric, Metric } from '../classes'; +/* eslint-disable max-classes-per-file */ + +import { ClusterMetric, Metric, MetricOptions } from '../classes'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; +type KibanaClusterMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'format' | 'units' | 'metricAgg' +> & + Partial>; + export class KibanaClusterMetric extends ClusterMetric { - constructor(opts) { + constructor(opts: KibanaClusterMetricOptions) { super({ ...opts, app: 'kibana', @@ -25,8 +33,14 @@ export class KibanaClusterMetric extends ClusterMetric { } } +type KibanaEventsRateClusterMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'format' | 'units' +> & + Partial>; + export class KibanaEventsRateClusterMetric extends KibanaClusterMetric { - constructor(opts) { + constructor(opts: KibanaEventsRateClusterMetricOptions) { super({ ...opts, metricAgg: 'max', @@ -63,8 +77,14 @@ export class KibanaEventsRateClusterMetric extends KibanaClusterMetric { } } +type KibanaMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'format' | 'metricAgg' | 'units' +> & + Partial>; + export class KibanaMetric extends Metric { - constructor(opts) { + constructor(opts: KibanaMetricOptions) { super({ ...opts, app: 'kibana', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.ts similarity index 100% rename from x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.js rename to x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.ts index 1cf156f97597c..e6db13e222251 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.ts @@ -5,9 +5,9 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { KibanaEventsRateClusterMetric, KibanaMetric } from './classes'; import { LARGE_FLOAT, SMALL_FLOAT, LARGE_BYTES } from '../../../../common/formatting'; -import { i18n } from '@kbn/i18n'; const clientResponseTimeTitle = i18n.translate( 'xpack.monitoring.metrics.kibana.clientResponseTimeTitle', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.js b/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts similarity index 77% rename from x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.js rename to x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts index 234a1ac89f66d..6fcd757e3c6c3 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts @@ -5,11 +5,13 @@ * 2.0. */ +/* eslint-disable max-classes-per-file */ + import _ from 'lodash'; -import { ClusterMetric, Metric } from '../classes'; +import { i18n } from '@kbn/i18n'; +import { ClusterMetric, Metric, MetricOptions } from '../classes'; import { LARGE_FLOAT } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; -import { i18n } from '@kbn/i18n'; const msTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.msTimeUnitLabel', { defaultMessage: 'ms', @@ -18,8 +20,14 @@ const perSecondUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.per defaultMessage: '/s', }); +type LogstashClusterMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'format' | 'metricAgg' | 'units' +> & + Partial>; + export class LogstashClusterMetric extends ClusterMetric { - constructor(opts) { + constructor(opts: LogstashClusterMetricOptions) { super({ ...opts, app: 'logstash', @@ -35,8 +43,13 @@ export class LogstashClusterMetric extends ClusterMetric { } } +type LogstashEventsLatencyClusterMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' +>; + export class LogstashEventsLatencyClusterMetric extends LogstashClusterMetric { - constructor(opts) { + constructor(opts: LogstashEventsLatencyClusterMetricOptions) { super({ ...opts, format: LARGE_FLOAT, @@ -90,18 +103,23 @@ export class LogstashEventsLatencyClusterMetric extends LogstashClusterMetric { }, }, }; + } - this.calculation = (bucket) => { - const timeInMillisDeriv = _.get(bucket, 'events_time_in_millis_deriv.normalized_value', null); - const totalEventsDeriv = _.get(bucket, 'events_total_deriv.normalized_value', null); + public calculation = (bucket: object) => { + const timeInMillisDeriv = _.get(bucket, 'events_time_in_millis_deriv.normalized_value', null); + const totalEventsDeriv = _.get(bucket, 'events_total_deriv.normalized_value', null); - return Metric.calculateLatency(timeInMillisDeriv, totalEventsDeriv); - }; - } + return Metric.calculateLatency(timeInMillisDeriv, totalEventsDeriv); + }; } +type LogstashEventsRateClusterMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' +>; + export class LogstashEventsRateClusterMetric extends LogstashClusterMetric { - constructor(opts) { + constructor(opts: LogstashEventsRateClusterMetricOptions) { super({ ...opts, derivative: true, @@ -141,8 +159,14 @@ export class LogstashEventsRateClusterMetric extends LogstashClusterMetric { } } +type LogstashMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'units' | 'derivative' | 'metricAgg' | 'format' +> & + Partial>; + export class LogstashMetric extends Metric { - constructor(opts) { + constructor(opts: LogstashMetricOptions) { super({ ...opts, app: 'logstash', @@ -158,8 +182,10 @@ export class LogstashMetric extends Metric { } } +type LogstashEventsLatencyMetricOptions = Pick; + export class LogstashEventsLatencyMetric extends LogstashMetric { - constructor(opts) { + constructor(opts: LogstashEventsLatencyMetricOptions) { super({ ...opts, format: LARGE_FLOAT, @@ -189,8 +215,7 @@ export class LogstashEventsLatencyMetric extends LogstashMetric { }, }, }; - - this.calculation = (bucket) => { + this.calculation = (bucket: object) => { const timeInMillisDeriv = _.get(bucket, 'events_time_in_millis_deriv.normalized_value', null); const totalEventsDeriv = _.get(bucket, 'events_total_deriv.normalized_value', null); @@ -199,8 +224,10 @@ export class LogstashEventsLatencyMetric extends LogstashMetric { } } +type LogstashEventsRateMetricOptions = Pick; + export class LogstashEventsRateMetric extends LogstashMetric { - constructor(opts) { + constructor(opts: LogstashEventsRateMetricOptions) { super({ ...opts, derivative: true, @@ -211,8 +238,14 @@ export class LogstashEventsRateMetric extends LogstashMetric { } } +type LogstashPipelineQueueSizeMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'format' | 'units' +> & + Partial>; + export class LogstashPipelineQueueSizeMetric extends LogstashMetric { - constructor(opts) { + constructor(opts: LogstashPipelineQueueSizeMetricOptions) { super({ ...opts }); this.dateHistogramSubAggs = { @@ -242,19 +275,32 @@ export class LogstashPipelineQueueSizeMetric extends LogstashMetric { }, }, }; - - this.calculation = (bucket) => _.get(bucket, 'pipelines.total_queue_size_for_node.value'); + this.calculation = (bucket: object) => { + return _.get(bucket, 'pipelines.total_queue_size_for_node.value'); + }; } } +type LogstashPipelineThroughputMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'format' | 'units' +> & + Partial> & { + mbField?: string; + }; + export class LogstashPipelineThroughputMetric extends LogstashMetric { - constructor(opts) { + constructor(opts: LogstashPipelineThroughputMetricOptions) { super({ ...opts, derivative: true, }); - this.getDateHistogramSubAggs = ({ pipeline }) => { + this.getDateHistogramSubAggs = ({ + pipeline, + }: { + pipeline: { uuids: string[]; id: string }; + }) => { return { metric_deriv: { derivative: { @@ -336,15 +382,30 @@ export class LogstashPipelineThroughputMetric extends LogstashMetric { } } +type LogstashPipelineNodeCountMetricOptions = Pick< + MetricOptions, + 'field' | 'label' | 'description' | 'format' | 'units' +> & + Partial>; + export class LogstashPipelineNodeCountMetric extends LogstashMetric { - constructor(opts) { + constructor(opts: LogstashPipelineNodeCountMetricOptions) { super({ ...opts, derivative: false, }); - this.getDateHistogramSubAggs = ({ pageOfPipelines }) => { - const termAggExtras = {}; + this.getDateHistogramSubAggs = ({ + pageOfPipelines, + }: { + pageOfPipelines: Array<{ id: string }>; + }) => { + const termAggExtras: { + include: string[]; + } = { + include: [], + }; + if (pageOfPipelines) { termAggExtras.include = pageOfPipelines.map((pipeline) => pipeline.id); } @@ -404,14 +465,14 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric { }; }; - this.calculation = (bucket) => { - const pipelineNodesCounts = {}; + this.calculation = (bucket: object) => { + const pipelineNodesCounts: any = {}; const legacyPipelineBuckets = _.get(bucket, 'pipelines_nested.by_pipeline_id.buckets', []); const mbPiplineBuckets = _.get(bucket, 'pipelines_mb_nested.by_pipeline_id.buckets', []); const pipelineBuckets = legacyPipelineBuckets.length ? legacyPipelineBuckets : mbPiplineBuckets; - pipelineBuckets.forEach((pipelineBucket) => { + pipelineBuckets.forEach((pipelineBucket: any) => { pipelineNodesCounts[pipelineBucket.key] = _.get(pipelineBucket, 'to_root.node_count.value'); }); diff --git a/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts similarity index 100% rename from x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.js rename to x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts index a140cd7bcc370..87024a6de86ab 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { QuotaMetric } from '../classes'; import { LogstashEventsRateClusterMetric, @@ -22,7 +23,6 @@ import { SMALL_BYTES, LARGE_ABBREVIATED, } from '../../../../common/formatting'; -import { i18n } from '@kbn/i18n'; const instanceSystemLoadTitle = i18n.translate( 'xpack.monitoring.metrics.logstash.systemLoadTitle', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/metrics.ts similarity index 84% rename from x-pack/plugins/monitoring/server/lib/metrics/metrics.js rename to x-pack/plugins/monitoring/server/lib/metrics/metrics.ts index 58cc61f6bbdc5..cb787d10c7cb8 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/metrics.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { Metric } from './classes/metric'; import { metrics as elasticsearchMetrics } from './elasticsearch/metrics'; import { metrics as kibanaMetrics } from './kibana/metrics'; import { metrics as logstashMetrics } from './logstash/metrics'; @@ -12,7 +13,9 @@ import { metrics as beatsMetrics } from './beats/metrics'; import { metrics as apmMetrics } from './apm/metrics'; import { metrics as entSearchMetrics } from './enterprise_search/metrics'; -export const metrics = { +export type { Metric } from './classes/metric'; + +export const metrics: { [key: string]: Metric } = { ...elasticsearchMetrics, ...kibanaMetrics, ...logstashMetrics, diff --git a/x-pack/plugins/observability/kibana.json b/x-pack/plugins/observability/kibana.json index dff163c57d5f6..505c8cfe79c03 100644 --- a/x-pack/plugins/observability/kibana.json +++ b/x-pack/plugins/observability/kibana.json @@ -35,7 +35,8 @@ "data", "dataViews", "kibanaReact", - "kibanaUtils" + "kibanaUtils", + "lens" ], "extraPublicDirs": [ "common" diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts index d01d579daf91a..286ad7005c2cb 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts @@ -63,10 +63,11 @@ import { SYNTHETICS_STEP_DURATION, SYNTHETICS_STEP_NAME, } from './field_names/synthetics'; +import { DOCUMENT_FIELD_NAME } from '../../../../../../../lens/common/constants'; export const DEFAULT_TIME = { from: 'now-1h', to: 'now' }; -export const RECORDS_FIELD = 'Records'; +export const RECORDS_FIELD = DOCUMENT_FIELD_NAME; export const RECORDS_PERCENTAGE_FIELD = 'RecordsPercentage'; export const FieldLabels: Record = { diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts index 9c636edaac197..430cf84c077ca 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts @@ -394,7 +394,7 @@ describe('Lens Attribute', () => { label: 'Part of count() / overall_sum(count())', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0X1': { customLabel: true, @@ -408,7 +408,7 @@ describe('Lens Attribute', () => { label: 'Part of count() / overall_sum(count())', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0X2': { customLabel: true, @@ -609,7 +609,7 @@ describe('Lens Attribute', () => { label: 'Part of count() / overall_sum(count())', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0X1': { customLabel: true, @@ -623,7 +623,7 @@ describe('Lens Attribute', () => { label: 'Part of count() / overall_sum(count())', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0X2': { customLabel: true, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.tsx index 44b40944dfd07..35121f6df94b3 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.tsx @@ -12,6 +12,7 @@ import { FormulaIndexPatternColumn, OverallSumIndexPatternColumn, } from '../../../../../../../lens/public'; +import { RECORDS_FIELD } from '../constants'; export function getDistributionInPercentageColumn({ label, @@ -50,7 +51,7 @@ export function getDistributionInPercentageColumn({ operationType: 'count', isBucketed: false, scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, customLabel: true, filter: { query: columnFilter ?? '', language: 'kuery' }, }; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts index ba4b4a3bce4d9..e92d4f430ae7b 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { RECORDS_FIELD } from '../constants'; + export const sampleAttribute = { description: '', references: [ @@ -88,7 +90,7 @@ export const sampleAttribute = { label: 'Part of count() / overall_sum(count())', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0X1': { customLabel: true, @@ -102,7 +104,7 @@ export const sampleAttribute = { label: 'Part of count() / overall_sum(count())', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0X2': { customLabel: true, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts index f595e7a147812..0230f5643ada8 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { RECORDS_FIELD } from '../constants'; + export const sampleAttributeCoreWebVital = { description: '', references: [ @@ -59,7 +61,7 @@ export const sampleAttributeCoreWebVital = { label: 'Average', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-2': { dataType: 'number', @@ -71,7 +73,7 @@ export const sampleAttributeCoreWebVital = { label: 'Poor', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0': { dataType: 'number', @@ -84,7 +86,7 @@ export const sampleAttributeCoreWebVital = { label: 'Good', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, }, incompleteColumns: {}, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts index 52ccdc2918e4c..6da949896aa5f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { RECORDS_FIELD } from '../constants'; + export const sampleAttributeKpi = { description: '', references: [ @@ -46,7 +48,7 @@ export const sampleAttributeKpi = { label: 'Page views', operationType: 'count', scale: 'ratio', - sourceField: 'Records', + sourceField: RECORDS_FIELD, }, }, incompleteColumns: {}, diff --git a/x-pack/plugins/observability/public/index.ts b/x-pack/plugins/observability/public/index.ts index d855d0178192e..550969191fa87 100644 --- a/x-pack/plugins/observability/public/index.ts +++ b/x-pack/plugins/observability/public/index.ts @@ -102,5 +102,7 @@ export type { SeriesConfig, ConfigProps } from './components/shared/exploratory_ export { ReportTypes, REPORT_METRIC_FIELD, + RECORDS_PERCENTAGE_FIELD, + RECORDS_FIELD, } from './components/shared/exploratory_view/configurations/constants'; export { ExploratoryViewContextProvider } from './components/shared/exploratory_view/contexts/exploratory_view_config'; diff --git a/x-pack/plugins/observability/public/pages/alerts/components/parse_alert.ts b/x-pack/plugins/observability/public/pages/alerts/components/parse_alert.ts index a938998c6f8ea..2c07aed15122e 100644 --- a/x-pack/plugins/observability/public/pages/alerts/components/parse_alert.ts +++ b/x-pack/plugins/observability/public/pages/alerts/components/parse_alert.ts @@ -23,14 +23,18 @@ export const parseAlert = (observabilityRuleTypeRegistry: ObservabilityRuleTypeRegistry) => (alert: Record): TopAlert => { const experimentalFields = Object.keys(experimentalRuleFieldMap); - const alertWithExperimentalFields = experimentalFields.reduce( - (acc, key) => ({ ...acc, [key]: alert[key] }), - {} - ); + const alertWithExperimentalFields = experimentalFields.reduce((acc, key) => { + if (alert[key]) { + return { ...acc, [key]: alert[key] }; + } + return acc; + }, {}); + const parsedFields = { - ...parseTechnicalFields(alert), - ...parseExperimentalFields(alertWithExperimentalFields), + ...parseTechnicalFields(alert, true), + ...parseExperimentalFields(alertWithExperimentalFields, true), }; + const formatter = observabilityRuleTypeRegistry.getFormatter(parsedFields[ALERT_RULE_TYPE_ID]!); const formatted = { link: undefined, diff --git a/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/get_export_settings.ts b/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/get_export_settings.ts index 7d4db38ef4aae..5b69e33624c5c 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/get_export_settings.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/get_export_settings.ts @@ -6,7 +6,6 @@ */ import { ByteSizeValue } from '@kbn/config-schema'; -import { i18n } from '@kbn/i18n'; import { IUiSettingsClient } from 'kibana/server'; import { createEscapeValue } from '../../../../../../../src/plugins/data/common'; import { ReportingConfig } from '../../../'; @@ -49,11 +48,7 @@ export const getExportSettings = async ( if (setTimezone === 'Browser') { // if `Browser`, hardcode it to 'UTC' so the export has data that makes sense logger.warn( - i18n.translate('xpack.reporting.exportTypes.csv.executeJob.dateFormateSetting', { - defaultMessage: - 'Kibana Advanced Setting "{dateFormatTimezone}" is set to "Browser". Dates will be formatted as UTC to avoid ambiguity.', - values: { dateFormatTimezone: 'dateFormat:tz' }, - }) + `Kibana Advanced Setting "dateFormat:tz" is set to "Browser". Dates will be formatted as UTC to avoid ambiguity.` ); setTimezone = 'UTC'; } diff --git a/x-pack/plugins/rule_registry/common/parse_experimental_fields.ts b/x-pack/plugins/rule_registry/common/parse_experimental_fields.ts index 9299b8eac6921..4347a7e5b8d48 100644 --- a/x-pack/plugins/rule_registry/common/parse_experimental_fields.ts +++ b/x-pack/plugins/rule_registry/common/parse_experimental_fields.ts @@ -6,6 +6,7 @@ */ import { isLeft } from 'fp-ts/lib/Either'; import { PathReporter } from 'io-ts/lib/PathReporter'; +import { pick } from 'lodash'; import { experimentalRuleFieldMap, ExperimentalRuleFieldMap, @@ -16,8 +17,16 @@ import { runtimeTypeFromFieldMap } from './field_map'; const experimentalFieldRuntimeType = runtimeTypeFromFieldMap(experimentalRuleFieldMap); -export const parseExperimentalFields = (input: unknown) => { - const validate = experimentalFieldRuntimeType.decode(input); +export const parseExperimentalFields = (input: unknown, partial = false) => { + const decodePartial = (alert: unknown) => { + const limitedFields = pick(experimentalRuleFieldMap, Object.keys(alert as object)); + const partialTechnicalFieldRuntimeType = runtimeTypeFromFieldMap( + limitedFields as unknown as ExperimentalRuleFieldMap + ); + return partialTechnicalFieldRuntimeType.decode(alert); + }; + + const validate = partial ? decodePartial(input) : experimentalFieldRuntimeType.decode(input); if (isLeft(validate)) { throw new Error(PathReporter.report(validate).join('\n')); diff --git a/x-pack/plugins/rule_registry/common/parse_technical_fields.test.ts b/x-pack/plugins/rule_registry/common/parse_technical_fields.test.ts index dfc351099b444..b292e0744a3a5 100644 --- a/x-pack/plugins/rule_registry/common/parse_technical_fields.test.ts +++ b/x-pack/plugins/rule_registry/common/parse_technical_fields.test.ts @@ -45,6 +45,20 @@ describe('parseTechnicalFields', () => { expect(() => parseTechnicalFields(ALERT_WITH_MISSING_REQUIRED_FIELDS)).toThrow(); }); + it('parses a partial alert with missing required fields without error', () => { + const ALERT_WITH_MISSING_REQUIRED_FIELDS = { + '@timestamp': ['2021-12-06T12:30:59.411Z'], + 'kibana.alert.duration.us': ['488935266000'], + 'kibana.alert.reason': ['host.uptime has reported no data over the past 1m for *'], + 'kibana.alert.workflow_status': ['open'], + 'kibana.alert.start': ['2021-11-30T20:42:04.145Z'], + 'event.action': ['active'], + 'kibana.version': ['8.1.0'], + 'event.kind': ['signal'], + }; + expect(() => parseTechnicalFields(ALERT_WITH_MISSING_REQUIRED_FIELDS, true)).not.toThrow(); + }); + it('parses an alert with missing optional fields without error', () => { const ALERT_WITH_MISSING_OPTIONAL_FIELDS = { '@timestamp': ['2021-12-06T12:30:59.411Z'], diff --git a/x-pack/plugins/rule_registry/common/parse_technical_fields.ts b/x-pack/plugins/rule_registry/common/parse_technical_fields.ts index 59a170ba3f9f6..c5b7d0425f245 100644 --- a/x-pack/plugins/rule_registry/common/parse_technical_fields.ts +++ b/x-pack/plugins/rule_registry/common/parse_technical_fields.ts @@ -7,6 +7,7 @@ import { isLeft } from 'fp-ts/lib/Either'; import { PathReporter } from 'io-ts/lib/PathReporter'; +import { pick } from 'lodash'; import { technicalRuleFieldMap, TechnicalRuleFieldMap, @@ -16,8 +17,16 @@ import { runtimeTypeFromFieldMap } from './field_map'; const technicalFieldRuntimeType = runtimeTypeFromFieldMap(technicalRuleFieldMap); -export const parseTechnicalFields = (input: unknown) => { - const validate = technicalFieldRuntimeType.decode(input); +export const parseTechnicalFields = (input: unknown, partial = false) => { + const decodePartial = (alert: unknown) => { + const limitedFields = pick(technicalRuleFieldMap, Object.keys(alert as object)); + const partialTechnicalFieldRuntimeType = runtimeTypeFromFieldMap( + limitedFields as unknown as TechnicalRuleFieldMap + ); + return partialTechnicalFieldRuntimeType.decode(alert); + }; + + const validate = partial ? decodePartial(input) : technicalFieldRuntimeType.decode(input); if (isLeft(validate)) { throw new Error(PathReporter.report(validate).join('\n')); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts index 276ea070d6f87..af531e8ae8e12 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts @@ -46,6 +46,7 @@ const fakeRequest = { const auditLogger = { log: jest.fn(), + enabled: true, } as jest.Mocked; describe('AlertsClientFactory', () => { diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts index 92f5ea4517d3f..09861278cd5d5 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts @@ -25,6 +25,7 @@ const alertingAuthMock = alertingAuthorizationMock.create(); const esClientMock = elasticsearchClientMock.createElasticsearchClient(); const auditLogger = { log: jest.fn(), + enabled: true, } as jest.Mocked; const alertsClientParams: jest.Mocked = { diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts index 5f9a20c14ea5b..bfff95b5d601b 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts @@ -24,6 +24,7 @@ const alertingAuthMock = alertingAuthorizationMock.create(); const esClientMock = elasticsearchClientMock.createElasticsearchClient(); const auditLogger = { log: jest.fn(), + enabled: true, } as jest.Mocked; const alertsClientParams: jest.Mocked = { diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts index eaf6c0089ce12..0c74cc1463410 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts @@ -25,6 +25,7 @@ const alertingAuthMock = alertingAuthorizationMock.create(); const esClientMock = elasticsearchClientMock.createElasticsearchClient(); const auditLogger = { log: jest.fn(), + enabled: true, } as jest.Mocked; const alertsClientParams: jest.Mocked = { diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts index 85527e26a9cd3..0dcfc602bc281 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts @@ -24,6 +24,7 @@ const alertingAuthMock = alertingAuthorizationMock.create(); const esClientMock = elasticsearchClientMock.createElasticsearchClient(); const auditLogger = { log: jest.fn(), + enabled: true, } as jest.Mocked; const alertsClientParams: jest.Mocked = { diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/driver.ts index 0e56c715d17cc..57f987f866ec9 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/driver.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/driver.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import { map, truncate } from 'lodash'; import open from 'opn'; import puppeteer, { ElementHandle, EvaluateFn, Page, SerializableOrJSHandle } from 'puppeteer'; @@ -92,10 +91,7 @@ const WAIT_FOR_DELAY_MS: number = 100; function getDisallowedOutgoingUrlError(interceptedUrl: string) { return new Error( - i18n.translate('xpack.screenshotting.chromiumDriver.disallowedOutgoingUrl', { - defaultMessage: `Received disallowed outgoing URL: "{interceptedUrl}". Failing the request and closing the browser.`, - values: { interceptedUrl }, - }) + `Received disallowed outgoing URL: "${interceptedUrl}". Failing the request and closing the browser.` ); } @@ -323,15 +319,7 @@ export class HeadlessChromiumDriver { headers, }); } catch (err) { - logger.error( - i18n.translate( - 'xpack.screenshotting.chromiumDriver.failedToCompleteRequestUsingHeaders', - { - defaultMessage: 'Failed to complete a request using headers: {error}', - values: { error: err }, - } - ) - ); + logger.error(`Failed to complete a request using headers: ${err.message}`); } } else { const loggedUrl = isData ? this.truncateUrl(interceptedUrl) : interceptedUrl; @@ -339,12 +327,7 @@ export class HeadlessChromiumDriver { try { await client.send('Fetch.continueRequest', { requestId }); } catch (err) { - logger.error( - i18n.translate('xpack.screenshotting.chromiumDriver.failedToCompleteRequest', { - defaultMessage: 'Failed to complete a request: {error}', - values: { error: err }, - }) - ); + logger.error(`Failed to complete a request: ${err.message}`); } } diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts index 8bdd206310750..787bd8fbfca99 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import { getDataPath } from '@kbn/utils'; import { spawn } from 'child_process'; import del from 'del'; @@ -305,10 +304,7 @@ export class HeadlessChromiumDriverFactory { const uncaughtExceptionPageError$ = Rx.fromEvent(page, 'pageerror').pipe( map((err) => { logger.warn( - i18n.translate('xpack.screenshotting.browsers.chromium.pageErrorDetected', { - defaultMessage: `Reporting encountered an uncaught error on the page that will be ignored: {err}`, - values: { err: err.toString() }, - }) + `Reporting encountered an uncaught error on the page that will be ignored: ${err.message}` ); }) ); @@ -350,12 +346,7 @@ export class HeadlessChromiumDriverFactory { getPageExit(browser: Browser, page: Page) { const pageError$ = Rx.fromEvent(page, 'error').pipe( mergeMap((err) => { - return Rx.throwError( - i18n.translate('xpack.screenshotting.browsers.chromium.errorDetected', { - defaultMessage: 'Reporting encountered an error: {err}', - values: { err: err.toString() }, - }) - ); + return Rx.throwError(`Reporting encountered an error: ${err.toString()}`); }) ); @@ -383,9 +374,7 @@ export class HeadlessChromiumDriverFactory { const exit$ = Rx.fromEvent(browserProcess, 'exit').pipe( map((code) => { this.logger.error(`Browser exited abnormally, received code: ${code}`); - return i18n.translate('xpack.screenshotting.diagnostic.browserCrashed', { - defaultMessage: `Browser exited abnormally during startup`, - }); + return `Browser exited abnormally during startup`; }) ); @@ -393,9 +382,7 @@ export class HeadlessChromiumDriverFactory { map((err) => { this.logger.error(`Browser process threw an error on startup`); this.logger.error(err as string | Error); - return i18n.translate('xpack.screenshotting.diagnostic.browserErrored', { - defaultMessage: `Browser process threw an error on startup`, - }); + return `Browser process threw an error on startup`; }) ); diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/index.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/index.ts index cab99c43f8303..31a48cae7475e 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/index.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/index.ts @@ -5,14 +5,8 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; - export const getChromiumDisconnectedError = () => - new Error( - i18n.translate('xpack.screenshotting.screencapture.browserWasClosed', { - defaultMessage: 'Browser was closed unexpectedly! Check the server logs for more info.', - }) - ); + new Error('Browser was closed unexpectedly! Check the server logs for more info.'); export { HeadlessChromiumDriver } from './driver'; export type { ConditionalHeaders } from './driver'; diff --git a/x-pack/plugins/screenshotting/server/config/create_config.ts b/x-pack/plugins/screenshotting/server/config/create_config.ts index 1819f37e1bccd..d56dd2489f4b8 100644 --- a/x-pack/plugins/screenshotting/server/config/create_config.ts +++ b/x-pack/plugins/screenshotting/server/config/create_config.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import { cloneDeep, set, upperFirst } from 'lodash'; import type { Logger } from 'src/core/server'; import { getDefaultChromiumSandboxDisabled } from './default_chromium_sandbox_disabled'; @@ -27,29 +26,15 @@ export async function createConfig(parentLogger: Logger, config: ConfigType) { const { os, disableSandbox } = await getDefaultChromiumSandboxDisabled(); const osName = [os.os, os.dist, os.release].filter(Boolean).map(upperFirst).join(' '); - logger.debug( - i18n.translate('xpack.screenshotting.serverConfig.osDetected', { - defaultMessage: `Running on OS: '{osName}'`, - values: { osName }, - }) - ); + logger.debug(`Running on OS: '${osName}'`); if (disableSandbox === true) { logger.warn( - i18n.translate('xpack.screenshotting.serverConfig.autoSet.sandboxDisabled', { - defaultMessage: `Chromium sandbox provides an additional layer of protection, but is not supported for {osName} OS. Automatically setting '{configKey}: true'.`, - values: { - configKey: 'xpack.screenshotting.capture.browser.chromium.disableSandbox', - osName, - }, - }) + `Chromium sandbox provides an additional layer of protection, but is not supported for ${osName} OS. Automatically setting 'xpack.screenshotting.capture.browser.chromium.disableSandbox: true'.` ); } else { logger.info( - i18n.translate('xpack.screenshotting.serverConfig.autoSet.sandboxEnabled', { - defaultMessage: `Chromium sandbox provides an additional layer of protection, and is supported for {osName} OS. Automatically enabling Chromium sandbox.`, - values: { osName }, - }) + `Chromium sandbox provides an additional layer of protection, and is supported for ${osName} OS. Automatically enabling Chromium sandbox.` ); } diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.ts b/x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.ts index f7576a012e738..0e2106a98d8b0 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import apm from 'elastic-apm-node'; import type { Logger } from 'src/core/server'; import type { HeadlessChromiumDriver } from '../browsers'; @@ -83,9 +82,7 @@ export const getElementPositionAndAttributes = async ( if (!elementsPositionAndAttributes?.length) { throw new Error( - i18n.translate('xpack.screenshotting.screencapture.noElements', { - defaultMessage: `An error occurred while reading the page for visualization panels: no panels were found.`, - }) + `An error occurred while reading the page for visualization panels: no panels were found.` ); } } catch (err) { diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.ts b/x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.ts index 3677fe99d932f..39976d2a6d656 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import apm from 'elastic-apm-node'; import type { Logger } from 'src/core/server'; import type { HeadlessChromiumDriver } from '../browsers'; @@ -22,11 +21,7 @@ export const getNumberOfItems = async ( const { renderComplete: renderCompleteSelector, itemsCountAttribute } = layout.selectors; let itemsCount: number; - logger.debug( - i18n.translate('xpack.screenshotting.screencapture.logWaitingForElements', { - defaultMessage: 'waiting for elements or items count attribute; or not found to interrupt', - }) - ); + logger.debug('waiting for elements or items count attribute; or not found to interrupt'); try { // the dashboard is using the `itemsCountAttribute` attribute to let us @@ -62,10 +57,7 @@ export const getNumberOfItems = async ( } catch (error) { logger.error(error); throw new Error( - i18n.translate('xpack.screenshotting.screencapture.readVisualizationsError', { - defaultMessage: `An error occurred when trying to read the page for visualization panel info: {error}`, - values: { error }, - }) + `An error occurred when trying to read the page for visualization panel info: ${error.message}` ); } diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_render_errors.ts b/x-pack/plugins/screenshotting/server/screenshots/get_render_errors.ts index ad3da8d0ef488..007b3eb48d1c9 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/get_render_errors.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/get_render_errors.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import apm from 'elastic-apm-node'; import type { Logger } from 'src/core/server'; import type { HeadlessChromiumDriver } from '../browsers'; @@ -43,10 +42,7 @@ export const getRenderErrors = async ( if (errorsFound?.length) { logger.warn( - i18n.translate('xpack.screenshotting.screencapture.renderErrorsFound', { - defaultMessage: 'Found {count} error messages. See report object for more information.', - values: { count: errorsFound.length }, - }) + `Found ${errorsFound.length} error messages. See report object for more information.` ); } diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.ts b/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.ts index 8e03bb8a77cc9..26ef272e7f18e 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import apm from 'elastic-apm-node'; import type { Logger } from 'src/core/server'; import type { HeadlessChromiumDriver } from '../browsers'; @@ -33,11 +32,7 @@ export const getScreenshots = async ( logger: Logger, elementsPositionAndAttributes: ElementsPositionAndAttribute[] ): Promise => { - logger.info( - i18n.translate('xpack.screenshotting.screencapture.takingScreenshots', { - defaultMessage: `taking screenshots`, - }) - ); + logger.info(`taking screenshots`); const screenshots: Screenshot[] = []; @@ -60,14 +55,7 @@ export const getScreenshots = async ( span?.end(); } - logger.info( - i18n.translate('xpack.screenshotting.screencapture.screenshotsTaken', { - defaultMessage: `screenshots taken: {numScreenhots}`, - values: { - numScreenhots: screenshots.length, - }, - }) - ); + logger.info(`screenshots taken: ${screenshots.length}`); return screenshots; }; diff --git a/x-pack/plugins/screenshotting/server/screenshots/index.test.ts b/x-pack/plugins/screenshotting/server/screenshots/index.test.ts index f749e31988ff4..c49f2289ba959 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/index.test.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/index.test.ts @@ -271,7 +271,7 @@ describe('Screenshot Observable Pipeline', () => { }, }, ], - "error": [Error: The "wait for elements" phase encountered an error: Error: An error occurred when trying to read the page for visualization panel info: Error: Mock error!], + "error": [Error: The "wait for elements" phase encountered an error: Error: An error occurred when trying to read the page for visualization panel info: Mock error!], "screenshots": Array [ Object { "data": Object { @@ -313,7 +313,7 @@ describe('Screenshot Observable Pipeline', () => { }, }, ], - "error": [Error: The "wait for elements" phase encountered an error: Error: An error occurred when trying to read the page for visualization panel info: Error: Mock error!], + "error": [Error: The "wait for elements" phase encountered an error: Error: An error occurred when trying to read the page for visualization panel info: Mock error!], "screenshots": Array [ Object { "data": Object { diff --git a/x-pack/plugins/screenshotting/server/screenshots/inject_css.ts b/x-pack/plugins/screenshotting/server/screenshots/inject_css.ts index d4e38600db7de..30b7867a0e9b2 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/inject_css.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/inject_css.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import fs from 'fs'; import { promisify } from 'util'; import apm from 'elastic-apm-node'; @@ -22,11 +21,7 @@ export const injectCustomCss = async ( layout: Layout ): Promise => { const span = apm.startSpan('inject_css', 'correction'); - logger.debug( - i18n.translate('xpack.screenshotting.screencapture.injectingCss', { - defaultMessage: 'injecting custom css', - }) - ); + logger.debug('injecting custom css'); const filePath = layout.getCssOverridesPath(); if (!filePath) { @@ -50,10 +45,7 @@ export const injectCustomCss = async ( } catch (err) { logger.error(err); throw new Error( - i18n.translate('xpack.screenshotting.screencapture.injectCss', { - defaultMessage: `An error occurred when trying to update Kibana CSS for reporting. {error}`, - values: { error: err }, - }) + `An error occurred when trying to update Kibana CSS for reporting. ${err.message}` ); } diff --git a/x-pack/plugins/screenshotting/server/screenshots/open_url.ts b/x-pack/plugins/screenshotting/server/screenshots/open_url.ts index 08639122a4c26..a27c9b5db4090 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/open_url.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/open_url.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import apm from 'elastic-apm-node'; import type { Logger } from 'src/core/server'; import type { Layout } from 'src/plugins/screenshot_mode/common'; @@ -50,12 +49,7 @@ export const openUrl = async ( ); } catch (err) { logger.error(err); - throw new Error( - i18n.translate('xpack.screenshotting.screencapture.couldntLoadKibana', { - defaultMessage: `An error occurred when trying to open the Kibana URL: {error}`, - values: { error: err }, - }) - ); + throw new Error(`An error occurred when trying to open the Kibana URL: ${err.message}`); } span?.end(); diff --git a/x-pack/plugins/screenshotting/server/screenshots/wait_for_render.ts b/x-pack/plugins/screenshotting/server/screenshots/wait_for_render.ts index bdc75572e685e..16f0d5a6da774 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/wait_for_render.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/wait_for_render.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import apm from 'elastic-apm-node'; import type { Logger } from 'src/core/server'; import type { HeadlessChromiumDriver } from '../browsers'; @@ -20,11 +19,7 @@ export const waitForRenderComplete = async ( ) => { const span = apm.startSpan('wait_for_render', 'wait'); - logger.debug( - i18n.translate('xpack.screenshotting.screencapture.waitingForRenderComplete', { - defaultMessage: 'waiting for rendering to complete', - }) - ); + logger.debug('waiting for rendering to complete'); return await browser .evaluate( @@ -74,11 +69,7 @@ export const waitForRenderComplete = async ( logger ) .then(() => { - logger.debug( - i18n.translate('xpack.screenshotting.screencapture.renderIsComplete', { - defaultMessage: 'rendering is complete', - }) - ); + logger.debug('rendering is complete'); span?.end(); }); diff --git a/x-pack/plugins/screenshotting/server/screenshots/wait_for_visualizations.ts b/x-pack/plugins/screenshotting/server/screenshots/wait_for_visualizations.ts index 3102f444c2340..0c439f765163c 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/wait_for_visualizations.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/wait_for_visualizations.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import apm from 'elastic-apm-node'; import type { Logger } from 'src/core/server'; import type { HeadlessChromiumDriver } from '../browsers'; @@ -46,12 +45,7 @@ export const waitForVisualizations = async ( const span = apm.startSpan('wait_for_visualizations', 'wait'); const { renderComplete: renderCompleteSelector } = layout.selectors; - logger.debug( - i18n.translate('xpack.screenshotting.screencapture.waitingForRenderedElements', { - defaultMessage: `waiting for {itemsCount} rendered elements to be in the DOM`, - values: { itemsCount: toEqual }, - }) - ); + logger.debug(`waiting for ${toEqual} rendered elements to be in the DOM`); try { await browser.waitFor({ @@ -64,10 +58,7 @@ export const waitForVisualizations = async ( } catch (err) { logger.error(err); throw new Error( - i18n.translate('xpack.screenshotting.screencapture.couldntFinishRendering', { - defaultMessage: `An error occurred when trying to wait for {count} visualizations to finish rendering. {error}`, - values: { count: toEqual, error: err }, - }) + `An error occurred when trying to wait for ${toEqual} visualizations to finish rendering. ${err.message}` ); } diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx index f621ca0eddb0f..a99e08fd5a8a6 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx @@ -139,9 +139,9 @@ function getProps({ const rolesAPIClient = rolesAPIClientMock.create(); rolesAPIClient.getRole.mockResolvedValue(role); - const indexPatterns = dataPluginMock.createStartContract().indexPatterns; + const dataViews = dataPluginMock.createStartContract().dataViews; // `undefined` titles can technically happen via import/export or other manual manipulation - indexPatterns.getTitles = jest.fn().mockResolvedValue(['foo*', 'bar*', undefined]); + dataViews.getTitles = jest.fn().mockResolvedValue(['foo*', 'bar*', undefined]); const indicesAPIClient = indicesAPIClientMock.create(); @@ -171,7 +171,7 @@ function getProps({ roleName: role?.name, license, http, - indexPatterns, + dataViews, indicesAPIClient, privilegesAPIClient, rolesAPIClient, @@ -352,11 +352,11 @@ describe('', () => { }); it('can render if index patterns are not available', async () => { - const indexPatterns = dataPluginMock.createStartContract().indexPatterns; - indexPatterns.getTitles = jest.fn().mockRejectedValue({ response: { status: 403 } }); + const dataViews = dataPluginMock.createStartContract().dataViews; + dataViews.getTitles = jest.fn().mockRejectedValue({ response: { status: 403 } }); const wrapper = mountWithIntl( - + ); await waitForRender(wrapper); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx index 2bfc23b446966..2e9b5f126f6db 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx @@ -34,7 +34,7 @@ import type { NotificationsStart, ScopedHistory, } from 'src/core/public'; -import type { IndexPatternsContract } from 'src/plugins/data/public'; +import type { DataViewsContract } from 'src/plugins/data/public'; import { reactRouterNavigate } from '../../../../../../../src/plugins/kibana_react/public'; import type { KibanaFeature } from '../../../../../features/common'; @@ -69,7 +69,7 @@ import { RoleValidator } from './validate_role'; interface Props { action: 'edit' | 'clone'; roleName?: string; - indexPatterns: IndexPatternsContract; + dataViews: DataViewsContract; userAPIClient: PublicMethodsOf; indicesAPIClient: PublicMethodsOf; rolesAPIClient: PublicMethodsOf; @@ -101,13 +101,13 @@ function useRunAsUsers( } function useIndexPatternsTitles( - indexPatterns: IndexPatternsContract, + dataViews: DataViewsContract, fatalErrors: FatalErrorsSetup, notifications: NotificationsStart ) { const [indexPatternsTitles, setIndexPatternsTitles] = useState(null); useEffect(() => { - indexPatterns + dataViews .getTitles() .catch((err: IHttpFetchError) => { // If user doesn't have access to the index patterns they still should be able to create new @@ -115,6 +115,8 @@ function useIndexPatternsTitles( if (err.response?.status === 403) { notifications.toasts.addDanger({ title: i18n.translate('xpack.security.management.roles.noIndexPatternsPermission', { + // Note: we are attempting to fetch data views (a Kibana construct), but we are using those to render a list of usable index + // patterns (an Elasticsearch construct) for the user. This error message reflects what is shown on the UI. defaultMessage: 'You need permission to access the list of available index patterns.', }), }); @@ -125,7 +127,7 @@ function useIndexPatternsTitles( throw err; }) .then((titles) => setIndexPatternsTitles(titles.filter(Boolean))); - }, [fatalErrors, indexPatterns, notifications]); + }, [fatalErrors, dataViews, notifications]); return indexPatternsTitles; } @@ -271,7 +273,7 @@ function useFeatures( export const EditRolePage: FunctionComponent = ({ userAPIClient, - indexPatterns, + dataViews, rolesAPIClient, indicesAPIClient, privilegesAPIClient, @@ -294,7 +296,7 @@ export const EditRolePage: FunctionComponent = ({ const { current: validator } = useRef(new RoleValidator({ shouldValidate: false })); const [formError, setFormError] = useState(null); const runAsUsers = useRunAsUsers(userAPIClient, fatalErrors); - const indexPatternsTitles = useIndexPatternsTitles(indexPatterns, fatalErrors, notifications); + const indexPatternsTitles = useIndexPatternsTitles(dataViews, fatalErrors, notifications); const privileges = usePrivileges(privilegesAPIClient, fatalErrors); const spaces = useSpaces(http, fatalErrors); const features = useFeatures(getFeatures, fatalErrors); diff --git a/x-pack/plugins/security/public/management/roles/roles_management_app.tsx b/x-pack/plugins/security/public/management/roles/roles_management_app.tsx index fb68fa7857668..3c723bdfcc988 100644 --- a/x-pack/plugins/security/public/management/roles/roles_management_app.tsx +++ b/x-pack/plugins/security/public/management/roles/roles_management_app.tsx @@ -108,7 +108,7 @@ export const rolesManagementApp = Object.freeze({ license={license} docLinks={docLinks} uiCapabilities={application.capabilities} - indexPatterns={data.indexPatterns} + dataViews={data.dataViews} history={history} spacesApiUi={spacesApiUi} /> diff --git a/x-pack/plugins/security/server/audit/audit_events.ts b/x-pack/plugins/security/server/audit/audit_events.ts index 2dfaf8ece004f..37b2cecfa55c1 100644 --- a/x-pack/plugins/security/server/audit/audit_events.ts +++ b/x-pack/plugins/security/server/audit/audit_events.ts @@ -218,8 +218,6 @@ export enum SavedObjectAction { UPDATE = 'saved_object_update', DELETE = 'saved_object_delete', FIND = 'saved_object_find', - ADD_TO_SPACES = 'saved_object_add_to_spaces', - DELETE_FROM_SPACES = 'saved_object_delete_from_spaces', REMOVE_REFERENCES = 'saved_object_remove_references', OPEN_POINT_IN_TIME = 'saved_object_open_point_in_time', CLOSE_POINT_IN_TIME = 'saved_object_close_point_in_time', @@ -236,8 +234,6 @@ const savedObjectAuditVerbs: Record = { saved_object_update: ['update', 'updating', 'updated'], saved_object_delete: ['delete', 'deleting', 'deleted'], saved_object_find: ['access', 'accessing', 'accessed'], - saved_object_add_to_spaces: ['update', 'updating', 'updated'], - saved_object_delete_from_spaces: ['update', 'updating', 'updated'], saved_object_open_point_in_time: [ 'open point-in-time', 'opening point-in-time', @@ -272,8 +268,6 @@ const savedObjectAuditTypes: Record = { saved_object_update: 'change', saved_object_delete: 'deletion', saved_object_find: 'access', - saved_object_add_to_spaces: 'change', - saved_object_delete_from_spaces: 'change', saved_object_open_point_in_time: 'creation', saved_object_close_point_in_time: 'deletion', saved_object_remove_references: 'change', diff --git a/x-pack/plugins/security/server/audit/audit_service.test.ts b/x-pack/plugins/security/server/audit/audit_service.test.ts index 1815f617dceae..eb1a22e0b3543 100644 --- a/x-pack/plugins/security/server/audit/audit_service.test.ts +++ b/x-pack/plugins/security/server/audit/audit_service.test.ts @@ -68,6 +68,7 @@ describe('#setup', () => { Object { "asScoped": [Function], "withoutRequest": Object { + "enabled": true, "log": [Function], }, } diff --git a/x-pack/plugins/security/server/audit/audit_service.ts b/x-pack/plugins/security/server/audit/audit_service.ts index a29ec221b3474..6f81164be5a89 100644 --- a/x-pack/plugins/security/server/audit/audit_service.ts +++ b/x-pack/plugins/security/server/audit/audit_service.ts @@ -49,6 +49,14 @@ export interface AuditLogger { * ``` */ log: (event: AuditEvent | undefined) => void; + + /** + * Indicates whether audit logging is enabled or not. + * + * Useful for skipping resource-intense operations that don't need to be performed when audit + * logging is disabled. + */ + readonly enabled: boolean; } export interface AuditServiceSetup { @@ -122,7 +130,8 @@ export class AuditService { ); // Record feature usage at a regular interval if enabled and license allows - if (config.enabled && config.appender) { + const enabled = !!(config.enabled && config.appender); + if (enabled) { license.features$.subscribe((features) => { clearInterval(this.usageIntervalId!); if (features.allowAuditLogging) { @@ -169,6 +178,7 @@ export class AuditService { trace: { id: request.id }, }); }, + enabled, }); http.registerOnPostAuth((request, response, t) => { @@ -180,7 +190,7 @@ export class AuditService { return { asScoped, - withoutRequest: { log }, + withoutRequest: { log, enabled }, }; } diff --git a/x-pack/plugins/security/server/audit/index.mock.ts b/x-pack/plugins/security/server/audit/index.mock.ts index c84faacff0147..6ac9108b51a83 100644 --- a/x-pack/plugins/security/server/audit/index.mock.ts +++ b/x-pack/plugins/security/server/audit/index.mock.ts @@ -13,9 +13,11 @@ export const auditServiceMock = { getLogger: jest.fn(), asScoped: jest.fn().mockReturnValue({ log: jest.fn(), + enabled: true, }), withoutRequest: { log: jest.fn(), + enabled: true, }, } as jest.Mocked>; }, diff --git a/x-pack/plugins/security/server/authentication/authenticator.test.ts b/x-pack/plugins/security/server/authentication/authenticator.test.ts index 62ca6168584fb..f0ff164cbbc5a 100644 --- a/x-pack/plugins/security/server/authentication/authenticator.test.ts +++ b/x-pack/plugins/security/server/authentication/authenticator.test.ts @@ -264,6 +264,7 @@ describe('Authenticator', () => { let mockSessVal: SessionValue; const auditLogger = { log: jest.fn(), + enabled: true, }; beforeEach(() => { @@ -1094,6 +1095,7 @@ describe('Authenticator', () => { let mockSessVal: SessionValue; const auditLogger = { log: jest.fn(), + enabled: true, }; beforeEach(() => { @@ -1831,6 +1833,7 @@ describe('Authenticator', () => { let mockSessVal: SessionValue; const auditLogger = { log: jest.fn(), + enabled: true, }; beforeEach(() => { @@ -2009,6 +2012,7 @@ describe('Authenticator', () => { let mockSessVal: SessionValue; const auditLogger = { log: jest.fn(), + enabled: true, }; beforeEach(() => { @@ -2145,6 +2149,7 @@ describe('Authenticator', () => { let mockSessionValue: SessionValue; const auditLogger = { log: jest.fn(), + enabled: true, }; beforeEach(() => { diff --git a/x-pack/plugins/security/server/plugin.test.ts b/x-pack/plugins/security/server/plugin.test.ts index 85c2fff5a438e..f4294ecbb6c11 100644 --- a/x-pack/plugins/security/server/plugin.test.ts +++ b/x-pack/plugins/security/server/plugin.test.ts @@ -68,6 +68,7 @@ describe('Security Plugin', () => { "audit": Object { "asScoped": [Function], "withoutRequest": Object { + "enabled": false, "log": [Function], }, }, diff --git a/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.test.ts b/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.test.ts index 7f62948251d7c..2e39810d4cbde 100644 --- a/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.test.ts +++ b/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.test.ts @@ -8,7 +8,11 @@ import { mockEnsureAuthorized } from './secure_spaces_client_wrapper.test.mocks'; import { deepFreeze } from '@kbn/std'; -import type { EcsEventOutcome, SavedObjectsClientContract } from 'src/core/server'; +import type { + EcsEventOutcome, + SavedObjectsClientContract, + SavedObjectsFindResponse, +} from 'src/core/server'; import { SavedObjectsErrorHelpers } from 'src/core/server'; import { httpServerMock } from 'src/core/server/mocks'; @@ -63,6 +67,31 @@ const setup = ({ securityEnabled = false }: Opts = {}) => { return space; }); + baseClient.createSavedObjectFinder.mockImplementation(() => ({ + async *find() { + yield { + saved_objects: [ + { + namespaces: ['*'], + type: 'dashboard', + id: '1', + }, + { + namespaces: ['existing_space'], + type: 'dashboard', + id: '2', + }, + { + namespaces: ['default', 'existing_space'], + type: 'dashboard', + id: '3', + }, + ], + } as SavedObjectsFindResponse; + }, + async close() {}, + })); + const authorization = authorizationMock.create({ version: 'unit-test', applicationName: 'kibana', @@ -602,7 +631,7 @@ describe('SecureSpacesClientWrapper', () => { }); }); - test(`throws a forbidden error when unauthorized`, async () => { + it(`throws a forbidden error when unauthorized`, async () => { const username = 'some_user'; const { wrapper, baseClient, authorization, auditLogger, request } = setup({ @@ -637,7 +666,7 @@ describe('SecureSpacesClientWrapper', () => { }); }); - it('deletes the space when authorized', async () => { + it('deletes the space with all saved objects when authorized', async () => { const username = 'some_user'; const { wrapper, baseClient, authorization, auditLogger, request } = setup({ @@ -669,6 +698,14 @@ describe('SecureSpacesClientWrapper', () => { type: 'space', id: space.id, }); + expectAuditEvent(auditLogger, SavedObjectAction.DELETE, 'unknown', { + type: 'dashboard', + id: '2', + }); + expectAuditEvent(auditLogger, SavedObjectAction.UPDATE_OBJECTS_SPACES, 'unknown', { + type: 'dashboard', + id: '3', + }); }); }); diff --git a/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.ts b/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.ts index 9d20a6ea40b24..c43216643205f 100644 --- a/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.ts +++ b/x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.ts @@ -17,6 +17,7 @@ import type { LegacyUrlAliasTarget, Space, } from '../../../spaces/server'; +import { ALL_SPACES_ID } from '../../common/constants'; import type { AuditLogger } from '../audit'; import { SavedObjectAction, savedObjectEvent, SpaceAuditAction, spaceAuditEvent } from '../audit'; import type { AuthorizationServiceSetup } from '../authorization'; @@ -246,6 +247,10 @@ export class SecureSpacesClientWrapper implements ISpacesClient { return this.spacesClient.update(id, space); } + public createSavedObjectFinder(id: string) { + return this.spacesClient.createSavedObjectFinder(id); + } + public async delete(id: string) { if (this.useRbac) { try { @@ -265,6 +270,35 @@ export class SecureSpacesClientWrapper implements ISpacesClient { } } + // Fetch saved objects to be removed for audit logging + if (this.auditLogger.enabled) { + const finder = this.spacesClient.createSavedObjectFinder(id); + try { + for await (const response of finder.find()) { + response.saved_objects.forEach((savedObject) => { + const { namespaces = [] } = savedObject; + const isOnlySpace = namespaces.length === 1; // We can always rely on the `namespaces` field having >=1 element + if (namespaces.includes(ALL_SPACES_ID) && !namespaces.includes(id)) { + // This object exists in All Spaces and its `namespaces` field isn't going to change; there's nothing to audit + return; + } + this.auditLogger.log( + savedObjectEvent({ + action: isOnlySpace + ? SavedObjectAction.DELETE + : SavedObjectAction.UPDATE_OBJECTS_SPACES, + outcome: 'unknown', + savedObject: { type: savedObject.type, id: savedObject.id }, + deleteFromSpaces: [id], + }) + ); + }); + } + } finally { + await finder.close(); + } + } + this.auditLogger.log( spaceAuditEvent({ action: SpaceAuditAction.DELETE, diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index b1598863ba9d6..fcec53eb0cf30 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -63,7 +63,6 @@ export const NO_ALERT_INDEX = 'no-alert-index-049FC71A-4C2C-446F-9901-37XMC5024C export const ENDPOINT_METADATA_INDEX = 'metrics-endpoint.metadata-*' as const; export const DEFAULT_RULE_REFRESH_INTERVAL_ON = true as const; export const DEFAULT_RULE_REFRESH_INTERVAL_VALUE = 60000 as const; // ms -export const DEFAULT_RULES_TABLE_IN_MEMORY_THRESHOLD = 3000; // rules export const DEFAULT_RULE_NOTIFICATION_QUERY_SIZE = 100 as const; export const SECURITY_FEATURE_ID = 'Security' as const; export const DEFAULT_SPACE_ID = 'default' as const; @@ -176,10 +175,6 @@ export const ENABLE_NEWS_FEED_SETTING = 'securitySolution:enableNewsFeed' as con /** This Kibana Advanced Setting sets the auto refresh interval for the detections all rules table */ export const DEFAULT_RULES_TABLE_REFRESH_SETTING = 'securitySolution:rulesTableRefresh' as const; -/** This Kibana Advanced Setting sets the threshold number of rules for which in-memory implementation is enabled */ -export const RULES_TABLE_ADVANCED_FILTERING_THRESHOLD = - 'securitySolution:advancedFilteringMaxRules' as const; - /** This Kibana Advanced Setting specifies the URL of the News feed widget */ export const NEWS_FEED_URL_SETTING = 'securitySolution:newsFeedUrl' as const; @@ -272,6 +267,14 @@ export const DETECTION_ENGINE_RULE_EXECUTION_EVENTS_URL = export const detectionEngineRuleExecutionEventsUrl = (ruleId: string) => `${INTERNAL_DETECTION_ENGINE_URL}/rules/${ruleId}/execution/events` as const; +/** + * Telemetry detection endpoint for any previews requested of what data we are + * providing through UI/UX and for e2e tests. + * curl http//localhost:5601/internal/security_solution/telemetry + * to see the contents + */ +export const SECURITY_TELEMETRY_URL = `/internal/security_solution/telemetry` as const; + export const TIMELINE_RESOLVE_URL = '/api/timeline/resolve' as const; export const TIMELINE_URL = '/api/timeline' as const; export const TIMELINES_URL = '/api/timelines' as const; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/common/rule_monitoring.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/common/rule_monitoring.ts index afc6fad33a4bd..6fd792c44ae96 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/common/rule_monitoring.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/common/rule_monitoring.ts @@ -17,14 +17,38 @@ import { enumeration, IsoDateString, PositiveInteger } from '@kbn/securitysoluti * Framework's status to determine the resulting status of a rule. */ export enum RuleExecutionStatus { - 'succeeded' = 'succeeded', - 'failed' = 'failed', + /** + * @deprecated Replaced by the 'running' status but left for backwards compatibility + * with rule execution events already written to Event Log in the prior versions of Kibana. + * Don't use when writing rule status changes. + */ 'going to run' = 'going to run', + + /** + * Rule execution started but not reached any intermediate or final status. + */ + 'running' = 'running', + + /** + * Rule can partially fail for various reasons either in the middle of an execution + * (in this case we update its status right away) or in the end of it. So currently + * this status can be both intermediate and final at the same time. + * A typical reason for a partial failure: not all the indices that the rule searches + * over actually exist. + */ 'partial failure' = 'partial failure', + + /** + * Rule failed to execute due to unhandled exception or a reason defined in the + * business logic of its executor function. + */ + 'failed' = 'failed', + /** - * @deprecated 'partial failure' status should be used instead + * Rule executed successfully without any issues. Note: this status is just an indication + * of a rule's "health". The rule might or might not generate any alerts despite of it. */ - 'warning' = 'warning', + 'succeeded' = 'succeeded', } export const ruleExecutionStatus = enumeration('RuleExecutionStatus', RuleExecutionStatus); @@ -38,7 +62,7 @@ export const ruleExecutionStatusOrderByStatus: Record< > = { [RuleExecutionStatus.succeeded]: 0, [RuleExecutionStatus['going to run']]: 10, - [RuleExecutionStatus.warning]: 20, + [RuleExecutionStatus.running]: 15, [RuleExecutionStatus['partial failure']]: 20, [RuleExecutionStatus.failed]: 30, }; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts index 5b25a1273ac37..0642481b62a6a 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts @@ -68,16 +68,6 @@ export const getRulesSchemaMock = (anchorDate: string = ANCHOR_DATE): RulesSchem rule_id: 'query-rule-id', interval: '5m', exceptions_list: getListArrayMock(), - // TODO: https://github.com/elastic/kibana/pull/121644 clean up - // execution_summary: { - // last_execution: { - // date: '2020-02-22T16:47:50.047Z', - // status: RuleExecutionStatus.succeeded, - // status_order: 0, - // message: 'succeeded', - // metrics: {}, - // }, - // }, }); export const getRulesMlSchemaMock = (anchorDate: string = ANCHOR_DATE): RulesSchema => { diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts index 0d4247a8c3bbf..f15e3f418427a 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts @@ -165,13 +165,31 @@ export class ExceptionsListItemGenerator extends BaseDataGenerator = {}): ExceptionListItemSchema { - const eventFilter = this.generate(overrides); - - return { - ...eventFilter, + return this.generate({ name: `Event filter (${this.randomString(5)})`, list_id: ENDPOINT_EVENT_FILTERS_LIST_ID, - }; + entries: [ + { + field: 'process.pe.company', + operator: 'excluded', + type: 'match', + value: 'elastic', + }, + { + entries: [ + { + field: 'status', + operator: 'included', + type: 'match', + value: 'dfdfd', + }, + ], + field: 'process.Ext.code_signature', + type: 'nested', + }, + ], + ...overrides, + }); } generateEventFilterForCreate( @@ -198,6 +216,7 @@ export class ExceptionsListItemGenerator extends BaseDataGenerator; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts index 8a9a047aab3fd..ee836b89f901f 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts @@ -9,6 +9,7 @@ import { CloudEcs } from '../../../../ecs/cloud'; import { HostEcs, OsEcs } from '../../../../ecs/host'; import { Hit, Hits, Maybe, SearchHit, StringOrNumber, TotalValue } from '../../../common'; import { EndpointPendingActions, HostStatus } from '../../../../endpoint/types'; +import { HostRiskSeverity } from '../kpi'; export enum HostPolicyResponseActionStatus { success = 'success', @@ -126,3 +127,21 @@ export interface HostHit extends Hit { } export type HostHits = Hits; + +export const enum HostRiskScoreFields { + timestamp = '@timestamp', + hostName = 'host.name', + riskScore = 'risk_stats.risk_score', + risk = 'risk', + // TODO: Steph/Host Risk + // ruleRisks = 'rule_risks', +} + +export interface HostRiskScoreItem { + _id?: Maybe; + [HostRiskScoreFields.hostName]: Maybe; + [HostRiskScoreFields.risk]: Maybe; + [HostRiskScoreFields.riskScore]: Maybe; + // TODO: Steph/Host Risk + // [HostRiskScoreFields.ruleRisks]: Maybe; +} diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/risky_hosts/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/risky_hosts/index.ts index 5216052b1a6b1..610077bd6bc65 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/risky_hosts/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/risky_hosts/index.ts @@ -18,7 +18,7 @@ export interface HostsKpiRiskyHostsStrategyResponse extends IEsSearchResponse { }; } -export enum HostRiskSeverity { +export const enum HostRiskSeverity { unknown = 'Unknown', low = 'Low', moderate = 'Moderate', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/risk_score/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/risk_score/index.ts index 1c0d20161823b..b36fbd5ce57a3 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/risk_score/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/risk_score/index.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { FactoryQueryTypes } from '../..'; +import { FactoryQueryTypes, HostRiskScoreFields } from '../..'; import type { IEsSearchRequest, IEsSearchResponse, } from '../../../../../../../../src/plugins/data/common'; import { RISKY_HOSTS_INDEX_PREFIX } from '../../../../constants'; -import { Direction, Inspect, Maybe, TimerangeInput } from '../../../common'; +import { ESQuery } from '../../../../typed_json'; +import { Inspect, Maybe, SortField, TimerangeInput } from '../../../common'; export interface HostsRiskScoreRequestOptions extends IEsSearchRequest { defaultIndex: string[]; @@ -19,12 +20,17 @@ export interface HostsRiskScoreRequestOptions extends IEsSearchRequest { hostNames?: string[]; timerange?: TimerangeInput; onlyLatest?: boolean; - limit?: number; - sortOrder?: Direction.asc | Direction.desc; + pagination?: { + cursorStart: number; + querySize: number; + }; + sort?: HostRiskScoreSortField; + filterQuery?: ESQuery | string | undefined; } export interface HostsRiskScoreStrategyResponse extends IEsSearchResponse { inspect?: Maybe; + totalCount: number; } export interface HostsRiskScore { @@ -42,8 +48,11 @@ export interface HostsRiskScore { export interface RuleRisk { rule_name: string; rule_risk: number; + rule_id?: string; // TODO Remove the '?' when the new transform is delivered } export const getHostRiskIndex = (spaceId: string, onlyLatest: boolean = true): string => { return `${RISKY_HOSTS_INDEX_PREFIX}${onlyLatest ? 'latest_' : ''}${spaceId}`; }; + +export type HostRiskScoreSortField = SortField; diff --git a/x-pack/plugins/security_solution/cypress/integration/detection_rules/links.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detection_rules/links.spec.ts index aa6ad73c019b0..469c77e1c3c17 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detection_rules/links.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/detection_rules/links.spec.ts @@ -6,7 +6,7 @@ */ import { getNewRule } from '../../objects/rule'; -import { RULES_MONIROTING_TABLE, RULE_NAME } from '../../screens/alerts_detection_rules'; +import { RULES_MONITORING_TABLE, RULE_NAME } from '../../screens/alerts_detection_rules'; import { createCustomRuleActivated } from '../../tasks/api_calls/rules'; import { cleanKibana, reload } from '../../tasks/common'; import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login'; @@ -26,7 +26,7 @@ describe('Rules talbes links', () => { }); it('should render correct link for rule name - rule monitoring', () => { - cy.get(RULES_MONIROTING_TABLE).first().click(); + cy.get(RULES_MONITORING_TABLE).first().click(); cy.get(RULE_NAME).first().click(); cy.url().should('contain', 'rules/id/'); }); diff --git a/x-pack/plugins/security_solution/cypress/integration/detection_rules/prebuilt_rules.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detection_rules/prebuilt_rules.spec.ts index 01614ea98b007..3081d7c966eb6 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detection_rules/prebuilt_rules.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/detection_rules/prebuilt_rules.spec.ts @@ -13,7 +13,7 @@ import { RULES_EMPTY_PROMPT, RULE_SWITCH, SHOWING_RULES_TEXT, - RULES_MONIROTING_TABLE, + RULES_MONITORING_TABLE, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, } from '../../screens/alerts_detection_rules'; @@ -175,7 +175,7 @@ describe('Actions with prebuilt rules', () => { context('Rule monitoring table', () => { it('Allows to activate/deactivate all rules at once', () => { - cy.get(RULES_MONIROTING_TABLE).click(); + cy.get(RULES_MONITORING_TABLE).click(); cy.get(SELECT_ALL_RULES_ON_PAGE_CHECKBOX).click(); activateSelectedRules(); diff --git a/x-pack/plugins/security_solution/cypress/integration/detection_rules/sorting.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detection_rules/sorting.spec.ts index 1a8fa2e972f89..a162ca4a544d1 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detection_rules/sorting.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/detection_rules/sorting.spec.ts @@ -13,6 +13,7 @@ import { FOURTH_RULE, RULES_TABLE, pageSelector, + RULES_TABLE_REFRESH_INDICATOR, } from '../../screens/alerts_detection_rules'; import { goToManageAlertsDetectionRules, waitForAlertsPanelToBeLoaded } from '../../tasks/alerts'; @@ -89,6 +90,7 @@ describe('Alerts detection rules', () => { .invoke('text') .then((ruleNameFirstPage) => { goToPage(2); + cy.get(RULES_TABLE_REFRESH_INDICATOR).should('not.exist'); cy.get(RULES_TABLE) .find(RULE_NAME) .first() diff --git a/x-pack/plugins/security_solution/cypress/integration/host_details/risk_tab.ts b/x-pack/plugins/security_solution/cypress/integration/host_details/risk_tab.ts new file mode 100644 index 0000000000000..7cf1a06acdd9b --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/integration/host_details/risk_tab.ts @@ -0,0 +1,52 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { loginAndWaitForHostDetailsPage } from '../../tasks/login'; + +import { cleanKibana } from '../../tasks/common'; +import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver'; +import { TABLE_CELL, TABLE_ROWS } from '../../screens/alerts_details'; + +describe('risk tab', () => { + before(() => { + cleanKibana(); + esArchiverLoad('risky_hosts'); + }); + + after(() => { + esArchiverUnload('risky_hosts'); + }); + + it('renders risk tab', () => { + loginAndWaitForHostDetailsPage('siem-kibana'); + cy.get('[data-test-subj="navigation-hostRisk"]').click(); + waitForTableToLoad(); + + cy.get('[data-test-subj="topHostScoreContributors"]') + .find(TABLE_ROWS) + .within(() => { + cy.get(TABLE_CELL).contains('Unusual Linux Username'); + }); + }); + + it('shows risk information overlay when button is clicked', () => { + loginAndWaitForHostDetailsPage('siem-kibana'); + cy.get('[data-test-subj="navigation-hostRisk"]').click(); + waitForTableToLoad(); + + cy.get('[data-test-subj="open-risk-information-flyout-trigger"]').click(); + + cy.get('[data-test-subj="open-risk-information-flyout"] .euiFlyoutHeader').contains( + 'How is host risk calculated?' + ); + }); +}); + +export const waitForTableToLoad = () => { + cy.get('.euiBasicTable-loading').should('exist'); + cy.get('.euiBasicTable-loading').should('not.exist'); +}; diff --git a/x-pack/plugins/security_solution/cypress/integration/hosts/host_risk_tab.spec.ts b/x-pack/plugins/security_solution/cypress/integration/hosts/host_risk_tab.spec.ts new file mode 100644 index 0000000000000..38a639e19c6b8 --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/integration/hosts/host_risk_tab.spec.ts @@ -0,0 +1,43 @@ +/* + * 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 { cleanKibana } from '../../tasks/common'; +import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver'; +import { navigateToHostRiskDetailTab } from '../../tasks/host_risk'; +import { + HOST_BY_RISK_TABLE_CELL, + HOST_BY_RISK_TABLE_FILTER, + HOST_BY_RISK_TABLE_FILTER_CRITICAL, +} from '../../screens/hosts/host_risk'; +import { loginAndWaitForPage } from '../../tasks/login'; +import { HOSTS_URL } from '../../urls/navigation'; + +describe('risk tab', () => { + before(() => { + cleanKibana(); + esArchiverLoad('risky_hosts'); + loginAndWaitForPage(HOSTS_URL); + navigateToHostRiskDetailTab(); + }); + + after(() => { + esArchiverUnload('risky_hosts'); + }); + + it('renders the table', () => { + cy.get(HOST_BY_RISK_TABLE_CELL).eq(3).should('have.text', 'siem-kibana'); + cy.get(HOST_BY_RISK_TABLE_CELL).eq(4).should('have.text', '21.00'); + cy.get(HOST_BY_RISK_TABLE_CELL).eq(5).should('have.text', 'Low'); + }); + + it('filters the table', () => { + cy.get(HOST_BY_RISK_TABLE_FILTER).click(); + cy.get(HOST_BY_RISK_TABLE_FILTER_CRITICAL).click(); + + cy.get(HOST_BY_RISK_TABLE_CELL).eq(3).should('not.have.text', 'siem-kibana'); + }); +}); diff --git a/x-pack/plugins/security_solution/cypress/integration/hosts/risky_hosts_kpi.spec.ts b/x-pack/plugins/security_solution/cypress/integration/hosts/risky_hosts_kpi.spec.ts deleted file mode 100644 index 6661e6308971f..0000000000000 --- a/x-pack/plugins/security_solution/cypress/integration/hosts/risky_hosts_kpi.spec.ts +++ /dev/null @@ -1,20 +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 { loginAndWaitForPage } from '../../tasks/login'; - -import { HOSTS_URL } from '../../urls/navigation'; - -describe('RiskyHosts KPI', () => { - it('renders', () => { - loginAndWaitForPage(HOSTS_URL); - - cy.get('[data-test-subj="riskyHostsTotal"]').should('have.text', '0 Risky Hosts'); - cy.get('[data-test-subj="riskyHostsCriticalQuantity"]').should('have.text', '0 hosts'); - cy.get('[data-test-subj="riskyHostsHighQuantity"]').should('have.text', '0 hosts'); - }); -}); diff --git a/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts b/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts index eaede8ff5642f..dc56bd0369dba 100644 --- a/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts +++ b/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts @@ -64,7 +64,7 @@ export const RULES_TABLE = '[data-test-subj="rules-table"]'; export const RULES_ROW = '.euiTableRow'; -export const RULES_MONIROTING_TABLE = '[data-test-subj="allRulesTableTab-monitoring"]'; +export const RULES_MONITORING_TABLE = '[data-test-subj="allRulesTableTab-monitoring"]'; export const SEVERITY = '[data-test-subj="severity"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts index 00bd39b911fb8..58331518255df 100644 --- a/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts +++ b/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts @@ -5,7 +5,7 @@ * 2.0. */ -export const RULE_NAME = '[data-test-subj="topHostScoreContributors"] .euiTableCellContent__text'; +export const RULE_NAME = '[data-test-subj="topHostScoreContributors"] .euiTableCellContent'; export const RISK_FLYOUT = '[data-test-subj="open-risk-information-flyout"] .euiFlyoutHeader'; @@ -14,3 +14,13 @@ export const RISK_DETAILS_NAV = '[data-test-subj="navigation-hostRisk"]'; export const RISK_FLYOUT_TRIGGER = '[data-test-subj="open-risk-information-flyout-trigger"]'; export const LOADING_TABLE = '.euiBasicTable-loading'; + +export const HOST_BY_RISK_TABLE = '.table-hostRisk-loading-false'; + +export const HOST_BY_RISK_TABLE_CELL = + '[data-test-subj="table-hostRisk-loading-false"] .euiTableCellContent'; + +export const HOST_BY_RISK_TABLE_FILTER = '[data-test-subj="host-risk-filter-button"]'; + +export const HOST_BY_RISK_TABLE_FILTER_CRITICAL = + '[data-test-subj="host-risk-filter-item-Critical"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts index 03d64ab22608c..09bbe6a2f3fbe 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts @@ -157,7 +157,10 @@ export const goToTheRuleDetailsOf = (ruleName: string) => { }; export const loadPrebuiltDetectionRules = () => { - cy.get(LOAD_PREBUILT_RULES_BTN).should('exist').click({ force: true }); + cy.get(LOAD_PREBUILT_RULES_BTN) + .should('exist') + .pipe(($el) => $el.trigger('click')) + .should('be.disabled'); }; export const reloadDeletedRules = () => { diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx index 8b15ed4b250b8..dbf73f7a6654d 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx @@ -10,8 +10,10 @@ import { EuiLoadingSpinner, EuiPanel, EuiSpacer, EuiLink, EuiText } from '@elast import { FormattedMessage } from '@kbn/i18n-react'; import * as i18n from './translations'; import { RISKY_HOSTS_DOC_LINK } from '../../../../overview/components/overview_risky_host_links/risky_hosts_disabled_module'; -import type { HostRisk } from '../../../containers/hosts_risk/use_hosts_risk_score'; import { EnrichedDataRow, ThreatSummaryPanelHeader } from './threat_summary_view'; +import { HostRisk } from '../../../containers/hosts_risk/types'; +import { HostRiskScore } from '../../../../hosts/components/common/host_risk_score'; +import { HostRiskSeverity } from '../../../../../common/search_strategy'; const HostRiskSummaryComponent: React.FC<{ hostRisk: HostRisk; @@ -51,7 +53,15 @@ const HostRiskSummaryComponent: React.FC<{ {hostRisk.isModuleEnabled && hostRisk.result && hostRisk.result.length > 0 && ( <> - + + } + /> )} diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx index 9939f7c688040..4da090bfa106a 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx @@ -28,9 +28,9 @@ import { BrowserFields, TimelineEventsDetailsItem, } from '../../../../../common/search_strategy'; -import { HostRisk } from '../../../containers/hosts_risk/use_hosts_risk_score'; import { HostRiskSummary } from './host_risk_summary'; import { EnrichmentSummary } from './enrichment_summary'; +import { HostRisk } from '../../../containers/hosts_risk/types'; export interface ThreatSummaryDescription { browserField: BrowserField; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx index 272404d179b96..13eadfc53ae42 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx @@ -38,11 +38,9 @@ import { } from './cti_details/helpers'; import { EnrichmentRangePicker } from './cti_details/enrichment_range_picker'; import { Reason } from './reason'; - import { InvestigationGuideView } from './investigation_guide_view'; - -import { HostRisk } from '../../containers/hosts_risk/use_hosts_risk_score'; import { Overview } from './overview'; +import { HostRisk } from '../../containers/hosts_risk/types'; type EventViewTab = EuiTabbedContentTab; diff --git a/x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/title.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/title.test.tsx.snap index 176902ae38d20..b77b7358d2276 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/title.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/title.test.tsx.snap @@ -14,8 +14,7 @@ exports[`Title it renders 1`] = ` Test title - - = ({ draggableArguments, title, badgeOptio )} {badgeOptions && ( <> - {' '} {badgeOptions.beta ? ( - ) : ( - + {badgeOptions.text} - + )} )} diff --git a/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap index 7fe76e05b2f02..6701224289e66 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap @@ -6,6 +6,7 @@ exports[`HeaderSection it renders 1`] = ` > = ({ border, children, + headerFilters, height, id, isInspectDisabled, split, + stackHeader, subtitle, title, titleSize = 'm', @@ -68,7 +72,11 @@ const HeaderSectionComponent: React.FC = ({ hideSubtitle = false, }) => (
- + @@ -99,6 +107,8 @@ const HeaderSectionComponent: React.FC = ({ /> )} + + {headerFilters && {headerFilters}} diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/index.ts b/x-pack/plugins/security_solution/public/common/components/link_to/index.ts index 6681ee2cb7e8f..2f7f876bda9bc 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/link_to/index.ts @@ -15,7 +15,7 @@ import { SecurityPageName } from '../../../app/types'; export { getDetectionEngineUrl, getRuleDetailsUrl } from './redirect_to_detection_engine'; export { getAppOverviewUrl } from './redirect_to_overview'; -export { getHostDetailsUrl, getHostsUrl } from './redirect_to_hosts'; +export { getHostDetailsUrl, getTabsOnHostDetailsUrl, getHostsUrl } from './redirect_to_hosts'; export { getNetworkUrl, getNetworkDetailsUrl } from './redirect_to_network'; export { getTimelineTabsUrl, getTimelineUrl } from './redirect_to_timelines'; export { diff --git a/x-pack/plugins/security_solution/public/common/components/links/index.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.tsx index a232b795d1dba..d54d7efd267b8 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/index.tsx @@ -25,6 +25,7 @@ import { encodeIpv6 } from '../../lib/helpers'; import { getCaseDetailsUrl, getHostDetailsUrl, + getTabsOnHostDetailsUrl, getNetworkDetailsUrl, getCreateCaseUrl, useFormatUrl, @@ -40,6 +41,7 @@ import * as i18n from './translations'; import { SecurityPageName } from '../../../app/types'; import { getUebaDetailsUrl } from '../link_to/redirect_to_ueba'; import { LinkButton, LinkAnchor, GenericLinkButton, PortContainer, Comma } from './helpers'; +import { HostsTableType } from '../../../hosts/store/model'; export { LinkButton, LinkAnchor } from './helpers'; @@ -92,23 +94,34 @@ const HostDetailsLinkComponent: React.FC<{ hostName: string; isButton?: boolean; onClick?: (e: SyntheticEvent) => void; + hostTab?: HostsTableType; title?: string; -}> = ({ children, Component, hostName, isButton, onClick, title }) => { +}> = ({ children, Component, hostName, isButton, onClick, title, hostTab }) => { const { formatUrl, search } = useFormatUrl(SecurityPageName.hosts); const { navigateToApp } = useKibana().services.application; + + const encodedHostName = encodeURIComponent(hostName); + const goToHostDetails = useCallback( (ev) => { ev.preventDefault(); navigateToApp(APP_UI_ID, { deepLinkId: SecurityPageName.hosts, - path: getHostDetailsUrl(encodeURIComponent(hostName), search), + path: hostTab + ? getTabsOnHostDetailsUrl(encodedHostName, hostTab, search) + : getHostDetailsUrl(encodedHostName, search), }); }, - [hostName, navigateToApp, search] + [encodedHostName, navigateToApp, search, hostTab] ); const href = useMemo( - () => formatUrl(getHostDetailsUrl(encodeURIComponent(hostName))), - [formatUrl, hostName] + () => + formatUrl( + hostTab + ? getTabsOnHostDetailsUrl(encodedHostName, hostTab) + : getHostDetailsUrl(encodedHostName) + ), + [formatUrl, encodedHostName, hostTab] ); return isButton ? ( ( WrappedComponent: React.ComponentClass | React.ComponentType -): React.ComponentClass { - class ManageQuery extends React.PureComponent { - static displayName: string; - public componentDidUpdate(prevProps: OwnProps) { - const { loading, id, refetch, setQuery, inspect = null } = this.props; - setQuery({ id, inspect, loading, refetch }); - } - - public componentWillUnmount() { - const { deleteQuery, id } = this.props; - if (deleteQuery) { - deleteQuery({ id }); - } - } +): React.FC { + const ManageQuery = (props: OwnProps & T) => { + const { loading, id, refetch, setQuery, deleteQuery, inspect = null } = props; + useQueryInspector({ + queryId: id, + loading, + refetch, + setQuery, + deleteQuery, + inspect, + }); + + const otherProps = omit(['refetch', 'setQuery'], props); + return ; + }; - public render() { - const otherProps = omit(['refetch', 'setQuery'], this.props); - return ; - } - } ManageQuery.displayName = `ManageQuery (${WrappedComponent?.displayName ?? 'Unknown'})`; return ManageQuery; } + +interface UseQueryInspectorTypes extends Pick { + queryId: string; + legendPosition?: Position; + loading: boolean; + refetch: inputsModel.Refetch; + inspect?: inputsModel.InspectQuery | null; +} + +export const useQueryInspector = ({ + setQuery, + deleteQuery, + refetch, + inspect, + loading, + queryId, +}: UseQueryInspectorTypes) => { + useEffect(() => { + setQuery({ id: queryId, inspect: inspect ?? null, loading, refetch }); + }, [deleteQuery, setQuery, queryId, refetch, inspect, loading]); + + useEffect(() => { + return () => { + if (deleteQuery) { + deleteQuery({ id: queryId }); + } + }; + }, [deleteQuery, queryId]); +}; diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx index ef49c8e2a5e8c..032ab1f505fca 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx @@ -39,6 +39,8 @@ import { } from '../../../network/components/network_top_countries_table/columns'; import { TlsColumns } from '../../../network/components/tls_table/columns'; import { UncommonProcessTableColumns } from '../../../hosts/components/uncommon_process_table'; +import { HostRiskScoreColumns } from '../../../hosts/components/host_risk_score_table'; + import { UsersColumns } from '../../../network/components/users_table/columns'; import { HeaderSection } from '../header_section'; import { Loader } from '../loader'; @@ -88,7 +90,7 @@ declare type BasicTableColumns = | NetworkTopCountriesColumnsNetworkDetails | NetworkTopNFlowColumns | NetworkTopNFlowColumnsNetworkDetails - | NetworkHttpColumns + | HostRiskScoreColumns | RiskScoreColumns | TlsColumns | UncommonProcessTableColumns @@ -102,6 +104,7 @@ export interface BasicTableProps { columns: T; dataTestSubj?: string; headerCount: number; + headerFilters?: string | React.ReactNode; headerSupplement?: React.ReactElement; headerTitle: string | React.ReactElement; headerTooltip?: string; @@ -118,6 +121,8 @@ export interface BasicTableProps { pageOfItems: any[]; showMorePagesIndicator: boolean; sorting?: SortingBasicTable; + split?: boolean; + stackHeader?: boolean; totalCount: number; updateActivePage: (activePage: number) => void; updateLimitPagination: (limit: number) => void; @@ -140,6 +145,7 @@ const PaginatedTableComponent: FC = ({ columns, dataTestSubj = DEFAULT_DATA_TEST_SUBJ, headerCount, + headerFilters, headerSupplement, headerTitle, headerTooltip, @@ -155,6 +161,8 @@ const PaginatedTableComponent: FC = ({ pageOfItems, showMorePagesIndicator, sorting = null, + split, + stackHeader, totalCount, updateActivePage, updateLimitPagination, @@ -255,7 +263,10 @@ const PaginatedTableComponent: FC = ({ {}; - -const isRecord = (item: unknown): item is Record => - typeof item === 'object' && !!item; - -const isHostsRiskScoreHit = (item: Partial): item is HostsRiskScore => - isRecord(item) && - isRecord(item.host) && - typeof item.host.name === 'string' && - typeof item.risk_stats?.risk_score === 'number' && - typeof item.risk === 'string'; - -export interface HostRisk { - loading: boolean; - isModuleEnabled?: boolean; - result?: HostsRiskScore[]; -} - -/** - * @param queryId Provide this parameter when using query inspector to identify the query. - */ -export const useHostsRiskScore = ({ - timerange, - hostName, - onlyLatest = true, - queryId = HostRiskScoreQueryId.DEFAULT, - sortOrder, - limit, -}: { - timerange?: { to: string; from: string }; - hostName?: string; - onlyLatest?: boolean; - queryId?: HostRiskScoreQueryId; - limit?: number; - sortOrder?: Direction; -}): HostRisk | null => { - const riskyHostsFeatureEnabled = useIsExperimentalFeatureEnabled('riskyHostsEnabled'); - const [isModuleEnabled, setIsModuleEnabled] = useState(undefined); - const [loading, setLoading] = useState(riskyHostsFeatureEnabled); - - const { addError } = useAppToasts(); - const { data, spaces } = useKibana().services; - - const dispatch = useDispatch(); - - const { error, result, start, loading: isHostsRiskScoreLoading } = useHostsRiskScoreComplete(); - - const deleteQuery = useCallback(() => { - dispatch(inputsActions.deleteOneQuery({ inputId: 'global', id: queryId })); - }, [dispatch, queryId]); - - useEffect(() => { - if (!isHostsRiskScoreLoading && result) { - setIsModuleEnabled(true); - setLoading(false); - dispatch( - inputsActions.setQuery({ - inputId: 'global', - id: queryId, - inspect: { - dsl: result.inspect?.dsl ?? [], - response: [JSON.stringify(result.rawResponse, null, 2)], - }, - loading: isHostsRiskScoreLoading, - refetch: noop, - }) - ); - } - return deleteQuery; - }, [deleteQuery, dispatch, isHostsRiskScoreLoading, result, setIsModuleEnabled, queryId]); - - useEffect(() => { - if (error) { - if (isIndexNotFoundError(error)) { - setIsModuleEnabled(false); - setLoading(false); - } else { - addError(error, { - title: i18n.translate('xpack.securitySolution.overview.hostsRiskError', { - defaultMessage: 'Error Fetching Hosts Risk', - }), - }); - setLoading(false); - setIsModuleEnabled(true); - } - } - }, [addError, error, setIsModuleEnabled]); - - useEffect(() => { - if (riskyHostsFeatureEnabled && (hostName || timerange)) { - spaces?.getActiveSpace().then((space) => { - start({ - data, - timerange: timerange - ? { to: timerange.to, from: timerange.from, interval: '' } - : undefined, - hostNames: hostName ? [hostName] : undefined, - defaultIndex: [getHostRiskIndex(space.id, onlyLatest)], - onlyLatest, - sortOrder, - limit, - }); - }); - } - }, [ - start, - data, - timerange, - hostName, - onlyLatest, - riskyHostsFeatureEnabled, - spaces, - sortOrder, - limit, - ]); - - if ((!hostName && !timerange) || !riskyHostsFeatureEnabled) { - return null; - } - - const hits = result?.rawResponse?.hits?.hits; - - return { - result: isHostsRiskScoreHit(hits?.[0]?._source) - ? (hits?.map((hit) => hit._source) as HostsRiskScore[]) - : [], - isModuleEnabled, - loading, - }; -}; diff --git a/x-pack/plugins/security_solution/public/common/containers/hosts_risk/use_hosts_risk_score_complete.ts b/x-pack/plugins/security_solution/public/common/containers/hosts_risk/use_hosts_risk_score_complete.ts deleted file mode 100644 index 2531d533d830b..0000000000000 --- a/x-pack/plugins/security_solution/public/common/containers/hosts_risk/use_hosts_risk_score_complete.ts +++ /dev/null @@ -1,63 +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 type { Observable } from 'rxjs'; -import { filter } from 'rxjs/operators'; - -import { useObservable, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; -import { - DataPublicPluginStart, - isCompleteResponse, - isErrorResponse, -} from '../../../../../../../src/plugins/data/public'; -import { - HostsQueries, - HostsRiskScoreRequestOptions, - HostsRiskScoreStrategyResponse, -} from '../../../../common/search_strategy'; - -type GetHostsRiskScoreProps = HostsRiskScoreRequestOptions & { - data: DataPublicPluginStart; - signal: AbortSignal; -}; - -export const getHostsRiskScore = ({ - data, - defaultIndex, - timerange, - hostNames, - signal, - limit, - sortOrder, -}: GetHostsRiskScoreProps): Observable => - data.search.search( - { - defaultIndex, - factoryQueryType: HostsQueries.hostsRiskScore, - timerange, - hostNames, - limit, - sortOrder, - }, - { - strategy: 'securitySolutionSearchStrategy', - abortSignal: signal, - } - ); - -export const getHostsRiskScoreComplete = ( - props: GetHostsRiskScoreProps -): Observable => { - return getHostsRiskScore(props).pipe( - filter((response) => { - return isErrorResponse(response) || isCompleteResponse(response); - }) - ); -}; - -const getHostsRiskScoreWithOptionalSignal = withOptionalSignal(getHostsRiskScoreComplete); - -export const useHostsRiskScoreComplete = () => useObservable(getHostsRiskScoreWithOptionalSignal); diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index cf7d9f1dae23e..91bafffdaa25f 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -16,6 +16,7 @@ import { RiskScoreFields, HostRulesFields, HostTacticsFields, + HostRiskScoreFields, } from '../../../common/search_strategy'; import { State } from '../store'; @@ -83,7 +84,12 @@ export const mockGlobalState: State = { uncommonProcesses: { activePage: 0, limit: 10 }, anomalies: null, externalAlerts: { activePage: 0, limit: 10 }, - hostRisk: null, + hostRisk: { + activePage: 0, + limit: 10, + sort: { field: HostRiskScoreFields.riskScore, direction: Direction.desc }, + severitySelection: [], + }, }, }, details: { @@ -99,7 +105,12 @@ export const mockGlobalState: State = { uncommonProcesses: { activePage: 0, limit: 10 }, anomalies: null, externalAlerts: { activePage: 0, limit: 10 }, - hostRisk: null, + hostRisk: { + activePage: 0, + limit: 10, + sort: { field: HostRiskScoreFields.riskScore, direction: Direction.desc }, + severitySelection: [], + }, }, }, }, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx index bca04dcf37a5b..01d280d61d720 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx @@ -22,6 +22,7 @@ interface InvestigateInTimelineActionProps { alertIds?: string[]; buttonType?: 'text' | 'icon'; onInvestigateInTimelineAlertClick?: () => void; + timelineId?: string; } const InvestigateInTimelineActionComponent: React.FC = ({ @@ -30,11 +31,13 @@ const InvestigateInTimelineActionComponent: React.FC { const { investigateInTimelineAlertClick } = useInvestigateInTimeline({ ecsRowData, alertIds, onInvestigateInTimelineAlertClick, + timelineId, }); return ( diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx index c1cbe657415a6..54e7da3066ea1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx @@ -27,12 +27,14 @@ interface UseInvestigateInTimelineActionProps { nonEcsRowData?: TimelineNonEcsData[]; alertIds?: string[] | null | undefined; onInvestigateInTimelineAlertClick?: () => void; + timelineId?: string; } export const useInvestigateInTimeline = ({ ecsRowData, alertIds, onInvestigateInTimelineAlertClick, + timelineId, }: UseInvestigateInTimelineActionProps) => { const { data: { search: searchStrategyClient, query }, @@ -78,7 +80,7 @@ export const useInvestigateInTimeline = ({ const showInvestigateInTimelineAction = alertIds != null; const { isLoading: isFetchingAlertEcs, alertsEcsData } = useFetchEcsAlertsData({ alertIds, - skip: alertIds == null, + skip: alertIds == null || timelineId !== undefined, }); const investigateInTimelineAlertClick = useCallback(async () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/index.tsx index 9178f154404fb..168ad12736d15 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/index.tsx @@ -8,6 +8,4 @@ export * from './rule_status'; export * from './rule_status_badge'; export * from './rule_status_failed_callout'; - -// TODO: https://github.com/elastic/kibana/pull/121644 clean up export * as ruleStatusI18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx index 026a81c3726f5..fd60bc28873cf 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx @@ -12,7 +12,7 @@ import { RuleExecutionStatus } from '../../../../../common/detection_engine/sche import { FormattedDate } from '../../../../common/components/formatted_date'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; -import { getStatusColor, normalizeRuleExecutionStatus } from './utils'; +import { getStatusText, getStatusColor } from './utils'; import * as i18n from './translations'; interface RuleStatusProps { @@ -22,18 +22,18 @@ interface RuleStatusProps { } const RuleStatusComponent: React.FC = ({ status, date, children }) => { - const normalizedStatus = normalizeRuleExecutionStatus(status); - const statusColor = getStatusColor(normalizedStatus); + const statusText = getStatusText(status); + const statusColor = getStatusColor(status); return ( <> - {normalizedStatus ?? getEmptyTagValue()} + {statusText ?? getEmptyTagValue()} - {date != null && normalizedStatus != null && ( + {date != null && status != null && ( <> <>{i18n.STATUS_AT} diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_badge.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_badge.tsx index 48e744172b6ae..6a37d275e3870 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_badge.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_badge.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { HealthTruncateText } from '../../../../common/components/health_truncate_text'; -import { getCapitalizedRuleStatusText, getStatusColor } from './utils'; +import { getCapitalizedStatusText, getStatusColor } from './utils'; import type { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; @@ -22,8 +22,8 @@ interface RuleStatusBadgeProps { * @param status - rule execution status */ const RuleStatusBadgeComponent = ({ status }: RuleStatusBadgeProps) => { - const statusText = getCapitalizedRuleStatusText(status); - const statusColor = getStatusColor(status ?? null); + const statusText = getCapitalizedStatusText(status); + const statusColor = getStatusColor(status); return ( { - describe('Visibility conditions', () => { - const renderWith = (status: RuleExecutionStatus | null | undefined) => - shallow(); - - it('is hidden if status is undefined', () => { - const wrapper = renderWith(undefined); - expect(wrapper.find('EuiCallOut')).toHaveLength(0); - }); - - it('is hidden if status is null', () => { - const wrapper = renderWith(null); - expect(wrapper.find('EuiCallOut')).toHaveLength(0); - }); - - it('is hidden if status is "going to run"', () => { - const wrapper = renderWith(RuleExecutionStatus['going to run']); - expect(wrapper.find('EuiCallOut')).toHaveLength(0); - }); - - it('is hidden if status is "succeeded"', () => { - const wrapper = renderWith(RuleExecutionStatus.succeeded); - expect(wrapper.find('EuiCallOut')).toHaveLength(0); - }); - - it('is visible if status is "warning"', () => { - const wrapper = renderWith(RuleExecutionStatus.warning); - expect(wrapper.find('EuiCallOut')).toHaveLength(1); - }); - - it('is visible if status is "partial failure"', () => { - const wrapper = renderWith(RuleExecutionStatus['partial failure']); - expect(wrapper.find('EuiCallOut')).toHaveLength(1); - }); - - it('is visible if status is "failed"', () => { - const wrapper = renderWith(RuleExecutionStatus.failed); - expect(wrapper.find('EuiCallOut')).toHaveLength(1); - }); + const renderWith = (status: RuleExecutionStatus | null | undefined) => + render(); + + it('is hidden if status is undefined', () => { + const result = renderWith(undefined); + expect(result.queryByTestId(TEST_ID)).toBe(null); + }); + + it('is hidden if status is null', () => { + const result = renderWith(null); + expect(result.queryByTestId(TEST_ID)).toBe(null); + }); + + it('is hidden if status is "going to run"', () => { + const result = renderWith(RuleExecutionStatus['going to run']); + expect(result.queryByTestId(TEST_ID)).toBe(null); + }); + + it('is hidden if status is "running"', () => { + const result = renderWith(RuleExecutionStatus.running); + expect(result.queryByTestId(TEST_ID)).toBe(null); + }); + + it('is hidden if status is "succeeded"', () => { + const result = renderWith(RuleExecutionStatus.succeeded); + expect(result.queryByTestId(TEST_ID)).toBe(null); + }); + + it('is visible if status is "partial failure"', () => { + const result = renderWith(RuleExecutionStatus['partial failure']); + result.getByTestId(TEST_ID); + result.getByText('Warning at'); + result.getByText('Jan 27, 2022 @ 15:03:31.176'); + result.getByText(MESSAGE); + }); + + it('is visible if status is "failed"', () => { + const result = renderWith(RuleExecutionStatus.failed); + result.getByTestId(TEST_ID); + result.getByText('Rule failure at'); + result.getByText('Jan 27, 2022 @ 15:03:31.176'); + result.getByText(MESSAGE); }); }); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.tsx index 474ce6ac0ffe0..5f10150383369 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.tsx @@ -9,9 +9,7 @@ import React from 'react'; import { EuiCallOut, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { FormattedDate } from '../../../../common/components/formatted_date'; - import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; -import { normalizeRuleExecutionStatus } from './utils'; import * as i18n from './translations'; @@ -26,10 +24,8 @@ const RuleStatusFailedCallOutComponent: React.FC = message, status, }) => { - // TODO: https://github.com/elastic/kibana/pull/121644 clean up - const props = getPropsByStatus(status); - if (!props) { - // we will not show this callout for this status + const { shouldBeDisplayed, color, title } = getPropsByStatus(status); + if (!shouldBeDisplayed) { return null; } @@ -37,14 +33,15 @@ const RuleStatusFailedCallOutComponent: React.FC = - {props.title} + {title} } - color={props.color} + color={color} iconType="alert" + data-test-subj="ruleStatusFailedCallOut" >

{message}

@@ -54,28 +51,31 @@ const RuleStatusFailedCallOutComponent: React.FC = export const RuleStatusFailedCallOut = React.memo(RuleStatusFailedCallOutComponent); RuleStatusFailedCallOut.displayName = 'RuleStatusFailedCallOut'; -// ------------------------------------------------------------------------------------------------- -// Helpers - interface HelperProps { + shouldBeDisplayed: boolean; color: 'danger' | 'warning'; title: string; } -const getPropsByStatus = (status: RuleExecutionStatus | null | undefined): HelperProps | null => { - const normalizedStatus = normalizeRuleExecutionStatus(status); - switch (normalizedStatus) { +const getPropsByStatus = (status: RuleExecutionStatus | null | undefined): HelperProps => { + switch (status) { case RuleExecutionStatus.failed: return { + shouldBeDisplayed: true, color: 'danger', title: i18n.ERROR_CALLOUT_TITLE, }; - case RuleExecutionStatus.warning: + case RuleExecutionStatus['partial failure']: return { + shouldBeDisplayed: true, color: 'warning', title: i18n.PARTIAL_FAILURE_CALLOUT_TITLE, }; default: - return null; + return { + shouldBeDisplayed: false, + color: 'warning', + title: '', + }; } }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts index 5f68f6634fff7..090674d88bf56 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts @@ -5,35 +5,44 @@ * 2.0. */ +import { IconColor } from '@elastic/eui'; import { capitalize } from 'lodash'; +import { assertUnreachable } from '../../../../../common/utility_types'; import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; -export const normalizeRuleExecutionStatus = ( - value: RuleExecutionStatus | null | undefined -): RuleExecutionStatus | null => - value === RuleExecutionStatus['partial failure'] - ? RuleExecutionStatus.warning - : value != null - ? value - : null; +export const getStatusText = (value: RuleExecutionStatus | null | undefined): string | null => { + if (value == null) { + return null; + } + if (value === RuleExecutionStatus['partial failure']) { + return 'warning'; + } + return value; +}; -export const getCapitalizedRuleStatusText = ( +export const getCapitalizedStatusText = ( value: RuleExecutionStatus | null | undefined ): string | null => { - const status = normalizeRuleExecutionStatus(value); + const status = getStatusText(value); return status != null ? capitalize(status) : null; }; -export const getStatusColor = (status: RuleExecutionStatus | string | null) => - status == null - ? 'subdued' - : status === 'succeeded' - ? 'success' - : status === 'failed' - ? 'danger' - : status === 'executing' || - status === 'going to run' || - status === 'partial failure' || - status === 'warning' - ? 'warning' - : 'subdued'; +export const getStatusColor = (status: RuleExecutionStatus | null | undefined): IconColor => { + if (status == null) { + return 'subdued'; + } + if (status === RuleExecutionStatus.succeeded) { + return 'success'; + } + if (status === RuleExecutionStatus.failed) { + return 'danger'; + } + if ( + status === RuleExecutionStatus.running || + status === RuleExecutionStatus['partial failure'] || + status === RuleExecutionStatus['going to run'] + ) { + return 'warning'; + } + return assertUnreachable(status, 'Unknown rule execution status'); +}; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.test.tsx index 15f30e2c92c3a..53c4e5b882406 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.test.tsx @@ -17,6 +17,7 @@ import { RulesSchema } from '../../../../../common/detection_engine/schemas/resp import { useStateToaster, displayErrorToast } from '../../../../common/components/toasters'; import { useRulesTableContextOptional } from '../../../containers/detection_engine/rules/rules_table/rules_table_context'; import { useRulesTableContextMock } from '../../../containers/detection_engine/rules/rules_table/__mocks__/rules_table_context'; +import { TestProviders } from '../../../../common/mock'; jest.mock('../../../../common/components/toasters'); jest.mock('../../../containers/detection_engine/rules'); @@ -36,7 +37,8 @@ describe('RuleSwitch', () => { test('it renders loader if "isLoading" is true', () => { const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); expect(wrapper.find('[data-test-subj="ruleSwitchLoader"]').exists()).toBeTruthy(); @@ -45,27 +47,32 @@ describe('RuleSwitch', () => { test('it renders switch disabled if "isDisabled" is true', () => { const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); expect(wrapper.find('[data-test-subj="ruleSwitch"]').at(0).props().disabled).toBeTruthy(); }); test('it renders switch enabled if "enabled" is true', () => { - const wrapper = mount(); + const wrapper = mount(, { + wrappingComponent: TestProviders, + }); expect(wrapper.find('[data-test-subj="ruleSwitch"]').at(0).props().checked).toBeTruthy(); }); test('it renders switch disabled if "enabled" is false', () => { const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); expect(wrapper.find('[data-test-subj="ruleSwitch"]').at(0).props().checked).toBeFalsy(); }); test('it renders an off switch enabled on click', async () => { const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); wrapper.find('[data-test-subj="ruleSwitch"]').at(2).simulate('click'); @@ -81,7 +88,8 @@ describe('RuleSwitch', () => { (enableRules as jest.Mock).mockResolvedValue([rule]); const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); wrapper.find('[data-test-subj="ruleSwitch"]').at(2).simulate('click'); @@ -96,7 +104,8 @@ describe('RuleSwitch', () => { (enableRules as jest.Mock).mockRejectedValue(mockError); const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); wrapper.find('[data-test-subj="ruleSwitch"]').at(2).simulate('click'); @@ -114,7 +123,8 @@ describe('RuleSwitch', () => { ]); const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); wrapper.find('[data-test-subj="ruleSwitch"]').at(2).simulate('click'); @@ -128,7 +138,8 @@ describe('RuleSwitch', () => { (useRulesTableContextOptional as jest.Mock).mockReturnValue(useRulesTableContextMock.create()); const wrapper = mount( - + , + { wrappingComponent: TestProviders } ); wrapper.find('[data-test-subj="ruleSwitch"]').at(2).simulate('click'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx index 409a4badc4d22..e596c552e623f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx @@ -22,6 +22,7 @@ import { enableRulesAction } from '../../../pages/detection_engine/rules/all/act import { useStateToaster, displayErrorToast } from '../../../../common/components/toasters'; import { bucketRulesResponse } from '../../../pages/detection_engine/rules/all/helpers'; import { useRulesTableContextOptional } from '../../../containers/detection_engine/rules/rules_table/rules_table_context'; +import { useInvalidateRules } from '../../../containers/detection_engine/rules/rules_table/use_find_rules'; const StaticSwitch = styled(EuiSwitch)` .euiSwitch__thumb, @@ -56,6 +57,7 @@ export const RuleSwitchComponent = ({ const [myEnabled, setMyEnabled] = useState(enabled ?? false); const [, dispatchToaster] = useStateToaster(); const rulesTableContext = useRulesTableContextOptional(); + const invalidateRules = useInvalidateRules(); const onRuleStateChange = useCallback( async (event: EuiSwitchEvent) => { @@ -65,8 +67,7 @@ export const RuleSwitchComponent = ({ [id], event.target.checked, dispatchToaster, - rulesTableContext.actions.setLoadingRules, - rulesTableContext.actions.updateRules + rulesTableContext.actions.setLoadingRules ); } else { const enabling = event.target.checked; @@ -100,9 +101,10 @@ export const RuleSwitchComponent = ({ displayErrorToast(title, err.message, dispatchToaster); } } + invalidateRules(); setMyIsLoading(false); }, - [dispatchToaster, id, onChange, rulesTableContext] + [dispatchToaster, id, invalidateRules, onChange, rulesTableContext] ); useEffect(() => { diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_fetch_ecs_alerts_data.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_fetch_ecs_alerts_data.ts index c459fab89a25e..f7c3c341bfa29 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_fetch_ecs_alerts_data.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_fetch_ecs_alerts_data.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { useEffect, useState } from 'react'; +import { useEffect, useState, useRef } from 'react'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { isEmpty } from 'lodash'; @@ -25,10 +25,11 @@ export const useFetchEcsAlertsData = ({ }): { isLoading: boolean | null; alertsEcsData: Ecs[] | null } => { const [isLoading, setIsLoading] = useState(null); const [alertsEcsData, setAlertEcsData] = useState(null); + const abortCtrl = useRef(new AbortController()); useEffect(() => { let isSubscribed = true; - const abortCtrl = new AbortController(); + const controller = abortCtrl.current; const fetchAlert = async () => { try { @@ -72,7 +73,7 @@ export const useFetchEcsAlertsData = ({ return (): void => { isSubscribed = false; - abortCtrl.abort(); + controller.abort(); }; }, [alertIds, onError, skip]); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts index 167911c92f22b..004d1c3b7693c 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts @@ -669,11 +669,8 @@ describe('Detections Rules API', () => { }); }); - // TODO: https://github.com/elastic/kibana/pull/121644 clean up describe('fetchRuleExecutionEvents', () => { - const responseMock = { - dummy: 'response', - }; + const responseMock = { events: [] }; beforeEach(() => { fetchMock.mockClear(); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/__mocks__/rules_table_context.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/__mocks__/rules_table_context.tsx index a207d4a0ee9bd..a6d3aeb35d2a8 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/__mocks__/rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/__mocks__/rules_table_context.tsx @@ -44,13 +44,13 @@ export const useRulesTableContextMock = { reFetchRules: jest.fn(), setFilterOptions: jest.fn(), setIsAllSelected: jest.fn(), + setIsInMemorySorting: jest.fn(), setIsRefreshOn: jest.fn(), setLoadingRules: jest.fn(), setPage: jest.fn(), setPerPage: jest.fn(), setSelectedRuleIds: jest.fn(), setSortingOptions: jest.fn(), - updateRules: jest.fn(), }, }), }; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/rules_table_context.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/rules_table_context.tsx index 3f91387f52d07..45b7bb1557f36 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/rules_table_context.tsx @@ -6,16 +6,12 @@ */ import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'; -import { useQueryClient } from 'react-query'; -import { - DEFAULT_RULES_TABLE_REFRESH_SETTING, - RULES_TABLE_ADVANCED_FILTERING_THRESHOLD, -} from '../../../../../../common/constants'; +import { DEFAULT_RULES_TABLE_REFRESH_SETTING } from '../../../../../../common/constants'; import { invariant } from '../../../../../../common/utils/invariant'; -import { useUiSetting$ } from '../../../../../common/lib/kibana'; +import { useKibana, useUiSetting$ } from '../../../../../common/lib/kibana'; import { FilterOptions, PaginationOptions, Rule, SortingOptions } from '../types'; -import { getFindRulesQueryKey, useFindRules } from './use_find_rules'; -import { getRulesComparator, getRulesPredicate, mergeRules } from './utils'; +import { useFindRules } from './use_find_rules'; +import { getRulesComparator, getRulesPredicate } from './utils'; export interface RulesTableState { /** @@ -43,9 +39,9 @@ export interface RulesTableState { */ isFetching: boolean; /** - * Is true when we store and sort all rules in-memory. Is null when the total number of rules is not known yet. + * Is true when we store and sort all rules in-memory. */ - isInMemorySorting: null | boolean; + isInMemorySorting: boolean; /** * Is true then there is no cached data and the query is currently fetching. */ @@ -115,13 +111,13 @@ export interface RulesTableActions { reFetchRules: ReturnType['refetch']; setFilterOptions: React.Dispatch>; setIsAllSelected: React.Dispatch>; + setIsInMemorySorting: (value: boolean) => void; setIsRefreshOn: React.Dispatch>; setLoadingRules: React.Dispatch>; setPage: React.Dispatch>; setPerPage: React.Dispatch>; setSelectedRuleIds: React.Dispatch>; setSortingOptions: React.Dispatch>; - updateRules: (newRules: Rule[]) => void; } export interface RulesTableContextType { @@ -133,15 +129,15 @@ const RulesTableContext = createContext(null); interface RulesTableContextProviderProps { children: React.ReactNode; - totalRules: number | null; refetchPrePackagedRulesStatus: () => Promise; } +const IN_MEMORY_STORAGE_KEY = 'detection-rules-table-in-memory'; + const DEFAULT_RULES_PER_PAGE = 20; export const RulesTableContextProvider = ({ children, - totalRules, refetchPrePackagedRulesStatus, }: RulesTableContextProviderProps) => { const [autoRefreshSettings] = useUiSetting$<{ @@ -149,14 +145,11 @@ export const RulesTableContextProvider = ({ value: number; idleTimeout: number; }>(DEFAULT_RULES_TABLE_REFRESH_SETTING); + const { storage } = useKibana().services; - const [advancedFilteringThreshold] = useUiSetting$( - RULES_TABLE_ADVANCED_FILTERING_THRESHOLD + const [isInMemorySorting, setIsInMemorySorting] = useState( + storage.get(IN_MEMORY_STORAGE_KEY) ?? false ); - - const hasTotalRules = totalRules != null; - const isInMemorySorting = hasTotalRules ? totalRules < advancedFilteringThreshold : null; - const [filterOptions, setFilterOptions] = useState(initialFilterOptions); const [sortingOptions, setSortingOptions] = useState(initialSortingOptions); const [isAllSelected, setIsAllSelected] = useState(false); @@ -166,6 +159,19 @@ export const RulesTableContextProvider = ({ const [perPage, setPerPage] = useState(DEFAULT_RULES_PER_PAGE); const [selectedRuleIds, setSelectedRuleIds] = useState([]); + const toggleInMemorySorting = useCallback( + (value: boolean) => { + setIsInMemorySorting(value); // Update state so the table gets re-rendered + storage.set(IN_MEMORY_STORAGE_KEY, value); // Persist new value in the local storage + + // Reset sorting options when switching to server-side implementation as currently selected sorting might not be supported + if (value === false) { + setSortingOptions(initialSortingOptions); + } + }, + [storage] + ); + const isActionInProgress = useMemo(() => { if (loadingRules.ids.length > 0) { return !['disable', 'enable', 'edit'].includes(loadingRules.action ?? ''); @@ -185,7 +191,6 @@ export const RulesTableContextProvider = ({ isLoading, isRefetching, } = useFindRules({ - enabled: hasTotalRules, isInMemorySorting, filterOptions, sortingOptions, @@ -210,43 +215,6 @@ export const RulesTableContextProvider = ({ .slice((page - 1) * perPage, page * perPage) : filteredRules; - const queryClient = useQueryClient(); - /** - * Use this method to update rules data cached by react-query. - * It is useful when we receive new rules back from a mutation query (bulk edit, etc.); - * we can merge those rules with the existing cache to avoid an extra roundtrip to re-fetch updated rules. - */ - const updateRules = useCallback( - (newRules: Rule[]) => { - queryClient.setQueryData['data']>( - getFindRulesQueryKey({ isInMemorySorting, filterOptions, sortingOptions, pagination }), - (currentData) => ({ - rules: mergeRules(currentData?.rules || [], newRules), - total: currentData?.total || 0, - }) - ); - - /** - * Unset loading state for all new rules - */ - const newRuleIds = newRules.map((r) => r.id); - const newLoadingRuleIds = loadingRules.ids.filter((id) => !newRuleIds.includes(id)); - setLoadingRules({ - ids: newLoadingRuleIds, - action: newLoadingRuleIds.length === 0 ? null : loadingRules.action, - }); - }, - [ - filterOptions, - isInMemorySorting, - loadingRules.action, - loadingRules.ids, - pagination, - queryClient, - sortingOptions, - ] - ); - const providerValue = useMemo( () => ({ state: { @@ -275,13 +243,13 @@ export const RulesTableContextProvider = ({ reFetchRules: refetch, setFilterOptions, setIsAllSelected, + setIsInMemorySorting: toggleInMemorySorting, setIsRefreshOn, setLoadingRules, setPage, setPerPage, setSelectedRuleIds, setSortingOptions, - updateRules, }, }), [ @@ -304,8 +272,8 @@ export const RulesTableContextProvider = ({ rulesToDisplay, selectedRuleIds, sortingOptions, + toggleInMemorySorting, total, - updateRules, ] ); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/use_find_rules.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/use_find_rules.ts index ca93c21b934ca..5088ea8a3e2b0 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/use_find_rules.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/use_find_rules.ts @@ -5,72 +5,124 @@ * 2.0. */ -import { useQuery } from 'react-query'; +import { useCallback } from 'react'; +import { QueryKey, useQuery, useQueryClient, UseQueryOptions } from 'react-query'; import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; import { fetchRules } from '../api'; import * as i18n from '../translations'; -import { FilterOptions, PaginationOptions, SortingOptions } from '../types'; +import { FilterOptions, PaginationOptions, Rule, SortingOptions } from '../types'; -interface UseFindRulesArgs { - enabled: boolean; - isInMemorySorting: null | boolean; - filterOptions: FilterOptions; - sortingOptions: SortingOptions; - pagination: Pick; +interface FindRulesQueryArgs { + filterOptions?: FilterOptions; + sortingOptions?: SortingOptions; + pagination?: Pick; +} + +interface UseFindRulesArgs extends FindRulesQueryArgs { + isInMemorySorting: boolean; refetchInterval: number | false; } const MAX_RULES_PER_PAGE = 10000; +const FIND_RULES_QUERY_KEY = 'findRules'; -export const useFindRules = ({ - enabled, - pagination, - filterOptions, - sortingOptions, - isInMemorySorting, - refetchInterval, -}: UseFindRulesArgs) => { - const { addError } = useAppToasts(); - - return useQuery( - getFindRulesQueryKey({ pagination, filterOptions, sortingOptions, isInMemorySorting }), - async ({ signal }) => { - const { page, perPage } = pagination; +/** + * This hook is used to fetch detection rules. Under the hood, it implements a + * "feature switch" that allows switching from an in-memory implementation to a + * backend-based implementation on the fly. + * + * @param args - find rules arguments + * @returns rules query result + */ +export const useFindRules = (args: UseFindRulesArgs) => { + const { pagination, filterOptions, sortingOptions, isInMemorySorting, refetchInterval } = args; - const response = await fetchRules({ - signal, - pagination: isInMemorySorting - ? { page: 1, perPage: MAX_RULES_PER_PAGE } - : { page, perPage }, - filterOptions: isInMemorySorting ? undefined : filterOptions, - sortingOptions: isInMemorySorting ? undefined : sortingOptions, - }); + // Use this query result when isInMemorySorting = true + const allRules = useFindRulesQuery( + getFindRulesQueryKey({ pagination, filterOptions, sortingOptions, isInMemorySorting: true }), + { pagination: { page: 1, perPage: MAX_RULES_PER_PAGE } }, + { refetchInterval, enabled: isInMemorySorting } + ); - return { - rules: response.data, - total: response.total, - }; - }, + // Use this query result when isInMemorySorting = false + const pagedRules = useFindRulesQuery( + getFindRulesQueryKey({ pagination, filterOptions, sortingOptions, isInMemorySorting: false }), + { pagination, filterOptions, sortingOptions }, { - enabled, refetchInterval, - refetchIntervalInBackground: false, + enabled: !isInMemorySorting, keepPreviousData: true, // Use this option so that the state doesn't jump between "success" and "loading" on page change - staleTime: Infinity, - onError: (error: Error) => addError(error, { title: i18n.RULE_AND_TIMELINE_FETCH_FAILURE }), } ); + + return isInMemorySorting ? allRules : pagedRules; }; +/** + * A helper method used to construct a query key to be used as a cache key for + * react-query + * + * @param args - query arguments + * @returns Query key + */ export const getFindRulesQueryKey = ({ isInMemorySorting, filterOptions, sortingOptions, pagination, -}: Pick< - UseFindRulesArgs, - 'isInMemorySorting' | 'filterOptions' | 'sortingOptions' | 'pagination' ->) => +}: FindRulesQueryArgs & Pick) => isInMemorySorting - ? ['findAllRules'] // For the in-memory implementation we fetch data only once and cache it, thus the key is constant and do not depend on input arguments - : ['findAllRules', filterOptions, sortingOptions, pagination]; + ? [FIND_RULES_QUERY_KEY, 'all'] // For the in-memory implementation we fetch data only once and cache it, thus the key is constant and do not depend on input arguments + : [FIND_RULES_QUERY_KEY, 'paged', filterOptions, sortingOptions, pagination]; + +interface RulesQueryData { + rules: Rule[]; + total: number; +} + +const useFindRulesQuery = ( + queryKey: QueryKey, + queryArgs: FindRulesQueryArgs, + queryOptions: UseQueryOptions +) => { + const { addError } = useAppToasts(); + + return useQuery( + queryKey, + async ({ signal }) => { + const response = await fetchRules({ signal, ...queryArgs }); + + return { rules: response.data, total: response.total }; + }, + { + refetchIntervalInBackground: false, + onError: (error: Error) => addError(error, { title: i18n.RULE_AND_TIMELINE_FETCH_FAILURE }), + ...queryOptions, + } + ); +}; + +/** + * We should use this hook to invalidate the rules cache. Any rule mutation, + * like creation, deletion, modification, or rule activation, should lead to + * cache invalidation. + * + * We invalidate all rules cache entries for simplicity so that we don't need to + * look for cache entries that contain mutated rules. + * + * @returns A rules cache invalidation callback + */ +export const useInvalidateRules = () => { + const queryClient = useQueryClient(); + + return useCallback(() => { + /** + * Invalidate all queries that start with FIND_RULES_QUERY_KEY. This + * includes the in-memory query cache and paged query cache. + */ + queryClient.invalidateQueries(FIND_RULES_QUERY_KEY, { + refetchActive: true, + refetchInactive: false, + }); + }, [queryClient]); +}; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/utils.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/utils.ts index c93e14727ce70..b3e612537c5d7 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/rules_table/utils.ts @@ -8,23 +8,6 @@ import { get } from 'lodash'; import { FilterOptions, Rule, SortingOptions } from '../types'; -/** - * Merge new rules into the currently cached rules - * - * @param currentRules - * @param newRules - */ -export function mergeRules(currentRules: Rule[], newRules: Rule[]): Rule[] { - const currentRuleIds = currentRules.map((r) => r.id); - return newRules.reduce( - (mergedRules, newRule) => - currentRuleIds.includes(newRule.id) - ? mergedRules.map((rule) => (newRule.id === rule.id ? newRule : rule)) - : [...mergedRules, newRule], - currentRules - ); -} - /** * Returns a comparator function to be used with .sort() * diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/translations.ts index c1161db6db26f..86107a4019b0a 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/translations.ts @@ -109,3 +109,10 @@ export const RELOAD_MISSING_PREPACKAGED_RULES_AND_TIMELINES = ( 'Install {missingRules} Elastic prebuilt {missingRules, plural, =1 {rule} other {rules}} and {missingTimelines} Elastic prebuilt {missingTimelines, plural, =1 {timeline} other {timelines}} ', } ); + +export const RULE_EXECUTION_EVENTS_FETCH_FAILURE = i18n.translate( + 'xpack.securitySolution.containers.detectionEngine.ruleExecutionEventsFetchFailDescription', + { + defaultMessage: 'Failed to fetch rule execution events', + } +); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts index de2cc3c7d93d7..7943bca613488 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts @@ -143,7 +143,6 @@ export const RuleSchema = t.intersection([ exceptions_list: listArray, uuid: t.string, version: t.number, - // TODO: https://github.com/elastic/kibana/pull/121644 clean up execution_summary: ruleExecutionSummary, }), ]); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx index 860b31af21c6d..f890b5708148f 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx @@ -12,6 +12,7 @@ import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine import { getRulesSchemaMock } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; +import { TestProviders } from '../../../../common/mock'; jest.mock('./api'); jest.mock('../../../../common/hooks/use_app_toasts'); @@ -24,15 +25,20 @@ describe('useCreateRule', () => { }); test('init', async () => { - const { result } = renderHook(() => useCreateRule()); + const { result } = renderHook(() => useCreateRule(), { + wrapper: TestProviders, + }); expect(result.current).toEqual([{ isLoading: false, ruleId: null }, result.current[1]]); }); test('saving rule with isLoading === true', async () => { await act(async () => { - const { result, rerender, waitForNextUpdate } = renderHook(() => - useCreateRule() + const { result, rerender, waitForNextUpdate } = renderHook( + () => useCreateRule(), + { + wrapper: TestProviders, + } ); await waitForNextUpdate(); result.current[1](getCreateRulesSchemaMock()); @@ -43,8 +49,11 @@ describe('useCreateRule', () => { test('updates ruleId after the rule has been saved', async () => { await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => - useCreateRule() + const { result, waitForNextUpdate } = renderHook( + () => useCreateRule(), + { + wrapper: TestProviders, + } ); await waitForNextUpdate(); result.current[1](getCreateRulesSchemaMock()); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx index d50ef49593f40..86d10d16a4a23 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx @@ -13,6 +13,7 @@ import { CreateRulesSchema } from '../../../../../common/detection_engine/schema import { createRule } from './api'; import * as i18n from './translations'; import { transformOutput } from './transforms'; +import { useInvalidateRules } from './rules_table/use_find_rules'; interface CreateRuleReturn { isLoading: boolean; @@ -26,6 +27,7 @@ export const useCreateRule = (): ReturnCreateRule => { const [ruleId, setRuleId] = useState(null); const [isLoading, setIsLoading] = useState(false); const { addError } = useAppToasts(); + const invalidateRules = useInvalidateRules(); useEffect(() => { let isSubscribed = true; @@ -39,6 +41,7 @@ export const useCreateRule = (): ReturnCreateRule => { rule: transformOutput(rule), signal: abortCtrl.signal, }); + invalidateRules(); if (isSubscribed) { setRuleId(createRuleResponse.id); } @@ -58,7 +61,7 @@ export const useCreateRule = (): ReturnCreateRule => { isSubscribed = false; abortCtrl.abort(); }; - }, [rule, addError]); + }, [rule, addError, invalidateRules]); return [{ isLoading, ruleId }, setRule]; }; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.test.tsx index 2036c79d3f80c..4a98110153830 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.test.tsx @@ -5,24 +5,22 @@ * 2.0. */ +jest.mock('./api'); +jest.mock('../../../../common/lib/kibana'); + import React from 'react'; import { QueryClient, QueryClientProvider } from 'react-query'; import { renderHook, cleanup } from '@testing-library/react-hooks'; import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; -import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useRuleExecutionEvents } from './use_rule_execution_events'; import * as api from './api'; +import { useToasts } from '../../../../common/lib/kibana'; -jest.mock('./api'); -jest.mock('../../../../common/hooks/use_app_toasts'); +const SOME_RULE_ID = 'some-rule-id'; -// TODO: https://github.com/elastic/kibana/pull/121644 clean up describe('useRuleExecutionEvents', () => { - (useAppToasts as jest.Mock).mockReturnValue(useAppToastsMock.create()); - beforeEach(() => { jest.clearAllMocks(); }); @@ -31,21 +29,54 @@ describe('useRuleExecutionEvents', () => { cleanup(); }); - it('fetches data from the API (via fetchRuleExecutionEvents)', async () => { - const fetchRuleExecutionEvents = jest.spyOn(api, 'fetchRuleExecutionEvents'); - const queryClient = new QueryClient(); + const createReactQueryWrapper = () => { + const queryClient = new QueryClient({ + defaultOptions: { + queries: { + // Turn retries off, otherwise we won't be able to test errors + retry: false, + }, + }, + }); const wrapper: React.FC = ({ children }) => ( {children} ); + return wrapper; + }; - const { result, waitFor } = renderHook(() => useRuleExecutionEvents('some rule ID'), { - wrapper, + const render = () => + renderHook(() => useRuleExecutionEvents(SOME_RULE_ID), { + wrapper: createReactQueryWrapper(), }); - await waitFor(() => result.current.isSuccess); + it('calls the API via fetchRuleExecutionEvents', async () => { + const fetchRuleExecutionEvents = jest.spyOn(api, 'fetchRuleExecutionEvents'); + + const { waitForNextUpdate } = render(); + + await waitForNextUpdate(); expect(fetchRuleExecutionEvents).toHaveBeenCalledTimes(1); + expect(fetchRuleExecutionEvents).toHaveBeenLastCalledWith( + expect.objectContaining({ ruleId: SOME_RULE_ID }) + ); + }); + + it('fetches data from the API', async () => { + const { result, waitForNextUpdate } = render(); + + // It starts from a loading state + expect(result.current.isLoading).toEqual(true); + expect(result.current.isSuccess).toEqual(false); + expect(result.current.isError).toEqual(false); + + // When fetchRuleExecutionEvents returns + await waitForNextUpdate(); + + // It switches to a success state expect(result.current.isLoading).toEqual(false); + expect(result.current.isSuccess).toEqual(true); + expect(result.current.isError).toEqual(false); expect(result.current.data).toEqual([ { date: '2021-12-29T10:42:59.996Z', @@ -54,4 +85,31 @@ describe('useRuleExecutionEvents', () => { }, ]); }); + + it('handles exceptions from the API', async () => { + const exception = new Error('Boom!'); + jest.spyOn(api, 'fetchRuleExecutionEvents').mockRejectedValue(exception); + + const { result, waitForNextUpdate } = render(); + + // It starts from a loading state + expect(result.current.isLoading).toEqual(true); + expect(result.current.isSuccess).toEqual(false); + expect(result.current.isError).toEqual(false); + + // When fetchRuleExecutionEvents throws + await waitForNextUpdate(); + + // It switches to an error state + expect(result.current.isLoading).toEqual(false); + expect(result.current.isSuccess).toEqual(false); + expect(result.current.isError).toEqual(true); + expect(result.current.error).toEqual(exception); + + // And shows a toast with the caught exception + expect(useToasts().addError).toHaveBeenCalledTimes(1); + expect(useToasts().addError).toHaveBeenCalledWith(exception, { + title: 'Failed to fetch rule execution events', + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx index 8cbb9cb3e9ceb..58f4c524dc362 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx @@ -10,21 +10,18 @@ import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { fetchRuleExecutionEvents } from './api'; import * as i18n from './translations'; -// TODO: https://github.com/elastic/kibana/pull/121644 clean up export const useRuleExecutionEvents = (ruleId: string) => { const { addError } = useAppToasts(); return useQuery( - 'ruleExecutionEvents', + ['ruleExecutionEvents', ruleId], async ({ signal }) => { const response = await fetchRuleExecutionEvents({ ruleId, signal }); return response.events; }, { onError: (e) => { - // TODO: Should it be responsible for showing toasts? - // TODO: Change the title - addError(e, { title: i18n.RULE_AND_TIMELINE_FETCH_FAILURE }); + addError(e, { title: i18n.RULE_EXECUTION_EVENTS_FETCH_FAILURE }); }, } ); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx index 2ff2230cfa046..c2841c64ba4a3 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx @@ -11,6 +11,7 @@ import { useUpdateRule, ReturnUpdateRule } from './use_update_rule'; import { getUpdateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { TestProviders } from '../../../../common/mock'; jest.mock('./api'); jest.mock('../../../../common/hooks/use_app_toasts'); @@ -23,15 +24,20 @@ describe('useUpdateRule', () => { }); test('init', async () => { - const { result } = renderHook(() => useUpdateRule()); + const { result } = renderHook(() => useUpdateRule(), { + wrapper: TestProviders, + }); expect(result.current).toEqual([{ isLoading: false, isSaved: false }, result.current[1]]); }); test('saving rule with isLoading === true', async () => { await act(async () => { - const { result, rerender, waitForNextUpdate } = renderHook(() => - useUpdateRule() + const { result, rerender, waitForNextUpdate } = renderHook( + () => useUpdateRule(), + { + wrapper: TestProviders, + } ); await waitForNextUpdate(); result.current[1](getUpdateRulesSchemaMock()); @@ -42,8 +48,11 @@ describe('useUpdateRule', () => { test('saved rule with isSaved === true', async () => { await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => - useUpdateRule() + const { result, waitForNextUpdate } = renderHook( + () => useUpdateRule(), + { + wrapper: TestProviders, + } ); await waitForNextUpdate(); result.current[1](getUpdateRulesSchemaMock()); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx index a5953b6ec3e65..aee965a8b8ef0 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx @@ -14,6 +14,7 @@ import { transformOutput } from './transforms'; import { updateRule } from './api'; import * as i18n from './translations'; +import { useInvalidateRules } from './rules_table/use_find_rules'; interface UpdateRuleReturn { isLoading: boolean; @@ -27,6 +28,7 @@ export const useUpdateRule = (): ReturnUpdateRule => { const [isSaved, setIsSaved] = useState(false); const [isLoading, setIsLoading] = useState(false); const { addError } = useAppToasts(); + const invalidateRules = useInvalidateRules(); useEffect(() => { let isSubscribed = true; @@ -37,6 +39,7 @@ export const useUpdateRule = (): ReturnUpdateRule => { try { setIsLoading(true); await updateRule({ rule: transformOutput(rule), signal: abortCtrl.signal }); + invalidateRules(); if (isSubscribed) { setIsSaved(true); } @@ -56,7 +59,7 @@ export const useUpdateRule = (): ReturnUpdateRule => { isSubscribed = false; abortCtrl.abort(); }; - }, [rule, addError]); + }, [rule, addError, invalidateRules]); return [{ isLoading, isSaved }, setRule]; }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.ts similarity index 98% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.tsx rename to x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.ts index 024b3aba613af..951d71162a9a2 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.ts @@ -135,8 +135,7 @@ export const enableRulesAction = async ( ids: string[], enabled: boolean, dispatchToaster: Dispatch, - setLoadingRules: RulesTableActions['setLoadingRules'], - updateRules: RulesTableActions['updateRules'] + setLoadingRules: RulesTableActions['setLoadingRules'] ) => { const errorTitle = enabled ? i18n.BATCH_ACTION_ACTIVATE_SELECTED_ERROR(ids.length) @@ -147,7 +146,6 @@ export const enableRulesAction = async ( const response = await enableRules({ ids, enabled }); const { rules, errors } = bucketRulesResponse(response); - updateRules(rules); if (errors.length > 0) { displayErrorToast( diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx index f197043a7a291..a31240fae29ae 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx @@ -48,6 +48,7 @@ import { convertRulesFilterToKQL } from '../../../../../containers/detection_eng import type { FilterOptions } from '../../../../../containers/detection_engine/rules/types'; import type { BulkActionPartialErrorResponse } from '../../../../../../../common/detection_engine/schemas/response/perform_bulk_action_schema'; import type { HTTPError } from '../../../../../../../common/detection_engine/types'; +import { useInvalidateRules } from '../../../../../containers/detection_engine/rules/rules_table/use_find_rules'; interface UseBulkActionsArgs { filterOptions: FilterOptions; @@ -69,6 +70,7 @@ export const useBulkActions = ({ const queryClient = useQueryClient(); const hasMlPermissions = useHasMlPermissions(); const rulesTableContext = useRulesTableContext(); + const invalidateRules = useInvalidateRules(); const [, dispatchToaster] = useStateToaster(); const hasActionsPrivileges = useHasActionsPrivileges(); const toasts = useAppToasts(); @@ -92,7 +94,7 @@ export const useBulkActions = ({ const { state: { isAllSelected, rules, loadingRuleIds, selectedRuleIds }, - actions: { reFetchRules, setLoadingRules, updateRules, setIsRefreshOn }, + actions: { setLoadingRules, setIsRefreshOn }, } = rulesTableContext; return useCallback( @@ -131,10 +133,10 @@ export const useBulkActions = ({ }); await rulesBulkAction.byQuery(filterQuery); - await reFetchRules(); } else { - await enableRulesAction(ruleIds, true, dispatchToaster, setLoadingRules, updateRules); + await enableRulesAction(ruleIds, true, dispatchToaster, setLoadingRules); } + invalidateRules(); }; const handleDeactivateActions = async () => { @@ -149,16 +151,10 @@ export const useBulkActions = ({ }); await rulesBulkAction.byQuery(filterQuery); - await reFetchRules(); } else { - await enableRulesAction( - activatedIds, - false, - dispatchToaster, - setLoadingRules, - updateRules - ); + await enableRulesAction(activatedIds, false, dispatchToaster, setLoadingRules); } + invalidateRules(); }; const handleDuplicateAction = async () => { @@ -180,7 +176,7 @@ export const useBulkActions = ({ setLoadingRules ); } - await reFetchRules(); + invalidateRules(); }; const handleDeleteAction = async () => { @@ -202,7 +198,7 @@ export const useBulkActions = ({ } else { await deleteRulesAction(selectedRuleIds, dispatchToaster, setLoadingRules); } - await reFetchRules(); + invalidateRules(); }; const handleExportAction = async () => { @@ -334,9 +330,10 @@ export const useBulkActions = ({ await rulesBulkAction.byIds(customSelectedRuleIds); } + invalidateRules(); isBulkEditFinished = true; if (getIsMounted()) { - await Promise.allSettled([reFetchRules(), resolveTagsRefetch(bulkEditActionType)]); + await resolveTagsRefetch(bulkEditActionType); } } catch (e) { // user has cancelled form or error has occured @@ -492,24 +489,23 @@ export const useBulkActions = ({ rules, selectedRuleIds, hasActionsPrivileges, + isRulesBulkEditEnabled, isAllSelected, loadingRuleIds, hasMlPermissions, + invalidateRules, dispatchToaster, - filterQuery, setLoadingRules, - reFetchRules, - updateRules, - confirmDeletion, - isRulesBulkEditEnabled, toasts, - filterOptions, - completeBulkEditForm, - confirmBulkEdit, - resolveTagsRefetch, + filterQuery, + confirmDeletion, setIsRefreshOn, - getIsMounted, + confirmBulkEdit, + completeBulkEditForm, queryClient, + getIsMounted, + filterOptions, + resolveTagsRefetch, ] ); }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.test.tsx rename to x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.test.tsx index b78dfbcce4f7b..ba9cb5eded38f 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.test.tsx @@ -51,7 +51,7 @@ describe('AllRules', () => { /> ); - expect(wrapper.find('[data-test-subj="allRulesTableTab-rules"]')).toHaveLength(1); + expect(wrapper.find('RulesTables')).toHaveLength(1); }); describe('tabs', () => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx index 8c7205ee70687..2cf26bbbd23ea 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx @@ -5,11 +5,11 @@ * 2.0. */ -import { EuiSpacer, EuiTab, EuiTabs } from '@elastic/eui'; -import React, { useMemo, useState } from 'react'; +import { EuiSpacer } from '@elastic/eui'; +import React, { useState } from 'react'; import { CreatePreBuiltRules } from '../../../../containers/detection_engine/rules'; -import * as i18n from '../translations'; import { RulesTables } from './rules_tables'; +import { AllRulesTabs, RulesTableToolbar } from './rules_table_toolbar'; interface AllRulesProps { createPrePackagedRules: CreatePreBuiltRules | null; @@ -23,24 +23,6 @@ interface AllRulesProps { setRefreshRulesData: (refreshRule: () => Promise) => void; } -export enum AllRulesTabs { - rules = 'rules', - monitoring = 'monitoring', - exceptions = 'exceptions', -} - -const allRulesTabs = [ - { - id: AllRulesTabs.rules, - name: i18n.RULES_TAB, - disabled: false, - }, - { - id: AllRulesTabs.monitoring, - name: i18n.MONITORING_TAB, - disabled: false, - }, -]; /** * Table Component for displaying all Rules for a given cluster. Provides the ability to filter * by name, sort by enabled, and perform the following actions: @@ -61,30 +43,11 @@ export const AllRules = React.memo( rulesNotUpdated, setRefreshRulesData, }) => { - const [allRulesTab, setAllRulesTab] = useState(AllRulesTabs.rules); - - const tabs = useMemo( - () => ( - - {allRulesTabs.map((tab) => ( - setAllRulesTab(tab.id)} - isSelected={tab.id === allRulesTab} - disabled={tab.disabled} - key={tab.id} - > - {tab.name} - - ))} - - ), - [allRulesTab] - ); + const [activeTab, setActiveTab] = useState(AllRulesTabs.rules); return ( <> - {tabs} + ( rulesInstalled={rulesInstalled} rulesNotInstalled={rulesNotInstalled} rulesNotUpdated={rulesNotUpdated} - selectedTab={allRulesTab} + selectedTab={activeTab} setRefreshRulesData={setRefreshRulesData} /> diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx index 156375826aeb5..a85c5213ca599 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx @@ -32,7 +32,7 @@ export type TableColumn = EuiBasicTableColumn | EuiTableActionsColumnType< export const getRulesTableActions = ( dispatchToaster: Dispatch, navigateToApp: NavigateToApp, - reFetchRules: RulesTableActions['reFetchRules'], + invalidateRules: () => void, actionsPrivileges: boolean, setLoadingRules: RulesTableActions['setLoadingRules'] ): Array> => [ @@ -71,6 +71,7 @@ export const getRulesTableActions = ( dispatchToaster, setLoadingRules ); + invalidateRules(); if (createdRules?.length) { editRuleAction(createdRules[0].id, navigateToApp); } @@ -93,7 +94,7 @@ export const getRulesTableActions = ( name: i18n.DELETE_RULE, onClick: async (rule: Rule) => { await deleteRulesAction([rule.id], dispatchToaster, setLoadingRules); - await reFetchRules(); + invalidateRules(); }, }, ]; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_toolbar.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_toolbar.tsx new file mode 100644 index 0000000000000..14a1d93ee66d6 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_toolbar.tsx @@ -0,0 +1,79 @@ +/* + * 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 { EuiSwitch, EuiTab, EuiTabs, EuiToolTip } from '@elastic/eui'; +import React from 'react'; +import styled from 'styled-components'; +import { useRulesTableContext } from '../../../../containers/detection_engine/rules/rules_table/rules_table_context'; +import * as i18n from '../translations'; + +const ToolbarLayout = styled.div` + display: grid; + grid-template-columns: 1fr auto; + align-items: center; + grid-gap: 16px; + box-shadow: inset 0 -1px 0 #d3dae6; +`; + +interface RulesTableToolbarProps { + activeTab: AllRulesTabs; + onTabChange: (tab: AllRulesTabs) => void; +} + +export enum AllRulesTabs { + rules = 'rules', + monitoring = 'monitoring', +} + +const allRulesTabs = [ + { + id: AllRulesTabs.rules, + name: i18n.RULES_TAB, + disabled: false, + }, + { + id: AllRulesTabs.monitoring, + name: i18n.MONITORING_TAB, + disabled: false, + }, +]; + +export const RulesTableToolbar = React.memo( + ({ onTabChange, activeTab }) => { + const { + state: { isInMemorySorting }, + actions: { setIsInMemorySorting }, + } = useRulesTableContext(); + + return ( + + + {allRulesTabs.map((tab) => ( + onTabChange(tab.id)} + isSelected={tab.id === activeTab} + disabled={tab.disabled} + key={tab.id} + > + {tab.name} + + ))} + + + setIsInMemorySorting(e.target.checked)} + /> + + + ); + } +); + +RulesTableToolbar.displayName = 'RulesTableToolbar'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx index b1595da0088ba..ccf5f5e7407a3 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx @@ -17,7 +17,7 @@ import { import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import { partition } from 'lodash/fp'; -import { AllRulesTabs } from '.'; +import { AllRulesTabs } from './rules_table_toolbar'; import { HeaderSection } from '../../../../../common/components/header_section'; import { Loader } from '../../../../../common/components/loader'; import { useBoolState } from '../../../../../common/hooks/use_bool_state'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx index d7477a792a115..f41112e23c4d9 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx @@ -91,36 +91,40 @@ const useEnabledColumn = ({ hasPermissions }: ColumnsProps): TableColumn => { ); }; -const useRuleNameColumn = (): TableColumn => { +export const RuleLink = ({ name, id }: Pick) => { const { formatUrl } = useFormatUrl(SecurityPageName.rules); const { navigateToApp } = useKibana().services.application; + return ( + + void }) => { + ev.preventDefault(); + navigateToApp(APP_UI_ID, { + deepLinkId: SecurityPageName.rules, + path: getRuleDetailsUrl(id), + }); + }} + href={formatUrl(getRuleDetailsUrl(id))} + > + {name} + + + ); +}; + +const useRuleNameColumn = (): TableColumn => { return useMemo( () => ({ field: 'name', name: i18n.COLUMN_RULE, - render: (value: Rule['name'], item: Rule) => ( - - void }) => { - ev.preventDefault(); - navigateToApp(APP_UI_ID, { - deepLinkId: SecurityPageName.rules, - path: getRuleDetailsUrl(item.id), - }); - }} - href={formatUrl(getRuleDetailsUrl(item.id))} - > - {value} - - - ), + render: (value: Rule['name'], item: Rule) => , sortable: true, truncateText: true, width: '38%', }), - [formatUrl, navigateToApp] + [] ); }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.test.tsx index 45713b6b0667f..ced24a576eea7 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.test.tsx @@ -27,6 +27,7 @@ jest.mock('react-router-dom', () => { }); jest.mock('../../../../../common/lib/kibana'); jest.mock('../../../../containers/detection_engine/lists/use_lists_config'); +jest.mock('../../../../containers/detection_engine/rules/rules_table/use_find_rules'); jest.mock('../../../../../common/components/link_to'); jest.mock('../../../../components/user_info'); jest.mock('../../../../../common/hooks/use_app_toasts'); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/failure_history.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/failure_history.tsx index 62992d5d189c1..05665d7c6b3c2 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/failure_history.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/failure_history.tsx @@ -20,7 +20,6 @@ import { HeaderSection } from '../../../../../common/components/header_section'; import * as i18n from './translations'; import { FormattedDate } from '../../../../../common/components/formatted_date'; -// TODO: https://github.com/elastic/kibana/pull/121644 clean up const columns: Array> = [ { name: i18n.COLUMN_STATUS_TYPE, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx index 2e861b971730a..9ad0dfd70e336 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx @@ -464,39 +464,31 @@ const RuleDetailsPageComponent: React.FC = ({ const lastExecutionDate = lastExecution?.date ?? ''; const lastExecutionMessage = lastExecution?.message ?? ''; - // TODO: https://github.com/elastic/kibana/pull/121644 clean up const ruleStatusInfo = useMemo(() => { return ruleLoading ? ( ) : ( - <> - - - - + + + ); }, [lastExecutionStatus, lastExecutionDate, ruleLoading, isExistingRule, refreshRule]); - // TODO: https://github.com/elastic/kibana/pull/121644 clean up const ruleError = useMemo(() => { - if (ruleLoading) { - return ( - - - - ); - } - - return ( + return ruleLoading ? ( + + + + ) : ( { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.tsx index 39956dabb92b6..65837879862af 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.tsx @@ -28,7 +28,6 @@ import { redirectToDetections, userHasPermissions, } from './helpers'; -import { RulesPageHeader } from './rules_page_header'; import * as i18n from './translations'; import { SecurityPageName } from '../../../../app/types'; import { LinkButton } from '../../../../common/components/links'; @@ -39,6 +38,7 @@ import { MissingPrivilegesCallOut } from '../../../components/callouts/missing_p import { APP_UI_ID } from '../../../../../common/constants'; import { useKibana } from '../../../../common/lib/kibana'; import { RulesTableContextProvider } from '../../../containers/detection_engine/rules/rules_table/rules_table_context'; +import { HeaderPage } from '../../../../common/components/header_page'; type Func = () => Promise; @@ -164,11 +164,6 @@ const RulesPageComponent: React.FC = () => { return null; } - const totalRules = - rulesInstalled != null && rulesCustomInstalled != null - ? rulesInstalled + rulesCustomInstalled - : null; - return ( <> @@ -195,11 +190,10 @@ const RulesPageComponent: React.FC = () => { showCheckBox /> - + {loadPrebuiltRulesAndTemplatesButton && ( {loadPrebuiltRulesAndTemplatesButton} @@ -244,7 +238,7 @@ const RulesPageComponent: React.FC = () => { - + {(prePackagedRuleStatus === 'ruleNeedUpdate' || prePackagedTimelineStatus === 'timelineNeedUpdate') && ( { - const { isInMemorySorting } = useRulesTableContext().state; - - return ( - - {children} - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts index a35b213b2d800..7972eb90310c1 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts @@ -59,11 +59,11 @@ export const EXPERIMENTAL_ON = i18n.translate( } ); -export const EXPERIMENTAL_ON_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.experimentalOnDescription', +export const EXPERIMENTAL_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.experimentalDescription', { defaultMessage: - 'The experimental rules table view allows for advanced sorting and filtering capabilities. If you experience performance issues when working with the table, you can turn the experimental view off in Security Solution Advanced Settings.', + 'The experimental rules table view allows for advanced sorting capabilities. If you experience performance issues when working with the table, you can turn this setting off.', } ); @@ -74,14 +74,6 @@ export const EXPERIMENTAL_OFF = i18n.translate( } ); -export const EXPERIMENTAL_OFF_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.experimentalOffDescription', - { - defaultMessage: - "The experimental rules table view allows for advanced sorting and filtering capabilities. It is turned off because you have more than 3000 rules. If you'd like to turn it on, you can do that in Security Solutions Advanced Settings.", - } -); - export const ADD_PAGE_TITLE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.addPageTitle', { diff --git a/x-pack/plugins/security_solution/public/helper_hooks.tsx b/x-pack/plugins/security_solution/public/helper_hooks.tsx new file mode 100644 index 0000000000000..2030fa14ad696 --- /dev/null +++ b/x-pack/plugins/security_solution/public/helper_hooks.tsx @@ -0,0 +1,21 @@ +/* + * 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 { useCallback, useState } from 'react'; + +export const useOnOpenCloseHandler = (): [boolean, () => void, () => void] => { + const [isOpen, setIsOpen] = useState(false); + + const handleOnClose = useCallback(() => { + setIsOpen(false); + }, []); + + const handleOnOpen = useCallback(() => { + setIsOpen(true); + }, []); + return [isOpen, handleOnOpen, handleOnClose]; +}; diff --git a/x-pack/plugins/security_solution/public/hosts/components/common/host_risk_score.tsx b/x-pack/plugins/security_solution/public/hosts/components/common/host_risk_score.tsx index 982cde1e90a00..39909b736a612 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/common/host_risk_score.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/common/host_risk_score.tsx @@ -12,13 +12,14 @@ import { EuiHealth, transparentize } from '@elastic/eui'; import styled, { css } from 'styled-components'; import { euiLightVars } from '@kbn/ui-theme'; import { HostRiskSeverity } from '../../../../common/search_strategy'; +import { WithHoverActions } from '../../../common/components/with_hover_actions'; -const HOST_RISK_SEVERITY_COLOUR = { - Unknown: euiLightVars.euiColorMediumShade, - Low: euiLightVars.euiColorVis0, - Moderate: euiLightVars.euiColorWarning, - High: euiLightVars.euiColorVis9_behindText, - Critical: euiLightVars.euiColorDanger, +export const HOST_RISK_SEVERITY_COLOUR: { [k in HostRiskSeverity]: string } = { + [HostRiskSeverity.unknown]: euiLightVars.euiColorMediumShade, + [HostRiskSeverity.low]: euiLightVars.euiColorVis0, + [HostRiskSeverity.moderate]: euiLightVars.euiColorWarning, + [HostRiskSeverity.high]: euiLightVars.euiColorVis9_behindText, + [HostRiskSeverity.critical]: euiLightVars.euiColorDanger, }; const HostRiskBadge = styled.div<{ $severity: HostRiskSeverity; $hideBackgroundColor: boolean }>` @@ -35,19 +36,34 @@ const HostRiskBadge = styled.div<{ $severity: HostRiskSeverity; $hideBackgroundC `}; `} `; - +const TooltipContainer = styled.div` + padding: ${({ theme }) => theme.eui.paddingSizes.s}; +`; export const HostRiskScore: React.FC<{ severity: HostRiskSeverity; hideBackgroundColor?: boolean; -}> = ({ severity, hideBackgroundColor = false }) => ( - - - {severity} - - -); + toolTipContent?: JSX.Element; +}> = ({ severity, hideBackgroundColor = false, toolTipContent }) => { + const badge = ( + + + {severity} + + + ); + + if (toolTipContent != null) { + return ( + {toolTipContent}} + render={() => badge} + /> + ); + } + return badge; +}; diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx index 00230b0a4d278..8abfbb59965ef 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx @@ -25,11 +25,12 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import React, { useState, useCallback, memo } from 'react'; +import React from 'react'; import { HostRiskSeverity } from '../../../../common/search_strategy'; import { RISKY_HOSTS_DOC_LINK } from '../../../overview/components/overview_risky_host_links/risky_hosts_disabled_module'; import { HostRiskScore } from '../common/host_risk_score'; import * as i18n from './translations'; +import { useOnOpenCloseHandler } from '../../../helper_hooks'; const tableColumns: Array> = [ { @@ -62,7 +63,7 @@ const tableItems: TableItem[] = [ export const HOST_RISK_INFO_BUTTON_CLASS = 'HostRiskInformation__button'; -export const HostRiskInformationButtonIcon = memo(() => { +export const HostRiskInformationButtonIcon = () => { const [isFlyoutVisible, handleOnOpen, handleOnClose] = useOnOpenCloseHandler(); return ( @@ -79,10 +80,9 @@ export const HostRiskInformationButtonIcon = memo(() => { {isFlyoutVisible && } ); -}); -HostRiskInformationButtonIcon.displayName = 'HostRiskInformationButtonIcon'; +}; -export const HostRiskInformationButtonEmpty = memo(() => { +export const HostRiskInformationButtonEmpty = () => { const [isFlyoutVisible, handleOnOpen, handleOnClose] = useOnOpenCloseHandler(); return ( @@ -93,20 +93,6 @@ export const HostRiskInformationButtonEmpty = memo(() => { {isFlyoutVisible && } ); -}); -HostRiskInformationButtonEmpty.displayName = 'HostRiskInformationButtonEmpty'; - -const useOnOpenCloseHandler = (): [boolean, () => void, () => void] => { - const [isOpen, setIsOpen] = useState(false); - - const handleOnClose = useCallback(() => { - setIsOpen(false); - }, []); - - const handleOnOpen = useCallback(() => { - setIsOpen(true); - }, []); - return [isOpen, handleOnOpen, handleOnClose]; }; const HostRiskInformationFlyout = ({ handleOnClose }: { handleOnClose: () => void }) => { diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx new file mode 100644 index 0000000000000..cab6dd08ef018 --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx @@ -0,0 +1,112 @@ +/* + * 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 { EuiIcon, EuiLink, EuiText, EuiToolTip } from '@elastic/eui'; +import { + DragEffects, + DraggableWrapper, +} from '../../../common/components/drag_and_drop/draggable_wrapper'; +import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; +import { getEmptyTagValue } from '../../../common/components/empty_value'; +import { HostDetailsLink } from '../../../common/components/links'; +import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; +import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; +import { HostRiskScoreColumns } from '.'; + +import * as i18n from './translations'; +import { HostRiskScore } from '../common/host_risk_score'; +import { HostRiskSeverity } from '../../../../common/search_strategy'; +import { HostsTableType } from '../../store/model'; + +export const getHostRiskScoreColumns = ({ + dispatchSeverityUpdate, +}: { + dispatchSeverityUpdate: (s: HostRiskSeverity) => void; +}): HostRiskScoreColumns => [ + { + field: 'host.name', + name: i18n.HOST_NAME, + truncateText: false, + mobileOptions: { show: true }, + sortable: true, + render: (hostName) => { + if (hostName != null && hostName.length > 0) { + const id = escapeDataProviderId(`host-risk-score-table-hostName-${hostName}`); + return ( + + snapshot.isDragging ? ( + + + + ) : ( + + ) + } + /> + ); + } + return getEmptyTagValue(); + }, + }, + { + field: 'risk_stats.risk_score', + name: i18n.HOST_RISK_SCORE, + truncateText: true, + mobileOptions: { show: true }, + sortable: true, + render: (riskScore) => { + if (riskScore != null) { + return ( + + {riskScore.toFixed(2)} + + ); + } + return getEmptyTagValue(); + }, + }, + { + field: 'risk', + name: ( + + <> + {i18n.HOST_RISK} + + + ), + truncateText: false, + mobileOptions: { show: true }, + sortable: true, + render: (risk) => { + if (risk != null) { + return ( + dispatchSeverityUpdate(risk)}> + {i18n.VIEW_HOSTS_BY_SEVERITY(risk.toLowerCase())} + + } + severity={risk} + /> + ); + } + return getEmptyTagValue(); + }, + }, +]; diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx new file mode 100644 index 0000000000000..9994a03b1e666 --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx @@ -0,0 +1,194 @@ +/* + * 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, { useMemo, useCallback } from 'react'; +import { useDispatch } from 'react-redux'; + +import { EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; +import { + Columns, + Criteria, + ItemsPerRow, + PaginatedTable, +} from '../../../common/components/paginated_table'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { hostsActions, hostsModel, hostsSelectors } from '../../store'; +import { getHostRiskScoreColumns } from './columns'; +import type { + HostsRiskScore, + HostRiskScoreItem, + HostRiskScoreSortField, +} from '../../../../common/search_strategy'; +import { HostRiskScoreFields, HostRiskSeverity } from '../../../../common/search_strategy'; +import { State } from '../../../common/store'; +import * as i18n from '../hosts_table/translations'; +import * as i18nHosts from './translations'; +import { SeverityBar } from './severity_bar'; +import { SeverityBadges } from './severity_badges'; +import { SeverityFilterGroup } from './severity_filter_group'; +import { SeverityCount } from '../../containers/kpi_hosts/risky_hosts'; + +export const rowItems: ItemsPerRow[] = [ + { + text: i18n.ROWS_5, + numberOfRow: 5, + }, + { + text: i18n.ROWS_10, + numberOfRow: 10, + }, +]; + +const tableType = hostsModel.HostsTableType.risk; + +interface HostRiskScoreTableProps { + data: HostsRiskScore[]; + id: string; + isInspect: boolean; + loading: boolean; + loadPage: (newActivePage: number) => void; + severityCount: SeverityCount; + totalCount: number; + type: hostsModel.HostsType; +} + +export type HostRiskScoreColumns = [ + Columns, + Columns, + Columns +]; + +const HostRiskScoreTableComponent: React.FC = ({ + data, + id, + isInspect, + loading, + loadPage, + severityCount, + totalCount, + type, +}) => { + const dispatch = useDispatch(); + const getHostRiskScoreSelector = useMemo(() => hostsSelectors.hostRiskScoreSelector(), []); + const { activePage, limit, sort } = useDeepEqualSelector((state: State) => + getHostRiskScoreSelector(state, hostsModel.HostsType.page) + ); + const updateLimitPagination = useCallback( + (newLimit) => + dispatch( + hostsActions.updateTableLimit({ + hostsType: type, + limit: newLimit, + tableType, + }) + ), + [type, dispatch] + ); + + const updateActivePage = useCallback( + (newPage) => + dispatch( + hostsActions.updateTableActivePage({ + activePage: newPage, + hostsType: type, + tableType, + }) + ), + [type, dispatch] + ); + + const onSort = useCallback( + (criteria: Criteria) => { + if (criteria.sort != null) { + const newSort = criteria.sort; + if (newSort.direction !== sort.direction || newSort.field !== sort.field) { + dispatch( + hostsActions.updateHostRiskScoreSort({ + sort: newSort as HostRiskScoreSortField, + hostsType: type, + }) + ); + } + } + }, + [dispatch, sort, type] + ); + const dispatchSeverityUpdate = useCallback( + (s: HostRiskSeverity) => { + dispatch( + hostsActions.updateHostRiskScoreSeverityFilter({ + severitySelection: [s], + hostsType: type, + }) + ); + }, + [dispatch, type] + ); + const columns = useMemo( + () => getHostRiskScoreColumns({ dispatchSeverityUpdate }), + [dispatchSeverityUpdate] + ); + + const risk = ( + + + + + + + + + ); + + const headerTitle = ( + + {i18nHosts.HOSTS_BY_RISK} + + + + + ); + return ( + } + headerSupplement={risk} + headerTitle={headerTitle} + headerUnit={i18n.UNIT(totalCount)} + id={id} + isInspect={isInspect} + itemsPerRow={rowItems} + limit={limit} + loading={loading} + loadPage={loadPage} + onChange={onSort} + pageOfItems={data} + showMorePagesIndicator={false} + sorting={sort} + split={true} + stackHeader={true} + totalCount={totalCount} + updateLimitPagination={updateLimitPagination} + updateActivePage={updateActivePage} + /> + ); +}; + +HostRiskScoreTableComponent.displayName = 'HostRiskScoreTableComponent'; + +export const HostRiskScoreTable = React.memo(HostRiskScoreTableComponent); + +HostRiskScoreTable.displayName = 'HostRiskScoreTable'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_badges.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_badges.tsx new file mode 100644 index 0000000000000..655a11a8da421 --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_badges.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 { EuiFlexGroup, EuiNotificationBadge, EuiFlexItem } from '@elastic/eui'; +import React from 'react'; +import { HOST_RISK_SEVERITY_COLOUR, HostRiskScore } from '../common/host_risk_score'; +import { HostRiskSeverity } from '../../../../common/search_strategy'; +import { SeverityCount } from '../../containers/kpi_hosts/risky_hosts'; + +export const SeverityBadges: React.FC<{ + severityCount: SeverityCount; +}> = React.memo(({ severityCount }) => ( + + + + + {(Object.keys(HOST_RISK_SEVERITY_COLOUR) as HostRiskSeverity[]).map((status) => ( + + + + ))} + + + +)); + +SeverityBadges.displayName = 'SeverityBadges'; + +const SeverityBadge: React.FC<{ status: HostRiskSeverity; count: number }> = React.memo( + ({ status, count }) => ( + + + + + + + {count} + + + + ) +); + +SeverityBadge.displayName = 'SeverityBadge'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_bar.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_bar.tsx new file mode 100644 index 0000000000000..9522e84333e30 --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_bar.tsx @@ -0,0 +1,58 @@ +/* + * 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 styled from 'styled-components'; +import { EuiColorPaletteDisplay } from '@elastic/eui'; +import React, { useMemo } from 'react'; + +import { HostRiskSeverity } from '../../../../common/search_strategy'; +import { HOST_RISK_SEVERITY_COLOUR } from '../common/host_risk_score'; +import { SeverityCount } from '../../containers/kpi_hosts/risky_hosts'; + +const StyledEuiColorPaletteDisplay = styled(EuiColorPaletteDisplay)` + &.risk-score-severity-bar { + border: none; + border-radius: 0; + &:after { + border: none; + } + } +`; +interface PalletteObject { + stop: number; + color: string; +} +type PalletteArray = PalletteObject[]; + +export const SeverityBar: React.FC<{ + severityCount: SeverityCount; +}> = ({ severityCount }) => { + const palette = useMemo( + () => + (Object.keys(HOST_RISK_SEVERITY_COLOUR) as HostRiskSeverity[]).reduce( + (acc: PalletteArray, status: HostRiskSeverity) => { + const previousStop = acc.length > 0 ? acc[acc.length - 1].stop : 0; + const newEntry: PalletteObject = { + stop: previousStop + (severityCount[status] || 0), + color: HOST_RISK_SEVERITY_COLOUR[status], + }; + acc.push(newEntry); + return acc; + }, + [] as PalletteArray + ), + [severityCount] + ); + return ( + + ); +}; diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_filter_group.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_filter_group.tsx new file mode 100644 index 0000000000000..656129aec3e5b --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/severity_filter_group.tsx @@ -0,0 +1,128 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useCallback, useMemo, useState } from 'react'; + +import { + EuiFilterButton, + EuiFilterGroup, + EuiFilterSelectItem, + EuiPopover, + FilterChecked, + useGeneratedHtmlId, +} from '@elastic/eui'; +import { useDispatch } from 'react-redux'; +import { HostRiskSeverity } from '../../../../common/search_strategy'; +import * as i18n from './translations'; +import { hostsActions, hostsModel, hostsSelectors } from '../../store'; +import { SeverityCount } from '../../containers/kpi_hosts/risky_hosts'; +import { HostRiskScore } from '../common/host_risk_score'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { State } from '../../../common/store'; + +interface SeverityItems { + risk: HostRiskSeverity; + count: number; + checked?: FilterChecked; +} +export const SeverityFilterGroup: React.FC<{ + severityCount: SeverityCount; + type: hostsModel.HostsType; +}> = ({ severityCount, type }) => { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + const dispatch = useDispatch(); + + const onButtonClick = useCallback(() => { + setIsPopoverOpen(!isPopoverOpen); + }, [isPopoverOpen]); + + const closePopover = useCallback(() => { + setIsPopoverOpen(false); + }, []); + + const filterGroupPopoverId = useGeneratedHtmlId({ + prefix: 'filterGroupPopover', + }); + const getHostRiskScoreFilterQuerySelector = useMemo( + () => hostsSelectors.hostRiskScoreSeverityFilterSelector(), + [] + ); + const severitySelectionRedux = useDeepEqualSelector((state: State) => + getHostRiskScoreFilterQuerySelector(state, type) + ); + + const items: SeverityItems[] = useMemo(() => { + const checked: FilterChecked = 'on'; + return (Object.keys(severityCount) as HostRiskSeverity[]).map((k) => ({ + risk: k, + count: severityCount[k], + checked: severitySelectionRedux.includes(k) ? checked : undefined, + })); + }, [severityCount, severitySelectionRedux]); + + const updateSeverityFilter = useCallback( + (selectedSeverity: HostRiskSeverity) => { + const currentSelection = severitySelectionRedux ?? []; + const newSelection = currentSelection.includes(selectedSeverity) + ? currentSelection.filter((s) => s !== selectedSeverity) + : [...currentSelection, selectedSeverity]; + dispatch( + hostsActions.updateHostRiskScoreSeverityFilter({ + severitySelection: newSelection, + hostsType: type, + }) + ); + }, + [dispatch, severitySelectionRedux, type] + ); + + const totalActiveHosts = useMemo( + () => items.reduce((total, item) => (item.checked === 'on' ? total + item.count : total), 0), + [items] + ); + + const button = useMemo( + () => ( + item.checked === 'on')} + iconType="arrowDown" + isSelected={isPopoverOpen} + numActiveFilters={totalActiveHosts} + onClick={onButtonClick} + > + {i18n.HOST_RISK} + + ), + [isPopoverOpen, items, onButtonClick, totalActiveHosts] + ); + + return ( + + +
+ {items.map((item, index) => ( + updateSeverityFilter(item.risk)} + > + + + ))} +
+
+
+ ); +}; diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/translations.ts b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/translations.ts new file mode 100644 index 0000000000000..9a1fc5600f528 --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/translations.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { i18n } from '@kbn/i18n'; + +export const HOST_NAME = i18n.translate('xpack.securitySolution.hostsRiskTable.hostNameTitle', { + defaultMessage: 'Host Name', +}); + +export const HOST_RISK_SCORE = i18n.translate( + 'xpack.securitySolution.hostsRiskTable.hostRiskScoreTitle', + { + defaultMessage: 'Host risk score', + } +); + +export const HOST_RISK = i18n.translate('xpack.securitySolution.hostsRiskTable.riskTitle', { + defaultMessage: 'Host risk classification', +}); +export const HOST_RISK_TOOLTIP = i18n.translate( + 'xpack.securitySolution.hostsRiskTable.hostRiskToolTip', + { + defaultMessage: + 'Host risk classification is determined by host risk score. Hosts classified as Critical or High are indicated as risky.', + } +); + +export const HOSTS_BY_RISK = i18n.translate('xpack.securitySolution.hostsRiskTable.hostsTitle', { + defaultMessage: 'Hosts by risk', +}); + +export const HOST_RISK_TABLE_TOOLTIP = i18n.translate( + 'xpack.securitySolution.hostsRiskTable.hostsTableTitle', + { + defaultMessage: + 'The host risk table is not affected by the KQL time range. This table shows the latest recorded risk score for each host.', + } +); + +export const VIEW_HOSTS_BY_SEVERITY = (severity: string) => + i18n.translate('xpack.securitySolution.hostsRiskTable.filteredHostsTitle', { + values: { severity }, + defaultMessage: 'View {severity} risk hosts', + }); diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_score_over_time/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_score_over_time/index.test.tsx index 9a7dfcc967fbb..cf0d881b09235 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_score_over_time/index.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/host_score_over_time/index.test.tsx @@ -9,16 +9,20 @@ import { render } from '@testing-library/react'; import React from 'react'; import { HostRiskScoreOverTime } from '.'; import { TestProviders } from '../../../common/mock'; -import { useHostsRiskScore } from '../../../common/containers/hosts_risk/use_hosts_risk_score'; +import { useHostRiskScore } from '../../containers/host_risk_score'; -jest.mock('../../../common/containers/hosts_risk/use_hosts_risk_score'); -const useHostsRiskScoreMock = useHostsRiskScore as jest.Mock; +jest.mock('../../containers/host_risk_score'); +const useHostRiskScoreMock = useHostRiskScore as jest.Mock; describe('Host Risk Flyout', () => { it('renders', () => { + useHostRiskScoreMock.mockReturnValueOnce([false, { data: [], isModuleEnabled: true }]); + const { queryByTestId } = render( { }); it('renders loader when HostsRiskScore is laoding', () => { - useHostsRiskScoreMock.mockReturnValueOnce({ - loading: true, - isModuleEnabled: true, - result: [], - }); + useHostRiskScoreMock.mockReturnValueOnce([true, { data: [], isModuleEnabled: true }]); const { queryByTestId } = render( { hostName: string; from: string; to: string; } -const RISKY_TRESHOULD = 70; -const DEFAULT_CHART_HEIGH = 250; +const RISKY_THRESHOLD = 70; +const DEFAULT_CHART_HEIGHT = 250; +const QUERY_ID = HostRiskScoreQueryId.HOST_RISK_SCORE_OVER_TIME; const StyledEuiText = styled(EuiText)` font-size: 9px; @@ -54,13 +58,12 @@ const HostRiskScoreOverTimeComponent: React.FC = ({ hostName, from, to, + setQuery, + deleteQuery, }) => { const timeZone = useTimeZone(); - const memoizedDataTimeFormatter = useMemo( - () => histogramDateTimeFormatter([from, to]), - [from, to] - ); + const dataTimeFormatter = useMemo(() => histogramDateTimeFormatter([from, to]), [from, to]); const scoreFormatter = useCallback((d: number) => Math.round(d).toString(), []); const headerFormatter = useCallback( (tooltip: TooltipValue) => , @@ -76,24 +79,32 @@ const HostRiskScoreOverTimeComponent: React.FC = ({ ); const theme = useTheme(); - const hostRisk = useHostsRiskScore({ + const [loading, { data, refetch, inspect }] = useHostRiskScore({ hostName, onlyLatest: false, timerange, - queryId: HostRiskScoreQueryId.HOST_RISK_SCORE_OVER_TIME, }); - const data = useMemo( + const graphData = useMemo( () => - hostRisk?.result - ?.map((result) => ({ - x: result['@timestamp'], - y: result.risk_stats.risk_score, + data + ?.map((hostRisk) => ({ + x: hostRisk['@timestamp'], + y: hostRisk.risk_stats.risk_score, })) .reverse() ?? [], - [hostRisk] + [data] ); + useQueryInspector({ + queryId: QUERY_ID, + loading, + refetch, + setQuery, + deleteQuery, + inspect, + }); + return ( @@ -103,17 +114,14 @@ const HostRiskScoreOverTimeComponent: React.FC = ({ - +
-
- {hostRisk?.loading ? ( +
+ {loading ? ( ) : ( @@ -127,7 +135,7 @@ const HostRiskScoreOverTimeComponent: React.FC = ({ = ({ xAccessor="x" yAccessors={['y']} timeZone={timeZone} - data={data} + data={graphData} tickFormat={scoreFormatter} /> = ({ domainType={AnnotationDomainType.YDomain} dataValues={[ { - dataValue: RISKY_TRESHOULD, - details: RISKY_TRESHOULD.toString(), + dataValue: RISKY_THRESHOLD, + details: `${RISKY_THRESHOLD}`, header: i18n.HOST_RISK_THRESHOLD, }, ]} diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx index 30f62c7637974..d6f7809cca606 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiIcon, EuiToolTip } from '@elastic/eui'; +import { EuiIcon, EuiLink, EuiText, EuiToolTip } from '@elastic/eui'; import React from 'react'; import { DragEffects, @@ -23,8 +23,12 @@ import { HostsTableColumns } from './'; import * as i18n from './translations'; import { HostRiskSeverity, Maybe } from '../../../../common/search_strategy'; import { HostRiskScore } from '../common/host_risk_score'; +import { VIEW_HOSTS_BY_SEVERITY } from '../host_risk_score_table/translations'; -export const getHostsColumns = (showRiskColumn: boolean): HostsTableColumns => { +export const getHostsColumns = ( + showRiskColumn: boolean, + dispatchSeverityUpdate: (s: HostRiskSeverity) => void +): HostsTableColumns => { const columns: HostsTableColumns = [ { field: 'node.host.name', @@ -153,7 +157,16 @@ export const getHostsColumns = (showRiskColumn: boolean): HostsTableColumns => { sortable: false, render: (riskScore: HostRiskSeverity) => { if (riskScore != null) { - return ; + return ( + dispatchSeverityUpdate(riskScore)}> + {VIEW_HOSTS_BY_SEVERITY(riskScore.toLowerCase())} + + } + severity={riskScore} + /> + ); } return getEmptyTagValue(); }, diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx index e30e87ffcb8fb..71efbb0a44d15 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx @@ -27,6 +27,12 @@ import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_exper jest.mock('../../../common/lib/kibana'); +jest.mock('../../../common/lib/kibana/hooks', () => ({ + useNavigateTo: () => ({ + navigateTo: jest.fn(), + }), +})); + // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar jest.mock('../../../common/components/search_bar', () => ({ diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx index dc9312b1ad4c4..2415d83f11fef 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx @@ -30,6 +30,9 @@ import { import { Direction } from '../../../../common/search_strategy'; import { HostEcs, OsEcs } from '../../../../common/ecs/host'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; +import { SecurityPageName } from '../../../../common/constants'; +import { HostsTableType } from '../../store/model'; +import { useNavigateTo } from '../../../common/lib/kibana/hooks'; const tableType = hostsModel.HostsTableType.hosts; @@ -80,10 +83,12 @@ const HostsTableComponent: React.FC = ({ type, }) => { const dispatch = useDispatch(); + const { navigateTo } = useNavigateTo(); const getHostsSelector = useMemo(() => hostsSelectors.hostsSelector(), []); const { activePage, direction, limit, sortField } = useDeepEqualSelector((state) => getHostsSelector(state, type) ); + const updateLimitPagination = useCallback( (newLimit) => dispatch( @@ -129,9 +134,25 @@ const HostsTableComponent: React.FC = ({ ); const riskyHostsFeatureEnabled = useIsExperimentalFeatureEnabled('riskyHostsEnabled'); + const dispatchSeverityUpdate = useCallback( + (s: HostRiskSeverity) => { + dispatch( + hostsActions.updateHostRiskScoreSeverityFilter({ + severitySelection: [s], + hostsType: type, + }) + ); + navigateTo({ + deepLinkId: SecurityPageName.hosts, + path: HostsTableType.risk, + }); + }, + [dispatch, navigateTo, type] + ); + const hostsColumns = useMemo( - () => getHostsColumns(riskyHostsFeatureEnabled), - [riskyHostsFeatureEnabled] + () => getHostsColumns(riskyHostsFeatureEnabled, dispatchSeverityUpdate), + [dispatchSeverityUpdate, riskyHostsFeatureEnabled] ); const sorting = useMemo(() => getSorting(sortField, direction), [sortField, direction]); diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts index 15276355f800c..4c825ad0e5d37 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts @@ -17,6 +17,10 @@ export const UNIT = (totalCount: number) => defaultMessage: `{totalCount, plural, =1 {host} other {hosts}}`, }); +export const RISK_SCORE = i18n.translate('xpack.securitySolution.hostsRiskTable.tableTitle', { + defaultMessage: 'Host risk', +}); + export const NAME = i18n.translate('xpack.securitySolution.hostsTable.nameTitle', { defaultMessage: 'Host name', }); diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx index 1f854b1328aad..9660aa059e773 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx @@ -12,31 +12,18 @@ import { HostsKpiAuthentications } from './authentications'; import { HostsKpiHosts } from './hosts'; import { HostsKpiUniqueIps } from './unique_ips'; import { HostsKpiProps } from './types'; -import { RiskyHosts } from './risky_hosts'; -import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; -import { useRiskyHosts } from '../../containers/kpi_hosts/risky_hosts'; import { CallOutSwitcher } from '../../../common/components/callouts'; import { RISKY_HOSTS_DOC_LINK } from '../../../overview/components/overview_risky_host_links/risky_hosts_disabled_module'; import * as i18n from './translations'; +import { useHostRiskScore } from '../../containers/host_risk_score'; export const HostsKpiComponent = React.memo( ({ filterQuery, from, indexNames, to, setQuery, skip, narrowDateRange }) => { - const riskyHostsExperimentEnabled = useIsExperimentalFeatureEnabled('riskyHostsEnabled'); - const { - error, - response, - loading, - isModuleDisabled: isRiskHostsModuleDisabled, - } = useRiskyHosts({ - filterQuery, - from, - to, - skip: skip || !riskyHostsExperimentEnabled, - }); + const [_, { isModuleEnabled }] = useHostRiskScore({}); return ( <> - {isRiskHostsModuleDisabled && ( + {isModuleEnabled === false && ( <> ( )} - + ( skip={skip} /> - {riskyHostsExperimentEnabled && ( - - - - )} + + + { it('renders', () => { + useHostRiskScoreMock.mockReturnValueOnce([ + true, + { + data: [], + isModuleEnabled: true, + }, + ]); + const { queryByTestId } = render( { }); it('renders sorted items', () => { - useHostsRiskScoreMock.mockReturnValueOnce({ - loading: true, - isModuleEnabled: true, - result: [ - { - risk_stats: { - rule_risks: [ - { - rule_name: 'third', - rule_risk: '10', - }, - { - rule_name: 'first', - rule_risk: '99', - }, - { - rule_name: 'second', - rule_risk: '55', - }, - ], + useHostRiskScoreMock.mockReturnValueOnce([ + true, + { + data: [ + { + risk_stats: { + rule_risks: [ + { + rule_name: 'third', + rule_risk: '10', + }, + { + rule_name: 'first', + rule_risk: '99', + }, + { + rule_name: 'second', + rule_risk: '55', + }, + ], + }, }, - }, - ], - }); + ], + isModuleEnabled: true, + }, + ]); const { queryAllByRole } = render( { hostName: string; from: string; to: string; } - interface TableItem { rank: number; name: string; + id?: string; // TODO Remove the '?' when the new transform is delivered } const columns: Array> = [ @@ -45,15 +51,20 @@ const columns: Array> = [ field: 'name', sortable: true, truncateText: true, + render: (value: TableItem['name'], { id }: TableItem) => + id ? : value, }, ]; const PAGE_SIZE = 5; +const QUERY_ID = HostRiskScoreQueryId.TOP_HOST_SCORE_CONTRIBUTORS; const TopHostScoreContributorsComponent: React.FC = ({ hostName, from, to, + setQuery, + deleteQuery, }) => { const timerange = useMemo( () => ({ @@ -63,25 +74,31 @@ const TopHostScoreContributorsComponent: React.FC [from, to] ); - const hostRisk = useHostsRiskScore({ + const sort = useMemo( + () => ({ field: HostRiskScoreFields.timestamp, direction: Direction.desc }), + [] + ); + + const [loading, { data, refetch, inspect }] = useHostRiskScore({ hostName, timerange, onlyLatest: false, - queryId: HostRiskScoreQueryId.TOP_HOST_SCORE_CONTRIBUTORS, - limit: 1, - sortOrder: Direction.desc, + sort, + pagination: { + querySize: 1, + cursorStart: 0, + }, }); - const result = hostRisk?.result; - const items = useMemo(() => { - const rules = result && result.length > 0 ? result[0].risk_stats.rule_risks : []; + const rules = data && data.length > 0 ? data[0].risk_stats.rule_risks : []; + return rules .sort((a, b) => b.rule_risk - a.rule_risk) - .map(({ rule_name: name }, i) => ({ rank: i + 1, name })); - }, [result]); + .map(({ rule_name: name, rule_id: id }, i) => ({ rank: i + 1, name, id })); + }, [data]); - const pagination = useMemo( + const tablePagination = useMemo( () => ({ hidePerPageOptions: true, pageSize: PAGE_SIZE, @@ -90,6 +107,15 @@ const TopHostScoreContributorsComponent: React.FC [items.length] ); + useQueryInspector({ + queryId: QUERY_ID, + loading, + refetch, + setQuery, + deleteQuery, + inspect, + }); + return ( @@ -99,10 +125,7 @@ const TopHostScoreContributorsComponent: React.FC - + @@ -111,8 +134,8 @@ const TopHostScoreContributorsComponent: React.FC diff --git a/x-pack/plugins/security_solution/public/hosts/containers/host_risk_score/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/host_risk_score/index.tsx new file mode 100644 index 0000000000000..7f2c41f1414cf --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/containers/host_risk_score/index.tsx @@ -0,0 +1,223 @@ +/* + * 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 deepEqual from 'fast-deep-equal'; +import { noop } from 'lodash/fp'; +import { useCallback, useEffect, useRef, useState } from 'react'; +import { Subscription } from 'rxjs'; + +import { inputsModel } from '../../../common/store'; +import { createFilter } from '../../../common/containers/helpers'; +import { useKibana } from '../../../common/lib/kibana'; +import { + HostsQueries, + HostsRiskScoreStrategyResponse, + getHostRiskIndex, + HostsRiskScore, + HostRiskScoreSortField, + HostsRiskScoreRequestOptions, +} from '../../../../common/search_strategy'; +import { ESQuery } from '../../../../common/typed_json'; + +import * as i18n from './translations'; +import { isCompleteResponse, isErrorResponse } from '../../../../../../../src/plugins/data/common'; +import { getInspectResponse } from '../../../helpers'; +import { InspectResponse } from '../../../types'; +import { useTransforms } from '../../../transforms/containers/use_transforms'; +import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import { isIndexNotFoundError } from '../../../common/utils/exceptions'; +import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; + +export interface HostRiskScoreState { + data?: HostsRiskScore[]; + inspect: InspectResponse; + isInspected: boolean; + refetch: inputsModel.Refetch; + totalCount: number; + isModuleEnabled: boolean | undefined; +} + +interface UseHostRiskScore { + sort?: HostRiskScoreSortField; + filterQuery?: ESQuery | string; + skip?: boolean; + timerange?: { to: string; from: string }; + hostName?: string; + onlyLatest?: boolean; + pagination?: HostsRiskScoreRequestOptions['pagination']; +} + +const isRecord = (item: unknown): item is Record => + typeof item === 'object' && !!item; + +export const isHostsRiskScoreHit = (item: Partial): item is HostsRiskScore => + isRecord(item) && + isRecord(item.host) && + typeof item.risk_stats?.risk_score === 'number' && + typeof item.risk === 'string'; + +export const useHostRiskScore = ({ + timerange, + hostName, + onlyLatest = true, + filterQuery, + sort, + skip = false, + pagination, +}: UseHostRiskScore): [boolean, HostRiskScoreState] => { + const { querySize, cursorStart } = pagination || {}; + const { data, spaces } = useKibana().services; + const refetch = useRef(noop); + const abortCtrl = useRef(new AbortController()); + const searchSubscription = useRef(new Subscription()); + const riskyHostsFeatureEnabled = useIsExperimentalFeatureEnabled('riskyHostsEnabled'); + const [loading, setLoading] = useState(riskyHostsFeatureEnabled); + const [riskScoreRequest, setHostRiskScoreRequest] = useState( + null + ); + const { getTransformChangesIfTheyExist } = useTransforms(); + const { addError, addWarning } = useAppToasts(); + + const [riskScoreResponse, setHostRiskScoreResponse] = useState({ + data: undefined, + inspect: { + dsl: [], + response: [], + }, + isInspected: false, + refetch: refetch.current, + totalCount: 0, + isModuleEnabled: undefined, + }); + + const riskScoreSearch = useCallback( + (request: HostsRiskScoreRequestOptions | null) => { + if (request == null || skip) { + return; + } + + const asyncSearch = async () => { + abortCtrl.current = new AbortController(); + setLoading(true); + + searchSubscription.current = data.search + .search(request, { + strategy: 'securitySolutionSearchStrategy', + abortSignal: abortCtrl.current.signal, + }) + .subscribe({ + next: (response) => { + if (isCompleteResponse(response)) { + const hits = response?.rawResponse?.hits?.hits; + + setHostRiskScoreResponse((prevResponse) => ({ + ...prevResponse, + data: isHostsRiskScoreHit(hits?.[0]?._source) + ? (hits?.map((hit) => hit._source) as HostsRiskScore[]) + : [], + inspect: getInspectResponse(response, prevResponse.inspect), + refetch: refetch.current, + totalCount: response.totalCount, + isModuleEnabled: true, + })); + searchSubscription.current.unsubscribe(); + setLoading(false); + } else if (isErrorResponse(response)) { + setLoading(false); + addWarning(i18n.ERROR_RISK_SCORE); + searchSubscription.current.unsubscribe(); + } + }, + error: (error) => { + setLoading(false); + if (isIndexNotFoundError(error)) { + setHostRiskScoreResponse((prevResponse) => + !prevResponse + ? prevResponse + : { + ...prevResponse, + isModuleEnabled: false, + } + ); + + setLoading(false); + } else { + addError(error, { title: i18n.FAIL_RISK_SCORE }); + } + + searchSubscription.current.unsubscribe(); + }, + }); + }; + searchSubscription.current.unsubscribe(); + abortCtrl.current.abort(); + if (riskyHostsFeatureEnabled) { + asyncSearch(); + } + + refetch.current = asyncSearch; + }, + [data.search, addError, addWarning, skip, riskyHostsFeatureEnabled] + ); + const [spaceId, setSpaceId] = useState(); + + useEffect(() => { + if (spaces) { + spaces.getActiveSpace().then((space) => setSpaceId(space.id)); + } + }, [spaces]); + + useEffect(() => { + if (spaceId) { + setHostRiskScoreRequest((prevRequest) => { + const myRequest = { + ...(prevRequest ?? {}), + defaultIndex: [getHostRiskIndex(spaceId, onlyLatest)], + factoryQueryType: HostsQueries.hostsRiskScore, + filterQuery: createFilter(filterQuery), + pagination: + cursorStart && querySize + ? { + cursorStart, + querySize, + } + : undefined, + hostNames: hostName ? [hostName] : undefined, + timerange: timerange + ? { to: timerange.to, from: timerange.from, interval: '' } + : undefined, + sort, + }; + + if (!deepEqual(prevRequest, myRequest)) { + return myRequest; + } + return prevRequest; + }); + } + }, [ + filterQuery, + spaceId, + onlyLatest, + timerange, + cursorStart, + querySize, + sort, + hostName, + getTransformChangesIfTheyExist, + ]); + + useEffect(() => { + riskScoreSearch(riskScoreRequest); + return () => { + searchSubscription.current.unsubscribe(); + abortCtrl.current.abort(); + }; + }, [riskScoreRequest, riskScoreSearch]); + + return [loading, riskScoreResponse]; +}; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/host_risk_score/translations.ts b/x-pack/plugins/security_solution/public/hosts/containers/host_risk_score/translations.ts new file mode 100644 index 0000000000000..8cc275674d4e9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/containers/host_risk_score/translations.ts @@ -0,0 +1,22 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ERROR_RISK_SCORE = i18n.translate( + 'xpack.securitySolution.riskScore.errorSearchDescription', + { + defaultMessage: `An error has occurred on risk score search`, + } +); + +export const FAIL_RISK_SCORE = i18n.translate( + 'xpack.securitySolution.riskScore.failSearchDescription', + { + defaultMessage: `Failed to run search on risk score`, + } +); diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/risky_hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/risky_hosts/index.tsx index d3785c842af90..090560842f388 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/risky_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/risky_hosts/index.tsx @@ -7,12 +7,13 @@ import type { Observable } from 'rxjs'; import { filter } from 'rxjs/operators'; -import { useEffect, useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { useObservable, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; import { createFilter } from '../../../../common/containers/helpers'; import { getHostRiskIndex, + HostRiskSeverity, HostsKpiQueries, RequestBasicOptions, } from '../../../../../common/search_strategy'; @@ -25,6 +26,8 @@ import type { DataPublicPluginStart } from '../../../../../../../../src/plugins/ import type { HostsKpiRiskyHostsStrategyResponse } from '../../../../../common/search_strategy/security_solution/hosts/kpi/risky_hosts'; import { useKibana } from '../../../../common/lib/kibana'; import { isIndexNotFoundError } from '../../../../common/utils/exceptions'; +import { ESTermQuery } from '../../../../../common/typed_json'; +import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; export type RiskyHostsScoreRequestOptions = RequestBasicOptions; @@ -33,7 +36,7 @@ type GetHostsRiskScoreProps = RiskyHostsScoreRequestOptions & { signal: AbortSignal; }; -export const getRiskyHosts = ({ +const getRiskyHosts = ({ data, defaultIndex, timerange, @@ -53,7 +56,7 @@ export const getRiskyHosts = ({ } ); -export const getRiskyHostsComplete = ( +const getRiskyHostsComplete = ( props: GetHostsRiskScoreProps ): Observable => { return getRiskyHosts(props).pipe( @@ -68,16 +71,32 @@ const getRiskyHostsWithOptionalSignal = withOptionalSignal(getRiskyHostsComplete const useRiskyHostsComplete = () => useObservable(getRiskyHostsWithOptionalSignal); interface UseRiskyHostProps { - filterQuery?: string; + filterQuery?: string | ESTermQuery; from: string; to: string; - skip: boolean; + skip?: boolean; +} +export type SeverityCount = { + [k in HostRiskSeverity]: number; +}; + +interface RiskScoreKpi { + error: unknown; + isModuleDisabled: boolean; + severityCount: SeverityCount; + loading: boolean; } -export const useRiskyHosts = ({ filterQuery, from, to, skip }: UseRiskyHostProps) => { - const { error, result: response, start, loading } = useRiskyHostsComplete(); +export const useRiskScoreKpi = ({ + filterQuery, + from, + to, + skip, +}: UseRiskyHostProps): RiskScoreKpi => { + const riskyHostsFeatureEnabled = useIsExperimentalFeatureEnabled('riskyHostsEnabled'); + const { error, result, start, loading } = useRiskyHostsComplete(); const { data, spaces } = useKibana().services; - const isModuleDisabled = error && isIndexNotFoundError(error); + const isModuleDisabled = !!error && isIndexNotFoundError(error); const [spaceId, setSpaceId] = useState(); useEffect(() => { @@ -87,7 +106,7 @@ export const useRiskyHosts = ({ filterQuery, from, to, skip }: UseRiskyHostProps }, [spaces]); useEffect(() => { - if (!skip && spaceId) { + if (!skip && spaceId && riskyHostsFeatureEnabled) { start({ data, timerange: { to, from, interval: '' }, @@ -95,7 +114,18 @@ export const useRiskyHosts = ({ filterQuery, from, to, skip }: UseRiskyHostProps defaultIndex: [getHostRiskIndex(spaceId)], }); } - }, [data, spaceId, start, filterQuery, to, from, skip]); + }, [data, spaceId, start, filterQuery, to, from, skip, riskyHostsFeatureEnabled]); - return { error, response, loading, isModuleDisabled }; + const severityCount = useMemo( + () => ({ + [HostRiskSeverity.unknown]: 0, + [HostRiskSeverity.low]: 0, + [HostRiskSeverity.moderate]: 0, + [HostRiskSeverity.high]: 0, + [HostRiskSeverity.critical]: 0, + ...(result?.riskyHosts ?? {}), + }), + [result] + ); + return { error, severityCount, loading, isModuleDisabled }; }; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx index 259f3f7540e73..f2b0a64cbe60c 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx @@ -23,6 +23,12 @@ jest.mock('../../../common/lib/kibana'); jest.mock('../../../common/components/url_state/normalize_time_range.ts'); +jest.mock('../../../common/lib/kibana/hooks', () => ({ + useNavigateTo: () => ({ + navigateTo: jest.fn(), + }), +})); + jest.mock('../../../common/containers/source', () => ({ useFetchIndex: () => [false, { indicesExist: true, indexPatterns: mockIndexPattern }], })); diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx index 96086e2de1b3e..f850ff4c63026 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx @@ -29,7 +29,7 @@ import { TimelineId } from '../../../common/types/timeline'; import { LastEventIndexKey } from '../../../common/search_strategy'; import { useKibana } from '../../common/lib/kibana'; import { convertToBuildEsQuery } from '../../common/lib/keury'; -import { inputsSelectors } from '../../common/store'; +import { inputsSelectors, State } from '../../common/store'; import { setAbsoluteRangeDatePicker } from '../../common/store/inputs/actions'; import { SpyRoute } from '../../common/utils/route/spy_routes'; @@ -41,7 +41,8 @@ import { HostsTabs } from './hosts_tabs'; import { navTabsHosts } from './nav_tabs'; import * as i18n from './translations'; import { filterHostData } from './navigation'; -import { hostsModel } from '../store'; +import { hostsModel, hostsSelectors } from '../store'; +import { generateSeverityFilter } from '../store/helpers'; import { HostsTableType } from '../store/model'; import { onTimelineTabKeyPressed, @@ -54,6 +55,7 @@ import { useSourcererDataView } from '../../common/containers/sourcerer'; import { useDeepEqualSelector, useShallowEqualSelector } from '../../common/hooks/use_selector'; import { useInvalidFilterQuery } from '../../common/hooks/use_invalid_filter_query'; import { ID } from '../containers/hosts'; +import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; /** * Need a 100% height here to account for the graph/analyze tool, which sets no explicit height parameters, but fills the available space. @@ -83,6 +85,13 @@ const HostsComponent = () => { const getGlobalQuerySelector = useMemo(() => inputsSelectors.globalQuerySelector(), []); const query = useDeepEqualSelector(getGlobalQuerySelector); const filters = useDeepEqualSelector(getGlobalFiltersQuerySelector); + const getHostRiskScoreFilterQuerySelector = useMemo( + () => hostsSelectors.hostRiskScoreSeverityFilterSelector(), + [] + ); + const severitySelection = useDeepEqualSelector((state: State) => + getHostRiskScoreFilterQuerySelector(state, hostsModel.HostsType.page) + ); const { to, from, deleteQuery, setQuery, isInitializing } = useGlobalTime(); const { globalFullScreen } = useGlobalFullScreen(); @@ -93,8 +102,14 @@ const HostsComponent = () => { if (tabName === HostsTableType.alerts) { return filters.length > 0 ? [...filters, ...filterHostData] : filterHostData; } + + if (tabName === HostsTableType.risk) { + const severityFilter = generateSeverityFilter(severitySelection); + + return [...severityFilter, ...filterHostData, ...filters]; + } return filters; - }, [tabName, filters]); + }, [severitySelection, tabName, filters]); const narrowDateRange = useCallback( ({ x }) => { if (!x) { @@ -133,6 +148,8 @@ const HostsComponent = () => { [indexPattern, query, tabsFilters, uiSettings] ); + const riskyHostsFeatureEnabled = useIsExperimentalFeatureEnabled('riskyHostsEnabled'); + useInvalidFilterQuery({ id: ID, filterQuery, kqlError, query, startDate: from, endDate: to }); const onSkipFocusBeforeEventsTable = useCallback(() => { @@ -195,7 +212,7 @@ const HostsComponent = () => { diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx index 7d7288c878369..07979c289309a 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx @@ -18,6 +18,7 @@ import { UpdateDateRange } from '../../common/components/charts/common'; import { HOSTS_PATH } from '../../../common/constants'; import { HostsQueryTabBody, + HostRiskScoreQueryTabBody, AuthenticationsQueryTabBody, UncommonProcessQueryTabBody, EventsQueryTabBody, @@ -85,6 +86,9 @@ export const HostsTabs = memo( + + + diff --git a/x-pack/plugins/security_solution/public/hosts/pages/index.tsx b/x-pack/plugins/security_solution/public/hosts/pages/index.tsx index 64acbbc666312..0f5b2ca20da48 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/index.tsx @@ -22,6 +22,7 @@ const getHostsTabPath = () => `${HostsTableType.uncommonProcesses}|` + `${HostsTableType.anomalies}|` + `${HostsTableType.events}|` + + `${HostsTableType.risk}|` + `${HostsTableType.alerts})`; const getHostDetailsTabPath = () => diff --git a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.test.tsx index 154dd8dda0f5d..50e301d4b4f57 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.test.tsx @@ -10,7 +10,7 @@ import { navTabsHosts } from './nav_tabs'; describe('navTabsHosts', () => { test('it should skip anomalies tab if without mlUserPermission', () => { - const tabs = navTabsHosts(false); + const tabs = navTabsHosts(false, false); expect(tabs).toHaveProperty(HostsTableType.hosts); expect(tabs).toHaveProperty(HostsTableType.authentications); expect(tabs).toHaveProperty(HostsTableType.uncommonProcesses); @@ -19,11 +19,28 @@ describe('navTabsHosts', () => { }); test('it should display anomalies tab if with mlUserPermission', () => { - const tabs = navTabsHosts(true); + const tabs = navTabsHosts(true, false); expect(tabs).toHaveProperty(HostsTableType.hosts); expect(tabs).toHaveProperty(HostsTableType.authentications); expect(tabs).toHaveProperty(HostsTableType.uncommonProcesses); expect(tabs).toHaveProperty(HostsTableType.anomalies); expect(tabs).toHaveProperty(HostsTableType.events); }); + test('it should skip risk tab if without hostRisk', () => { + const tabs = navTabsHosts(false, false); + expect(tabs).toHaveProperty(HostsTableType.hosts); + expect(tabs).toHaveProperty(HostsTableType.authentications); + expect(tabs).toHaveProperty(HostsTableType.uncommonProcesses); + expect(tabs).not.toHaveProperty(HostsTableType.risk); + expect(tabs).toHaveProperty(HostsTableType.events); + }); + + test('it should display risk tab if with hostRisk', () => { + const tabs = navTabsHosts(false, true); + expect(tabs).toHaveProperty(HostsTableType.hosts); + expect(tabs).toHaveProperty(HostsTableType.authentications); + expect(tabs).toHaveProperty(HostsTableType.uncommonProcesses); + expect(tabs).toHaveProperty(HostsTableType.risk); + expect(tabs).toHaveProperty(HostsTableType.events); + }); }); diff --git a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx index c43a6431d2da8..0d8a5e252bfbb 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx @@ -13,7 +13,11 @@ import { HOSTS_PATH } from '../../../common/constants'; const getTabsOnHostsUrl = (tabName: HostsTableType) => `${HOSTS_PATH}/${tabName}`; -export const navTabsHosts = (hasMlUserPermissions: boolean): HostsNavTab => { +export const navTabsHosts = ( + hasMlUserPermissions: boolean, + isRiskyHostsEnabled: boolean +): HostsNavTab => { + const hiddenTabs = []; const hostsNavTabs = { [HostsTableType.hosts]: { id: HostsTableType.hosts, @@ -51,7 +55,21 @@ export const navTabsHosts = (hasMlUserPermissions: boolean): HostsNavTab => { href: getTabsOnHostsUrl(HostsTableType.alerts), disabled: false, }, + [HostsTableType.risk]: { + id: HostsTableType.risk, + name: i18n.NAVIGATION_HOST_RISK_TITLE, + href: getTabsOnHostsUrl(HostsTableType.risk), + disabled: false, + }, }; - return hasMlUserPermissions ? hostsNavTabs : omit([HostsTableType.anomalies], hostsNavTabs); + if (!hasMlUserPermissions) { + hiddenTabs.push(HostsTableType.anomalies); + } + + if (!isRiskyHostsEnabled) { + hiddenTabs.push(HostsTableType.risk); + } + + return omit(hiddenTabs, hostsNavTabs); }; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx new file mode 100644 index 0000000000000..f2d7c70ab2f0c --- /dev/null +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx @@ -0,0 +1,75 @@ +/* + * 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, { useMemo } from 'react'; +import { noop } from 'lodash/fp'; +import { useHostRiskScore } from '../../containers/host_risk_score'; +import { HostsComponentsQueryProps } from './types'; +import { manageQuery } from '../../../common/components/page/manage_query'; +import { HostRiskScoreTable } from '../../components/host_risk_score_table'; +import { useRiskScoreKpi } from '../../containers/kpi_hosts/risky_hosts'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { hostsModel, hostsSelectors } from '../../store'; +import { State } from '../../../common/store'; +import { HostRiskScoreQueryId } from '../../../common/containers/hosts_risk/types'; + +const HostRiskScoreTableManage = manageQuery(HostRiskScoreTable); + +export const HostRiskScoreQueryTabBody = ({ + deleteQuery, + endDate, + filterQuery, + skip, + setQuery, + startDate, + type, +}: HostsComponentsQueryProps) => { + const getHosRiskScoreSelector = useMemo(() => hostsSelectors.hostRiskScoreSelector(), []); + const { activePage, limit, sort } = useDeepEqualSelector((state: State) => + getHosRiskScoreSelector(state, hostsModel.HostsType.page) + ); + + const pagination = useMemo( + () => ({ + cursorStart: activePage * limit, + querySize: limit, + }), + [activePage, limit] + ); + + const [loading, { data, totalCount, inspect, isInspected, refetch }] = useHostRiskScore({ + filterQuery, + skip, + pagination, + sort, + }); + + const { severityCount, loading: isKpiLoading } = useRiskScoreKpi({ + filterQuery, + from: startDate, + to: endDate, + }); + + return ( + + ); +}; + +HostRiskScoreQueryTabBody.displayName = 'HostRiskScoreQueryTabBody'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx index 6982047aa26ad..cebcc0ee855ea 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx @@ -20,18 +20,32 @@ const StyledEuiFlexGroup = styled(EuiFlexGroup)` `; const HostRiskTabBodyComponent: React.FC< - Pick & { hostName: string } -> = ({ hostName, startDate, endDate }) => { + Pick & { + hostName: string; + } +> = ({ hostName, startDate, endDate, setQuery, deleteQuery }) => { const { buttonHref } = useRiskyHostsDashboardButtonHref(startDate, endDate); return ( <> - + - + diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/index.ts b/x-pack/plugins/security_solution/public/hosts/pages/navigation/index.ts index d5961cdc788e4..6b74418549164 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/index.ts +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/index.ts @@ -11,3 +11,4 @@ export * from './hosts_query_tab_body'; export * from './uncommon_process_query_tab_body'; export * from './alerts_query_tab_body'; export * from './host_risk_tab_body'; +export * from './host_risk_score_tab_body'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/translations.ts b/x-pack/plugins/security_solution/public/hosts/pages/translations.ts index 337f18ef33503..c2ece6c40e701 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/translations.ts +++ b/x-pack/plugins/security_solution/public/hosts/pages/translations.ts @@ -60,7 +60,7 @@ export const NAVIGATION_ALERTS_TITLE = i18n.translate( export const NAVIGATION_HOST_RISK_TITLE = i18n.translate( 'xpack.securitySolution.hosts.navigation.hostRisk', { - defaultMessage: 'Host risk', + defaultMessage: 'Hosts by risk', } ); diff --git a/x-pack/plugins/security_solution/public/hosts/store/actions.ts b/x-pack/plugins/security_solution/public/hosts/store/actions.ts index ab4033ebe7f5a..92029913e6fcc 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/actions.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/actions.ts @@ -6,7 +6,11 @@ */ import actionCreatorFactory from 'typescript-fsa'; -import { HostsSortField } from '../../../common/search_strategy/security_solution/hosts'; +import { + HostRiskSeverity, + HostsSortField, + HostRiskScoreSortField, +} from '../../../common/search_strategy/security_solution/hosts'; import { HostsTableType, HostsType } from './model'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/hosts'); @@ -33,3 +37,13 @@ export const updateHostsSort = actionCreator<{ sort: HostsSortField; hostsType: HostsType; }>('UPDATE_HOSTS_SORT'); + +export const updateHostRiskScoreSort = actionCreator<{ + sort: HostRiskScoreSortField; + hostsType: HostsType; +}>('UPDATE_HOST_RISK_SCORE_SORT'); + +export const updateHostRiskScoreSeverityFilter = actionCreator<{ + severitySelection: HostRiskSeverity[]; + hostsType: HostsType; +}>('UPDATE_HOST_RISK_SCORE_SEVERITY'); diff --git a/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts b/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts index 0d7df790f8f31..b9a194ea07fc2 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; +import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; import { HostsModel, HostsTableType, HostsType } from './model'; import { setHostsQueriesActivePageToZero } from './helpers'; -import { Direction, HostsFields } from '../../../common/search_strategy'; +import { Direction, HostsFields, HostRiskScoreFields } from '../../../common/search_strategy'; export const mockHostsState: HostsModel = { page: { @@ -36,7 +36,15 @@ export const mockHostsState: HostsModel = { activePage: 4, limit: DEFAULT_TABLE_LIMIT, }, - [HostsTableType.risk]: null, + [HostsTableType.risk]: { + activePage: DEFAULT_TABLE_ACTIVE_PAGE, + limit: DEFAULT_TABLE_LIMIT, + sort: { + field: HostRiskScoreFields.riskScore, + direction: Direction.desc, + }, + severitySelection: [], + }, }, }, details: { @@ -64,7 +72,15 @@ export const mockHostsState: HostsModel = { activePage: 4, limit: DEFAULT_TABLE_LIMIT, }, - [HostsTableType.risk]: null, + [HostsTableType.risk]: { + activePage: DEFAULT_TABLE_ACTIVE_PAGE, + limit: DEFAULT_TABLE_LIMIT, + sort: { + field: HostRiskScoreFields.riskScore, + direction: Direction.desc, + }, + severitySelection: [], + }, }, }, }; @@ -96,7 +112,15 @@ describe('Hosts redux store', () => { activePage: 0, limit: 10, }, - [HostsTableType.risk]: null, + [HostsTableType.risk]: { + activePage: 0, + limit: 10, + severitySelection: [], + sort: { + direction: 'desc', + field: 'risk_stats.risk_score', + }, + }, }); }); @@ -125,7 +149,15 @@ describe('Hosts redux store', () => { activePage: 0, limit: 10, }, - [HostsTableType.risk]: null, + [HostsTableType.risk]: { + activePage: 0, + limit: 10, + severitySelection: [], + sort: { + direction: 'desc', + field: 'risk_stats.risk_score', + }, + }, }); }); }); diff --git a/x-pack/plugins/security_solution/public/hosts/store/helpers.ts b/x-pack/plugins/security_solution/public/hosts/store/helpers.ts index 6d4ddc2f78fbf..4d93aa3b0312f 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/helpers.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/helpers.ts @@ -8,6 +8,7 @@ import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../common/store/constants'; import { HostsModel, HostsTableType, Queries, HostsType } from './model'; +import { HostRiskSeverity } from '../../../common/search_strategy'; export const setHostPageQueriesActivePageToZero = (state: HostsModel): Queries => ({ ...state.page.queries, @@ -65,3 +66,27 @@ export const setHostsQueriesActivePageToZero = (state: HostsModel, type: HostsTy } throw new Error(`HostsType ${type} is unknown`); }; + +export const generateSeverityFilter = (severitySelection: HostRiskSeverity[]) => + severitySelection.length > 0 + ? [ + { + query: { + bool: { + should: severitySelection.map((query) => ({ + match_phrase: { + 'risk.keyword': { + query, + }, + }, + })), + }, + }, + meta: { + alias: null, + disabled: false, + negate: false, + }, + }, + ] + : []; diff --git a/x-pack/plugins/security_solution/public/hosts/store/model.ts b/x-pack/plugins/security_solution/public/hosts/store/model.ts index 0a82d3961aa02..78e8299cc8dea 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/model.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/model.ts @@ -5,7 +5,11 @@ * 2.0. */ -import { Direction } from '../../../common/search_strategy'; +import { + Direction, + HostRiskSeverity, + HostRiskScoreSortField, +} from '../../../common/search_strategy'; import { HostsFields } from '../../../common/search_strategy/security_solution'; export enum HostsType { @@ -33,6 +37,11 @@ export interface HostsQuery extends BasicQueryPaginated { sortField: HostsFields; } +export interface HostRiskScoreQuery extends BasicQueryPaginated { + sort: HostRiskScoreSortField; + severitySelection: HostRiskSeverity[]; +} + export interface Queries { [HostsTableType.authentications]: BasicQueryPaginated; [HostsTableType.hosts]: HostsQuery; @@ -40,7 +49,7 @@ export interface Queries { [HostsTableType.uncommonProcesses]: BasicQueryPaginated; [HostsTableType.anomalies]: null | undefined; [HostsTableType.alerts]: BasicQueryPaginated; - [HostsTableType.risk]: null | undefined; + [HostsTableType.risk]: HostRiskScoreQuery; } export interface GenericHostsModel { diff --git a/x-pack/plugins/security_solution/public/hosts/store/reducer.ts b/x-pack/plugins/security_solution/public/hosts/store/reducer.ts index 171431144a746..0922ede935946 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/reducer.ts @@ -6,7 +6,7 @@ */ import { reducerWithInitialState } from 'typescript-fsa-reducers'; -import { Direction, HostsFields } from '../../../common/search_strategy'; +import { Direction, HostsFields, HostRiskScoreFields } from '../../../common/search_strategy'; import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; @@ -14,6 +14,8 @@ import { setHostDetailsTablesActivePageToZero, setHostTablesActivePageToZero, updateHostsSort, + updateHostRiskScoreSeverityFilter, + updateHostRiskScoreSort, updateTableActivePage, updateTableLimit, } from './actions'; @@ -51,7 +53,15 @@ export const initialHostsState: HostsState = { activePage: DEFAULT_TABLE_ACTIVE_PAGE, limit: DEFAULT_TABLE_LIMIT, }, - [HostsTableType.risk]: null, + [HostsTableType.risk]: { + activePage: DEFAULT_TABLE_ACTIVE_PAGE, + limit: DEFAULT_TABLE_LIMIT, + sort: { + field: HostRiskScoreFields.riskScore, + direction: Direction.desc, + }, + severitySelection: [], + }, }, }, details: { @@ -79,7 +89,15 @@ export const initialHostsState: HostsState = { activePage: DEFAULT_TABLE_ACTIVE_PAGE, limit: DEFAULT_TABLE_LIMIT, }, - [HostsTableType.risk]: null, + [HostsTableType.risk]: { + activePage: DEFAULT_TABLE_ACTIVE_PAGE, + limit: DEFAULT_TABLE_LIMIT, + sort: { + field: HostRiskScoreFields.riskScore, + direction: Direction.desc, + }, + severitySelection: [], + }, }, }, }; @@ -143,4 +161,31 @@ export const hostsReducer = reducerWithInitialState(initialHostsState) }, }, })) + .case(updateHostRiskScoreSort, (state, { sort, hostsType }) => ({ + ...state, + [hostsType]: { + ...state[hostsType], + queries: { + ...state[hostsType].queries, + [HostsTableType.risk]: { + ...state[hostsType].queries[HostsTableType.risk], + sort, + }, + }, + }, + })) + .case(updateHostRiskScoreSeverityFilter, (state, { severitySelection, hostsType }) => ({ + ...state, + [hostsType]: { + ...state[hostsType], + queries: { + ...state[hostsType].queries, + [HostsTableType.risk]: { + ...state[hostsType].queries[HostsTableType.risk], + severitySelection, + activePage: DEFAULT_TABLE_ACTIVE_PAGE, + }, + }, + }, + })) .build(); diff --git a/x-pack/plugins/security_solution/public/hosts/store/selectors.ts b/x-pack/plugins/security_solution/public/hosts/store/selectors.ts index 9ee4cb7352ae9..92247a9fea2e6 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/selectors.ts @@ -21,6 +21,12 @@ export const authenticationsSelector = () => export const hostsSelector = () => createSelector(selectHosts, (hosts) => hosts.queries[HostsTableType.hosts]); +export const hostRiskScoreSelector = () => + createSelector(selectHosts, (hosts) => hosts.queries[HostsTableType.risk]); + +export const hostRiskScoreSeverityFilterSelector = () => + createSelector(selectHosts, (hosts) => hosts.queries[HostsTableType.risk].severitySelection); + export const eventsSelector = () => createSelector(selectHosts, (hosts) => hosts.queries.events); export const uncommonProcessesSelector = () => diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts index c7ba1a5c30c22..aada4195290df 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts @@ -840,4 +840,26 @@ export const AdvancedPolicySchema: AdvancedPolicySchemaType[] = [ } ), }, + { + key: 'mac.advanced.kernel.network_extension.enable_content_filtering', + first_supported_version: '8.1', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.mac.advanced.kernel.network_extension.enable_content_filtering', + { + defaultMessage: + 'Enable or disable the network content filter, this will enable/disable network eventing. Host isolation will fail if this option is disabled. Default: true', + } + ), + }, + { + key: 'mac.advanced.kernel.network_extension.enable_packet_filtering', + first_supported_version: '8.1', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.mac.advanced.kernel.network_extension.enable_packet_filtering', + { + defaultMessage: + 'Enable or disable the network packet filter. Host isolation will fail if this option is disabled. Default: true', + } + ), + }, ]; diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx index 4e5418816ee9c..82c45c8e5bf7e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx @@ -12,16 +12,18 @@ import '../../../common/mock/match_media'; import { TestProviders } from '../../../common/mock'; import { HostOverview } from './index'; -import { useHostsRiskScore } from '../../../common/containers/hosts_risk/use_hosts_risk_score'; +import { useHostRiskScore } from '../../../hosts/containers/host_risk_score'; import { mockData } from './mock'; import { mockAnomalies } from '../../../common/components/ml/mock'; -jest.mock('../../../common/containers/hosts_risk/use_hosts_risk_score', () => ({ - useHostsRiskScore: jest.fn().mockReturnValue({ - result: [], - isModuleEnabled: false, - loading: true, - }), +jest.mock('../../../hosts/containers/host_risk_score', () => ({ + useHostRiskScore: jest.fn().mockReturnValue([ + true, + { + data: [], + isModuleEnabled: false, + }, + ]), })); describe('Host Summary Component', () => { @@ -74,22 +76,24 @@ describe('Host Summary Component', () => { const risk = 'very high hos risk'; const riskScore = 9999999; - (useHostsRiskScore as jest.Mock).mockReturnValue({ - result: [ - { - host: { - name: 'testHostmame', + (useHostRiskScore as jest.Mock).mockReturnValue([ + false, + { + data: [ + { + host: { + name: 'testHostmame', + }, + risk, + risk_stats: { + rule_risks: [], + risk_score: riskScore, + }, }, - risk, - risk_stats: { - rule_risks: [], - risk_score: riskScore, - }, - }, - ], - isModuleEnabled: true, - loading: false, - }); + ], + isModuleEnabled: true, + }, + ]); const { getByTestId } = render( diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx index 06f7787085ddc..479580a6bfb95 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx @@ -35,8 +35,8 @@ import { import * as i18n from './translations'; import { EndpointOverview } from './endpoint_overview'; import { OverviewDescriptionList } from '../../../common/components/overview_description_list'; -import { useHostsRiskScore } from '../../../common/containers/hosts_risk/use_hosts_risk_score'; import { HostRiskScore } from '../../../hosts/components/common/host_risk_score'; +import { useHostRiskScore } from '../../../hosts/containers/host_risk_score'; interface HostSummaryProps { contextID?: string; // used to provide unique draggable context when viewing in the side panel @@ -80,7 +80,7 @@ export const HostOverview = React.memo( const capabilities = useMlCapabilities(); const userPermissions = hasMlUserPermissions(capabilities); const [darkMode] = useUiSetting$(DEFAULT_DARK_MODE); - const hostRisk = useHostsRiskScore({ + const [_, { data: hostRisk, isModuleEnabled }] = useHostRiskScore({ hostName, }); @@ -97,9 +97,8 @@ export const HostOverview = React.memo( ); const [hostRiskScore, hostRiskLevel] = useMemo(() => { - if (hostRisk?.isModuleEnabled) { - const hostRiskData = - hostRisk.result && hostRisk.result.length > 0 ? hostRisk.result[0] : undefined; + if (isModuleEnabled) { + const hostRiskData = hostRisk && hostRisk.length > 0 ? hostRisk[0] : undefined; return [ { title: i18n.HOST_RISK_SCORE, @@ -128,7 +127,7 @@ export const HostOverview = React.memo( ]; } return [undefined, undefined]; - }, [hostRisk]); + }, [hostRisk, isModuleEnabled]); const column: DescriptionList[] = useMemo( () => [ diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx index 95ebe9be77019..8f34a94ea6aa2 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx @@ -22,12 +22,12 @@ import { } from '../../../common/mock'; import { useRiskyHostsDashboardButtonHref } from '../../containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href'; import { useRiskyHostsDashboardLinks } from '../../containers/overview_risky_host_links/use_risky_hosts_dashboard_links'; -import { useHostsRiskScore } from '../../../common/containers/hosts_risk/use_hosts_risk_score'; +import { useHostRiskScore } from '../../../hosts/containers/host_risk_score'; jest.mock('../../../common/lib/kibana'); -jest.mock('../../../common/containers/hosts_risk/use_hosts_risk_score'); -const useHostsRiskScoreMock = useHostsRiskScore as jest.Mock; +jest.mock('../../../hosts/containers/host_risk_score'); +const useHostRiskScoreMock = useHostRiskScore as jest.Mock; jest.mock('../../containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href'); const useRiskyHostsDashboardButtonHrefMock = useRiskyHostsDashboardButtonHref as jest.Mock; @@ -51,17 +51,21 @@ describe('RiskyHostLinks', () => { }); it('renders enabled module view if module is enabled', () => { - useHostsRiskScoreMock.mockReturnValueOnce({ - loading: false, - isModuleEnabled: true, - result: [], - }); + useHostRiskScoreMock.mockReturnValueOnce([ + false, + { + data: [], + isModuleEnabled: true, + }, + ]); render( { }); it('renders disabled module view if module is disabled', () => { - useHostsRiskScoreMock.mockReturnValueOnce({ - loading: false, - isModuleEnabled: false, - result: [], - }); + useHostRiskScoreMock.mockReturnValueOnce([ + false, + { + data: [], + isModuleEnabled: false, + }, + ]); render( { timerange: { to: string; from: string }; } -const RiskyHostLinksComponent: React.FC = ({ timerange }) => { - const hostRiskScore = useHostsRiskScore({ +const QUERY_ID = HostRiskScoreQueryId.OVERVIEW_RISKY_HOSTS; + +const RiskyHostLinksComponent: React.FC = ({ + timerange, + deleteQuery, + setQuery, +}) => { + const [loading, { data, isModuleEnabled, inspect, refetch }] = useHostRiskScore({ timerange, - queryId: HostRiskScoreQueryId.OVERVIEW_RISKY_HOSTS, }); - switch (hostRiskScore?.isModuleEnabled) { + useQueryInspector({ + queryId: QUERY_ID, + loading, + refetch, + setQuery, + deleteQuery, + inspect, + }); + + switch (isModuleEnabled) { case true: return ( - + ); case false: return ; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx index bc45faf1f0580..65c22d634cf27 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx @@ -52,23 +52,19 @@ describe('RiskyHostsEnabledModule', () => { diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx index 875b7c206d793..cdab0a1353e1f 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx @@ -10,7 +10,6 @@ import { RiskyHostsPanelView } from './risky_hosts_panel_view'; import { LinkPanelListItem } from '../link_panel'; import { useRiskyHostsDashboardButtonHref } from '../../containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href'; import { useRiskyHostsDashboardLinks } from '../../containers/overview_risky_host_links/use_risky_hosts_dashboard_links'; -import { HostRisk } from '../../../common/containers/hosts_risk/use_hosts_risk_score'; import { HostsRiskScore } from '../../../../common/search_strategy'; const getListItemsFromHits = (items: HostsRiskScore[]): LinkPanelListItem[] => { @@ -24,13 +23,10 @@ const getListItemsFromHits = (items: HostsRiskScore[]): LinkPanelListItem[] => { const RiskyHostsEnabledModuleComponent: React.FC<{ from: string; - hostRiskScore: HostRisk; + hostRiskScore?: HostsRiskScore[]; to: string; }> = ({ hostRiskScore, to, from }) => { - const listItems = useMemo( - () => getListItemsFromHits(hostRiskScore?.result || []), - [hostRiskScore] - ); + const listItems = useMemo(() => getListItemsFromHits(hostRiskScore || []), [hostRiskScore]); const { buttonHref } = useRiskyHostsDashboardButtonHref(to, from); const { listItemsWithLinks } = useRiskyHostsDashboardLinks(to, from, listItems); diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx index c98b612375f9b..0226617725e62 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx @@ -27,7 +27,7 @@ import { useCtiDashboardLinks } from '../containers/overview_cti_links'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; import { initialUserPrivilegesState } from '../../common/components/user_privileges/user_privileges_context'; import { EndpointPrivileges } from '../../../common/endpoint/types'; -import { useHostsRiskScore } from '../../common/containers/hosts_risk/use_hosts_risk_score'; +import { useHostRiskScore } from '../../hosts/containers/host_risk_score'; jest.mock('../../common/lib/kibana'); jest.mock('../../common/containers/source'); @@ -80,13 +80,9 @@ jest.mock('../containers/overview_cti_links/use_ti_integrations'); const useTiIntegrationsMock = useTiIntegrations as jest.Mock; useTiIntegrationsMock.mockReturnValue({}); -jest.mock('../../common/containers/hosts_risk/use_hosts_risk_score'); -const useHostsRiskScoreMock = useHostsRiskScore as jest.Mock; -useHostsRiskScoreMock.mockReturnValue({ - loading: false, - isModuleEnabled: false, - listItems: [], -}); +jest.mock('../../hosts/containers/host_risk_score'); +const useHostRiskScoreMock = useHostRiskScore as jest.Mock; +useHostRiskScoreMock.mockReturnValue([false, { data: [], isModuleEnabled: false }]); jest.mock('../../common/hooks/use_experimental_features'); const useIsExperimentalFeatureEnabledMock = useIsExperimentalFeatureEnabled as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx index 8de31fa8ebe8a..91c3be79a680b 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx @@ -161,6 +161,8 @@ const OverviewComponent = () => { {riskyHostsEnabled && ( + 1`] = ` + +`; + +exports[`Details Panel Component DetailsPanel: rendering it should not render the DetailsPanel if no expanded detail has been set in the reducer 1`] = ` + +`; + +exports[`Details Panel Component DetailsPanel:EventDetails: rendering it should render the Event Details Panel when the panelView is set and the associated params are set 1`] = ` +.c0 { + -webkit-flex: 0 1 auto; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + margin-top: 8px; +} + + + + + +
+ +
+ + +
+ + + +
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`; + +exports[`Details Panel Component DetailsPanel:EventDetails: rendering it should render the Event Details view of the Details Panel in the flyout when the panelView is eventDetail and the eventId is set 1`] = ` +Array [ + .c0 { + -webkit-flex: 0 1 auto; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + margin-top: 8px; +} + +.c1 .euiFlyoutBody__overflow { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + overflow: hidden; +} + +.c1 .euiFlyoutBody__overflow .euiFlyoutBody__overflowContent { + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + overflow: hidden; + padding: 0 16px 16px; +} + + +
+ - -
- -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - `); + expect(wrapper.find('EventDetailsPanelComponent')).toMatchSnapshot(); }); test('it should render the Event Details view of the Details Panel in the flyout when the panelView is eventDetail and the eventId is set', () => { @@ -379,584 +163,7 @@ describe('Details Panel Component', () => { ); - expect(wrapper.find('[data-test-subj="timeline:details-panel:flyout"]')) - .toMatchInlineSnapshot(` - Array [ - .c0 { - -webkit-flex: 0 1 auto; - -ms-flex: 0 1 auto; - flex: 0 1 auto; - margin-top: 8px; - } - - .c1 .euiFlyoutBody__overflow { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - overflow: hidden; - } - - .c1 .euiFlyoutBody__overflow .euiFlyoutBody__overflowContent { - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - overflow: hidden; - padding: 0 16px 16px; - } - - -
-