From 27ed76bc159fb8a44d88383338f9425db18c5fb4 Mon Sep 17 00:00:00 2001 From: jpdjere Date: Fri, 24 May 2024 11:51:42 +0200 Subject: [PATCH] Renamed folder --- .../logic/rule_objects/create_prebuilt_rules.ts | 2 +- .../logic/rule_objects/upgrade_prebuilt_rules.ts | 2 +- .../lib/detection_engine/routes/__mocks__/request_context.ts | 2 +- .../rule_exceptions/api/create_rule_exceptions/route.ts | 4 ++-- .../api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts | 2 +- .../rule_management/api/rules/bulk_actions/route.test.ts | 2 +- .../rule_management/api/rules/bulk_create_rules/route.ts | 2 +- .../rule_management/api/rules/bulk_delete_rules/route.ts | 2 +- .../rule_management/api/rules/bulk_patch_rules/route.ts | 2 +- .../rule_management/api/rules/bulk_update_rules/route.ts | 2 +- .../rule_management/api/rules/create_rule/route.ts | 2 +- .../rule_management/api/rules/delete_rule/route.ts | 2 +- .../rule_management/api/rules/patch_rule/route.ts | 2 +- .../rule_management/api/rules/read_rule/route.ts | 2 +- .../rule_management/api/rules/update_rule/route.ts | 2 +- .../rule_management/logic/import/import_rules_utils.ts | 2 +- .../logic/{crud => rule_management}/__mocks__/read_rules.ts | 0 .../__mocks__/rules_management_client.ts | 0 .../create_custom_rule.rule_management_client.test.ts | 0 .../create_prebuilt_rule.rule_management_client.test.ts | 0 .../delete_rule.rule_management_client.test.ts | 0 .../import_rule.rule_management_client.test.ts | 0 .../patch_rule.rule_management_client.test.ts | 0 .../logic/{crud => rule_management}/read_rules.test.ts | 0 .../logic/{crud => rule_management}/read_rules.ts | 0 .../{crud => rule_management}/rules_management_client.ts | 0 .../update_rule.rule_management_client.test.ts | 0 .../upgrade_prebuilt_rule.rule_management_client.test.ts | 0 .../detection_engine_health/rule_objects/fetch_rule_by_id.ts | 2 +- .../security_solution/server/request_context_factory.ts | 2 +- x-pack/plugins/security_solution/server/types.ts | 2 +- 31 files changed, 20 insertions(+), 20 deletions(-) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/__mocks__/read_rules.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/__mocks__/rules_management_client.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/create_custom_rule.rule_management_client.test.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/create_prebuilt_rule.rule_management_client.test.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/delete_rule.rule_management_client.test.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/import_rule.rule_management_client.test.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/patch_rule.rule_management_client.test.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/read_rules.test.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/read_rules.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/rules_management_client.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/update_rule.rule_management_client.test.ts (100%) rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{crud => rule_management}/upgrade_prebuilt_rule.rule_management_client.test.ts (100%) diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts index 380ec2e57f119..9f65149e7c46e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts @@ -9,7 +9,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../common/consta import { initPromisePool } from '../../../../../utils/promise_pool'; import { withSecuritySpan } from '../../../../../utils/with_security_span'; import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset'; -import type { IRulesManagementClient } from '../../../rule_management/logic/crud/rules_management_client'; +import type { IRulesManagementClient } from '../../../rule_management/logic/rule_management/rules_management_client'; export const createPrebuiltRules = ( rulesManagementClient: IRulesManagementClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts index e7582ef90123a..a6ff9b0dea9c3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts @@ -9,7 +9,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../common/consta import { initPromisePool } from '../../../../../utils/promise_pool'; import { withSecuritySpan } from '../../../../../utils/with_security_span'; import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset'; -import type { IRulesManagementClient } from '../../../rule_management/logic/crud/rules_management_client'; +import type { IRulesManagementClient } from '../../../rule_management/logic/rule_management/rules_management_client'; /** * Upgrades existing prebuilt rules given a set of rules and output index. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts index 5c5b324e9202e..ebc18daba1c9f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts @@ -38,7 +38,7 @@ import { riskEngineDataClientMock } from '../../../entity_analytics/risk_engine/ import { riskScoreDataClientMock } from '../../../entity_analytics/risk_score/risk_score_data_client.mock'; import { assetCriticalityDataClientMock } from '../../../entity_analytics/asset_criticality/asset_criticality_data_client.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { rulesManagementClientMock } from '../../rule_management/logic/crud/__mocks__/rules_management_client'; +import { rulesManagementClientMock } from '../../rule_management/logic/rule_management/__mocks__/rules_management_client'; export const createMockClients = () => { const core = coreMock.createRequestHandlerContext(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts index 7ce4154b98ad2..0334ded224f43 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts @@ -37,13 +37,13 @@ import { CreateRuleExceptionsRequestParams, } from '../../../../../../common/api/detection_engine/rule_exceptions'; -import { readRules } from '../../../rule_management/logic/crud/read_rules'; +import { readRules } from '../../../rule_management/logic/rule_management/read_rules'; import { checkDefaultRuleExceptionListReferences } from '../../../rule_management/logic/exceptions/check_for_default_rule_exception_list'; import type { RuleParams } from '../../../rule_schema'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { buildSiemResponse } from '../../../routes/utils'; import { buildRouteValidation } from '../../../../../utils/build_validation/route_validation'; -import type { IRulesManagementClient } from '../../../rule_management/logic/crud/rules_management_client'; +import type { IRulesManagementClient } from '../../../rule_management/logic/rule_management/rules_management_client'; export const createRuleExceptionsRoute = (router: SecuritySolutionPluginRouter) => { router.versioned diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts index 2a07ecc95509b..1ef231bb0b5ad 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts @@ -11,7 +11,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../../common/con import type { PromisePoolOutcome } from '../../../../../../utils/promise_pool'; import { initPromisePool } from '../../../../../../utils/promise_pool'; import type { RuleAlertType } from '../../../../rule_schema'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { findRules } from '../../../logic/search/find_rules'; import { MAX_RULES_TO_PROCESS_TOTAL } from './route'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts index 0b7710db26425..f3b962bc27ebe 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts @@ -30,7 +30,7 @@ import { getBulkDisableRuleActionSchemaMock, } from '../../../../../../../common/api/detection_engine/rule_management/mocks'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; jest.mock('../../../../../machine_learning/authz'); jest.mock('../../../logic/crud/read_rules', () => ({ readRules: jest.fn() })); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts index f2cd8c05e2bae..ee9be34e14e98 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts @@ -16,7 +16,7 @@ import { } from '../../../../../../../common/api/detection_engine/rule_management'; import type { SecuritySolutionPluginRouter } from '../../../../../../types'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { getDuplicates } from './get_duplicates'; import { transformValidateBulkError } from '../../../utils/validate'; import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts index 5daea3722d8f7..a8c3b3d96060e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts @@ -24,7 +24,7 @@ import { createBulkErrorObject, transformBulkError, } from '../../../../routes/utils'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { getIdBulkError } from '../../../utils/utils'; import { transformValidateBulkError } from '../../../utils/validate'; import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts index bbf501417c647..06840ed328ee5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts @@ -19,7 +19,7 @@ import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { transformBulkError, buildSiemResponse } from '../../../../routes/utils'; import { getIdBulkError } from '../../../utils/utils'; import { transformValidateBulkError } from '../../../utils/validate'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation'; import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list'; import { validateRulesWithDuplicatedDefaultExceptionsList } from '../../../logic/exceptions/validate_rules_with_duplicated_default_exceptions_list'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts index 7abab5cd27e27..b7bef15b5f6b1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts @@ -24,7 +24,7 @@ import { buildSiemResponse, createBulkErrorObject, } from '../../../../routes/utils'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation'; import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list'; import { validateRulesWithDuplicatedDefaultExceptionsList } from '../../../logic/exceptions/validate_rules_with_duplicated_default_exceptions_list'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts index 9d667a15659b2..8ab0af5cda742 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../routes/utils'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list'; import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list'; import { transformValidate, validateResponseActionsPermissions } from '../../../utils/validate'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts index bdcac6a327c78..7db52619ff0b5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../routes/utils'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { getIdError, transform } from '../../../utils/utils'; export const deleteRuleRoute = (router: SecuritySolutionPluginRouter) => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts index 9cf9b57ae89bb..6cbba8ce65759 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../routes/utils'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list'; import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list'; import { getIdError } from '../../../utils/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts index ade1f280c046d..aabf538367930 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../routes/utils'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { getIdError, transform } from '../../../utils/utils'; export const readRuleRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts index 089e560fbcc6c..55bd63f1e0965 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../routes/utils'; -import { readRules } from '../../../logic/crud/read_rules'; +import { readRules } from '../../../logic/rule_management/read_rules'; import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list'; import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list'; import { getIdError } from '../../../utils/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts index 67c7fb47a1718..5c1ac63ec8a70 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts @@ -16,7 +16,7 @@ import type { RuleToImport } from '../../../../../../common/api/detection_engine import type { ImportRuleResponse } from '../../../routes/utils'; import { createBulkErrorObject } from '../../../routes/utils'; import { checkRuleExceptionReferences } from './check_rule_exception_references'; -import type { IRulesManagementClient } from '../crud/rules_management_client'; +import type { IRulesManagementClient } from '../rule_management/rules_management_client'; export type PromiseFromStreams = RuleToImport | Error; export interface RuleExceptionsPromiseFromStreams { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/__mocks__/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/read_rules.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/__mocks__/read_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/read_rules.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/__mocks__/rules_management_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/rules_management_client.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/__mocks__/rules_management_client.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/rules_management_client.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/create_custom_rule.rule_management_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.rule_management_client.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/create_custom_rule.rule_management_client.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.rule_management_client.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/create_prebuilt_rule.rule_management_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.rule_management_client.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/create_prebuilt_rule.rule_management_client.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.rule_management_client.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/delete_rule.rule_management_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.rule_management_client.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/delete_rule.rule_management_client.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.rule_management_client.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/import_rule.rule_management_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.rule_management_client.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/import_rule.rule_management_client.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.rule_management_client.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/patch_rule.rule_management_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.rule_management_client.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/patch_rule.rule_management_client.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.rule_management_client.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/read_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/read_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/read_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/rules_management_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/rules_management_client.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/rules_management_client.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/rules_management_client.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/update_rule.rule_management_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.rule_management_client.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/update_rule.rule_management_client.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.rule_management_client.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/upgrade_prebuilt_rule.rule_management_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.rule_management_client.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/crud/upgrade_prebuilt_rule.rule_management_client.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.rule_management_client.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts index a2082b548660e..9975669d7e4a4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts @@ -11,7 +11,7 @@ import type { RuleObjectId, RuleResponse, } from '../../../../../../../common/api/detection_engine/model/rule_schema'; -import { readRules } from '../../../../rule_management/logic/crud/read_rules'; +import { readRules } from '../../../../rule_management/logic/rule_management/read_rules'; import { transform } from '../../../../rule_management/utils/utils'; // TODO: https://github.com/elastic/kibana/issues/125642 Move to rule_management into a RuleManagementClient diff --git a/x-pack/plugins/security_solution/server/request_context_factory.ts b/x-pack/plugins/security_solution/server/request_context_factory.ts index 3c125956e6a81..28096984e0584 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.ts @@ -28,7 +28,7 @@ import type { EndpointAppContextService } from './endpoint/endpoint_app_context_ import { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client'; import { RiskScoreDataClient } from './lib/entity_analytics/risk_score/risk_score_data_client'; import { AssetCriticalityDataClient } from './lib/entity_analytics/asset_criticality'; -import { createRulesManagementClient } from './lib/detection_engine/rule_management/logic/crud/rules_management_client'; +import { createRulesManagementClient } from './lib/detection_engine/rule_management/logic/rule_management/rules_management_client'; export interface IRequestContextFactory { create( diff --git a/x-pack/plugins/security_solution/server/types.ts b/x-pack/plugins/security_solution/server/types.ts index 3c59ab23e3475..d8536c00ca4d0 100644 --- a/x-pack/plugins/security_solution/server/types.ts +++ b/x-pack/plugins/security_solution/server/types.ts @@ -33,7 +33,7 @@ import type { EndpointInternalFleetServicesInterface } from './endpoint/services import type { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client'; import type { RiskScoreDataClient } from './lib/entity_analytics/risk_score/risk_score_data_client'; import type { AssetCriticalityDataClient } from './lib/entity_analytics/asset_criticality'; -import type { IRulesManagementClient } from './lib/detection_engine/rule_management/logic/crud/rules_management_client'; +import type { IRulesManagementClient } from './lib/detection_engine/rule_management/logic/rule_management/rules_management_client'; export { AppClient }; export interface SecuritySolutionApiRequestHandlerContext {