[8.16] [Sustainable Kibana Architecture] Address `security` group dependencies' issues (#197480) (#197784)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Sustainable Kibana Architecture] Address `security` group
dependencies' issues
(#197480)](https://github.com/elastic/kibana/pull/197480)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2024-10-25T09:26:05Z","message":"[Sustainable
Kibana Architecture] Address `security` group dependencies' issues
(#197480)\n\n## Summary\r\n\r\nIn the scope of [Sustainable
Kibana\r\nArchitecture](https://github.com/elastic/kibana-team/issues/1179),
this\r\nPR fixes invalid dependencies from `security solution` code
towards\r\npackages that are categorised as `group: 'platform',
visibility:\r\n'private'`.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6e3bf7775e52515d5dfc653d25e769b0252c4d3d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","Team:
SecuritySolution","backport:prev-major"],"title":"[Sustainable Kibana
Architecture] Address `security` group dependencies'
issues","number":197480,"url":"https://github.com/elastic/kibana/pull/197480","mergeCommit":{"message":"[Sustainable
Kibana Architecture] Address `security` group dependencies' issues
(#197480)\n\n## Summary\r\n\r\nIn the scope of [Sustainable
Kibana\r\nArchitecture](https://github.com/elastic/kibana-team/issues/1179),
this\r\nPR fixes invalid dependencies from `security solution` code
towards\r\npackages that are categorised as `group: 'platform',
visibility:\r\n'private'`.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6e3bf7775e52515d5dfc653d25e769b0252c4d3d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197480","number":197480,"mergeCommit":{"message":"[Sustainable
Kibana Architecture] Address `security` group dependencies' issues
(#197480)\n\n## Summary\r\n\r\nIn the scope of [Sustainable
Kibana\r\nArchitecture](https://github.com/elastic/kibana-team/issues/1179),
this\r\nPR fixes invalid dependencies from `security solution` code
towards\r\npackages that are categorised as `group: 'platform',
visibility:\r\n'private'`.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6e3bf7775e52515d5dfc653d25e769b0252c4d3d"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
This commit is contained in:
Kibana Machine 2024-10-25 22:06:33 +11:00 committed by GitHub
parent 97de70ace8
commit ec2bae0eaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 114 additions and 112 deletions

View file

@ -10,6 +10,7 @@
export type {
Tag,
TagAttributes,
CreateTagOptions,
GetAllTagsOptions,
ITagsClient,
TagWithOptionalId,

View file

@ -9,7 +9,8 @@ import { v5 as uuidv5 } from 'uuid';
import { uniqBy } from 'lodash';
import type { SavedObjectsImportSuccess } from '@kbn/core-saved-objects-common';
import { taggableTypes } from '@kbn/saved-objects-tagging-plugin/common/constants';
import type { IAssignmentService, ITagsClient } from '@kbn/saved-objects-tagging-plugin/server';
import type { IAssignmentService } from '@kbn/saved-objects-tagging-plugin/server';
import type { ITagsClient } from '@kbn/saved-objects-tagging-plugin/common/types';
import type { KibanaAssetType } from '../../../../../common';
import type { PackageSpecTags } from '../../../../types';

View file

@ -5,10 +5,10 @@
* 2.0.
*/
import React, { FC } from 'react';
import React, { type FC } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiBadge } from '@elastic/eui';
import type { Tag } from '@kbn/saved-objects-tagging-plugin/public';
import type { Tag } from '@kbn/saved-objects-tagging-oss-plugin/common';
const MAX_TAGS_TO_SHOW = 3;

View file

@ -6,7 +6,7 @@
*/
import type { GlobalSearchResult } from '@kbn/global-search-plugin/common/types';
import { Tag } from '@kbn/saved-objects-tagging-plugin/public';
import type { Tag } from '@kbn/saved-objects-tagging-oss-plugin/common';
import { resultToOption } from './result_to_option';
const createSearchResult = (parts: Partial<GlobalSearchResult> = {}): GlobalSearchResult => ({

View file

@ -8,7 +8,8 @@
import React from 'react';
import type { EuiSelectableTemplateSitewideOption } from '@elastic/eui';
import type { GlobalSearchResult } from '@kbn/global-search-plugin/common/types';
import type { SavedObjectTaggingPluginStart, Tag } from '@kbn/saved-objects-tagging-plugin/public';
import type { SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public';
import type { Tag } from '@kbn/saved-objects-tagging-oss-plugin/common';
import { ResultTagList } from '../components/result_tag_list';
const cleanMeta = (str: string) => (str.charAt(0).toUpperCase() + str.slice(1)).replace(/-/g, ' ');

View file

@ -8,14 +8,6 @@
export type { TagsCapabilities } from './capabilities';
export { getTagsCapabilities } from './capabilities';
export { tagFeatureId, tagSavedObjectTypeName, tagManagementSectionId } from './constants';
export type {
TagWithRelations,
TagAttributes,
Tag,
ITagsClient,
TagSavedObject,
TagWithOptionalId,
} from './types';
export type { TagValidation } from './validation';
export {
validateTagColor,

View file

@ -5,10 +5,10 @@
* 2.0.
*/
import { SavedObject, SavedObjectReference } from '@kbn/core/types';
import { Tag, TagAttributes } from '../types';
import { TagsCapabilities } from '../capabilities';
import { AssignableObject } from '../assignments';
import type { SavedObject, SavedObjectReference } from '@kbn/core/types';
import type { Tag, TagAttributes } from '../types';
import type { TagsCapabilities } from '../capabilities';
import type { AssignableObject } from '../assignments';
export const createReference = (type: string, id: string): SavedObjectReference => ({
type,

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { SavedObject } from '@kbn/core/types';
import type { SavedObject } from '@kbn/core/types';
import type { Tag, TagAttributes } from '@kbn/saved-objects-tagging-oss-plugin/common';
export type TagSavedObject = SavedObject<TagAttributes>;
@ -20,6 +20,7 @@ export type TagWithRelations = Tag & {
// re-export types from oss definition
export type {
Tag,
CreateTagOptions,
TagAttributes,
TagWithOptionalId,
GetAllTagsOptions,

View file

@ -6,7 +6,7 @@
*/
import { i18n } from '@kbn/i18n';
import { Tag } from './types';
import type { Tag } from './types';
export const tagNameMinLength = 2;
export const tagNameMaxLength = 50;

View file

@ -5,10 +5,10 @@
* 2.0.
*/
import React, { ReactElement } from 'react';
import React, { type ReactElement } from 'react';
import { EuiBadge } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { TagAttributes } from '../../../common/types';
import type { TagAttributes } from '../../../common/types';
export interface TagBadgeProps<T> {
tag: T;

View file

@ -5,9 +5,9 @@
* 2.0.
*/
import React, { FC } from 'react';
import React, { type FC } from 'react';
import { EuiBadgeGroup } from '@elastic/eui';
import { TagWithOptionalId } from '../../../common/types';
import type { TagWithOptionalId } from '../../../common/types';
import { TagBadge } from './tag_badge';
export interface TagListProps {

View file

@ -5,9 +5,9 @@
* 2.0.
*/
import React, { FC } from 'react';
import React, { type FC } from 'react';
import { EuiHealth, EuiText } from '@elastic/eui';
import { Tag } from '../../../common';
import type { Tag } from '../../../common/types';
import { testSubjFriendly } from '../../utils';
export interface TagSearchBarOptionProps {

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import React, { FC, useMemo, useCallback, useState } from 'react';
import React, { type FC, useMemo, useCallback, useState } from 'react';
import {
EuiComboBox,
EuiHealth,
@ -17,9 +17,9 @@ import {
EuiComboBoxProps,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { Tag } from '../../../common';
import type { Tag } from '../../../common/types';
import { testSubjFriendly } from '../../utils';
import { CreateModalOpener } from '../edition_modal';
import type { CreateModalOpener } from '../edition_modal';
interface CreateOption {
type: '__create_option__';

View file

@ -5,14 +5,14 @@
* 2.0.
*/
import React, { FC, useMemo } from 'react';
import React, { type FC, useMemo } from 'react';
import useObservable from 'react-use/lib/useObservable';
import { SavedObjectReference } from '@kbn/core/types';
import { TagListComponentProps } from '@kbn/saved-objects-tagging-oss-plugin/public';
import { Tag, TagWithOptionalId } from '../../../common/types';
import type { SavedObjectReference } from '@kbn/core/types';
import type { TagListComponentProps } from '@kbn/saved-objects-tagging-oss-plugin/public';
import type { Tag, TagWithOptionalId } from '../../../common/types';
import { getObjectTags } from '../../utils';
import { TagList } from '../base';
import { ITagsCache } from '../../services';
import type { ITagsCache } from '../../services';
import { byNameTagSorter } from '../../utils';
interface SavedObjectTagListProps {

View file

@ -5,13 +5,13 @@
* 2.0.
*/
import React, { FC } from 'react';
import React, { type FC } from 'react';
import useObservable from 'react-use/lib/useObservable';
import { TagSelectorComponentProps } from '@kbn/saved-objects-tagging-oss-plugin/public';
import { TagsCapabilities } from '../../../common';
import type { TagSelectorComponentProps } from '@kbn/saved-objects-tagging-oss-plugin/public';
import type { TagsCapabilities } from '../../../common';
import { TagSelector } from '../base';
import { ITagsCache } from '../../services';
import { CreateModalOpener } from '../edition_modal';
import type { ITagsCache } from '../../services';
import type { CreateModalOpener } from '../edition_modal';
interface GetConnectedTagSelectorOptions {
cache: ITagsCache;

View file

@ -8,8 +8,8 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { CreateTagModal } from './create_modal';
import { IToasts, NotificationsStart } from '@kbn/core-notifications-browser';
import { ITagsClient, Tag } from '@kbn/saved-objects-tagging-oss-plugin/common';
import type { IToasts, NotificationsStart } from '@kbn/core-notifications-browser';
import type { ITagsClient, Tag } from '../../../common/types';
import { I18nProvider } from '@kbn/i18n-react';
import userEvent from '@testing-library/user-event';
import { duplicateTagNameErrorMessage, managedTagConflictMessage } from './utils';

View file

@ -5,12 +5,12 @@
* 2.0.
*/
import React, { FC, useState, useCallback } from 'react';
import React, { type FC, useState, useCallback } from 'react';
import { first, lastValueFrom } from 'rxjs';
import { i18n } from '@kbn/i18n';
import type { NotificationsStart } from '@kbn/core/public';
import { ITagsClient, Tag, TagAttributes } from '../../../common/types';
import type { ITagsClient, Tag, TagAttributes } from '../../../common/types';
import { isServerValidationError } from '../../services/tags';
import { getRandomColor, validateTag } from './utils';
import { CreateOrEditModal } from './create_or_edit_modal';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import React, { FC, useState, useCallback, useMemo, useRef } from 'react';
import React, { type FC, useState, useCallback, useMemo, useRef } from 'react';
import {
EuiButtonEmpty,
EuiButton,
@ -28,9 +28,9 @@ import {
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import useDebounce from 'react-use/lib/useDebounce';
import type { TagAttributes } from '../../../common/types';
import {
TagAttributes,
TagValidation,
type TagValidation,
validateTagColor,
tagNameMaxLength,
tagDescriptionMaxLength,

View file

@ -5,11 +5,11 @@
* 2.0.
*/
import React, { FC, useState, useCallback } from 'react';
import React, { type FC, useState, useCallback } from 'react';
import { i18n } from '@kbn/i18n';
import type { NotificationsStart } from '@kbn/core/public';
import { first, lastValueFrom } from 'rxjs';
import { ITagsClient, Tag, TagAttributes } from '../../../common/types';
import type { ITagsClient, Tag, TagAttributes } from '../../../common/types';
import { isServerValidationError } from '../../services/tags';
import { CreateOrEditModal } from './create_or_edit_modal';
import { validateTag } from './utils';

View file

@ -9,9 +9,9 @@ import React from 'react';
import { EuiDelayRender, EuiLoadingSpinner } from '@elastic/eui';
import type { OverlayRef } from '@kbn/core/public';
import { toMountPoint } from '@kbn/react-kibana-mount';
import { Tag, TagAttributes } from '../../../common/types';
import { ITagInternalClient } from '../../services';
import { StartServices } from '../../types';
import type { Tag, TagAttributes } from '../../../common/types';
import type { ITagInternalClient } from '../../services';
import type { StartServices } from '../../types';
interface GetModalOpenerOptions extends StartServices {
tagClient: ITagInternalClient;

View file

@ -9,8 +9,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { BehaviorSubject } from 'rxjs';
import useObservable from 'react-use/lib/useObservable';
import { type TagValidation, validateTagName } from '../../../common';
import type { ITagsClient, TagAttributes } from '../../../common/types';
import { type TagValidation, validateTagName } from '../../../common';
import { duplicateTagNameErrorMessage, managedTagConflictMessage, validateTag } from './utils';
const initialValidation: TagValidation = {

View file

@ -8,9 +8,9 @@
import { useCallback, useEffect, useRef } from 'react';
import { i18n } from '@kbn/i18n';
import type { TagAttributes } from '../../../common/types';
import {
TagAttributes,
TagValidation,
type TagValidation,
validateTagColor,
validateTagName,
validateTagDescription,

View file

@ -9,7 +9,6 @@ import { PluginInitializerContext } from '@kbn/core/public';
import { SavedObjectTaggingPlugin } from './plugin';
export type { SavedObjectTaggingPluginStart } from './types';
export type { Tag } from '../common';
export const plugin = (initializerContext: PluginInitializerContext) =>
new SavedObjectTaggingPlugin(initializerContext);

View file

@ -7,7 +7,7 @@
import { i18n } from '@kbn/i18n';
import { Observable, from, takeUntil } from 'rxjs';
import { TagWithRelations } from '../../../common';
import { TagWithRelations } from '../../../common/types';
import { getAssignFlyoutOpener } from '../../components/assign_flyout';
import { ITagAssignmentService } from '../../services/assignments';
import { ITagsCache } from '../../services/tags';

View file

@ -7,7 +7,7 @@
import { i18n } from '@kbn/i18n';
import { NotificationsStart, OverlayStart } from '@kbn/core/public';
import { TagWithRelations } from '../../../common';
import { TagWithRelations } from '../../../common/types';
import { ITagInternalClient } from '../../services/tags';
import { TagAction } from './types';

View file

@ -6,7 +6,7 @@
*/
import { i18n } from '@kbn/i18n';
import { TagWithRelations } from '../../../common';
import { TagWithRelations } from '../../../common/types';
import { getEditModalOpener } from '../../components/edition_modal';
import { ITagInternalClient } from '../../services/tags';
import { StartServices } from '../../types';

View file

@ -6,7 +6,7 @@
*/
import { Action as EuiTableAction } from '@elastic/eui/src/components/basic_table/action_types';
import { TagWithRelations } from '../../../common';
import { TagWithRelations } from '../../../common/types';
export type TagAction = EuiTableAction<TagWithRelations> & {
id: string;

View file

@ -10,7 +10,8 @@ import { EuiInMemoryTable, EuiBasicTableColumn, EuiLink, Query, EuiIconTip } fro
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { euiThemeVars } from '@kbn/ui-theme';
import { TagsCapabilities, TagWithRelations } from '../../../common';
import { TagsCapabilities } from '../../../common';
import type { TagWithRelations } from '../../../common/types';
import { TagBadge } from '../../components';
import { TagAction } from '../actions';

View file

@ -12,10 +12,11 @@ import { Query } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { ChromeBreadcrumb, CoreStart } from '@kbn/core/public';
import { EuiSpacer } from '@elastic/eui';
import { TagWithRelations, TagsCapabilities } from '../../common';
import { TagsCapabilities } from '../../common';
import type { TagWithRelations } from '../../common/types';
import { getCreateModalOpener } from '../components/edition_modal';
import { ITagInternalClient, ITagAssignmentService, ITagsCache } from '../services';
import { TagBulkAction } from './types';
import type { TagBulkAction } from './types';
import { Header, TagTable, ActionBar } from './components';
import { getTableActions } from './actions';
import { getBulkActions } from './bulk_actions';

View file

@ -7,7 +7,7 @@
import { httpServiceMock } from '@kbn/core/public/mocks';
import { getTagConnectionsUrl } from './get_tag_connections_url';
import { TagWithRelations } from '../../../common/types';
import type { TagWithRelations } from '../../../common/types';
const createTag = (name: string): TagWithRelations => ({
id: 'tag-id',

View file

@ -5,8 +5,8 @@
* 2.0.
*/
import { IBasePath } from '@kbn/core/public';
import { TagWithRelations } from '../../../common/types';
import type { IBasePath } from '@kbn/core/public';
import type { TagWithRelations } from '../../../common/types';
/**
* Returns the url to use to redirect to the SavedObject management section with given tag

View file

@ -6,8 +6,8 @@
*/
import moment from 'moment';
import { Tag, TagAttributes } from '../../../common/types';
import { TagsCache, CacheRefreshHandler } from './tags_cache';
import type { Tag, TagAttributes } from '../../../common/types';
import { TagsCache, type CacheRefreshHandler } from './tags_cache';
const createTag = (parts: Partial<Tag>): Tag => ({
id: 'tag-id',

View file

@ -5,11 +5,11 @@
* 2.0.
*/
import { Duration } from 'moment';
import { Observable, BehaviorSubject, Subject } from 'rxjs';
import type { Duration } from 'moment';
import { type Observable, BehaviorSubject, Subject } from 'rxjs';
import { takeUntil, first, mergeMap } from 'rxjs';
import { ITagsCache } from '@kbn/saved-objects-tagging-oss-plugin/public';
import { Tag, TagAttributes } from '../../../common/types';
import type { ITagsCache } from '@kbn/saved-objects-tagging-oss-plugin/public';
import type { Tag, TagAttributes } from '../../../common/types';
export type { ITagsCache };

View file

@ -6,10 +6,10 @@
*/
import { httpServiceMock } from '@kbn/core/public/mocks';
import { Tag } from '../../../common/types';
import type { Tag } from '../../../common/types';
import { createTag, createTagAttributes } from '../../../common/test_utils';
import { tagsCacheMock } from './tags_cache.mock';
import { TagsClient, FindTagsOptions } from './tags_client';
import { TagsClient, type FindTagsOptions } from './tags_client';
import { coreMock } from '@kbn/core/public/mocks';
describe('TagsClient', () => {

View file

@ -5,16 +5,16 @@
* 2.0.
*/
import { HttpSetup, AnalyticsServiceStart } from '@kbn/core/public';
import type { HttpSetup, AnalyticsServiceStart } from '@kbn/core/public';
import { reportPerformanceMetricEvent } from '@kbn/ebt-tools';
import {
import type {
Tag,
TagAttributes,
GetAllTagsOptions,
ITagsClient,
TagWithRelations,
} from '../../../common/types';
import { ITagsChangeListener } from './tags_cache';
import type { ITagsChangeListener } from './tags_cache';
const BULK_DELETE_TAG_EVENT = 'bulkDeleteTag';
const CREATE_TAG_EVENT = 'createTag';

View file

@ -5,9 +5,9 @@
* 2.0.
*/
import { SavedObjectsTaggingApiUi } from '@kbn/saved-objects-tagging-oss-plugin/public';
import type { SavedObjectsTaggingApiUi } from '@kbn/saved-objects-tagging-oss-plugin/public';
import { tagsCacheMock } from '../services/tags/tags_cache.mock';
import { Tag } from '../../common/types';
import type { Tag } from '../../common/types';
import { createTag } from '../../common/test_utils';
import { buildGetSearchBarFilter } from './get_search_bar_filter';

View file

@ -7,12 +7,12 @@
import React from 'react';
import { i18n } from '@kbn/i18n';
import {
import type {
SavedObjectsTaggingApiUi,
GetSearchBarFilterOptions,
} from '@kbn/saved-objects-tagging-oss-plugin/public';
import { Tag } from '../../common';
import type { Tag } from '../../common/types';
import { TagSearchBarOption } from '../components';
export interface BuildGetSearchBarFilterOptions {

View file

@ -5,9 +5,10 @@
* 2.0.
*/
import { SavedObject, SavedObjectReference } from '@kbn/core/types';
import { SavedObjectsFindOptionsReference } from '@kbn/core/public';
import { Tag, tagSavedObjectTypeName } from '../common';
import type { SavedObject, SavedObjectReference } from '@kbn/core/types';
import type { SavedObjectsFindOptionsReference } from '@kbn/core/public';
import type { Tag } from '../common/types';
import { tagSavedObjectTypeName } from '../common';
type SavedObjectReferenceLike = SavedObjectReference | SavedObjectsFindOptionsReference;

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { PluginInitializerContext } from '@kbn/core/server';
import type { PluginInitializerContext } from '@kbn/core/server';
export { config } from './config';
export type {
@ -14,7 +14,6 @@ export type {
CreateTagClientOptions,
} from './types';
export type { IAssignmentService } from './services';
export type { ITagsClient } from '../common';
export const plugin = async (initializerContext: PluginInitializerContext) => {
const { SavedObjectTaggingPlugin } = await import('./plugin');

View file

@ -6,10 +6,10 @@
*/
import type { CoreRequestHandlerContext, KibanaRequest } from '@kbn/core/server';
import { SecurityPluginSetup } from '@kbn/security-plugin/server';
import { ITagsClient } from '../common/types';
import { ITagsRequestHandlerContext } from './types';
import { TagsClient, IAssignmentService, AssignmentService } from './services';
import type { SecurityPluginSetup } from '@kbn/security-plugin/server';
import type { ITagsClient } from '../common/types';
import type { ITagsRequestHandlerContext } from './types';
import { TagsClient, type IAssignmentService, AssignmentService } from './services';
export class TagsRequestHandlerContext implements ITagsRequestHandlerContext {
#client?: ITagsClient;

View file

@ -6,9 +6,9 @@
*/
import { schema } from '@kbn/config-schema';
import type { TagAttributes } from '../../../common/types';
import type { TagsPluginRouter } from '../../types';
import { tagSavedObjectTypeName } from '../../../common/constants';
import { TagAttributes } from '../../../common/types';
import { savedObjectToTag } from '../../services/tags';
import { addConnectionCount } from '../lib';

View file

@ -5,13 +5,13 @@
* 2.0.
*/
import {
import type {
SavedObjectsClientContract,
SavedObjectsFindOptionsReference,
SavedObject,
} from '@kbn/core/server';
import type { Tag, TagAttributes, TagWithRelations } from '../../../common/types';
import { tagSavedObjectTypeName } from '../../../common/constants';
import { Tag, TagAttributes, TagWithRelations } from '../../../common/types';
export const addConnectionCount = async (
tags: Tag[],

View file

@ -5,8 +5,9 @@
* 2.0.
*/
import { SavedObject, SavedObjectsType } from '@kbn/core/server';
import { tagSavedObjectTypeName, TagAttributes } from '../../common';
import type { SavedObject, SavedObjectsType } from '@kbn/core/server';
import type { TagAttributes } from '../../common/types';
import { tagSavedObjectTypeName } from '../../common';
export const tagType: SavedObjectsType = {
name: tagSavedObjectTypeName,

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { ITagsClient } from '../../../common/types';
import type { ITagsClient } from '../../../common/types';
const createClientMock = () => {
const mock: jest.Mocked<ITagsClient> = {

View file

@ -8,8 +8,8 @@
import { validateTagMock } from './tags_client.test.mocks';
import { savedObjectsClientMock } from '@kbn/core/server/mocks';
import { TagAttributes, TagSavedObject } from '../../../common/types';
import { TagValidation } from '../../../common/validation';
import type { TagAttributes, TagSavedObject } from '../../../common/types';
import type { TagValidation } from '../../../common/validation';
import { TagsClient } from './tags_client';
import { TagValidationError } from './errors';

View file

@ -5,9 +5,14 @@
* 2.0.
*/
import { SavedObjectsClientContract } from '@kbn/core/server';
import { CreateTagOptions, Tag } from '@kbn/saved-objects-tagging-oss-plugin/common/types';
import { TagSavedObject, TagAttributes, ITagsClient } from '../../../common/types';
import type { SavedObjectsClientContract } from '@kbn/core/server';
import type {
CreateTagOptions,
ITagsClient,
Tag,
TagAttributes,
TagSavedObject,
} from '../../../common/types';
import { tagSavedObjectTypeName } from '../../../common/constants';
import { TagValidationError } from './errors';
import { validateTag } from './validate_tag';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { Tag, TagSavedObject } from '../../../common/types';
import type { Tag, TagSavedObject } from '../../../common/types';
export const savedObjectToTag = (savedObject: TagSavedObject): Tag => {
return {

View file

@ -5,13 +5,13 @@
* 2.0.
*/
import type { TagAttributes } from '../../../common/types';
import {
validateTagColorMock,
validateTagNameMock,
validateTagDescriptionMock,
} from './validate_tag.test.mocks';
import { TagAttributes } from '../../../common/types';
import { validateTag } from './validate_tag';
const createAttributes = (parts: Partial<TagAttributes> = {}): TagAttributes => ({

View file

@ -5,9 +5,9 @@
* 2.0.
*/
import { TagAttributes } from '../../../common/types';
import type { TagAttributes } from '../../../common/types';
import {
TagValidation,
type TagValidation,
validateTagColor,
validateTagName,
validateTagDescription,

View file

@ -10,8 +10,8 @@ import type {
CustomRequestHandlerContext,
SavedObjectsClientContract,
} from '@kbn/core/server';
import { ITagsClient } from '../common/types';
import { IAssignmentService } from './services';
import type { ITagsClient } from '../common/types';
import type { IAssignmentService } from './services';
export interface ITagsRequestHandlerContext {
tagsClient: ITagsClient;

View file

@ -10,7 +10,7 @@ import type {
ITagsClient,
TagAttributes,
Tag as TagResponse,
} from '@kbn/saved-objects-tagging-plugin/common';
} from '@kbn/saved-objects-tagging-oss-plugin/common';
import { INTERNAL_TAGS_URL } from '../../../../common/constants';
export interface Tag {

View file

@ -15,7 +15,7 @@ import {
import { useKibana } from '../../common/lib/kibana';
import { useFetchSecurityTags } from './use_fetch_security_tags';
import { DEFAULT_TAGS_RESPONSE } from '../../common/containers/tags/__mocks__/api';
import type { ITagsClient } from '@kbn/saved-objects-tagging-plugin/common';
import type { ITagsClient } from '@kbn/saved-objects-tagging-oss-plugin/common';
import type { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public';
jest.mock('../../common/lib/kibana');

View file

@ -7,7 +7,7 @@
import type { FC, PropsWithChildren } from 'react';
import React from 'react';
import type { Tag } from '@kbn/saved-objects-tagging-plugin/common';
import type { Tag } from '@kbn/saved-objects-tagging-oss-plugin/common';
import { useFetchSecurityTags } from '../containers/use_fetch_security_tags';
export interface TagReference extends Tag {

View file

@ -10,7 +10,7 @@ import type {
SavedObjectReference,
SavedObjectsClientContract,
} from '@kbn/core/server';
import type { TagAttributes } from '@kbn/saved-objects-tagging-plugin/common';
import type { TagAttributes } from '@kbn/saved-objects-tagging-oss-plugin/common';
import { getRandomColor } from '../../../../common/utils/get_ramdom_color';
interface CreateTagParams {

View file

@ -6,7 +6,7 @@
*/
import type { SavedObjectsClientContract, SavedObjectsFindResult } from '@kbn/core/server';
import type { TagAttributes } from '@kbn/saved-objects-tagging-plugin/common';
import type { TagAttributes } from '@kbn/saved-objects-tagging-oss-plugin/common';
export const findTagsByName = async ({
savedObjectsClient,

View file

@ -6,7 +6,7 @@
*/
import type { SavedObjectsClientContract, Logger, SavedObjectsFindResult } from '@kbn/core/server';
import type { TagWithOptionalId } from '@kbn/saved-objects-tagging-plugin/common';
import type { TagWithOptionalId } from '@kbn/saved-objects-tagging-oss-plugin/common';
import { SECURITY_TAG_NAME } from '../../../common/constants';
interface GetDashboardMetricsOptions {

View file

@ -95,7 +95,6 @@
"@kbn/securitysolution-exceptions-common",
"@kbn/rison",
"@kbn/shared-ux-page-kibana-template",
"@kbn/saved-objects-tagging-plugin",
"@kbn/securitysolution-hook-utils",
"@kbn/test-jest-helpers",
"@kbn/safer-lodash-set",