@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
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Built-in list-price catalog for computing LLM call cost from token counts.
|
|
3
|
+
*
|
|
4
|
+
* OneUptime prefers the cost the instrumentation reports (gen_ai.usage.cost)
|
|
5
|
+
* — a vendor-negotiated or gateway-computed number is always more accurate
|
|
6
|
+
* than a list price. This catalog is the fallback: when a span carries token
|
|
7
|
+
* counts but no reported cost, the ingest pipeline computes an estimated cost
|
|
8
|
+
* from these rates so token spend is visible in dashboards and enforceable by
|
|
9
|
+
* cost budgets without requiring every SDK to do pricing math.
|
|
10
|
+
*
|
|
11
|
+
* Rates are USD per one million tokens, taken from the providers' public
|
|
12
|
+
* pricing pages. They are list prices: they ignore prompt-cache discounts,
|
|
13
|
+
* batch pricing, and negotiated rates, and they go stale as vendors reprice —
|
|
14
|
+
* update them here, once, like Common/Types/Billing/PayAsYouGoPricing.ts.
|
|
15
|
+
* Matching is by normalized model-name prefix with the LONGEST prefix winning,
|
|
16
|
+
* so "gpt-4o-mini-2024-07-18" resolves to the gpt-4o-mini entry, not gpt-4o.
|
|
17
|
+
*/
|
|
18
|
+
export const LlmModelPricingCatalog = [
|
|
19
|
+
// ---- OpenAI ----
|
|
20
|
+
{
|
|
21
|
+
modelPrefix: "gpt-5-nano",
|
|
22
|
+
inputPricePerMillionTokensInUSD: 0.05,
|
|
23
|
+
outputPricePerMillionTokensInUSD: 0.4,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
modelPrefix: "gpt-5-mini",
|
|
27
|
+
inputPricePerMillionTokensInUSD: 0.25,
|
|
28
|
+
outputPricePerMillionTokensInUSD: 2,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
modelPrefix: "gpt-5",
|
|
32
|
+
inputPricePerMillionTokensInUSD: 1.25,
|
|
33
|
+
outputPricePerMillionTokensInUSD: 10,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
modelPrefix: "gpt-4.1-nano",
|
|
37
|
+
inputPricePerMillionTokensInUSD: 0.1,
|
|
38
|
+
outputPricePerMillionTokensInUSD: 0.4,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
modelPrefix: "gpt-4.1-mini",
|
|
42
|
+
inputPricePerMillionTokensInUSD: 0.4,
|
|
43
|
+
outputPricePerMillionTokensInUSD: 1.6,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
modelPrefix: "gpt-4.1",
|
|
47
|
+
inputPricePerMillionTokensInUSD: 2,
|
|
48
|
+
outputPricePerMillionTokensInUSD: 8,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
modelPrefix: "gpt-4o-mini",
|
|
52
|
+
inputPricePerMillionTokensInUSD: 0.15,
|
|
53
|
+
outputPricePerMillionTokensInUSD: 0.6,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
modelPrefix: "gpt-4o",
|
|
57
|
+
inputPricePerMillionTokensInUSD: 2.5,
|
|
58
|
+
outputPricePerMillionTokensInUSD: 10,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
modelPrefix: "gpt-4-turbo",
|
|
62
|
+
inputPricePerMillionTokensInUSD: 10,
|
|
63
|
+
outputPricePerMillionTokensInUSD: 30,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
modelPrefix: "gpt-4",
|
|
67
|
+
inputPricePerMillionTokensInUSD: 30,
|
|
68
|
+
outputPricePerMillionTokensInUSD: 60,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
modelPrefix: "gpt-3.5-turbo",
|
|
72
|
+
inputPricePerMillionTokensInUSD: 0.5,
|
|
73
|
+
outputPricePerMillionTokensInUSD: 1.5,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
modelPrefix: "o3-pro",
|
|
77
|
+
inputPricePerMillionTokensInUSD: 20,
|
|
78
|
+
outputPricePerMillionTokensInUSD: 80,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
modelPrefix: "o3-mini",
|
|
82
|
+
inputPricePerMillionTokensInUSD: 1.1,
|
|
83
|
+
outputPricePerMillionTokensInUSD: 4.4,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
modelPrefix: "o3",
|
|
87
|
+
inputPricePerMillionTokensInUSD: 2,
|
|
88
|
+
outputPricePerMillionTokensInUSD: 8,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
modelPrefix: "o4-mini",
|
|
92
|
+
inputPricePerMillionTokensInUSD: 1.1,
|
|
93
|
+
outputPricePerMillionTokensInUSD: 4.4,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
modelPrefix: "o1-mini",
|
|
97
|
+
inputPricePerMillionTokensInUSD: 1.1,
|
|
98
|
+
outputPricePerMillionTokensInUSD: 4.4,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
// Priced 10x above bare o1 — must never fall through to that prefix.
|
|
102
|
+
modelPrefix: "o1-pro",
|
|
103
|
+
inputPricePerMillionTokensInUSD: 150,
|
|
104
|
+
outputPricePerMillionTokensInUSD: 600,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
modelPrefix: "o1",
|
|
108
|
+
inputPricePerMillionTokensInUSD: 15,
|
|
109
|
+
outputPricePerMillionTokensInUSD: 60,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
modelPrefix: "text-embedding-3-small",
|
|
113
|
+
inputPricePerMillionTokensInUSD: 0.02,
|
|
114
|
+
outputPricePerMillionTokensInUSD: 0,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
modelPrefix: "text-embedding-3-large",
|
|
118
|
+
inputPricePerMillionTokensInUSD: 0.13,
|
|
119
|
+
outputPricePerMillionTokensInUSD: 0,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
modelPrefix: "text-embedding-ada-002",
|
|
123
|
+
inputPricePerMillionTokensInUSD: 0.1,
|
|
124
|
+
outputPricePerMillionTokensInUSD: 0,
|
|
125
|
+
},
|
|
126
|
+
// ---- Anthropic ----
|
|
127
|
+
{
|
|
128
|
+
modelPrefix: "claude-opus-4",
|
|
129
|
+
inputPricePerMillionTokensInUSD: 15,
|
|
130
|
+
outputPricePerMillionTokensInUSD: 75,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
modelPrefix: "claude-sonnet-4",
|
|
134
|
+
inputPricePerMillionTokensInUSD: 3,
|
|
135
|
+
outputPricePerMillionTokensInUSD: 15,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
modelPrefix: "claude-haiku-4",
|
|
139
|
+
inputPricePerMillionTokensInUSD: 1,
|
|
140
|
+
outputPricePerMillionTokensInUSD: 5,
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
modelPrefix: "claude-3-7-sonnet",
|
|
144
|
+
inputPricePerMillionTokensInUSD: 3,
|
|
145
|
+
outputPricePerMillionTokensInUSD: 15,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
modelPrefix: "claude-3-5-sonnet",
|
|
149
|
+
inputPricePerMillionTokensInUSD: 3,
|
|
150
|
+
outputPricePerMillionTokensInUSD: 15,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
modelPrefix: "claude-3-5-haiku",
|
|
154
|
+
inputPricePerMillionTokensInUSD: 0.8,
|
|
155
|
+
outputPricePerMillionTokensInUSD: 4,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
modelPrefix: "claude-3-opus",
|
|
159
|
+
inputPricePerMillionTokensInUSD: 15,
|
|
160
|
+
outputPricePerMillionTokensInUSD: 75,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
modelPrefix: "claude-3-haiku",
|
|
164
|
+
inputPricePerMillionTokensInUSD: 0.25,
|
|
165
|
+
outputPricePerMillionTokensInUSD: 1.25,
|
|
166
|
+
},
|
|
167
|
+
// ---- Google Gemini ----
|
|
168
|
+
{
|
|
169
|
+
modelPrefix: "gemini-2.5-pro",
|
|
170
|
+
inputPricePerMillionTokensInUSD: 1.25,
|
|
171
|
+
outputPricePerMillionTokensInUSD: 10,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
modelPrefix: "gemini-2.5-flash-lite",
|
|
175
|
+
inputPricePerMillionTokensInUSD: 0.1,
|
|
176
|
+
outputPricePerMillionTokensInUSD: 0.4,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
modelPrefix: "gemini-2.5-flash",
|
|
180
|
+
inputPricePerMillionTokensInUSD: 0.3,
|
|
181
|
+
outputPricePerMillionTokensInUSD: 2.5,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
modelPrefix: "gemini-2.0-flash-lite",
|
|
185
|
+
inputPricePerMillionTokensInUSD: 0.075,
|
|
186
|
+
outputPricePerMillionTokensInUSD: 0.3,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
modelPrefix: "gemini-2.0-flash",
|
|
190
|
+
inputPricePerMillionTokensInUSD: 0.1,
|
|
191
|
+
outputPricePerMillionTokensInUSD: 0.4,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
modelPrefix: "gemini-1.5-pro",
|
|
195
|
+
inputPricePerMillionTokensInUSD: 1.25,
|
|
196
|
+
outputPricePerMillionTokensInUSD: 5,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
modelPrefix: "gemini-1.5-flash",
|
|
200
|
+
inputPricePerMillionTokensInUSD: 0.075,
|
|
201
|
+
outputPricePerMillionTokensInUSD: 0.3,
|
|
202
|
+
},
|
|
203
|
+
// ---- Mistral ----
|
|
204
|
+
{
|
|
205
|
+
modelPrefix: "mistral-large",
|
|
206
|
+
inputPricePerMillionTokensInUSD: 2,
|
|
207
|
+
outputPricePerMillionTokensInUSD: 6,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
modelPrefix: "mistral-medium",
|
|
211
|
+
inputPricePerMillionTokensInUSD: 0.4,
|
|
212
|
+
outputPricePerMillionTokensInUSD: 2,
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
modelPrefix: "mistral-small",
|
|
216
|
+
inputPricePerMillionTokensInUSD: 0.1,
|
|
217
|
+
outputPricePerMillionTokensInUSD: 0.3,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
modelPrefix: "codestral",
|
|
221
|
+
inputPricePerMillionTokensInUSD: 0.3,
|
|
222
|
+
outputPricePerMillionTokensInUSD: 0.9,
|
|
223
|
+
},
|
|
224
|
+
// ---- DeepSeek ----
|
|
225
|
+
{
|
|
226
|
+
modelPrefix: "deepseek-chat",
|
|
227
|
+
inputPricePerMillionTokensInUSD: 0.27,
|
|
228
|
+
outputPricePerMillionTokensInUSD: 1.1,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
modelPrefix: "deepseek-reasoner",
|
|
232
|
+
inputPricePerMillionTokensInUSD: 0.55,
|
|
233
|
+
outputPricePerMillionTokensInUSD: 2.19,
|
|
234
|
+
},
|
|
235
|
+
// ---- xAI ----
|
|
236
|
+
{
|
|
237
|
+
modelPrefix: "grok-4",
|
|
238
|
+
inputPricePerMillionTokensInUSD: 3,
|
|
239
|
+
outputPricePerMillionTokensInUSD: 15,
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
modelPrefix: "grok-3-mini",
|
|
243
|
+
inputPricePerMillionTokensInUSD: 0.3,
|
|
244
|
+
outputPricePerMillionTokensInUSD: 0.5,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
modelPrefix: "grok-3",
|
|
248
|
+
inputPricePerMillionTokensInUSD: 3,
|
|
249
|
+
outputPricePerMillionTokensInUSD: 15,
|
|
250
|
+
},
|
|
251
|
+
// ---- Cohere ----
|
|
252
|
+
{
|
|
253
|
+
modelPrefix: "command-r-plus",
|
|
254
|
+
inputPricePerMillionTokensInUSD: 2.5,
|
|
255
|
+
outputPricePerMillionTokensInUSD: 10,
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
modelPrefix: "command-r",
|
|
259
|
+
inputPricePerMillionTokensInUSD: 0.15,
|
|
260
|
+
outputPricePerMillionTokensInUSD: 0.6,
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
modelPrefix: "command-a",
|
|
264
|
+
inputPricePerMillionTokensInUSD: 2.5,
|
|
265
|
+
outputPricePerMillionTokensInUSD: 10,
|
|
266
|
+
},
|
|
267
|
+
// ---- Amazon Nova ----
|
|
268
|
+
{
|
|
269
|
+
modelPrefix: "nova-micro",
|
|
270
|
+
inputPricePerMillionTokensInUSD: 0.035,
|
|
271
|
+
outputPricePerMillionTokensInUSD: 0.14,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
modelPrefix: "nova-lite",
|
|
275
|
+
inputPricePerMillionTokensInUSD: 0.06,
|
|
276
|
+
outputPricePerMillionTokensInUSD: 0.24,
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
modelPrefix: "nova-pro",
|
|
280
|
+
inputPricePerMillionTokensInUSD: 0.8,
|
|
281
|
+
outputPricePerMillionTokensInUSD: 3.2,
|
|
282
|
+
},
|
|
283
|
+
// ---- Meta Llama (typical hosted per-token rates) ----
|
|
284
|
+
{
|
|
285
|
+
modelPrefix: "llama-3.3-70b",
|
|
286
|
+
inputPricePerMillionTokensInUSD: 0.72,
|
|
287
|
+
outputPricePerMillionTokensInUSD: 0.72,
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
modelPrefix: "llama-3.1-405b",
|
|
291
|
+
inputPricePerMillionTokensInUSD: 2.4,
|
|
292
|
+
outputPricePerMillionTokensInUSD: 2.4,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
modelPrefix: "llama-3.1-70b",
|
|
296
|
+
inputPricePerMillionTokensInUSD: 0.72,
|
|
297
|
+
outputPricePerMillionTokensInUSD: 0.72,
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
modelPrefix: "llama-3.1-8b",
|
|
301
|
+
inputPricePerMillionTokensInUSD: 0.22,
|
|
302
|
+
outputPricePerMillionTokensInUSD: 0.22,
|
|
303
|
+
},
|
|
304
|
+
];
|
|
305
|
+
/*
|
|
306
|
+
* Leading tokens that carry deployment routing, not model identity. Bedrock
|
|
307
|
+
* model ids look like "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
308
|
+
* OpenRouter-style ids like "anthropic/claude-3-5-sonnet", Google's like
|
|
309
|
+
* "models/gemini-2.5-pro" — all of them must resolve to the same catalog
|
|
310
|
+
* entry as the bare model name.
|
|
311
|
+
*/
|
|
312
|
+
const RoutingPrefixTokens = [
|
|
313
|
+
// Bedrock cross-region inference profiles.
|
|
314
|
+
"us",
|
|
315
|
+
"eu",
|
|
316
|
+
"apac",
|
|
317
|
+
"global",
|
|
318
|
+
// Provider namespaces.
|
|
319
|
+
"anthropic",
|
|
320
|
+
"openai",
|
|
321
|
+
"google",
|
|
322
|
+
"meta",
|
|
323
|
+
"amazon",
|
|
324
|
+
"mistral",
|
|
325
|
+
"mistralai",
|
|
326
|
+
"cohere",
|
|
327
|
+
"ai21",
|
|
328
|
+
"deepseek",
|
|
329
|
+
"xai",
|
|
330
|
+
"azure",
|
|
331
|
+
"models",
|
|
332
|
+
];
|
|
333
|
+
export class LlmCostCatalogUtil {
|
|
334
|
+
/**
|
|
335
|
+
* Find the price entry for a (possibly vendor-decorated) model name.
|
|
336
|
+
* Returns null when the model is unknown — callers must not guess a price.
|
|
337
|
+
*
|
|
338
|
+
* `projectPriceOverrides` are per-project custom prices (negotiated rates,
|
|
339
|
+
* self-hosted models, fine-tunes) consulted alongside the built-in catalog.
|
|
340
|
+
* The longest matching prefix wins across BOTH lists; on a prefix-length
|
|
341
|
+
* tie the project entry beats the built-in one.
|
|
342
|
+
*/
|
|
343
|
+
static findPriceForModel(model, projectPriceOverrides) {
|
|
344
|
+
const candidates = this.normalizedCandidates(model);
|
|
345
|
+
const overrides = this.sanitizeOverrides(projectPriceOverrides);
|
|
346
|
+
let best = null;
|
|
347
|
+
let bestIsProjectOverride = false;
|
|
348
|
+
for (const candidate of candidates) {
|
|
349
|
+
for (const entry of overrides) {
|
|
350
|
+
if (!candidate.startsWith(entry.modelPrefix)) {
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
if (!best ||
|
|
354
|
+
entry.modelPrefix.length > best.modelPrefix.length ||
|
|
355
|
+
(entry.modelPrefix.length === best.modelPrefix.length &&
|
|
356
|
+
!bestIsProjectOverride)) {
|
|
357
|
+
best = entry;
|
|
358
|
+
bestIsProjectOverride = true;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
for (const entry of LlmModelPricingCatalog) {
|
|
362
|
+
if (!candidate.startsWith(entry.modelPrefix)) {
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
// Strictly longer only — an equal-length project entry keeps winning.
|
|
366
|
+
if (!best || entry.modelPrefix.length > best.modelPrefix.length) {
|
|
367
|
+
best = entry;
|
|
368
|
+
bestIsProjectOverride = false;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return best;
|
|
373
|
+
}
|
|
374
|
+
/*
|
|
375
|
+
* Normalize project override entries the same way catalog prefixes are
|
|
376
|
+
* stored (trimmed, lowercase) and drop unpriceable rows — user-authored
|
|
377
|
+
* data must never break span ingest or price a call negatively.
|
|
378
|
+
*/
|
|
379
|
+
static sanitizeOverrides(projectPriceOverrides) {
|
|
380
|
+
if (!projectPriceOverrides || projectPriceOverrides.length === 0) {
|
|
381
|
+
return [];
|
|
382
|
+
}
|
|
383
|
+
const sanitized = [];
|
|
384
|
+
for (const entry of projectPriceOverrides) {
|
|
385
|
+
if (!entry || typeof entry.modelPrefix !== "string") {
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
const modelPrefix = entry.modelPrefix.trim().toLowerCase();
|
|
389
|
+
const inputPrice = entry.inputPricePerMillionTokensInUSD;
|
|
390
|
+
const outputPrice = entry.outputPricePerMillionTokensInUSD;
|
|
391
|
+
if (!modelPrefix ||
|
|
392
|
+
typeof inputPrice !== "number" ||
|
|
393
|
+
!isFinite(inputPrice) ||
|
|
394
|
+
inputPrice < 0 ||
|
|
395
|
+
typeof outputPrice !== "number" ||
|
|
396
|
+
!isFinite(outputPrice) ||
|
|
397
|
+
outputPrice < 0) {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
if (modelPrefix === entry.modelPrefix) {
|
|
401
|
+
sanitized.push(entry);
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
sanitized.push({
|
|
405
|
+
modelPrefix: modelPrefix,
|
|
406
|
+
inputPricePerMillionTokensInUSD: inputPrice,
|
|
407
|
+
outputPricePerMillionTokensInUSD: outputPrice,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return sanitized;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Compute the estimated USD cost of a call from its token counts, or null
|
|
415
|
+
* when the model is unknown or there are no tokens to price. Never guesses:
|
|
416
|
+
* an unknown model yields null, not zero, so the caller can distinguish
|
|
417
|
+
* "free" from "unpriceable".
|
|
418
|
+
*/
|
|
419
|
+
static computeCostInUSD(data) {
|
|
420
|
+
const inputTokens = isFinite(data.inputTokens) && data.inputTokens > 0 ? data.inputTokens : 0;
|
|
421
|
+
const outputTokens = isFinite(data.outputTokens) && data.outputTokens > 0
|
|
422
|
+
? data.outputTokens
|
|
423
|
+
: 0;
|
|
424
|
+
if (inputTokens === 0 && outputTokens === 0) {
|
|
425
|
+
return null;
|
|
426
|
+
}
|
|
427
|
+
const price = this.findPriceForModel(data.model, data.projectPriceOverrides);
|
|
428
|
+
if (!price) {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
const cost = (inputTokens * price.inputPricePerMillionTokensInUSD) / 1000000 +
|
|
432
|
+
(outputTokens * price.outputPricePerMillionTokensInUSD) / 1000000;
|
|
433
|
+
/*
|
|
434
|
+
* Trim float noise (e.g. 0.30000000000000004) — 8 decimal places is
|
|
435
|
+
* sub-hundredth-of-a-cent resolution, far below list-price accuracy.
|
|
436
|
+
*/
|
|
437
|
+
return Math.round(cost * 1e8) / 1e8;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Expand a raw model string into normalized lookup candidates, most-specific
|
|
441
|
+
* first: the full lowercase name, then the name with routing/provider
|
|
442
|
+
* prefixes (path segments, dotted namespaces, region tokens) stripped away.
|
|
443
|
+
*/
|
|
444
|
+
static normalizedCandidates(model) {
|
|
445
|
+
if (!model || typeof model !== "string") {
|
|
446
|
+
return [];
|
|
447
|
+
}
|
|
448
|
+
const normalized = model.trim().toLowerCase();
|
|
449
|
+
if (!normalized) {
|
|
450
|
+
return [];
|
|
451
|
+
}
|
|
452
|
+
const candidates = [normalized];
|
|
453
|
+
// "anthropic/claude-3-5-sonnet" or "models/gemini-2.5-pro" → last segment.
|
|
454
|
+
const lastSlashSegment = normalized.split("/").pop() || "";
|
|
455
|
+
if (lastSlashSegment && !candidates.includes(lastSlashSegment)) {
|
|
456
|
+
candidates.push(lastSlashSegment);
|
|
457
|
+
}
|
|
458
|
+
/*
|
|
459
|
+
* "us.anthropic.claude-3-5-sonnet-20241022-v2:0" → progressively strip
|
|
460
|
+
* leading routing tokens ("us", "anthropic") that sit before the model
|
|
461
|
+
* name. Only recognized routing tokens are stripped, so a model whose name
|
|
462
|
+
* legitimately contains a dot (gpt-4.1, gemini-2.5-pro) is untouched.
|
|
463
|
+
*/
|
|
464
|
+
for (const base of [...candidates]) {
|
|
465
|
+
let remainder = base;
|
|
466
|
+
for (;;) {
|
|
467
|
+
const dotIndex = remainder.indexOf(".");
|
|
468
|
+
if (dotIndex <= 0) {
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
const leadingToken = remainder.substring(0, dotIndex);
|
|
472
|
+
if (!RoutingPrefixTokens.includes(leadingToken)) {
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
475
|
+
remainder = remainder.substring(dotIndex + 1);
|
|
476
|
+
if (remainder && !candidates.includes(remainder)) {
|
|
477
|
+
candidates.push(remainder);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
return candidates;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
//# sourceMappingURL=LlmCostCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LlmCostCatalog.js","sourceRoot":"","sources":["../../../../Types/Telemetry/LlmCostCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AASH,MAAM,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B,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
|
|
@@ -13,6 +13,7 @@ var ServiceType;
|
|
|
13
13
|
ServiceType["NetworkDevice"] = "NetworkDevice";
|
|
14
14
|
ServiceType["Alert"] = "Alert";
|
|
15
15
|
ServiceType["Incident"] = "Incident";
|
|
16
|
+
ServiceType["ScheduledMaintenance"] = "ScheduledMaintenance";
|
|
16
17
|
ServiceType["Host"] = "Host";
|
|
17
18
|
ServiceType["DockerHost"] = "DockerHost";
|
|
18
19
|
ServiceType["PodmanHost"] = "PodmanHost";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceType.js","sourceRoot":"","sources":["../../../../Types/Telemetry/ServiceType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,IAAK,
|
|
1
|
+
{"version":3,"file":"ServiceType.js","sourceRoot":"","sources":["../../../../Types/Telemetry/ServiceType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,IAAK,WA4BJ;AA5BD,WAAK,WAAW;IACd,8CAA+B,CAAA;IAC/B,kCAAmB,CAAA;IACnB,8CAA+B,CAAA;IAC/B,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,4DAA6C,CAAA;IAC7C,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,wCAAyB,CAAA;IACzB,sDAAuC,CAAA;IACvC,gDAAiC,CAAA;IACjC,0CAA2B,CAAA;IAC3B,wDAAyC,CAAA;IACzC,sCAAuB,CAAA;IACvB,wDAAyC,CAAA;IACzC,8CAA+B,CAAA;IAC/B,kDAAmC,CAAA;IACnC;;;;;;;;OAQG;IACH,kCAAmB,CAAA;AACrB,CAAC,EA5BI,WAAW,KAAX,WAAW,QA4Bf;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TelemetryRetentionConfig.js","sourceRoot":"","sources":["../../../../Types/Telemetry/TelemetryRetentionConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TelemetryRetentionConfig.js","sourceRoot":"","sources":["../../../../Types/Telemetry/TelemetryRetentionConfig.ts"],"names":[],"mappings":"AAwDA,MAAM,CAAC,MAAM,6CAA6C,GAAW,EAAE,CAAC;AAExE,SAAS,YAAY,CAAC,KAAgC;IACpD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/D,CAAC;AAED,SAAS,cAAc,CACrB,MAAmD,EACnD,MAAuB,EACvB,SAAsD;;IAEtD,IAAI,CAAC,MAAM,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QAC7D,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,UAAU,GACd,MAAA,MAAM,CAAC,IAAI,0CAAE,UAAU,CAAC;QAC1B,OAAO,YAAY,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,SAAwB,CAAC,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,QAAQ,GACZ,MAAA,MAAM,CAAC,MAAM,0CAAE,QAAQ,CAAC;QAC1B,OAAO,YAAY,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,SAAuB,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,gBAAgB,CACvB,MAAmD,EACnD,MAAuB;;IAEvB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,YAAY,CAAC,MAAA,MAAM,CAAC,MAAM,CAAC,0CAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,KAO/C;IACC,MAAM,EACJ,MAAM,EACN,SAAS,EACT,aAAa,EACb,sBAAsB,EACtB,aAAa,EACb,sBAAsB,GACvB,GAAG,KAAK,CAAC;IAEV,MAAM,UAAU,GAAyB;QACvC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC;QAChD,gBAAgB,CAAC,aAAa,EAAE,MAAM,CAAC;QACvC,YAAY,CAAC,sBAAsB,CAAC;QACpC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC;QAChD,gBAAgB,CAAC,aAAa,EAAE,MAAM,CAAC;QACvC,YAAY,CAAC,sBAAsB,CAAC;KACrC,CAAC;IAEF,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;QAC/B,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,6CAA6C,CAAC;AACvD,CAAC"}
|
|
@@ -5,6 +5,7 @@ var TelemetryType;
|
|
|
5
5
|
TelemetryType["Log"] = "Log";
|
|
6
6
|
TelemetryType["Exception"] = "Exception";
|
|
7
7
|
TelemetryType["Profile"] = "Profile";
|
|
8
|
+
TelemetryType["SecurityEvent"] = "SecurityEvent";
|
|
8
9
|
})(TelemetryType || (TelemetryType = {}));
|
|
9
10
|
export default TelemetryType;
|
|
10
11
|
//# sourceMappingURL=TelemetryType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TelemetryType.js","sourceRoot":"","sources":["../../../../Types/Telemetry/TelemetryType.ts"],"names":[],"mappings":"AAAA,IAAK,
|
|
1
|
+
{"version":3,"file":"TelemetryType.js","sourceRoot":"","sources":["../../../../Types/Telemetry/TelemetryType.ts"],"names":[],"mappings":"AAAA,IAAK,aAOJ;AAPD,WAAK,aAAa;IAChB,kCAAiB,CAAA;IACjB,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;IACnB,gDAA+B,CAAA;AACjC,CAAC,EAPI,aAAa,KAAb,aAAa,QAOjB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where one user stands on two factor authentication, as one value.
|
|
3
|
+
*
|
|
4
|
+
* The three states are DERIVED, never stored. `User.enableTwoFactorAuth` says
|
|
5
|
+
* whether the account is required to use two factor auth; the rows in
|
|
6
|
+
* `UserTotpAuth` / `UserWebAuthn` say whether anything has actually been set
|
|
7
|
+
* up. Neither answers the operator's question on its own, and the pair is easy
|
|
8
|
+
* to render wrongly -- "Two Factor Auth: Yes" for an account that has the
|
|
9
|
+
* requirement switched on but no authenticator behind it is precisely the
|
|
10
|
+
* user who cannot sign in unaided.
|
|
11
|
+
*
|
|
12
|
+
* A second column recording the same thing was considered and rejected: two
|
|
13
|
+
* flags that must agree can disagree, and every write path would have to
|
|
14
|
+
* remember to move both. `enableTwoFactorAuth` is already the only flag the
|
|
15
|
+
* login handler reads, so it stays the single source of truth and this enum is
|
|
16
|
+
* computed from it.
|
|
17
|
+
*
|
|
18
|
+
* The members are machine values, deliberately not display strings. The labels
|
|
19
|
+
* an operator sees ("Enabled - Pending Setup" and friends) are i18n keys
|
|
20
|
+
* resolved in the browser, so a translation can change without changing what
|
|
21
|
+
* crosses the wire.
|
|
22
|
+
*/
|
|
23
|
+
var TwoFactorAuthStatus;
|
|
24
|
+
(function (TwoFactorAuthStatus) {
|
|
25
|
+
/*
|
|
26
|
+
* The account is not required to use two factor auth. It may still have
|
|
27
|
+
* authenticators set up voluntarily -- they simply are not asked for.
|
|
28
|
+
*/
|
|
29
|
+
TwoFactorAuthStatus["NotEnabled"] = "NotEnabled";
|
|
30
|
+
/*
|
|
31
|
+
* Required, but nothing is set up yet. The user is sent through enrolment
|
|
32
|
+
* the next time they sign in and cannot get past it. This is the state an
|
|
33
|
+
* admin creates by turning the requirement on, and the state a "Reset MFA"
|
|
34
|
+
* leaves a mandated account in.
|
|
35
|
+
*/
|
|
36
|
+
TwoFactorAuthStatus["EnabledPendingSetup"] = "EnabledPendingSetup";
|
|
37
|
+
// Required, and at least one verified authenticator exists.
|
|
38
|
+
TwoFactorAuthStatus["EnabledConfigured"] = "EnabledConfigured";
|
|
39
|
+
})(TwoFactorAuthStatus || (TwoFactorAuthStatus = {}));
|
|
40
|
+
export default TwoFactorAuthStatus;
|
|
41
|
+
//# sourceMappingURL=TwoFactorAuthStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoFactorAuthStatus.js","sourceRoot":"","sources":["../../../Types/TwoFactorAuthStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAK,mBAiBJ;AAjBD,WAAK,mBAAmB;IACtB;;;OAGG;IACH,gDAAyB,CAAA;IAEzB;;;;;OAKG;IACH,kEAA2C,CAAA;IAE3C,4DAA4D;IAC5D,8DAAuC,CAAA;AACzC,CAAC,EAjBI,mBAAmB,KAAnB,mBAAmB,QAiBvB;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import BadDataException from "../../../Types/Exception/BadDataException";
|
|
|
2
2
|
import IconProp from "../../../Types/Icon/IconProp";
|
|
3
3
|
import API from "../../Utils/API/API";
|
|
4
4
|
import ModelAPI from "../../Utils/ModelAPI/ModelAPI";
|
|
5
|
+
import PermissionGate, { ModelAction, } from "../../Utils/PermissionGate";
|
|
5
6
|
import { ButtonStyleType } from "../Button/Button";
|
|
6
7
|
/**
|
|
7
8
|
* Reusable hook that provides "Archive" and "Unarchive" bulk actions for any
|
|
@@ -59,6 +60,19 @@ function useBulkArchiveActions(config) {
|
|
|
59
60
|
}
|
|
60
61
|
onBulkActionEnd();
|
|
61
62
|
};
|
|
63
|
+
/*
|
|
64
|
+
* Bulk actions are handed straight to the table's action bar, which never
|
|
65
|
+
* looks at permissions - so a viewer on an otherwise gated table could still
|
|
66
|
+
* relabel, reassign or archive every row they had selected. Each of these
|
|
67
|
+
* actions is an update of the records it touches.
|
|
68
|
+
*/
|
|
69
|
+
const updateGate = PermissionGate.check(new config.modelType(), ModelAction.Update);
|
|
70
|
+
const gateAction = (action) => {
|
|
71
|
+
if (updateGate.isAllowed || !updateGate.disabledReason) {
|
|
72
|
+
return action;
|
|
73
|
+
}
|
|
74
|
+
return Object.assign(Object.assign({}, action), { disabled: true, tooltip: updateGate.disabledReason });
|
|
75
|
+
};
|
|
62
76
|
const archiveAction = {
|
|
63
77
|
title: "Archive",
|
|
64
78
|
icon: IconProp.Archive,
|
|
@@ -88,8 +102,8 @@ function useBulkArchiveActions(config) {
|
|
|
88
102
|
},
|
|
89
103
|
};
|
|
90
104
|
return {
|
|
91
|
-
archiveBulkActions: [archiveAction],
|
|
92
|
-
unarchiveBulkActions: [unarchiveAction],
|
|
105
|
+
archiveBulkActions: [gateAction(archiveAction)],
|
|
106
|
+
unarchiveBulkActions: [gateAction(unarchiveAction)],
|
|
93
107
|
};
|
|
94
108
|
}
|
|
95
109
|
export default useBulkArchiveActions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BulkArchiveActions.js","sourceRoot":"","sources":["../../../../../UI/Components/BulkUpdate/BulkArchiveActions.tsx"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,2CAA2C,CAAC;AACzE,OAAO,QAAQ,MAAM,8BAA8B,CAAC;AAEpD,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAwBnD;;;;;;;;;;;;;;GAcG;AACH,SAAS,qBAAqB,CAC5B,MAAmC;IAEnC,MAAM,KAAK,GAAM,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;IACxC,MAAM,YAAY,GAChB,MAAM,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,IAAI,UAAU,CAAC;IAC1D,MAAM,UAAU,GACd,MAAM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