@oneuptime/common 12.0.15 → 12.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/Index.ts +10 -0
- package/Models/AnalyticsModels/LogCountBaseline.ts +174 -0
- package/Models/AnalyticsModels/SecurityEvent.ts +794 -0
- package/Models/AnalyticsModels/Span.ts +29 -1
- package/Models/AnalyticsModels/SpanCountBaseline.ts +198 -0
- package/Models/DatabaseModels/Alert.ts +42 -0
- package/Models/DatabaseModels/AlertMeasurement.ts +1114 -0
- package/Models/DatabaseModels/AlertMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/AlertStateTimeline.ts +10 -2
- package/Models/DatabaseModels/BillingPaymentMethod.ts +8 -10
- package/Models/DatabaseModels/DetectionRule.ts +568 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +382 -0
- package/Models/DatabaseModels/Incident.ts +42 -0
- package/Models/DatabaseModels/IncidentMeasurement.ts +1114 -0
- package/Models/DatabaseModels/IncidentMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/IncidentStateTimeline.ts +10 -2
- package/Models/DatabaseModels/IncomingCallPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/IncomingCallPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Index.ts +20 -0
- package/Models/DatabaseModels/Label.ts +11 -0
- package/Models/DatabaseModels/LlmCostBudget.ts +655 -0
- package/Models/DatabaseModels/LlmModelPrice.ts +481 -0
- package/Models/DatabaseModels/LogSavedView.ts +87 -0
- package/Models/DatabaseModels/MarketingConversion.ts +210 -8
- package/Models/DatabaseModels/MetricSavedView.ts +59 -0
- package/Models/DatabaseModels/OnCallDutyPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Probe.ts +21 -0
- package/Models/DatabaseModels/RunbookLabelRule.ts +36 -0
- package/Models/DatabaseModels/RunbookOwnerRule.ts +42 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.ts +1104 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.ts +491 -0
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.ts +10 -2
- package/Models/DatabaseModels/StatusPageLabelRule.ts +36 -0
- package/Models/DatabaseModels/StatusPageOwnerRule.ts +42 -0
- package/Models/DatabaseModels/TableView.ts +15 -0
- package/Models/DatabaseModels/Team.ts +13 -0
- package/Models/DatabaseModels/TeamMember.ts +8 -0
- package/Models/DatabaseModels/TraceSavedView.ts +52 -0
- package/Models/DatabaseModels/WorkflowLabelRule.ts +36 -0
- package/Models/DatabaseModels/WorkflowOwnerRule.ts +42 -0
- package/Server/API/TelemetryAPI.ts +252 -6
- package/Server/API/UserAPI.ts +88 -0
- package/Server/EnvironmentConfig.ts +36 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.ts +88 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.ts +457 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.ts +45 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.ts +77 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788600000000-AddDetectionRuleIncidentColumns.ts +39 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +14 -0
- package/Server/Middleware/IdentityRateLimit.ts +672 -0
- package/Server/Services/AccessTokenService.ts +15 -2
- package/Server/Services/AlertMeasurementService.ts +302 -0
- package/Server/Services/AlertMeasurementValueService.ts +508 -0
- package/Server/Services/AlertService.ts +50 -0
- package/Server/Services/AlertStateTimelineService.ts +54 -0
- package/Server/Services/DetectionRuleService.ts +74 -0
- package/Server/Services/GoogleSecOpsConnectionService.ts +89 -0
- package/Server/Services/IncidentMeasurementService.ts +304 -0
- package/Server/Services/IncidentMeasurementValueService.ts +523 -0
- package/Server/Services/IncidentService.ts +51 -0
- package/Server/Services/IncidentStateTimelineService.ts +54 -0
- package/Server/Services/Index.ts +30 -0
- package/Server/Services/LlmCostBudgetService.ts +93 -0
- package/Server/Services/LlmModelPriceService.ts +202 -0
- package/Server/Services/LogAggregationService.ts +1106 -2
- package/Server/Services/LogCountBaselineService.ts +163 -0
- package/Server/Services/MutableMetricService.ts +30 -9
- package/Server/Services/ScheduledMaintenanceMeasurementService.ts +311 -0
- package/Server/Services/ScheduledMaintenanceMeasurementValueService.ts +546 -0
- package/Server/Services/ScheduledMaintenanceService.ts +53 -0
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +188 -1
- package/Server/Services/SecurityEventService.ts +104 -0
- package/Server/Services/SpanCountBaselineService.ts +173 -0
- package/Server/Services/StatusPageService.ts +4 -3
- package/Server/Services/TelemetryUsageBillingService.ts +17 -2
- package/Server/Services/UserService.ts +284 -51
- package/Server/Services/UserTotpAuthService.ts +27 -86
- package/Server/Services/UserWebAuthnService.ts +26 -86
- package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +14 -0
- package/Server/Types/Database/Permissions/TenantPermission.ts +10 -0
- package/Server/Types/Database/QueryHelper.ts +1 -1
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +1 -1
- package/Server/Utils/AI/Toolbox/Index.ts +6 -0
- package/Server/Utils/AI/Toolbox/SecurityEventTools.ts +349 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +13 -4
- package/Server/Utils/Attribution.ts +130 -34
- package/Server/Utils/Marketing/ConversionUploadProvider.ts +98 -16
- package/Server/Utils/Marketing/Providers/GoogleAds.ts +70 -7
- package/Server/Utils/Marketing/Providers/LinkedIn.ts +54 -16
- package/Server/Utils/Marketing/Providers/Meta.ts +52 -18
- package/Server/Utils/Marketing/Providers/MicrosoftAds.ts +37 -10
- package/Server/Utils/Marketing/Providers/Reddit.ts +45 -15
- package/Server/Utils/Measurement/MeasurementDefinitionValidator.ts +209 -0
- package/Server/Utils/Measurement/MeasurementMetricWriter.ts +189 -0
- package/Server/Utils/Monitor/Criteria/CountAnomaly.ts +182 -0
- package/Server/Utils/Monitor/Criteria/LogMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.ts +35 -0
- package/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/DataToProcess.ts +2 -0
- package/Server/Utils/Monitor/MonitorCriteriaDataExtractor.ts +14 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +15 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +20 -0
- package/Server/Utils/Monitor/MonitorResource.ts +16 -0
- package/Server/Utils/Monitor/MonitorStepResourceIdentity.ts +1 -0
- package/Server/Utils/Monitor/MonitorStepsReferenceExtractor.ts +1 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +805 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.ts +262 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +212 -0
- package/Server/Utils/SecurityEvent/SecurityEventRow.ts +101 -0
- package/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.ts +635 -0
- package/Server/Utils/Telemetry/LlmCostBudgetEvaluator.ts +379 -0
- package/Server/Utils/Telemetry/LlmSpan.ts +83 -4
- package/Server/Utils/Telemetry/LogErrorPatternSql.ts +136 -0
- package/Server/Utils/UserPermission/UserPermission.ts +57 -1
- package/Tests/App/Dashboard/AlertsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/CreatePageEntryPointPermissions.test.tsx +306 -0
- package/Tests/App/Dashboard/DangerZone.test.tsx +11 -0
- package/Tests/App/Dashboard/IncidentsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/LogMonitorAttributeOperatorPreview.test.tsx +459 -0
- package/Tests/App/Dashboard/OverviewCustomFields.test.tsx +24 -0
- package/Tests/App/Dashboard/ScheduledMaintenanceSideMenu.test.tsx +6 -0
- package/Tests/App/Dashboard/SecurityEventsDetectionRulesPage.test.tsx +250 -0
- package/Tests/App/Dashboard/SecurityEventsMonitorStepForm.test.tsx +106 -0
- package/Tests/App/Dashboard/SecurityEventsMonitorsPage.test.tsx +185 -0
- package/Tests/App/Dashboard/SecurityEventsSetupGuide.test.tsx +200 -0
- package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +323 -0
- package/Tests/Models/DatabaseModels/ProjectSharedResources.test.ts +386 -0
- package/Tests/Models/DetectionRuleCreateContract.test.ts +35 -0
- package/Tests/Server/API/LogErrorPatternAPI.test.ts +811 -0
- package/Tests/Server/API/UserAuthenticationAPI.test.ts +11 -0
- package/Tests/Server/API/UserProjectsAPI.test.ts +11 -2
- package/Tests/Server/API/UserTwoFactorAuthAdminAPI.test.ts +918 -0
- package/Tests/Server/Infrastructure/LocalCache.test.ts +149 -0
- package/Tests/Server/Services/AccessTokenProjectUserGrant.test.ts +249 -0
- package/Tests/Server/Services/AlertMeasurementService.test.ts +665 -0
- package/Tests/Server/Services/AlertMeasurementValueService.test.ts +389 -0
- package/Tests/Server/Services/DetectionRuleService.test.ts +254 -0
- package/Tests/Server/Services/IncidentMeasurementService.test.ts +394 -0
- package/Tests/Server/Services/IncidentMeasurementValueService.test.ts +816 -0
- package/Tests/Server/Services/LlmCostBudgetService.test.ts +104 -0
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +405 -0
- package/Tests/Server/Services/LogErrorPatternAggregation.test.ts +804 -0
- package/Tests/Server/Services/MutableMetricNameRouting.test.ts +83 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementService.test.ts +750 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementValueService.test.ts +478 -0
- package/Tests/Server/Services/UserAuthenticationService.test.ts +216 -4
- package/Tests/Server/Services/UserTwoFactorAuthAdmin.test.ts +1190 -0
- package/Tests/Server/Types/Database/Permissions/ScopedRoleSharedResourceAccess.test.ts +466 -0
- package/Tests/Server/Types/Database/QueryHelperOperators.test.ts +265 -0
- package/Tests/Server/Types/Database/QueryHelperTextAndStructuralOperators.test.ts +206 -0
- package/Tests/Server/Utils/AnalyticsDatabase/ClusterAwareSchema.test.ts +6 -0
- package/Tests/Server/Utils/AnalyticsDatabase/FractionalAttributeThreshold.test.ts +224 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +172 -2
- package/Tests/Server/Utils/Attribution.test.ts +228 -1
- package/Tests/Server/Utils/Marketing/AdUploadableConversionTypes.test.ts +153 -92
- package/Tests/Server/Utils/Marketing/ConversionUploadProvider.test.ts +123 -6
- package/Tests/Server/Utils/Marketing/GoogleAds.test.ts +253 -1
- package/Tests/Server/Utils/Marketing/LinkedIn.test.ts +282 -0
- package/Tests/Server/Utils/Marketing/Meta.test.ts +304 -0
- package/Tests/Server/Utils/Marketing/MicrosoftAds.test.ts +263 -0
- package/Tests/Server/Utils/Marketing/Reddit.test.ts +259 -0
- package/Tests/Server/Utils/Measurement/MeasurementDefinitionValidator.test.ts +322 -0
- package/Tests/Server/Utils/Measurement/MeasurementMetricWriter.test.ts +373 -0
- package/Tests/Server/Utils/Monitor/Criteria/CountAnomaly.test.ts +221 -0
- package/Tests/Server/Utils/Monitor/Criteria/LogMonitorCriteria.test.ts +236 -0
- package/Tests/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.test.ts +147 -0
- package/Tests/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.test.ts +274 -0
- package/Tests/Server/Utils/Monitor/SecurityEventsMonitorDataExtractor.test.ts +93 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +1098 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsClient.test.ts +308 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +271 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventRow.test.ts +272 -0
- package/Tests/Server/Utils/SecurityEvent/SigmaClickhouseCompiler.test.ts +511 -0
- package/Tests/Server/Utils/Telemetry/LlmCostBudgetEvaluator.test.ts +497 -0
- package/Tests/Server/Utils/Telemetry/LlmSpan.test.ts +380 -0
- package/Tests/Server/Utils/Telemetry/LogErrorPatternSql.test.ts +207 -0
- package/Tests/Server/Utils/UserPermission/ProjectUserGrant.test.ts +293 -0
- package/Tests/Types/Monitor/MonitorStepInfraMonitorUtils.test.ts +194 -0
- package/Tests/Types/Monitor/MonitorStepSecurityEventsMonitor.test.ts +201 -0
- package/Tests/Types/SecurityEvent/OcsfEventClass.test.ts +105 -0
- package/Tests/Types/SecurityEvent/OcsfSeverity.test.ts +111 -0
- package/Tests/Types/Telemetry/LlmCostCatalog.test.ts +516 -0
- package/Tests/UI/Components/ActiveFilterChipsOperatorValues.test.tsx +222 -0
- package/Tests/UI/Components/BulkActionPermissionGating.test.tsx +296 -0
- package/Tests/UI/Components/CardModelDetailPermissionGating.test.tsx +305 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetail.test.tsx +23 -0
- package/Tests/UI/Components/DictionaryFilterOperatorDisplay.test.ts +239 -0
- package/Tests/UI/Components/DisabledButtonTooltip.test.tsx +267 -0
- package/Tests/UI/Components/DuplicateModel.test.tsx +37 -0
- package/Tests/UI/Components/ModelCardPermissionGating.test.tsx +348 -0
- package/Tests/UI/Components/ModelDelete.test.tsx +25 -1
- package/Tests/UI/Components/ModelFormCreatePermission.test.tsx +342 -0
- package/Tests/UI/Components/ModelTable/BaseModelTablePermissionGating.test.tsx +680 -0
- package/Tests/UI/Components/OrderedStatesListCreateGate.test.tsx +174 -0
- package/Tests/UI/Components/SavedViewsDropdownSearch.test.tsx +1127 -0
- package/Tests/UI/Components/SavedViewsFacetSection.test.tsx +958 -0
- package/Tests/UI/Components/SavedViewsList.test.ts +699 -0
- package/Tests/UI/Components/SavedViewsSidebarIntegration.test.tsx +640 -0
- package/Tests/UI/Components/SavedViewsSurfaceParity.test.tsx +679 -0
- package/Tests/UI/Components/TableViewLoadFailure.test.tsx +248 -0
- package/Tests/UI/Types/UseComponentOutsideClick.test.tsx +226 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +467 -0
- package/Tests/Utils/Measurement/MeasurementEvaluator.test.ts +639 -0
- package/Tests/Utils/Monitor/MonitorSummarySnapshotUtil.test.ts +1 -0
- package/Tests/Utils/Monitor/NetworkDeviceLinkRuleUtil.test.ts +285 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +433 -0
- package/Tests/Utils/SecurityEvent/GenericNormalizer.test.ts +204 -0
- package/Tests/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.test.ts +252 -0
- package/Tests/Utils/SecurityEvent/NormalizerHelpers.test.ts +274 -0
- package/Tests/Utils/SecurityEvent/OcsfNormalizer.test.ts +208 -0
- package/Tests/Utils/SecurityEvent/SecurityEventNormalizer.test.ts +172 -0
- package/Tests/Utils/SecurityEvent/SigmaRuleParser.test.ts +471 -0
- package/Tests/Utils/SecurityEvent/UdmNormalizer.test.ts +361 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +82 -0
- package/Tests/Utils/Telemetry/LogErrorPattern.test.ts +463 -0
- package/Types/AI/AIChatTypes.ts +1 -0
- package/Types/Alerts/AlertMeasurementAnchorType.ts +14 -0
- package/Types/Alerts/AlertStateRole.ts +11 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +16 -0
- package/Types/Dashboard/Chart/ChartType.ts +1 -0
- package/Types/Dashboard/DashboardComponentType.ts +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.ts +18 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.ts +16 -0
- package/Types/Incident/IncidentMeasurementAnchorType.ts +34 -0
- package/Types/Incident/IncidentStateRole.ts +14 -0
- package/Types/Marketing/Attribution.ts +75 -0
- package/Types/Marketing/MarketingConversion.ts +37 -7
- package/Types/Measurement/MeasurementAggregationType.ts +43 -0
- package/Types/Measurement/MeasurementAnchorKind.ts +23 -0
- package/Types/Measurement/MeasurementOccurrence.ts +14 -0
- package/Types/Measurement/MeasurementStatus.ts +34 -0
- package/Types/MeteredPlan/ProductType.ts +1 -0
- package/Types/Monitor/CriteriaFilter.ts +3 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +64 -0
- package/Types/Monitor/MonitorStep.ts +28 -0
- package/Types/Monitor/MonitorStepSecurityEventsMonitor.ts +100 -0
- package/Types/Monitor/MonitorType.ts +20 -0
- package/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.ts +17 -0
- package/Types/Permission.ts +399 -2
- package/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.ts +20 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.ts +16 -0
- package/Types/SecurityEvent/DetectionFindingConstants.ts +24 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.ts +92 -0
- package/Types/SecurityEvent/OcsfEventClass.ts +205 -0
- package/Types/SecurityEvent/OcsfSeverity.ts +88 -0
- package/Types/SecurityEvent/SecurityEventFormat.ts +23 -0
- package/Types/SecurityEvent/SigmaRule.ts +70 -0
- package/Types/Telemetry/LlmConventions.ts +20 -1
- package/Types/Telemetry/LlmCostCatalog.ts +557 -0
- package/Types/Telemetry/ServiceType.ts +1 -0
- package/Types/Telemetry/TelemetryRetentionConfig.ts +5 -1
- package/Types/Telemetry/TelemetryType.ts +1 -0
- package/Types/TwoFactorAuthStatus.ts +42 -0
- package/Types/UserAuthenticationStatus.ts +18 -0
- package/UI/Components/ActionButton/ActionButtonSchema.ts +7 -0
- package/UI/Components/BulkUpdate/BulkArchiveActions.tsx +35 -2
- package/UI/Components/BulkUpdate/BulkLabelActions.tsx +34 -1
- package/UI/Components/BulkUpdate/BulkOwnerActions.tsx +45 -1
- package/UI/Components/BulkUpdate/BulkUpdateForm.tsx +3 -0
- package/UI/Components/Button/Button.tsx +37 -2
- package/UI/Components/Card/Card.tsx +6 -0
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +24 -1
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +57 -0
- package/UI/Components/DuplicateModel/DuplicateModel.tsx +16 -0
- package/UI/Components/Forms/ModelForm.tsx +54 -2
- package/UI/Components/List/ListRow.tsx +6 -0
- package/UI/Components/LogsViewer/components/ActiveFilterChips.tsx +34 -7
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +7 -40
- package/UI/Components/LogsViewer/components/SavedViewsDropdown.tsx +155 -3
- package/UI/Components/ModelDelete/ModelDelete.tsx +20 -0
- package/UI/Components/ModelDetail/CardModelDetail.tsx +36 -23
- package/UI/Components/ModelList/ModelList.tsx +21 -2
- package/UI/Components/ModelList/StaticModelList.tsx +11 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +168 -62
- package/UI/Components/ModelTable/ModelTable.tsx +16 -10
- package/UI/Components/ModelTable/TableView.tsx +36 -4
- package/UI/Components/MoreMenu/MoreMenuItem.tsx +36 -4
- package/UI/Components/OrderedStatesList/Item.tsx +6 -0
- package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +81 -47
- package/UI/Components/ResetObjectID/ResetObjectID.tsx +16 -0
- package/UI/Components/SavedViews/SavedViewsFacetSection.tsx +242 -0
- package/UI/Components/SavedViews/SavedViewsList.ts +168 -0
- package/UI/Components/SavedViews/SavedViewsSearchInput.tsx +46 -0
- package/UI/Components/SavedViews/SavedViewsShowMoreButton.tsx +44 -0
- package/UI/Components/Table/TableRow.tsx +12 -0
- package/UI/Components/TelemetryViewer/components/SavedViewsDropdown.tsx +152 -2
- package/UI/Types/UseComponentOutsideClick.ts +47 -0
- package/UI/Utils/PermissionGate.ts +277 -0
- package/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.ts +84 -0
- package/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.ts +110 -0
- package/Utils/Dashboard/Components/Index.ts +14 -0
- package/Utils/Measurement/MeasurementEvaluator.ts +359 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.ts +1 -0
- package/Utils/Monitor/NetworkDeviceLinkRuleUtil.ts +93 -11
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +231 -0
- package/Utils/SecurityEvent/GenericNormalizer.ts +208 -0
- package/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts +206 -0
- package/Utils/SecurityEvent/NormalizerHelpers.ts +263 -0
- package/Utils/SecurityEvent/OcsfNormalizer.ts +194 -0
- package/Utils/SecurityEvent/SecurityEventNormalizer.ts +82 -0
- package/Utils/SecurityEvent/Sigma/SigmaRuleParser.ts +579 -0
- package/Utils/SecurityEvent/UdmNormalizer.ts +442 -0
- package/Utils/Telemetry/CrossSignalScope.ts +46 -9
- package/Utils/Telemetry/LogErrorPattern.ts +350 -0
- package/build/dist/Models/AnalyticsModels/Index.js +10 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js +159 -0
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js +596 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/Span.js +24 -1
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js +181 -0
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Alert.js +43 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js +10 -11
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +598 -0
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +410 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Incident.js +43 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +20 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Label.js +11 -0
- package/build/dist/Models/DatabaseModels/Label.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js +681 -0
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js +503 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js +87 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MarketingConversion.js +224 -8
- package/build/dist/Models/DatabaseModels/MarketingConversion.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricSavedView.js +59 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Probe.js +21 -0
- package/build/dist/Models/DatabaseModels/Probe.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +1133 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +515 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TableView.js +15 -0
- package/build/dist/Models/DatabaseModels/TableView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Team.js +13 -0
- package/build/dist/Models/DatabaseModels/Team.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamMember.js +8 -0
- package/build/dist/Models/DatabaseModels/TeamMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TraceSavedView.js +52 -0
- package/build/dist/Models/DatabaseModels/TraceSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +136 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +75 -2
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +29 -1
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js +36 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js +162 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js +52 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788600000000-AddDetectionRuleIncidentColumns.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788600000000-AddDetectionRuleIncidentColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +491 -0
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -0
- package/build/dist/Server/Services/AccessTokenService.js +13 -2
- package/build/dist/Server/Services/AccessTokenService.js.map +1 -1
- package/build/dist/Server/Services/AlertMeasurementService.js +250 -0
- package/build/dist/Server/Services/AlertMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js +400 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/AlertService.js +37 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +48 -0
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/DetectionRuleService.js +50 -0
- package/build/dist/Server/Services/DetectionRuleService.js.map +1 -0
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js +55 -0
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js +252 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js +413 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/IncidentService.js +41 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +50 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +30 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LlmCostBudgetService.js +89 -0
- package/build/dist/Server/Services/LlmCostBudgetService.js.map +1 -0
- package/build/dist/Server/Services/LlmModelPriceService.js +163 -0
- package/build/dist/Server/Services/LlmModelPriceService.js.map +1 -0
- package/build/dist/Server/Services/LogAggregationService.js +709 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/LogCountBaselineService.js +112 -0
- package/build/dist/Server/Services/LogCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/MutableMetricService.js +28 -9
- package/build/dist/Server/Services/MutableMetricService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js +254 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js +434 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +37 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +134 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/SecurityEventService.js +64 -0
- package/build/dist/Server/Services/SecurityEventService.js.map +1 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js +122 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/StatusPageService.js +4 -3
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +15 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +262 -42
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTotpAuthService.js +0 -73
- package/build/dist/Server/Services/UserTotpAuthService.js.map +1 -1
- package/build/dist/Server/Services/UserWebAuthnService.js +1 -73
- package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -1
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +13 -0
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +10 -0
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +3 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js +257 -0
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +13 -4
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/Attribution.js +77 -33
- package/build/dist/Server/Utils/Attribution.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js +46 -9
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js +52 -8
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js +41 -17
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js +42 -18
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js +24 -11
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js +34 -15
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js.map +1 -1
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js +109 -0
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js.map +1 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js +131 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js +111 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js +35 -0
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js +7 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +12 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +9 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +10 -0
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js +6 -5
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +600 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js +145 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +176 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js +69 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js +493 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js +317 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js +56 -4
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js +112 -0
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js.map +1 -0
- package/build/dist/Server/Utils/UserPermission/UserPermission.js +46 -1
- package/build/dist/Server/Utils/UserPermission/UserPermission.js.map +1 -1
- package/build/dist/Types/AI/AIChatTypes.js +1 -0
- package/build/dist/Types/AI/AIChatTypes.js.map +1 -1
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js +15 -0
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Alerts/AlertStateRole.js +12 -0
- package/build/dist/Types/Alerts/AlertStateRole.js.map +1 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +16 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/Dashboard/Chart/ChartType.js +1 -0
- package/build/dist/Types/Dashboard/Chart/ChartType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js +29 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Incident/IncidentStateRole.js +15 -0
- package/build/dist/Types/Incident/IncidentStateRole.js.map +1 -0
- package/build/dist/Types/Marketing/Attribution.js +68 -0
- package/build/dist/Types/Marketing/Attribution.js.map +1 -0
- package/build/dist/Types/Marketing/MarketingConversion.js +36 -7
- package/build/dist/Types/Marketing/MarketingConversion.js.map +1 -1
- package/build/dist/Types/Measurement/MeasurementAggregationType.js +40 -0
- package/build/dist/Types/Measurement/MeasurementAggregationType.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js +22 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js +15 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js +32 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js.map +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +2 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +59 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +17 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js +64 -0
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +19 -0
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js.map +1 -0
- package/build/dist/Types/Permission.js +347 -2
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js +19 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js +17 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js.map +1 -0
- package/build/dist/Types/SecurityEvent/DetectionFindingConstants.js +18 -0
- package/build/dist/Types/SecurityEvent/DetectionFindingConstants.js.map +1 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js +2 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js +181 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js +81 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js +21 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js +16 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js.map +1 -0
- package/build/dist/Types/Telemetry/LlmConventions.js +19 -1
- package/build/dist/Types/Telemetry/LlmConventions.js.map +1 -1
- package/build/dist/Types/Telemetry/LlmCostCatalog.js +484 -0
- package/build/dist/Types/Telemetry/LlmCostCatalog.js.map +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryRetentionConfig.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryType.js +1 -0
- package/build/dist/Types/Telemetry/TelemetryType.js.map +1 -1
- package/build/dist/Types/TwoFactorAuthStatus.js +41 -0
- package/build/dist/Types/TwoFactorAuthStatus.js.map +1 -0
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js +16 -2
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +15 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js +20 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +22 -1
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +1 -1
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +14 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +47 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js +8 -0
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js.map +1 -1
- package/build/dist/UI/Components/Forms/ModelForm.js +40 -1
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/List/ListRow.js +4 -1
- package/build/dist/UI/Components/List/ListRow.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js +32 -7
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +2 -17
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js +13 -0
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +27 -11
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelList/ModelList.js +13 -2
- package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js +4 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +101 -40
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.js +9 -7
- package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +32 -4
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +19 -2
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js +4 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +33 -32
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js +8 -0
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js.map +1 -1
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js +98 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js +99 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js +17 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js +15 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js.map +1 -0
- package/build/dist/UI/Components/Table/TableRow.js +8 -2
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Types/UseComponentOutsideClick.js +39 -0
- package/build/dist/UI/Types/UseComponentOutsideClick.js.map +1 -1
- package/build/dist/UI/Utils/PermissionGate.js +164 -0
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js +92 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +8 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js +210 -0
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js.map +1 -0
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js +1 -0
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js +51 -10
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +108 -0
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js +176 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js +146 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js +196 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js +136 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js +64 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +388 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js +328 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +29 -7
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/build/dist/Utils/Telemetry/LogErrorPattern.js +284 -0
- package/build/dist/Utils/Telemetry/LogErrorPattern.js.map +1 -0
- package/package.json +3 -1
|
@@ -41,6 +41,9 @@ import {
|
|
|
41
41
|
Permission.ProjectAdmin,
|
|
42
42
|
Permission.ProjectMember,
|
|
43
43
|
Permission.Viewer,
|
|
44
|
+
Permission.WorkflowAdmin,
|
|
45
|
+
Permission.WorkflowMember,
|
|
46
|
+
Permission.WorkflowViewer,
|
|
44
47
|
Permission.ReadWorkflowOwnerRule,
|
|
45
48
|
],
|
|
46
49
|
delete: [
|
|
@@ -84,6 +87,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
84
87
|
Permission.ProjectAdmin,
|
|
85
88
|
Permission.ProjectMember,
|
|
86
89
|
Permission.Viewer,
|
|
90
|
+
Permission.WorkflowAdmin,
|
|
91
|
+
Permission.WorkflowMember,
|
|
92
|
+
Permission.WorkflowViewer,
|
|
87
93
|
Permission.ReadWorkflowOwnerRule,
|
|
88
94
|
],
|
|
89
95
|
update: [],
|
|
@@ -120,6 +126,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
120
126
|
Permission.ProjectAdmin,
|
|
121
127
|
Permission.ProjectMember,
|
|
122
128
|
Permission.Viewer,
|
|
129
|
+
Permission.WorkflowAdmin,
|
|
130
|
+
Permission.WorkflowMember,
|
|
131
|
+
Permission.WorkflowViewer,
|
|
123
132
|
Permission.ReadWorkflowOwnerRule,
|
|
124
133
|
],
|
|
125
134
|
update: [],
|
|
@@ -150,6 +159,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
150
159
|
Permission.ProjectAdmin,
|
|
151
160
|
Permission.ProjectMember,
|
|
152
161
|
Permission.Viewer,
|
|
162
|
+
Permission.WorkflowAdmin,
|
|
163
|
+
Permission.WorkflowMember,
|
|
164
|
+
Permission.WorkflowViewer,
|
|
153
165
|
Permission.ReadWorkflowOwnerRule,
|
|
154
166
|
],
|
|
155
167
|
update: [
|
|
@@ -184,6 +196,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
184
196
|
Permission.ProjectAdmin,
|
|
185
197
|
Permission.ProjectMember,
|
|
186
198
|
Permission.Viewer,
|
|
199
|
+
Permission.WorkflowAdmin,
|
|
200
|
+
Permission.WorkflowMember,
|
|
201
|
+
Permission.WorkflowViewer,
|
|
187
202
|
Permission.ReadWorkflowOwnerRule,
|
|
188
203
|
],
|
|
189
204
|
update: [
|
|
@@ -216,6 +231,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
216
231
|
Permission.ProjectAdmin,
|
|
217
232
|
Permission.ProjectMember,
|
|
218
233
|
Permission.Viewer,
|
|
234
|
+
Permission.WorkflowAdmin,
|
|
235
|
+
Permission.WorkflowMember,
|
|
236
|
+
Permission.WorkflowViewer,
|
|
219
237
|
Permission.ReadWorkflowOwnerRule,
|
|
220
238
|
],
|
|
221
239
|
update: [
|
|
@@ -251,6 +269,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
251
269
|
Permission.ProjectAdmin,
|
|
252
270
|
Permission.ProjectMember,
|
|
253
271
|
Permission.Viewer,
|
|
272
|
+
Permission.WorkflowAdmin,
|
|
273
|
+
Permission.WorkflowMember,
|
|
274
|
+
Permission.WorkflowViewer,
|
|
254
275
|
Permission.ReadWorkflowOwnerRule,
|
|
255
276
|
],
|
|
256
277
|
update: [
|
|
@@ -288,6 +309,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
288
309
|
Permission.ProjectAdmin,
|
|
289
310
|
Permission.ProjectMember,
|
|
290
311
|
Permission.Viewer,
|
|
312
|
+
Permission.WorkflowAdmin,
|
|
313
|
+
Permission.WorkflowMember,
|
|
314
|
+
Permission.WorkflowViewer,
|
|
291
315
|
Permission.ReadWorkflowOwnerRule,
|
|
292
316
|
],
|
|
293
317
|
update: [
|
|
@@ -334,6 +358,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
334
358
|
Permission.ProjectAdmin,
|
|
335
359
|
Permission.ProjectMember,
|
|
336
360
|
Permission.Viewer,
|
|
361
|
+
Permission.WorkflowAdmin,
|
|
362
|
+
Permission.WorkflowMember,
|
|
363
|
+
Permission.WorkflowViewer,
|
|
337
364
|
Permission.ReadWorkflowOwnerRule,
|
|
338
365
|
],
|
|
339
366
|
update: [
|
|
@@ -367,6 +394,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
367
394
|
Permission.ProjectAdmin,
|
|
368
395
|
Permission.ProjectMember,
|
|
369
396
|
Permission.Viewer,
|
|
397
|
+
Permission.WorkflowAdmin,
|
|
398
|
+
Permission.WorkflowMember,
|
|
399
|
+
Permission.WorkflowViewer,
|
|
370
400
|
Permission.ReadWorkflowOwnerRule,
|
|
371
401
|
],
|
|
372
402
|
update: [
|
|
@@ -402,6 +432,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
402
432
|
Permission.ProjectAdmin,
|
|
403
433
|
Permission.ProjectMember,
|
|
404
434
|
Permission.Viewer,
|
|
435
|
+
Permission.WorkflowAdmin,
|
|
436
|
+
Permission.WorkflowMember,
|
|
437
|
+
Permission.WorkflowViewer,
|
|
405
438
|
Permission.ReadWorkflowOwnerRule,
|
|
406
439
|
],
|
|
407
440
|
update: [
|
|
@@ -448,6 +481,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
448
481
|
Permission.ProjectAdmin,
|
|
449
482
|
Permission.ProjectMember,
|
|
450
483
|
Permission.Viewer,
|
|
484
|
+
Permission.WorkflowAdmin,
|
|
485
|
+
Permission.WorkflowMember,
|
|
486
|
+
Permission.WorkflowViewer,
|
|
451
487
|
Permission.ReadWorkflowOwnerRule,
|
|
452
488
|
],
|
|
453
489
|
update: [
|
|
@@ -494,6 +530,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
494
530
|
Permission.ProjectAdmin,
|
|
495
531
|
Permission.ProjectMember,
|
|
496
532
|
Permission.Viewer,
|
|
533
|
+
Permission.WorkflowAdmin,
|
|
534
|
+
Permission.WorkflowMember,
|
|
535
|
+
Permission.WorkflowViewer,
|
|
497
536
|
Permission.ReadWorkflowOwnerRule,
|
|
498
537
|
],
|
|
499
538
|
update: [],
|
|
@@ -531,6 +570,9 @@ export default class WorkflowOwnerRule extends BaseModel {
|
|
|
531
570
|
Permission.ProjectAdmin,
|
|
532
571
|
Permission.ProjectMember,
|
|
533
572
|
Permission.Viewer,
|
|
573
|
+
Permission.WorkflowAdmin,
|
|
574
|
+
Permission.WorkflowMember,
|
|
575
|
+
Permission.WorkflowViewer,
|
|
534
576
|
Permission.ReadWorkflowOwnerRule,
|
|
535
577
|
],
|
|
536
578
|
update: [],
|
|
@@ -18,12 +18,17 @@ import LogAggregationService, {
|
|
|
18
18
|
HistogramRequest,
|
|
19
19
|
FacetValue,
|
|
20
20
|
FacetRequest,
|
|
21
|
+
LogAttributeFilters,
|
|
21
22
|
AnalyticsRequest,
|
|
22
23
|
AnalyticsChartType,
|
|
23
24
|
AnalyticsAggregation,
|
|
24
25
|
AnalyticsTimeseriesRow,
|
|
25
26
|
AnalyticsTopItem,
|
|
26
27
|
AnalyticsTableRow,
|
|
28
|
+
ErrorPatternFilters,
|
|
29
|
+
ErrorPatternTimelineRequest,
|
|
30
|
+
TopErrorPattern,
|
|
31
|
+
TopErrorPatternsRequest,
|
|
27
32
|
} from "../Services/LogAggregationService";
|
|
28
33
|
import TraceAggregationService, {
|
|
29
34
|
HistogramBucket as TraceHistogramBucket,
|
|
@@ -455,10 +460,9 @@ router.post(
|
|
|
455
460
|
? (body["sessionIds"] as Array<string>)
|
|
456
461
|
: undefined;
|
|
457
462
|
|
|
458
|
-
const attributes:
|
|
459
|
-
body["attributes"]
|
|
460
|
-
|
|
461
|
-
: undefined;
|
|
463
|
+
const attributes: LogAttributeFilters | undefined = body["attributes"]
|
|
464
|
+
? (body["attributes"] as LogAttributeFilters)
|
|
465
|
+
: undefined;
|
|
462
466
|
|
|
463
467
|
const resourceScopes: Array<ResourceEntityScope> | undefined =
|
|
464
468
|
await resolveResourceScopesFromBody(body, databaseProps.tenantId);
|
|
@@ -559,8 +563,8 @@ router.post(
|
|
|
559
563
|
? (body["sessionIds"] as Array<string>)
|
|
560
564
|
: undefined;
|
|
561
565
|
|
|
562
|
-
const attributes:
|
|
563
|
-
? (body["attributes"] as
|
|
566
|
+
const attributes: LogAttributeFilters | undefined = body["attributes"]
|
|
567
|
+
? (body["attributes"] as LogAttributeFilters)
|
|
564
568
|
: undefined;
|
|
565
569
|
|
|
566
570
|
/*
|
|
@@ -1918,6 +1922,248 @@ router.post(
|
|
|
1918
1922
|
},
|
|
1919
1923
|
);
|
|
1920
1924
|
|
|
1925
|
+
// --- Log Error Pattern Endpoints ---
|
|
1926
|
+
|
|
1927
|
+
/*
|
|
1928
|
+
* Shared body parsing for the two error-pattern endpoints. Both take the
|
|
1929
|
+
* same filter shape as the histogram/facet endpoints so the Insights page
|
|
1930
|
+
* can hand its one scope (time range, service selection, severities) to
|
|
1931
|
+
* every panel it draws; the detail endpoint adds the pattern itself.
|
|
1932
|
+
*
|
|
1933
|
+
* Defensive about shapes throughout: these bodies come from the browser,
|
|
1934
|
+
* and a stringly-typed or null field must mean "no filter" rather than
|
|
1935
|
+
* becoming an active predicate that silently narrows the result.
|
|
1936
|
+
*/
|
|
1937
|
+
function parseErrorPatternFilterBody(
|
|
1938
|
+
body: JSONObject,
|
|
1939
|
+
projectId: ObjectID,
|
|
1940
|
+
): Omit<ErrorPatternFilters, "startTime" | "endTime"> {
|
|
1941
|
+
const stringArray: (value: unknown) => Array<string> | undefined = (
|
|
1942
|
+
value: unknown,
|
|
1943
|
+
): Array<string> | undefined => {
|
|
1944
|
+
if (!Array.isArray(value)) {
|
|
1945
|
+
return undefined;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
const values: Array<string> = (value as Array<unknown>).filter(
|
|
1949
|
+
(item: unknown): item is string => {
|
|
1950
|
+
return typeof item === "string" && item.length > 0;
|
|
1951
|
+
},
|
|
1952
|
+
);
|
|
1953
|
+
|
|
1954
|
+
return values.length > 0 ? values : undefined;
|
|
1955
|
+
};
|
|
1956
|
+
|
|
1957
|
+
const serviceIdStrings: Array<string> | undefined = stringArray(
|
|
1958
|
+
body["serviceIds"],
|
|
1959
|
+
);
|
|
1960
|
+
|
|
1961
|
+
return {
|
|
1962
|
+
projectId,
|
|
1963
|
+
serviceIds: serviceIdStrings
|
|
1964
|
+
? serviceIdStrings.map((id: string): ObjectID => {
|
|
1965
|
+
return new ObjectID(id);
|
|
1966
|
+
})
|
|
1967
|
+
: undefined,
|
|
1968
|
+
entityKeys: stringArray(body["entityKeys"]),
|
|
1969
|
+
severityTexts: stringArray(body["severityTexts"]),
|
|
1970
|
+
bodySearchText:
|
|
1971
|
+
typeof body["bodySearchText"] === "string" &&
|
|
1972
|
+
body["bodySearchText"].trim().length > 0
|
|
1973
|
+
? (body["bodySearchText"] as string)
|
|
1974
|
+
: undefined,
|
|
1975
|
+
traceIds: stringArray(body["traceIds"]),
|
|
1976
|
+
spanIds: stringArray(body["spanIds"]),
|
|
1977
|
+
sessionIds: stringArray(body["sessionIds"]),
|
|
1978
|
+
attributes:
|
|
1979
|
+
body["attributes"] && typeof body["attributes"] === "object"
|
|
1980
|
+
? (body["attributes"] as Record<string, string | Array<string>>)
|
|
1981
|
+
: undefined,
|
|
1982
|
+
};
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
/*
|
|
1986
|
+
* Default window for the error-pattern endpoints: 24 hours rather than the
|
|
1987
|
+
* one hour the histogram defaults to. "Top errors" is a question about a
|
|
1988
|
+
* period long enough for a pattern to establish itself; an hour of a quiet
|
|
1989
|
+
* service routinely has nothing in it.
|
|
1990
|
+
*/
|
|
1991
|
+
function parseErrorPatternWindow(body: JSONObject): {
|
|
1992
|
+
startTime: Date;
|
|
1993
|
+
endTime: Date;
|
|
1994
|
+
} {
|
|
1995
|
+
const endTime: Date = body["endTime"]
|
|
1996
|
+
? OneUptimeDate.fromString(body["endTime"] as string)
|
|
1997
|
+
: OneUptimeDate.getCurrentDate();
|
|
1998
|
+
|
|
1999
|
+
const startTime: Date = body["startTime"]
|
|
2000
|
+
? OneUptimeDate.fromString(body["startTime"] as string)
|
|
2001
|
+
: OneUptimeDate.addRemoveHours(endTime, -24);
|
|
2002
|
+
|
|
2003
|
+
return { startTime, endTime };
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
router.post(
|
|
2007
|
+
"/telemetry/logs/error-patterns",
|
|
2008
|
+
...requireLogReadAccess,
|
|
2009
|
+
async (
|
|
2010
|
+
req: ExpressRequest,
|
|
2011
|
+
res: ExpressResponse,
|
|
2012
|
+
next: NextFunction,
|
|
2013
|
+
): Promise<void> => {
|
|
2014
|
+
try {
|
|
2015
|
+
const databaseProps: DatabaseCommonInteractionProps =
|
|
2016
|
+
await CommonAPI.getDatabaseCommonInteractionProps(req);
|
|
2017
|
+
|
|
2018
|
+
if (!databaseProps?.tenantId) {
|
|
2019
|
+
return Response.sendErrorResponse(
|
|
2020
|
+
req,
|
|
2021
|
+
res,
|
|
2022
|
+
new BadDataException("Invalid Project ID"),
|
|
2023
|
+
);
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
const body: JSONObject = req.body as JSONObject;
|
|
2027
|
+
const window: { startTime: Date; endTime: Date } =
|
|
2028
|
+
parseErrorPatternWindow(body);
|
|
2029
|
+
|
|
2030
|
+
const request: TopErrorPatternsRequest = {
|
|
2031
|
+
...parseErrorPatternFilterBody(body, databaseProps.tenantId),
|
|
2032
|
+
...window,
|
|
2033
|
+
resourceScopes: await resolveResourceScopesFromBody(
|
|
2034
|
+
body,
|
|
2035
|
+
databaseProps.tenantId,
|
|
2036
|
+
),
|
|
2037
|
+
limit: typeof body["limit"] === "number" ? body["limit"] : undefined,
|
|
2038
|
+
};
|
|
2039
|
+
|
|
2040
|
+
const patterns: Array<TopErrorPattern> =
|
|
2041
|
+
await LogAggregationService.getTopErrorPatterns(request);
|
|
2042
|
+
|
|
2043
|
+
return Response.sendJsonObjectResponse(req, res, {
|
|
2044
|
+
patterns: patterns as unknown as JSONObject,
|
|
2045
|
+
});
|
|
2046
|
+
} catch (err: unknown) {
|
|
2047
|
+
next(err);
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
2050
|
+
);
|
|
2051
|
+
|
|
2052
|
+
/*
|
|
2053
|
+
* Everything the UI needs to explain ONE error pattern, in a single round
|
|
2054
|
+
* trip: when it fired, what else fired alongside it, what the occurrences
|
|
2055
|
+
* have in common, which resources and traces carry it, and a handful of
|
|
2056
|
+
* raw lines.
|
|
2057
|
+
*
|
|
2058
|
+
* The six aggregations run concurrently and each degrades to an empty
|
|
2059
|
+
* result on its own failure. A correlation panel is supplementary
|
|
2060
|
+
* information — one slow or unlucky sub-query should cost the user that
|
|
2061
|
+
* section, not the whole page.
|
|
2062
|
+
*/
|
|
2063
|
+
router.post(
|
|
2064
|
+
"/telemetry/logs/error-pattern-correlation",
|
|
2065
|
+
...requireLogReadAccess,
|
|
2066
|
+
async (
|
|
2067
|
+
req: ExpressRequest,
|
|
2068
|
+
res: ExpressResponse,
|
|
2069
|
+
next: NextFunction,
|
|
2070
|
+
): Promise<void> => {
|
|
2071
|
+
try {
|
|
2072
|
+
const databaseProps: DatabaseCommonInteractionProps =
|
|
2073
|
+
await CommonAPI.getDatabaseCommonInteractionProps(req);
|
|
2074
|
+
|
|
2075
|
+
if (!databaseProps?.tenantId) {
|
|
2076
|
+
return Response.sendErrorResponse(
|
|
2077
|
+
req,
|
|
2078
|
+
res,
|
|
2079
|
+
new BadDataException("Invalid Project ID"),
|
|
2080
|
+
);
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
const body: JSONObject = req.body as JSONObject;
|
|
2084
|
+
|
|
2085
|
+
const pattern: string =
|
|
2086
|
+
typeof body["pattern"] === "string" ? (body["pattern"] as string) : "";
|
|
2087
|
+
|
|
2088
|
+
if (pattern.trim().length === 0) {
|
|
2089
|
+
return Response.sendErrorResponse(
|
|
2090
|
+
req,
|
|
2091
|
+
res,
|
|
2092
|
+
new BadDataException("pattern is required"),
|
|
2093
|
+
);
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
const window: { startTime: Date; endTime: Date } =
|
|
2097
|
+
parseErrorPatternWindow(body);
|
|
2098
|
+
|
|
2099
|
+
const bucketSizeInMinutes: number =
|
|
2100
|
+
typeof body["bucketSizeInMinutes"] === "number" &&
|
|
2101
|
+
body["bucketSizeInMinutes"] > 0
|
|
2102
|
+
? (body["bucketSizeInMinutes"] as number)
|
|
2103
|
+
: computeDefaultBucketSize(window.startTime, window.endTime);
|
|
2104
|
+
|
|
2105
|
+
const detailRequest: ErrorPatternTimelineRequest = {
|
|
2106
|
+
...parseErrorPatternFilterBody(body, databaseProps.tenantId),
|
|
2107
|
+
...window,
|
|
2108
|
+
resourceScopes: await resolveResourceScopesFromBody(
|
|
2109
|
+
body,
|
|
2110
|
+
databaseProps.tenantId,
|
|
2111
|
+
),
|
|
2112
|
+
pattern,
|
|
2113
|
+
bucketSizeInMinutes,
|
|
2114
|
+
limit: typeof body["limit"] === "number" ? body["limit"] : undefined,
|
|
2115
|
+
};
|
|
2116
|
+
|
|
2117
|
+
const degradeToEmpty: <T>(
|
|
2118
|
+
promise: Promise<Array<T>>,
|
|
2119
|
+
) => Promise<Array<T>> = async <T>(
|
|
2120
|
+
promise: Promise<Array<T>>,
|
|
2121
|
+
): Promise<Array<T>> => {
|
|
2122
|
+
try {
|
|
2123
|
+
return await promise;
|
|
2124
|
+
} catch {
|
|
2125
|
+
return [];
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
|
|
2129
|
+
const [timeline, coOccurring, attributes, resources, traces, samples] =
|
|
2130
|
+
await Promise.all([
|
|
2131
|
+
degradeToEmpty(
|
|
2132
|
+
LogAggregationService.getErrorPatternTimeline(detailRequest),
|
|
2133
|
+
),
|
|
2134
|
+
degradeToEmpty(
|
|
2135
|
+
LogAggregationService.getErrorPatternCoOccurrences(detailRequest),
|
|
2136
|
+
),
|
|
2137
|
+
degradeToEmpty(
|
|
2138
|
+
LogAggregationService.getErrorPatternAttributes(detailRequest),
|
|
2139
|
+
),
|
|
2140
|
+
degradeToEmpty(
|
|
2141
|
+
LogAggregationService.getErrorPatternResources(detailRequest),
|
|
2142
|
+
),
|
|
2143
|
+
degradeToEmpty(
|
|
2144
|
+
LogAggregationService.getErrorPatternTraces(detailRequest),
|
|
2145
|
+
),
|
|
2146
|
+
degradeToEmpty(
|
|
2147
|
+
LogAggregationService.getErrorPatternSamples(detailRequest),
|
|
2148
|
+
),
|
|
2149
|
+
]);
|
|
2150
|
+
|
|
2151
|
+
return Response.sendJsonObjectResponse(req, res, {
|
|
2152
|
+
pattern,
|
|
2153
|
+
bucketSizeInMinutes,
|
|
2154
|
+
timeline: timeline as unknown as JSONObject,
|
|
2155
|
+
coOccurringPatterns: coOccurring as unknown as JSONObject,
|
|
2156
|
+
attributes: attributes as unknown as JSONObject,
|
|
2157
|
+
resources: resources as unknown as JSONObject,
|
|
2158
|
+
traces: traces as unknown as JSONObject,
|
|
2159
|
+
samples: samples as unknown as JSONObject,
|
|
2160
|
+
});
|
|
2161
|
+
} catch (err: unknown) {
|
|
2162
|
+
next(err);
|
|
2163
|
+
}
|
|
2164
|
+
},
|
|
2165
|
+
);
|
|
2166
|
+
|
|
1921
2167
|
// --- Log Export Endpoint ---
|
|
1922
2168
|
|
|
1923
2169
|
router.post(
|
package/Server/API/UserAPI.ts
CHANGED
|
@@ -325,6 +325,94 @@ export default class UserAPI extends BaseAPI<User, UserServiceType> {
|
|
|
325
325
|
},
|
|
326
326
|
);
|
|
327
327
|
|
|
328
|
+
/*
|
|
329
|
+
* Require -- or stop requiring -- two factor auth for one user.
|
|
330
|
+
*
|
|
331
|
+
* Master-admin only, and its own route rather than a PUT to /user/:id
|
|
332
|
+
* carrying `enableTwoFactorAuth` for a reason that is not cosmetic: the
|
|
333
|
+
* generic write would succeed (a master admin bypasses the column's ACL)
|
|
334
|
+
* but it would NOT revoke the user's sessions, so "two factor auth is now
|
|
335
|
+
* required" would be a promise the product silently failed to keep for
|
|
336
|
+
* everybody already signed in. That revocation lives in
|
|
337
|
+
* UserService.setTwoFactorAuthRequired, where a caller cannot forget it.
|
|
338
|
+
*
|
|
339
|
+
* Session-only middleware, deliberately. This route WRITES, and the
|
|
340
|
+
* instance-wide master API key is scoped to reads for exactly this class
|
|
341
|
+
* of reason: a leaked static key that can read discloses, but one that can
|
|
342
|
+
* turn two factor auth off across every account on the instance is an
|
|
343
|
+
* account takeover with the safety catch removed.
|
|
344
|
+
*/
|
|
345
|
+
this.router.post(
|
|
346
|
+
`${new this.entityType().getCrudApiPath()?.toString()}/:userId/set-two-factor-auth-required`,
|
|
347
|
+
MasterAdminAuthorization.isAuthorizedMasterAdminMiddleware,
|
|
348
|
+
async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {
|
|
349
|
+
try {
|
|
350
|
+
const userId: ObjectID = UserAPI.getUserIdFromParams(req);
|
|
351
|
+
|
|
352
|
+
const isRequired: unknown = req.body?.["isRequired"];
|
|
353
|
+
|
|
354
|
+
/*
|
|
355
|
+
* Type-checked rather than cast, and the check has to be `typeof`
|
|
356
|
+
* rather than truthiness. `Boolean(req.body["isRequired"])` would
|
|
357
|
+
* read a missing field, a null, or the string "false" as a request
|
|
358
|
+
* to turn the requirement OFF -- silently weakening an account's
|
|
359
|
+
* security in response to a malformed call.
|
|
360
|
+
*/
|
|
361
|
+
if (typeof isRequired !== "boolean") {
|
|
362
|
+
throw new BadDataException(
|
|
363
|
+
"isRequired is required and must be a boolean.",
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
await UserService.setTwoFactorAuthRequired({
|
|
368
|
+
userId: userId,
|
|
369
|
+
isRequired: isRequired,
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
return Response.sendEmptySuccessResponse(req, res);
|
|
373
|
+
} catch (err) {
|
|
374
|
+
return next(err);
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
/*
|
|
380
|
+
* Clear everything one user has set up for two factor auth.
|
|
381
|
+
*
|
|
382
|
+
* This is the lost-device escape hatch. Two factor auth is self-service
|
|
383
|
+
* everywhere else in the product, which works right up until the phone
|
|
384
|
+
* holding the authenticator is gone: the user cannot produce a code, so
|
|
385
|
+
* they cannot sign in, so they cannot reach the page that would let them
|
|
386
|
+
* enrol a new one. Somebody outside the account has to be able to cut the
|
|
387
|
+
* knot.
|
|
388
|
+
*
|
|
389
|
+
* It does NOT turn the requirement off -- see
|
|
390
|
+
* UserService.resetTwoFactorAuth. Reset means "start again from a fresh QR
|
|
391
|
+
* code", not "you may now sign in with a password alone", and an operator
|
|
392
|
+
* helping with a lost phone should not have to notice that they had just
|
|
393
|
+
* downgraded the account.
|
|
394
|
+
*
|
|
395
|
+
* Takes no body: there is nothing to configure, and a route that ignores
|
|
396
|
+
* its body cannot be steered by one.
|
|
397
|
+
*/
|
|
398
|
+
this.router.post(
|
|
399
|
+
`${new this.entityType().getCrudApiPath()?.toString()}/:userId/reset-two-factor-auth`,
|
|
400
|
+
MasterAdminAuthorization.isAuthorizedMasterAdminMiddleware,
|
|
401
|
+
async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {
|
|
402
|
+
try {
|
|
403
|
+
const userId: ObjectID = UserAPI.getUserIdFromParams(req);
|
|
404
|
+
|
|
405
|
+
await UserService.resetTwoFactorAuth({
|
|
406
|
+
userId: userId,
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
return Response.sendEmptySuccessResponse(req, res);
|
|
410
|
+
} catch (err) {
|
|
411
|
+
return next(err);
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
);
|
|
415
|
+
|
|
328
416
|
this.router.get(
|
|
329
417
|
`${new this.entityType().getCrudApiPath()?.toString()}/profile-picture/:userId`,
|
|
330
418
|
async (req: ExpressRequest, res: ExpressResponse) => {
|
|
@@ -400,11 +400,35 @@ export const GoogleAdsLoginCustomerId: string =
|
|
|
400
400
|
*/
|
|
401
401
|
export const GoogleAdsApiVersion: string =
|
|
402
402
|
process.env["GOOGLE_ADS_API_VERSION"] || "v23";
|
|
403
|
-
|
|
403
|
+
/*
|
|
404
|
+
* Numeric conversion action ids from Google Ads (Goals -> Conversions). One
|
|
405
|
+
* per conversion type: the provider maps types to actions exhaustively, and an
|
|
406
|
+
* empty value leaves that type pending rather than uploading it under some
|
|
407
|
+
* other type's action.
|
|
408
|
+
*/
|
|
404
409
|
export const GoogleAdsSignUpConversionActionId: string =
|
|
405
410
|
process.env["GOOGLE_ADS_SIGNUP_CONVERSION_ACTION_ID"] || "";
|
|
406
411
|
export const GoogleAdsPaidSubscriptionConversionActionId: string =
|
|
407
412
|
process.env["GOOGLE_ADS_PAID_SUBSCRIPTION_CONVERSION_ACTION_ID"] || "";
|
|
413
|
+
export const GoogleAdsMeetingBookedConversionActionId: string =
|
|
414
|
+
process.env["GOOGLE_ADS_MEETING_BOOKED_CONVERSION_ACTION_ID"] || "";
|
|
415
|
+
|
|
416
|
+
/*
|
|
417
|
+
* Enhanced conversions for leads: upload a conversion identified ONLY by a
|
|
418
|
+
* hashed email, with no gclid at all.
|
|
419
|
+
*
|
|
420
|
+
* This is the mechanism that makes a sales-led funnel measurable — a demo
|
|
421
|
+
* booked in June and a licence signed in October share an email and nothing
|
|
422
|
+
* else. It is off by default because it is not purely a OneUptime-side switch:
|
|
423
|
+
* the Google Ads account must have enhanced conversions for leads turned on
|
|
424
|
+
* and the conversion action configured for it, and uploading email-only
|
|
425
|
+
* conversions to an account without that returns a per-conversion rejection.
|
|
426
|
+
*
|
|
427
|
+
* Hashing the email ALONGSIDE a click id needs no flag and is always sent — it
|
|
428
|
+
* only improves the match rate of a conversion that was uploadable anyway.
|
|
429
|
+
*/
|
|
430
|
+
export const GoogleAdsEnhancedConversionsForLeadsEnabled: boolean =
|
|
431
|
+
process.env["GOOGLE_ADS_ENHANCED_CONVERSIONS_FOR_LEADS_ENABLED"] === "true";
|
|
408
432
|
|
|
409
433
|
// Meta (Facebook) Conversions API. Server-only secrets.
|
|
410
434
|
export const MetaConversionsPixelId: string =
|
|
@@ -432,6 +456,8 @@ export const MicrosoftAdsSignUpConversionName: string =
|
|
|
432
456
|
process.env["MICROSOFT_ADS_SIGNUP_CONVERSION_NAME"] || "";
|
|
433
457
|
export const MicrosoftAdsPaidSubscriptionConversionName: string =
|
|
434
458
|
process.env["MICROSOFT_ADS_PAID_SUBSCRIPTION_CONVERSION_NAME"] || "";
|
|
459
|
+
export const MicrosoftAdsMeetingBookedConversionName: string =
|
|
460
|
+
process.env["MICROSOFT_ADS_MEETING_BOOKED_CONVERSION_NAME"] || "";
|
|
435
461
|
|
|
436
462
|
// LinkedIn Conversions API. Server-only secrets.
|
|
437
463
|
export const LinkedInConversionsAccessToken: string =
|
|
@@ -448,6 +474,8 @@ export const LinkedInSignUpConversionId: string =
|
|
|
448
474
|
process.env["LINKEDIN_SIGNUP_CONVERSION_ID"] || "";
|
|
449
475
|
export const LinkedInPaidSubscriptionConversionId: string =
|
|
450
476
|
process.env["LINKEDIN_PAID_SUBSCRIPTION_CONVERSION_ID"] || "";
|
|
477
|
+
export const LinkedInMeetingBookedConversionId: string =
|
|
478
|
+
process.env["LINKEDIN_MEETING_BOOKED_CONVERSION_ID"] || "";
|
|
451
479
|
|
|
452
480
|
// Reddit Conversions API. Server-only secrets.
|
|
453
481
|
export const RedditAdsOAuthClientId: string =
|
|
@@ -827,6 +855,13 @@ export const AverageSessionReplaySessionSizeInBytes: number =
|
|
|
827
855
|
export const AverageProfileSampleRowSizeInBytes: number =
|
|
828
856
|
parsePositiveNumberFromEnv("AVERAGE_PROFILE_SAMPLE_ROW_SIZE_IN_BYTES", 512);
|
|
829
857
|
|
|
858
|
+
/*
|
|
859
|
+
* Security events are wider than log rows (typed entity columns plus a
|
|
860
|
+
* fully flattened source payload), so the fallback average is 2 KiB.
|
|
861
|
+
*/
|
|
862
|
+
export const AverageSecurityEventRowSizeInBytes: number =
|
|
863
|
+
parsePositiveNumberFromEnv("AVERAGE_SECURITY_EVENT_ROW_SIZE_IN_BYTES", 2048);
|
|
864
|
+
|
|
830
865
|
export const SlackAppClientId: string | null =
|
|
831
866
|
process.env["SLACK_APP_CLIENT_ID"] || null;
|
|
832
867
|
export const SlackAppClientSecret: string | null =
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class AddDetectionRuleAndGoogleSecOpsConnection1788000000000
|
|
4
|
+
implements MigrationInterface
|
|
5
|
+
{
|
|
6
|
+
public name: string =
|
|
7
|
+
"AddDetectionRuleAndGoogleSecOpsConnection1788000000000";
|
|
8
|
+
|
|
9
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
10
|
+
await queryRunner.query(
|
|
11
|
+
`CREATE TABLE "DetectionRule" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "name" character varying(50) NOT NULL, "description" character varying(500), "sigmaRuleYaml" text NOT NULL, "isEnabled" boolean NOT NULL DEFAULT true, "evaluationIntervalInMinutes" integer NOT NULL DEFAULT '1', "groupByField" character varying(100), "shouldCreateAlert" boolean NOT NULL DEFAULT true, "shouldWriteDetectionFinding" boolean NOT NULL DEFAULT true, "alertSeverityId" uuid, "lastEvaluatedAt" TIMESTAMP WITH TIME ZONE, "lastMatchAt" TIMESTAMP WITH TIME ZONE, "lastError" character varying(500), "createdByUserId" uuid, "deletedByUserId" uuid, CONSTRAINT "PK_4c12aeb76297c2c78a1e708ad6d" PRIMARY KEY ("_id"))`,
|
|
12
|
+
);
|
|
13
|
+
await queryRunner.query(
|
|
14
|
+
`CREATE INDEX "IDX_edcda59471223b272610e40e3b" ON "DetectionRule" ("projectId") `,
|
|
15
|
+
);
|
|
16
|
+
await queryRunner.query(
|
|
17
|
+
`CREATE INDEX "IDX_861e04579580210cd030048d73" ON "DetectionRule" ("isEnabled") `,
|
|
18
|
+
);
|
|
19
|
+
await queryRunner.query(
|
|
20
|
+
`CREATE TABLE "GoogleSecOpsConnection" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "name" character varying(50) NOT NULL, "region" character varying(100) NOT NULL, "instanceResourceName" character varying(500) NOT NULL, "serviceAccountJson" text NOT NULL, "isEnabled" boolean NOT NULL DEFAULT true, "pollIntervalInMinutes" integer NOT NULL DEFAULT '5', "lastPolledAt" TIMESTAMP WITH TIME ZONE, "cursor" character varying(500), "lastError" character varying(500), "createdByUserId" uuid, "deletedByUserId" uuid, CONSTRAINT "PK_fbdcd1f7453680c7f366cc80c07" PRIMARY KEY ("_id"))`,
|
|
21
|
+
);
|
|
22
|
+
await queryRunner.query(
|
|
23
|
+
`CREATE INDEX "IDX_e59b999458abf1dea973d32fc5" ON "GoogleSecOpsConnection" ("projectId") `,
|
|
24
|
+
);
|
|
25
|
+
await queryRunner.query(
|
|
26
|
+
`CREATE INDEX "IDX_9fa67f61a03217dd86fab69fe7" ON "GoogleSecOpsConnection" ("isEnabled") `,
|
|
27
|
+
);
|
|
28
|
+
await queryRunner.query(
|
|
29
|
+
`ALTER TABLE "DetectionRule" ADD CONSTRAINT "FK_edcda59471223b272610e40e3b1" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
30
|
+
);
|
|
31
|
+
await queryRunner.query(
|
|
32
|
+
`ALTER TABLE "DetectionRule" ADD CONSTRAINT "FK_62fd7565adf068755445ef78509" FOREIGN KEY ("alertSeverityId") REFERENCES "AlertSeverity"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
33
|
+
);
|
|
34
|
+
await queryRunner.query(
|
|
35
|
+
`ALTER TABLE "DetectionRule" ADD CONSTRAINT "FK_81bc91fe3e02553aad48fc2785f" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
36
|
+
);
|
|
37
|
+
await queryRunner.query(
|
|
38
|
+
`ALTER TABLE "DetectionRule" ADD CONSTRAINT "FK_30f12b8514cc8ebb336988ebf68" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
39
|
+
);
|
|
40
|
+
await queryRunner.query(
|
|
41
|
+
`ALTER TABLE "GoogleSecOpsConnection" ADD CONSTRAINT "FK_e59b999458abf1dea973d32fc53" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
42
|
+
);
|
|
43
|
+
await queryRunner.query(
|
|
44
|
+
`ALTER TABLE "GoogleSecOpsConnection" ADD CONSTRAINT "FK_7df7932fd07705129a78d75c39a" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
45
|
+
);
|
|
46
|
+
await queryRunner.query(
|
|
47
|
+
`ALTER TABLE "GoogleSecOpsConnection" ADD CONSTRAINT "FK_1fff38e9cdc1d04b44dfdd9c1cc" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
52
|
+
await queryRunner.query(
|
|
53
|
+
`ALTER TABLE "GoogleSecOpsConnection" DROP CONSTRAINT "FK_1fff38e9cdc1d04b44dfdd9c1cc"`,
|
|
54
|
+
);
|
|
55
|
+
await queryRunner.query(
|
|
56
|
+
`ALTER TABLE "GoogleSecOpsConnection" DROP CONSTRAINT "FK_7df7932fd07705129a78d75c39a"`,
|
|
57
|
+
);
|
|
58
|
+
await queryRunner.query(
|
|
59
|
+
`ALTER TABLE "GoogleSecOpsConnection" DROP CONSTRAINT "FK_e59b999458abf1dea973d32fc53"`,
|
|
60
|
+
);
|
|
61
|
+
await queryRunner.query(
|
|
62
|
+
`ALTER TABLE "DetectionRule" DROP CONSTRAINT "FK_30f12b8514cc8ebb336988ebf68"`,
|
|
63
|
+
);
|
|
64
|
+
await queryRunner.query(
|
|
65
|
+
`ALTER TABLE "DetectionRule" DROP CONSTRAINT "FK_81bc91fe3e02553aad48fc2785f"`,
|
|
66
|
+
);
|
|
67
|
+
await queryRunner.query(
|
|
68
|
+
`ALTER TABLE "DetectionRule" DROP CONSTRAINT "FK_62fd7565adf068755445ef78509"`,
|
|
69
|
+
);
|
|
70
|
+
await queryRunner.query(
|
|
71
|
+
`ALTER TABLE "DetectionRule" DROP CONSTRAINT "FK_edcda59471223b272610e40e3b1"`,
|
|
72
|
+
);
|
|
73
|
+
await queryRunner.query(
|
|
74
|
+
`DROP INDEX "public"."IDX_9fa67f61a03217dd86fab69fe7"`,
|
|
75
|
+
);
|
|
76
|
+
await queryRunner.query(
|
|
77
|
+
`DROP INDEX "public"."IDX_e59b999458abf1dea973d32fc5"`,
|
|
78
|
+
);
|
|
79
|
+
await queryRunner.query(`DROP TABLE "GoogleSecOpsConnection"`);
|
|
80
|
+
await queryRunner.query(
|
|
81
|
+
`DROP INDEX "public"."IDX_861e04579580210cd030048d73"`,
|
|
82
|
+
);
|
|
83
|
+
await queryRunner.query(
|
|
84
|
+
`DROP INDEX "public"."IDX_edcda59471223b272610e40e3b"`,
|
|
85
|
+
);
|
|
86
|
+
await queryRunner.query(`DROP TABLE "DetectionRule"`);
|
|
87
|
+
}
|
|
88
|
+
}
|