@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
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AxiosError } from "axios";
|
|
2
|
+
import Attribution from "../Attribution";
|
|
2
3
|
import { JSONObject } from "../../../Types/JSON";
|
|
3
4
|
import {
|
|
4
5
|
AdUploadableMarketingConversionTypes,
|
|
6
|
+
LeadMarketingConversionTypes,
|
|
5
7
|
MarketingConversionType,
|
|
6
8
|
} from "../../../Types/Marketing/MarketingConversion";
|
|
7
9
|
import MarketingConversion from "../../../Models/DatabaseModels/MarketingConversion";
|
|
@@ -15,17 +17,33 @@ import MarketingConversion from "../../../Models/DatabaseModels/MarketingConvers
|
|
|
15
17
|
* Contract:
|
|
16
18
|
* - getSkipReason returns a human-readable reason when this conversion can
|
|
17
19
|
* never be uploaded to this platform (conversion type with no ad-platform
|
|
18
|
-
* mapping,
|
|
19
|
-
* provider not configured for this conversion type). Null
|
|
20
|
-
* It is implemented here and must not be overridden —
|
|
21
|
-
* getProviderSkipReason instead, which only runs for
|
|
22
|
-
* are ad-uploadable at all.
|
|
20
|
+
* mapping, no identifier this platform can match on, outside the platform's
|
|
21
|
+
* upload window, provider not configured for this conversion type). Null
|
|
22
|
+
* means uploadable. It is implemented here and must not be overridden —
|
|
23
|
+
* providers implement getProviderSkipReason instead, which only runs for
|
|
24
|
+
* conversion types that are ad-uploadable at all.
|
|
23
25
|
* - upload() sends one batch. Per-conversion PERMANENT rejections are
|
|
24
26
|
* returned in the result keyed by array index; they will not be retried.
|
|
25
27
|
* Transport/auth-level failures must THROW — the whole batch stays pending
|
|
26
28
|
* and is retried on the next run (bounded by the job's attempt cap), so
|
|
27
29
|
* providers should be safe against duplicate delivery where the platform
|
|
28
30
|
* supports an idempotency/dedup key.
|
|
31
|
+
*
|
|
32
|
+
* IDENTIFIERS
|
|
33
|
+
*
|
|
34
|
+
* A conversion can be matched to an ad click two ways, and most platforms
|
|
35
|
+
* accept either:
|
|
36
|
+
*
|
|
37
|
+
* - the click id the visitor carried (gclid, fbclid, msclkid, ...), which is
|
|
38
|
+
* exact but only survives as far as the browser storage that held it; and
|
|
39
|
+
* - the SHA-256 of the person's email, which every platform calls "enhanced
|
|
40
|
+
* conversions"/"enhanced matching" and which survives a change of device,
|
|
41
|
+
* a cleared browser, and the weeks between a demo and the deal it led to.
|
|
42
|
+
*
|
|
43
|
+
* Providers must consider a conversion uploadable when EITHER is present.
|
|
44
|
+
* Requiring the click id — which is what every provider here used to do — threw
|
|
45
|
+
* away exactly the sales-led conversions the enhanced-matching mechanism was
|
|
46
|
+
* designed for.
|
|
29
47
|
*/
|
|
30
48
|
|
|
31
49
|
export interface ConversionUploadBatchResult {
|
|
@@ -36,14 +54,28 @@ export interface ConversionUploadBatchResult {
|
|
|
36
54
|
export interface ConversionSkip {
|
|
37
55
|
reason: string;
|
|
38
56
|
/*
|
|
39
|
-
* Permanent skips (
|
|
40
|
-
* are recorded as Skipped and never revisited. Non-permanent skips
|
|
57
|
+
* Permanent skips (no usable identifier, outside the platform's upload
|
|
58
|
+
* window) are recorded as Skipped and never revisited. Non-permanent skips
|
|
41
59
|
* (missing provider configuration such as a conversion action id) leave
|
|
42
60
|
* the conversion pending so it uploads once the configuration is added.
|
|
43
61
|
*/
|
|
44
62
|
isPermanent: boolean;
|
|
45
63
|
}
|
|
46
64
|
|
|
65
|
+
/*
|
|
66
|
+
* A per-conversion-type mapping. Written as a Record over the enum rather than
|
|
67
|
+
* a switch or a two-way branch on purpose: the compiler refuses a Record that
|
|
68
|
+
* omits a member, so adding a MarketingConversionType is a build error in every
|
|
69
|
+
* provider until that provider states what the new type means on its platform.
|
|
70
|
+
*
|
|
71
|
+
* That is the guarantee Docs/analytics/enterprise-conversion-tracking.md asks
|
|
72
|
+
* for. Before it existed, providers chose their conversion action with
|
|
73
|
+
* `isSignUp(conversion) ? signUp : paidSubscription`, so a booked meeting added
|
|
74
|
+
* to the uploadable list would have been reported to every ad platform as a
|
|
75
|
+
* purchase.
|
|
76
|
+
*/
|
|
77
|
+
export type ConversionTypeMapping<T> = Record<MarketingConversionType, T>;
|
|
78
|
+
|
|
47
79
|
export default abstract class ConversionUploadProvider {
|
|
48
80
|
// Stable key used in MarketingConversion.uploadState. Never change it.
|
|
49
81
|
public abstract readonly key: string;
|
|
@@ -59,11 +91,8 @@ export default abstract class ConversionUploadProvider {
|
|
|
59
91
|
public abstract isConfigured(): boolean;
|
|
60
92
|
|
|
61
93
|
/*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* mapping for (a booked meeting) would otherwise be silently uploaded as a
|
|
65
|
-
* purchase. Screen those out here, before any provider sees them, so no
|
|
66
|
-
* provider or call site can skip the check.
|
|
94
|
+
* Screens conversion types the ledger records but no ad platform has a
|
|
95
|
+
* mapping for, before any provider sees them.
|
|
67
96
|
*/
|
|
68
97
|
public getSkipReason(conversion: MarketingConversion): ConversionSkip | null {
|
|
69
98
|
if (
|
|
@@ -99,7 +128,64 @@ export default abstract class ConversionUploadProvider {
|
|
|
99
128
|
return typeof value === "string" && value ? value : undefined;
|
|
100
129
|
}
|
|
101
130
|
|
|
131
|
+
/*
|
|
132
|
+
* The hashed email this conversion can be matched on, or undefined.
|
|
133
|
+
*
|
|
134
|
+
* Prefers the stored emailHash and falls back to hashing the email column,
|
|
135
|
+
* so rows written before emailHash existed still match. Both paths go
|
|
136
|
+
* through Attribution so the digest is identical whichever one produced it.
|
|
137
|
+
*/
|
|
138
|
+
protected getHashedEmail(
|
|
139
|
+
conversion: MarketingConversion,
|
|
140
|
+
): string | undefined {
|
|
141
|
+
if (conversion.emailHash) {
|
|
142
|
+
return conversion.emailHash;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return Attribution.hashEmail(conversion.email) || undefined;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/*
|
|
149
|
+
* Resolve a per-type value, or undefined when the column holds a string that
|
|
150
|
+
* is not a known conversion type. The column is a plain varchar, so this
|
|
151
|
+
* cannot be assumed away even though the mapping itself is exhaustive.
|
|
152
|
+
*/
|
|
153
|
+
protected resolveByConversionType<T>(
|
|
154
|
+
conversion: MarketingConversion,
|
|
155
|
+
mapping: ConversionTypeMapping<T>,
|
|
156
|
+
): T | undefined {
|
|
157
|
+
const conversionType: MarketingConversionType =
|
|
158
|
+
conversion.conversionType as MarketingConversionType;
|
|
159
|
+
|
|
160
|
+
if (!Object.values(MarketingConversionType).includes(conversionType)) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return mapping[conversionType];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/*
|
|
168
|
+
* A sales-led lead (booked meeting, enterprise licence request) rather than
|
|
169
|
+
* a completed transaction.
|
|
170
|
+
*/
|
|
171
|
+
protected isLead(conversion: MarketingConversion): boolean {
|
|
172
|
+
return LeadMarketingConversionTypes.includes(
|
|
173
|
+
conversion.conversionType as MarketingConversionType,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/*
|
|
178
|
+
* The revenue to report for this conversion, in USD.
|
|
179
|
+
*
|
|
180
|
+
* Leads return undefined regardless of what the row holds. A booked meeting
|
|
181
|
+
* is not money, and reporting one as revenue would let a bidding algorithm
|
|
182
|
+
* optimise towards booking meetings that never close.
|
|
183
|
+
*/
|
|
102
184
|
protected getValueInUSD(conversion: MarketingConversion): number | undefined {
|
|
185
|
+
if (this.isLead(conversion)) {
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
|
|
103
189
|
if (
|
|
104
190
|
conversion.conversionValueInUSDCents === undefined ||
|
|
105
191
|
conversion.conversionValueInUSDCents === null ||
|
|
@@ -110,10 +196,6 @@ export default abstract class ConversionUploadProvider {
|
|
|
110
196
|
return conversion.conversionValueInUSDCents / 100;
|
|
111
197
|
}
|
|
112
198
|
|
|
113
|
-
protected isSignUp(conversion: MarketingConversion): boolean {
|
|
114
|
-
return conversion.conversionType === MarketingConversionType.SignUp;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
199
|
protected isOlderThanDays(
|
|
118
200
|
conversion: MarketingConversion,
|
|
119
201
|
days: number,
|
|
@@ -3,7 +3,9 @@ import {
|
|
|
3
3
|
GoogleAdsApiVersion,
|
|
4
4
|
GoogleAdsCustomerId,
|
|
5
5
|
GoogleAdsDeveloperToken,
|
|
6
|
+
GoogleAdsEnhancedConversionsForLeadsEnabled,
|
|
6
7
|
GoogleAdsLoginCustomerId,
|
|
8
|
+
GoogleAdsMeetingBookedConversionActionId,
|
|
7
9
|
GoogleAdsOAuthClientId,
|
|
8
10
|
GoogleAdsOAuthClientSecret,
|
|
9
11
|
GoogleAdsOAuthRefreshToken,
|
|
@@ -12,9 +14,11 @@ import {
|
|
|
12
14
|
} from "../../../EnvironmentConfig";
|
|
13
15
|
import ConversionUploadProvider, {
|
|
14
16
|
ConversionSkip,
|
|
17
|
+
ConversionTypeMapping,
|
|
15
18
|
ConversionUploadBatchResult,
|
|
16
19
|
} from "../ConversionUploadProvider";
|
|
17
20
|
import { JSONObject } from "../../../../Types/JSON";
|
|
21
|
+
import { MarketingConversionType } from "../../../../Types/Marketing/MarketingConversion";
|
|
18
22
|
import MarketingConversion from "../../../../Models/DatabaseModels/MarketingConversion";
|
|
19
23
|
import logger from "../../Logger";
|
|
20
24
|
|
|
@@ -26,8 +30,16 @@ const GOOGLE_MAX_CONVERSION_AGE_IN_DAYS: number = 90;
|
|
|
26
30
|
/*
|
|
27
31
|
* Google Ads offline click conversions
|
|
28
32
|
* (customers/{id}:uploadClickConversions) with OAuth2 refresh-token auth.
|
|
29
|
-
* Supports gclid, wbraid and gbraid click ids
|
|
30
|
-
*
|
|
33
|
+
* Supports gclid, wbraid and gbraid click ids, plus enhanced conversions — a
|
|
34
|
+
* SHA-256 email in userIdentifiers. Uses partialFailure so valid conversions
|
|
35
|
+
* succeed even when others in the batch fail.
|
|
36
|
+
*
|
|
37
|
+
* A hashed email is attached to EVERY upload that has one, which only improves
|
|
38
|
+
* matching. Uploading a conversion that has ONLY a hashed email — enhanced
|
|
39
|
+
* conversions for leads, and the only way a sales-led deal months after the
|
|
40
|
+
* click is ever attributed — additionally requires the account to be set up
|
|
41
|
+
* for it, so it is gated on
|
|
42
|
+
* GOOGLE_ADS_ENHANCED_CONVERSIONS_FOR_LEADS_ENABLED.
|
|
31
43
|
*/
|
|
32
44
|
export default class GoogleAdsProvider extends ConversionUploadProvider {
|
|
33
45
|
public override readonly key: string = "google";
|
|
@@ -49,9 +61,14 @@ export default class GoogleAdsProvider extends ConversionUploadProvider {
|
|
|
49
61
|
protected override getProviderSkipReason(
|
|
50
62
|
conversion: MarketingConversion,
|
|
51
63
|
): ConversionSkip | null {
|
|
52
|
-
if (
|
|
64
|
+
if (
|
|
65
|
+
!this.getGoogleClickId(conversion) &&
|
|
66
|
+
!this.canUploadAsLead(conversion)
|
|
67
|
+
) {
|
|
53
68
|
return {
|
|
54
|
-
reason:
|
|
69
|
+
reason: GoogleAdsEnhancedConversionsForLeadsEnabled
|
|
70
|
+
? "No Google click id (gclid/wbraid/gbraid) and no email to match on"
|
|
71
|
+
: "No Google click id (gclid/wbraid/gbraid)",
|
|
55
72
|
isPermanent: true,
|
|
56
73
|
};
|
|
57
74
|
}
|
|
@@ -94,10 +111,49 @@ export default class GoogleAdsProvider extends ConversionUploadProvider {
|
|
|
94
111
|
return null;
|
|
95
112
|
}
|
|
96
113
|
|
|
114
|
+
/*
|
|
115
|
+
* Enhanced conversions for leads: this conversion has no click id, but it
|
|
116
|
+
* has an email and the account is configured to match on one.
|
|
117
|
+
*/
|
|
118
|
+
private canUploadAsLead(conversion: MarketingConversion): boolean {
|
|
119
|
+
return Boolean(
|
|
120
|
+
GoogleAdsEnhancedConversionsForLeadsEnabled &&
|
|
121
|
+
this.getHashedEmail(conversion),
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/*
|
|
126
|
+
* userIdentifiers per the enhanced-conversions spec. FIRST_PARTY is the
|
|
127
|
+
* correct source: the address was given to OneUptime directly, not bought or
|
|
128
|
+
* inferred.
|
|
129
|
+
*/
|
|
130
|
+
private getUserIdentifiers(
|
|
131
|
+
conversion: MarketingConversion,
|
|
132
|
+
): Array<JSONObject> {
|
|
133
|
+
const hashedEmail: string | undefined = this.getHashedEmail(conversion);
|
|
134
|
+
|
|
135
|
+
if (!hashedEmail) {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return [
|
|
140
|
+
{
|
|
141
|
+
hashedEmail: hashedEmail,
|
|
142
|
+
userIdentifierSource: "FIRST_PARTY",
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
}
|
|
146
|
+
|
|
97
147
|
private getConversionActionId(conversion: MarketingConversion): string {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
:
|
|
148
|
+
const mapping: ConversionTypeMapping<string> = {
|
|
149
|
+
[MarketingConversionType.SignUp]: GoogleAdsSignUpConversionActionId,
|
|
150
|
+
[MarketingConversionType.MeetingBooked]:
|
|
151
|
+
GoogleAdsMeetingBookedConversionActionId,
|
|
152
|
+
[MarketingConversionType.PaidSubscription]:
|
|
153
|
+
GoogleAdsPaidSubscriptionConversionActionId,
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
return this.resolveByConversionType(conversion, mapping) || "";
|
|
101
157
|
}
|
|
102
158
|
|
|
103
159
|
private async getAccessToken(): Promise<string> {
|
|
@@ -174,6 +230,13 @@ export default class GoogleAdsProvider extends ConversionUploadProvider {
|
|
|
174
230
|
),
|
|
175
231
|
};
|
|
176
232
|
|
|
233
|
+
const userIdentifiers: Array<JSONObject> =
|
|
234
|
+
this.getUserIdentifiers(conversion);
|
|
235
|
+
|
|
236
|
+
if (userIdentifiers.length > 0) {
|
|
237
|
+
payload["userIdentifiers"] = userIdentifiers;
|
|
238
|
+
}
|
|
239
|
+
|
|
177
240
|
const valueInUSD: number | undefined = this.getValueInUSD(conversion);
|
|
178
241
|
|
|
179
242
|
if (valueInUSD !== undefined) {
|
|
@@ -2,14 +2,17 @@ import axios, { AxiosError } from "axios";
|
|
|
2
2
|
import {
|
|
3
3
|
LinkedInApiVersion,
|
|
4
4
|
LinkedInConversionsAccessToken,
|
|
5
|
+
LinkedInMeetingBookedConversionId,
|
|
5
6
|
LinkedInPaidSubscriptionConversionId,
|
|
6
7
|
LinkedInSignUpConversionId,
|
|
7
8
|
} from "../../../EnvironmentConfig";
|
|
8
9
|
import ConversionUploadProvider, {
|
|
9
10
|
ConversionSkip,
|
|
11
|
+
ConversionTypeMapping,
|
|
10
12
|
ConversionUploadBatchResult,
|
|
11
13
|
} from "../ConversionUploadProvider";
|
|
12
14
|
import { JSONObject } from "../../../../Types/JSON";
|
|
15
|
+
import { MarketingConversionType } from "../../../../Types/Marketing/MarketingConversion";
|
|
13
16
|
import MarketingConversion from "../../../../Models/DatabaseModels/MarketingConversion";
|
|
14
17
|
|
|
15
18
|
const REQUEST_TIMEOUT_MS: number = 30000;
|
|
@@ -18,11 +21,12 @@ const REQUEST_TIMEOUT_MS: number = 30000;
|
|
|
18
21
|
const LINKEDIN_MAX_CONVERSION_AGE_IN_DAYS: number = 90;
|
|
19
22
|
|
|
20
23
|
/*
|
|
21
|
-
* LinkedIn Conversions API (api.linkedin.com/rest/conversionEvents)
|
|
22
|
-
* the li_fat_id first-party click id
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* LinkedIn Conversions API (api.linkedin.com/rest/conversionEvents) matching
|
|
25
|
+
* on the li_fat_id first-party click id, a SHA-256 email, or both — LinkedIn
|
|
26
|
+
* accepts several userIds and resolves whichever it can. Conversion rules are
|
|
27
|
+
* referenced by urn:lla:llaPartnerConversion:{id}. Events are posted one at a
|
|
28
|
+
* time (small volumes); auth-level failures abort the batch for retry, other
|
|
29
|
+
* per-event rejections are recorded as permanent.
|
|
26
30
|
*
|
|
27
31
|
* Note: LinkedIn access tokens expire (typically 60 days) — the token in
|
|
28
32
|
* LINKEDIN_CONVERSIONS_ACCESS_TOKEN must be rotated externally.
|
|
@@ -44,9 +48,9 @@ export default class LinkedInProvider extends ConversionUploadProvider {
|
|
|
44
48
|
protected override getProviderSkipReason(
|
|
45
49
|
conversion: MarketingConversion,
|
|
46
50
|
): ConversionSkip | null {
|
|
47
|
-
if (
|
|
51
|
+
if (this.getUserIds(conversion).length === 0) {
|
|
48
52
|
return {
|
|
49
|
-
reason: "No LinkedIn click id (li_fat_id)",
|
|
53
|
+
reason: "No LinkedIn click id (li_fat_id) and no email to match on",
|
|
50
54
|
isPermanent: true,
|
|
51
55
|
};
|
|
52
56
|
}
|
|
@@ -71,9 +75,48 @@ export default class LinkedInProvider extends ConversionUploadProvider {
|
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
private getConversionRuleId(conversion: MarketingConversion): string {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
:
|
|
78
|
+
const mapping: ConversionTypeMapping<string> = {
|
|
79
|
+
[MarketingConversionType.SignUp]: LinkedInSignUpConversionId,
|
|
80
|
+
[MarketingConversionType.MeetingBooked]:
|
|
81
|
+
LinkedInMeetingBookedConversionId,
|
|
82
|
+
[MarketingConversionType.PaidSubscription]:
|
|
83
|
+
LinkedInPaidSubscriptionConversionId,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return this.resolveByConversionType(conversion, mapping) || "";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* Every identifier LinkedIn can resolve this person by. Sending both when
|
|
91
|
+
* both exist raises the match rate; sending only the email is how a demo
|
|
92
|
+
* booked on one device and a licence signed on another are still joined to
|
|
93
|
+
* the click that started it.
|
|
94
|
+
*/
|
|
95
|
+
private getUserIds(conversion: MarketingConversion): Array<JSONObject> {
|
|
96
|
+
const userIds: Array<JSONObject> = [];
|
|
97
|
+
|
|
98
|
+
const clickId: string | undefined = this.getClickId(
|
|
99
|
+
conversion,
|
|
100
|
+
"li_fat_id",
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
if (clickId) {
|
|
104
|
+
userIds.push({
|
|
105
|
+
idType: "LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID",
|
|
106
|
+
idValue: clickId,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const hashedEmail: string | undefined = this.getHashedEmail(conversion);
|
|
111
|
+
|
|
112
|
+
if (hashedEmail) {
|
|
113
|
+
userIds.push({
|
|
114
|
+
idType: "SHA256_EMAIL",
|
|
115
|
+
idValue: hashedEmail,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return userIds;
|
|
77
120
|
}
|
|
78
121
|
|
|
79
122
|
public override async upload(
|
|
@@ -92,12 +135,7 @@ export default class LinkedInProvider extends ConversionUploadProvider {
|
|
|
92
135
|
// Dedup key: a retried batch must not double-count conversions.
|
|
93
136
|
eventId: conversion.id!.toString(),
|
|
94
137
|
user: {
|
|
95
|
-
userIds:
|
|
96
|
-
{
|
|
97
|
-
idType: "LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID",
|
|
98
|
-
idValue: this.getClickId(conversion, "li_fat_id") || "",
|
|
99
|
-
},
|
|
100
|
-
],
|
|
138
|
+
userIds: this.getUserIds(conversion),
|
|
101
139
|
},
|
|
102
140
|
};
|
|
103
141
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import axios, { AxiosResponse } from "axios";
|
|
2
|
-
import crypto from "crypto";
|
|
3
2
|
import {
|
|
4
3
|
MetaConversionsAccessToken,
|
|
5
4
|
MetaConversionsPixelId,
|
|
@@ -7,9 +6,11 @@ import {
|
|
|
7
6
|
} from "../../../EnvironmentConfig";
|
|
8
7
|
import ConversionUploadProvider, {
|
|
9
8
|
ConversionSkip,
|
|
9
|
+
ConversionTypeMapping,
|
|
10
10
|
ConversionUploadBatchResult,
|
|
11
11
|
} from "../ConversionUploadProvider";
|
|
12
12
|
import { JSONObject } from "../../../../Types/JSON";
|
|
13
|
+
import { MarketingConversionType } from "../../../../Types/Marketing/MarketingConversion";
|
|
13
14
|
import MarketingConversion from "../../../../Models/DatabaseModels/MarketingConversion";
|
|
14
15
|
|
|
15
16
|
const REQUEST_TIMEOUT_MS: number = 30000;
|
|
@@ -23,6 +24,11 @@ const META_MAX_EVENT_AGE_IN_DAYS: number = 7;
|
|
|
23
24
|
* per Meta's customer-information matching spec; the raw email never leaves
|
|
24
25
|
* OneUptime. event_id is the conversion row id, so Meta deduplicates
|
|
25
26
|
* retried uploads (and browser-pixel duplicates) server-side.
|
|
27
|
+
*
|
|
28
|
+
* An event is uploadable with a click id, a hashed email, or both — Meta
|
|
29
|
+
* matches on either. Requiring fbclid, as this provider used to, discarded
|
|
30
|
+
* every conversion whose click id had not survived to the moment of
|
|
31
|
+
* conversion, which is most of a sales-led funnel.
|
|
26
32
|
*/
|
|
27
33
|
export default class MetaProvider extends ConversionUploadProvider {
|
|
28
34
|
public override readonly key: string = "meta";
|
|
@@ -35,9 +41,19 @@ export default class MetaProvider extends ConversionUploadProvider {
|
|
|
35
41
|
protected override getProviderSkipReason(
|
|
36
42
|
conversion: MarketingConversion,
|
|
37
43
|
): ConversionSkip | null {
|
|
38
|
-
if (
|
|
44
|
+
if (
|
|
45
|
+
!this.getClickId(conversion, "fbclid") &&
|
|
46
|
+
!this.getHashedEmail(conversion)
|
|
47
|
+
) {
|
|
39
48
|
return {
|
|
40
|
-
reason: "No Meta click id (fbclid)",
|
|
49
|
+
reason: "No Meta click id (fbclid) and no email to match on",
|
|
50
|
+
isPermanent: true,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!this.getEventName(conversion)) {
|
|
55
|
+
return {
|
|
56
|
+
reason: "No Meta event name mapped for this conversion type",
|
|
41
57
|
isPermanent: true,
|
|
42
58
|
};
|
|
43
59
|
}
|
|
@@ -52,11 +68,19 @@ export default class MetaProvider extends ConversionUploadProvider {
|
|
|
52
68
|
return null;
|
|
53
69
|
}
|
|
54
70
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
/*
|
|
72
|
+
* Standard Meta event names. `Schedule` is Meta's own name for a booked
|
|
73
|
+
* meeting, and it carries no revenue — which is what keeps a demo out of the
|
|
74
|
+
* Purchase optimisation pool.
|
|
75
|
+
*/
|
|
76
|
+
private getEventName(conversion: MarketingConversion): string | undefined {
|
|
77
|
+
const mapping: ConversionTypeMapping<string> = {
|
|
78
|
+
[MarketingConversionType.SignUp]: "CompleteRegistration",
|
|
79
|
+
[MarketingConversionType.MeetingBooked]: "Schedule",
|
|
80
|
+
[MarketingConversionType.PaidSubscription]: "Purchase",
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return this.resolveByConversionType(conversion, mapping);
|
|
60
84
|
}
|
|
61
85
|
|
|
62
86
|
/*
|
|
@@ -74,20 +98,28 @@ export default class MetaProvider extends ConversionUploadProvider {
|
|
|
74
98
|
const data: Array<JSONObject> = conversions.map(
|
|
75
99
|
(conversion: MarketingConversion) => {
|
|
76
100
|
const eventAt: Date = conversion.conversionAt || new Date();
|
|
77
|
-
const fbclid: string = this.getClickId(
|
|
101
|
+
const fbclid: string | undefined = this.getClickId(
|
|
102
|
+
conversion,
|
|
103
|
+
"fbclid",
|
|
104
|
+
);
|
|
78
105
|
|
|
79
|
-
const userData: JSONObject = {
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
const userData: JSONObject = {};
|
|
107
|
+
|
|
108
|
+
// Only send fbc when there is a click id to build it from.
|
|
109
|
+
if (fbclid) {
|
|
110
|
+
userData["fbc"] = this.buildFbc(fbclid, eventAt);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const hashedEmail: string | undefined = this.getHashedEmail(conversion);
|
|
82
114
|
|
|
83
|
-
if (
|
|
84
|
-
userData["em"] = [
|
|
115
|
+
if (hashedEmail) {
|
|
116
|
+
userData["em"] = [hashedEmail];
|
|
85
117
|
}
|
|
86
118
|
|
|
87
|
-
const
|
|
119
|
+
const eventName: string = this.getEventName(conversion) || "Lead";
|
|
88
120
|
|
|
89
121
|
const payload: JSONObject = {
|
|
90
|
-
event_name:
|
|
122
|
+
event_name: eventName,
|
|
91
123
|
event_time: Math.floor(eventAt.getTime() / 1000),
|
|
92
124
|
event_id: conversion.id!.toString(),
|
|
93
125
|
/*
|
|
@@ -104,9 +136,11 @@ export default class MetaProvider extends ConversionUploadProvider {
|
|
|
104
136
|
/*
|
|
105
137
|
* Purchase events REQUIRE custom_data.value and currency — one
|
|
106
138
|
* valueless Purchase (custom-pricing plan) would 400 the entire
|
|
107
|
-
* batch. Send 0 when the value is unknown.
|
|
139
|
+
* batch. Send 0 when the value is unknown. Lead-shaped events
|
|
140
|
+
* (Schedule, Lead) never carry a value: getValueInUSD returns
|
|
141
|
+
* undefined for them, so no custom_data is attached at all.
|
|
108
142
|
*/
|
|
109
|
-
if (
|
|
143
|
+
if (eventName === "Purchase" || valueInUSD !== undefined) {
|
|
110
144
|
payload["custom_data"] = {
|
|
111
145
|
value: valueInUSD ?? 0,
|
|
112
146
|
currency: "USD",
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
MicrosoftAdsAccountId,
|
|
4
4
|
MicrosoftAdsCustomerId,
|
|
5
5
|
MicrosoftAdsDeveloperToken,
|
|
6
|
+
MicrosoftAdsMeetingBookedConversionName,
|
|
6
7
|
MicrosoftAdsOAuthClientId,
|
|
7
8
|
MicrosoftAdsOAuthClientSecret,
|
|
8
9
|
MicrosoftAdsOAuthRefreshToken,
|
|
@@ -11,9 +12,11 @@ import {
|
|
|
11
12
|
} from "../../../EnvironmentConfig";
|
|
12
13
|
import ConversionUploadProvider, {
|
|
13
14
|
ConversionSkip,
|
|
15
|
+
ConversionTypeMapping,
|
|
14
16
|
ConversionUploadBatchResult,
|
|
15
17
|
} from "../ConversionUploadProvider";
|
|
16
18
|
import { JSONObject } from "../../../../Types/JSON";
|
|
19
|
+
import { MarketingConversionType } from "../../../../Types/Marketing/MarketingConversion";
|
|
17
20
|
import MarketingConversion from "../../../../Models/DatabaseModels/MarketingConversion";
|
|
18
21
|
|
|
19
22
|
const REQUEST_TIMEOUT_MS: number = 30000;
|
|
@@ -23,10 +26,11 @@ const MICROSOFT_MAX_CONVERSION_AGE_IN_DAYS: number = 90;
|
|
|
23
26
|
|
|
24
27
|
/*
|
|
25
28
|
* Microsoft Advertising (Bing Ads) offline conversions via the Campaign
|
|
26
|
-
* Management v13 REST surface (OfflineConversions/Apply)
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* identity platform with the
|
|
29
|
+
* Management v13 REST surface (OfflineConversions/Apply), matching on msclkid
|
|
30
|
+
* or on a SHA-256 email (Microsoft's enhanced conversions). Offline conversion
|
|
31
|
+
* goals are matched by conversion NAME configured in the Microsoft Advertising
|
|
32
|
+
* UI. OAuth2 refresh-token flow against Microsoft identity platform with the
|
|
33
|
+
* msads.manage scope.
|
|
30
34
|
*/
|
|
31
35
|
export default class MicrosoftAdsProvider extends ConversionUploadProvider {
|
|
32
36
|
public override readonly key: string = "microsoft";
|
|
@@ -48,9 +52,12 @@ export default class MicrosoftAdsProvider extends ConversionUploadProvider {
|
|
|
48
52
|
protected override getProviderSkipReason(
|
|
49
53
|
conversion: MarketingConversion,
|
|
50
54
|
): ConversionSkip | null {
|
|
51
|
-
if (
|
|
55
|
+
if (
|
|
56
|
+
!this.getClickId(conversion, "msclkid") &&
|
|
57
|
+
!this.getHashedEmail(conversion)
|
|
58
|
+
) {
|
|
52
59
|
return {
|
|
53
|
-
reason: "No Microsoft click id (msclkid)",
|
|
60
|
+
reason: "No Microsoft click id (msclkid) and no email to match on",
|
|
54
61
|
isPermanent: true,
|
|
55
62
|
};
|
|
56
63
|
}
|
|
@@ -77,9 +84,15 @@ export default class MicrosoftAdsProvider extends ConversionUploadProvider {
|
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
private getConversionName(conversion: MarketingConversion): string {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
:
|
|
87
|
+
const mapping: ConversionTypeMapping<string> = {
|
|
88
|
+
[MarketingConversionType.SignUp]: MicrosoftAdsSignUpConversionName,
|
|
89
|
+
[MarketingConversionType.MeetingBooked]:
|
|
90
|
+
MicrosoftAdsMeetingBookedConversionName,
|
|
91
|
+
[MarketingConversionType.PaidSubscription]:
|
|
92
|
+
MicrosoftAdsPaidSubscriptionConversionName,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
return this.resolveByConversionType(conversion, mapping) || "";
|
|
83
96
|
}
|
|
84
97
|
|
|
85
98
|
private async getAccessToken(): Promise<string> {
|
|
@@ -137,7 +150,6 @@ export default class MicrosoftAdsProvider extends ConversionUploadProvider {
|
|
|
137
150
|
const body: JSONObject = {
|
|
138
151
|
OfflineConversions: conversions.map((conversion: MarketingConversion) => {
|
|
139
152
|
const payload: JSONObject = {
|
|
140
|
-
MicrosoftClickId: this.getClickId(conversion, "msclkid") || "",
|
|
141
153
|
ConversionName: this.getConversionName(conversion),
|
|
142
154
|
// ISO 8601 UTC, e.g. 2026-07-18T12:34:56Z.
|
|
143
155
|
ConversionTime: (conversion.conversionAt || new Date())
|
|
@@ -145,6 +157,21 @@ export default class MicrosoftAdsProvider extends ConversionUploadProvider {
|
|
|
145
157
|
.replace(/\.\d{3}Z$/, "Z"),
|
|
146
158
|
};
|
|
147
159
|
|
|
160
|
+
const clickId: string | undefined = this.getClickId(
|
|
161
|
+
conversion,
|
|
162
|
+
"msclkid",
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
if (clickId) {
|
|
166
|
+
payload["MicrosoftClickId"] = clickId;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const hashedEmail: string | undefined = this.getHashedEmail(conversion);
|
|
170
|
+
|
|
171
|
+
if (hashedEmail) {
|
|
172
|
+
payload["HashedEmailAddress"] = hashedEmail;
|
|
173
|
+
}
|
|
174
|
+
|
|
148
175
|
const valueInUSD: number | undefined = this.getValueInUSD(conversion);
|
|
149
176
|
|
|
150
177
|
if (valueInUSD !== undefined) {
|