From 518809443f3f21c16f5161f501879ce456b0d0fa Mon Sep 17 00:00:00 2001 From: Marco Antonio Ghiani Date: Tue, 9 Apr 2024 16:51:00 +0200 Subject: [PATCH] feat(discover-shared): update exports and codeowners --- .github/CODEOWNERS | 1 + src/plugins/discover_shared/public/index.ts | 7 ++++++- .../public/services/discover_features/types.ts | 8 ++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9e6bca0b54433..f21b42bd50906 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -362,6 +362,7 @@ examples/developer_examples @elastic/appex-sharedux examples/discover_customization_examples @elastic/kibana-data-discovery x-pack/plugins/discover_enhanced @elastic/kibana-data-discovery src/plugins/discover @elastic/kibana-data-discovery +src/plugins/discover_shared @elastic/kibana-data-discovery @elastic/obs-ux-logs-team packages/kbn-discover-utils @elastic/kibana-data-discovery packages/kbn-doc-links @elastic/docs packages/kbn-docs-utils @elastic/kibana-operations diff --git a/src/plugins/discover_shared/public/index.ts b/src/plugins/discover_shared/public/index.ts index 44e6033910fc2..c6b15310c50e7 100644 --- a/src/plugins/discover_shared/public/index.ts +++ b/src/plugins/discover_shared/public/index.ts @@ -12,4 +12,9 @@ export function plugin() { return new DiscoverSharedPlugin(); } -export type { DiscoverSharedPluginSetup, DiscoverSharedPluginStart } from './types'; +export type { DiscoverSharedClientSetupExports, DiscoverSharedClientStartExports } from './types'; +export type { + ObservabilityLogsAIAssistantFeatureRenderDeps, + ObservabilityLogsAIAssistantFeature, + DiscoverFeature, +} from './services/discover_features'; diff --git a/src/plugins/discover_shared/public/services/discover_features/types.ts b/src/plugins/discover_shared/public/services/discover_features/types.ts index 29d25387d63a0..07b61b114aaf7 100644 --- a/src/plugins/discover_shared/public/services/discover_features/types.ts +++ b/src/plugins/discover_shared/public/services/discover_features/types.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { FeaturesRegistry } from '@kbn/discover-utils'; +import { DocumentOverview, FeaturesRegistry } from '@kbn/discover-utils'; /** * Features types @@ -19,9 +19,13 @@ import { FeaturesRegistry } from '@kbn/discover-utils'; * It will be opinionatedly used as an additional tool to investigate a log document and * will be shown on the logs-overview preset tab of the UnifiedDocViewer. */ + +export interface ObservabilityLogsAIAssistantFeatureRenderDeps { + doc: DocumentOverview; +} export interface ObservabilityLogsAIAssistantFeature { id: 'observability-logs-ai-assistant'; - render: (/* TODO: Update with deps required for this integration */) => React.ReactNode; + render: (deps: ObservabilityLogsAIAssistantFeatureRenderDeps) => React.ReactNode; } // This should be a union of all the available client features.