@oneuptime/common 14.0.94 → 14.0.96
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/ExceptionInstance.d.mts +2 -0
- package/Models/AnalyticsModels/ExceptionInstance.d.ts +2 -0
- package/Models/AnalyticsModels/ExceptionInstance.js +7 -0
- package/Models/AnalyticsModels/Log.d.mts +2 -0
- package/Models/AnalyticsModels/Log.d.ts +2 -0
- package/Models/AnalyticsModels/Log.js +7 -0
- package/Models/AnalyticsModels/SecurityEvent.d.mts +8 -0
- package/Models/AnalyticsModels/SecurityEvent.d.ts +8 -0
- package/Models/AnalyticsModels/SecurityEvent.js +55 -0
- package/Models/AnalyticsModels/Span.d.mts +4 -0
- package/Models/AnalyticsModels/Span.d.ts +4 -0
- package/Models/AnalyticsModels/Span.js +63 -0
- package/Models/DatabaseModels/CustomNotificationChannel.d.mts +16 -0
- package/Models/DatabaseModels/CustomNotificationChannel.d.ts +16 -0
- package/Models/DatabaseModels/CustomNotificationChannel.js +337 -0
- package/Models/DatabaseModels/CustomNotificationChannel.mjs +2 -0
- package/Models/DatabaseModels/DashboardPlaylist.d.mts +16 -0
- package/Models/DatabaseModels/DashboardPlaylist.d.ts +16 -0
- package/Models/DatabaseModels/DashboardPlaylist.js +314 -0
- package/Models/DatabaseModels/DashboardPlaylist.mjs +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +14 -37
- package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.mts +1 -0
- package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.ts +1 -0
- package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.js +27 -3
- package/Models/DatabaseModels/DetectionRuleException.d.mts +25 -0
- package/Models/DatabaseModels/DetectionRuleException.d.ts +25 -0
- package/Models/DatabaseModels/DetectionRuleException.js +412 -0
- package/Models/DatabaseModels/DetectionRuleException.mjs +2 -0
- package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
- package/Models/DatabaseModels/GlobalConfig.js +107 -0
- package/Models/DatabaseModels/Index.js +8 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +40 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.d.mts +21 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.d.ts +21 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.js +357 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.mjs +2 -0
- package/Models/DatabaseModels/TeamComplianceSetting.js +2 -2
- package/Models/DatabaseModels/TeamPermission.js +5 -7
- package/Models/DatabaseModels/UserNotificationRule.d.mts +3 -0
- package/Models/DatabaseModels/UserNotificationRule.d.ts +3 -0
- package/Models/DatabaseModels/UserNotificationRule.js +67 -0
- package/Models/DatabaseModels/UserNotificationSetting.d.mts +1 -0
- package/Models/DatabaseModels/UserNotificationSetting.d.ts +1 -0
- package/Models/DatabaseModels/UserNotificationSetting.js +26 -0
- package/Models/DatabaseModels/UserOnCallLogTimeline.d.mts +3 -0
- package/Models/DatabaseModels/UserOnCallLogTimeline.d.ts +3 -0
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +53 -0
- package/Types/AI/AIChatPermissionMode.js +11 -5
- package/Types/AI/ResourceCardFacts.d.mts +11 -0
- package/Types/AI/ResourceCardFacts.d.ts +11 -0
- package/Types/AI/ResourceCardFacts.js +80 -0
- package/Types/AI/ResourceCardFacts.mjs +4 -0
- package/Types/AnalyticsDatabase/TableColumn.d.mts +4 -0
- package/Types/AnalyticsDatabase/TableColumn.d.ts +4 -0
- package/Types/AnalyticsDatabase/TableColumn.js +7 -0
- package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.mts +2 -0
- package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.ts +2 -0
- package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.js +4 -0
- package/Types/Backup/BackupDestinationCatalog.d.mts +2 -0
- package/Types/Backup/BackupDestinationCatalog.d.ts +2 -0
- package/Types/Backup/BackupDestinationCatalog.js +8 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.mts +25 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.ts +25 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.js +86 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.mjs +6 -0
- package/Types/CallAndSMS/CallAndSmsProvider.d.mts +23 -0
- package/Types/CallAndSMS/CallAndSmsProvider.d.ts +23 -0
- package/Types/CallAndSMS/CallAndSmsProvider.js +107 -0
- package/Types/CallAndSMS/CallAndSmsProvider.mjs +7 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.mts +2 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.ts +2 -0
- package/Types/CloudConnection/CloudConnectionCatalog.js +4 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +95 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +95 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +236 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +16 -0
- package/Types/Dashboard/DashboardPlaylist.d.mts +21 -0
- package/Types/Dashboard/DashboardPlaylist.d.ts +21 -0
- package/Types/Dashboard/DashboardPlaylist.js +197 -0
- package/Types/Dashboard/DashboardPlaylist.mjs +19 -0
- package/Types/Database/TableColumn.d.mts +8 -0
- package/Types/Database/TableColumn.d.ts +8 -0
- package/Types/Database/TableColumn.js +69 -23
- package/Types/Database/TableColumn.mjs +1 -0
- package/Types/HeldPermissions.d.mts +2 -0
- package/Types/HeldPermissions.d.ts +2 -0
- package/Types/HeldPermissions.js +32 -8
- package/Types/Icon/IconProp.d.mts +3 -0
- package/Types/Icon/IconProp.d.ts +3 -0
- package/Types/Icon/IconProp.js +4 -0
- package/Types/JSONFunctions.js +16 -1
- package/Types/LlmObservability/LlmConnectionCatalog.d.mts +2 -0
- package/Types/LlmObservability/LlmConnectionCatalog.d.ts +2 -0
- package/Types/LlmObservability/LlmConnectionCatalog.js +8 -0
- package/Types/Monitor/MonitorType.js +5 -4
- package/Types/Monitor/TelemetryAlertRule.d.mts +111 -0
- package/Types/Monitor/TelemetryAlertRule.d.ts +111 -0
- package/Types/Monitor/TelemetryAlertRule.js +886 -0
- package/Types/Monitor/TelemetryAlertRule.mjs +5 -0
- package/Types/Monitor/TelemetryRulePreview.d.mts +57 -0
- package/Types/Monitor/TelemetryRulePreview.d.ts +57 -0
- package/Types/Monitor/TelemetryRulePreview.js +190 -0
- package/Types/Monitor/TelemetryRulePreview.mjs +6 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.d.mts +23 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.d.ts +23 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.js +105 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.mjs +9 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.mts +3 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +3 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +23 -8
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.mts +47 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.ts +47 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.js +122 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.mjs +12 -0
- package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.mts +2 -1
- package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.ts +2 -1
- package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.js +10 -1
- package/Types/Permission.d.mts +10 -0
- package/Types/Permission.d.ts +10 -0
- package/Types/Permission.js +83 -19
- package/Types/ProviderLogo/ProviderLogo.d.mts +87 -0
- package/Types/ProviderLogo/ProviderLogo.d.ts +87 -0
- package/Types/ProviderLogo/ProviderLogo.js +215 -0
- package/Types/ProviderLogo/ProviderLogo.mjs +6 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.d.mts +3 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.d.ts +3 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.js +32 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.mjs +4 -0
- package/Types/RollingTime/RollingTimeUtil.js +20 -10
- package/Types/Runbook/RunbookTriggerType.d.mts +2 -1
- package/Types/Runbook/RunbookTriggerType.d.ts +2 -1
- package/Types/Runbook/RunbookTriggerType.js +5 -1
- package/Types/SecurityCase/SecurityCaseContext.d.mts +188 -0
- package/Types/SecurityCase/SecurityCaseContext.d.ts +188 -0
- package/Types/SecurityCase/SecurityCaseContext.js +165 -0
- package/Types/SecurityCase/SecurityCaseContext.mjs +30 -0
- package/Types/SecurityCase/SecurityEntityRisk.d.mts +11 -0
- package/Types/SecurityCase/SecurityEntityRisk.d.ts +11 -0
- package/Types/SecurityCase/SecurityEntityRisk.js +9 -1
- package/Types/SecurityCase/SecurityEntityRisk.mjs +1 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +9 -0
- package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.mts +2 -0
- package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.ts +2 -0
- package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.js +5 -0
- package/Types/SecurityEvent/DetectionRetrohunt.d.mts +38 -0
- package/Types/SecurityEvent/DetectionRetrohunt.d.ts +38 -0
- package/Types/SecurityEvent/DetectionRetrohunt.js +147 -0
- package/Types/SecurityEvent/DetectionRetrohunt.mjs +10 -0
- package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +5 -1
- package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +5 -1
- package/Types/SecurityEvent/DetectionRuleDataKind.js +42 -0
- package/Types/SecurityEvent/DetectionRuleException.d.mts +65 -0
- package/Types/SecurityEvent/DetectionRuleException.d.ts +65 -0
- package/Types/SecurityEvent/DetectionRuleException.js +441 -0
- package/Types/SecurityEvent/DetectionRuleException.mjs +24 -0
- package/Types/SecurityEvent/DetectionRuleLibrary.js +330 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.d.mts +5 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.d.ts +5 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.d.mts +31 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.d.ts +31 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.js +81 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.mjs +8 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.d.mts +28 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.d.ts +28 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.js +78 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.mjs +6 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.d.mts +39 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.d.ts +39 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.js +127 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.mjs +12 -0
- package/Types/SecurityEvent/TurnOnRecommended.d.mts +2 -0
- package/Types/SecurityEvent/TurnOnRecommended.d.ts +2 -0
- package/Types/SecurityEvent/TurnOnRecommended.js +7 -0
- package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +7 -1
- package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +7 -1
- package/Types/SecurityPlaybook/SecurityPlaybookAction.js +46 -0
- package/Types/SecurityPlaybook/SecurityPlaybookAction.mjs +1 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +10 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +10 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.js +37 -1
- package/Types/SecurityPlaybook/SecurityPlaybookStep.mjs +1 -0
- package/Types/SecurityPlaybook/SecurityPlaybookTemplates.js +17 -0
- package/Types/Team/ComplianceNotificationChannel.d.mts +2 -1
- package/Types/Team/ComplianceNotificationChannel.d.ts +2 -1
- package/Types/Team/ComplianceNotificationChannel.js +10 -1
- package/Types/Team/ComplianceRule.d.mts +8 -3
- package/Types/Team/ComplianceRule.d.ts +8 -3
- package/Types/Team/ComplianceRule.js +34 -22
- package/Types/Team/TeamComplianceStatus.d.mts +1 -0
- package/Types/Team/TeamComplianceStatus.d.ts +1 -0
- package/Types/Telemetry/OpenTelemetryGuides.d.mts +52 -0
- package/Types/Telemetry/OpenTelemetryGuides.d.ts +52 -0
- package/Types/Telemetry/OpenTelemetryGuides.js +419 -0
- package/Types/Telemetry/OpenTelemetryGuides.mjs +17 -0
- package/Types/Telemetry/TelemetrySavedViewState.d.mts +1 -0
- package/Types/Telemetry/TelemetrySavedViewState.d.ts +1 -0
- package/Types/Telemetry/TraceHealth.d.mts +24 -0
- package/Types/Telemetry/TraceHealth.d.ts +24 -0
- package/Types/Telemetry/TraceHealth.js +97 -0
- package/Types/Telemetry/TraceHealth.mjs +4 -0
- package/Types/Telemetry/TraceSpanType.d.mts +90 -0
- package/Types/Telemetry/TraceSpanType.d.ts +90 -0
- package/Types/Telemetry/TraceSpanType.js +238 -0
- package/Types/Telemetry/TraceSpanType.mjs +19 -0
- package/Types/Theme/ThemePreference.d.mts +26 -0
- package/Types/Theme/ThemePreference.d.ts +26 -0
- package/Types/Theme/ThemePreference.js +104 -0
- package/Types/Theme/ThemePreference.mjs +12 -0
- package/Types/Workflow/Component.d.mts +3 -0
- package/Types/Workflow/Component.d.ts +3 -0
- package/Types/Workflow/Components/Discord.js +2 -0
- package/Types/Workflow/Components/Mattermost.js +2 -0
- package/Types/Workflow/Components/MicrosoftTeams.js +2 -0
- package/Types/Workflow/Components/Slack.js +2 -0
- package/Types/Workflow/Components/Telegram.js +2 -0
- package/Types/Workflow/Components.js +6 -0
- package/Types/Workflow/Templates.js +5 -3
- package/Utils/ColorContrast.d.mts +0 -3
- package/Utils/ColorContrast.d.ts +0 -3
- package/Utils/ColorContrast.js +3 -41
- package/Utils/ColorContrast.mjs +0 -2
- package/Utils/NameInitials.d.mts +5 -0
- package/Utils/NameInitials.d.ts +5 -0
- package/Utils/NameInitials.js +92 -0
- package/Utils/NameInitials.mjs +6 -0
- package/Utils/OldestKeyCursor.d.mts +7 -0
- package/Utils/OldestKeyCursor.d.ts +7 -0
- package/Utils/OldestKeyCursor.js +68 -0
- package/Utils/OldestKeyCursor.mjs +2 -0
- package/Utils/Schema/OpenApiMetadataRegistry.d.mts +4 -0
- package/Utils/Schema/OpenApiMetadataRegistry.d.ts +4 -0
- package/Utils/Schema/OpenApiMetadataRegistry.js +20 -0
- package/Utils/Schema/OpenApiMetadataRegistry.mjs +2 -0
- package/Utils/Schema/Zod.js +6 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.d.mts +41 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.d.ts +41 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.js +215 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.mjs +6 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.d.mts +46 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.d.ts +46 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.js +327 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.mjs +17 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +5 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +5 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +22 -2
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +2 -0
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.mts +20 -0
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.ts +20 -0
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.js +347 -31
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.mjs +11 -0
- package/Utils/SecurityEvent/RequestFollowUp.d.mts +4 -0
- package/Utils/SecurityEvent/RequestFollowUp.d.ts +4 -0
- package/Utils/SecurityEvent/RequestFollowUp.js +127 -0
- package/Utils/SecurityEvent/RequestFollowUp.mjs +3 -0
- package/Utils/SecurityEvent/RequestOutcome.d.mts +80 -0
- package/Utils/SecurityEvent/RequestOutcome.d.ts +80 -0
- package/Utils/SecurityEvent/RequestOutcome.js +371 -0
- package/Utils/SecurityEvent/RequestOutcome.mjs +18 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.mts +76 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.ts +76 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.js +348 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.mjs +15 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.mts +61 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.ts +61 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.js +260 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.mjs +17 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.mts +30 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.ts +30 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.js +134 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.mjs +8 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.mts +40 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.ts +40 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.js +190 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.mjs +6 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.mts +57 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.ts +57 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.js +491 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.mjs +27 -0
- package/Utils/Telemetry/EntrySpan.d.mts +8 -0
- package/Utils/Telemetry/EntrySpan.d.ts +8 -0
- package/Utils/Telemetry/EntrySpan.js +53 -0
- package/Utils/Telemetry/EntrySpan.mjs +4 -0
- package/package.json +1 -1
|
@@ -90,16 +90,13 @@ class DatabaseBaseModel extends typeorm_1.BaseEntity {
|
|
|
90
90
|
this.id = id;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
/*
|
|
94
|
+
* The column lists below are made once per class (getTableColumnNames)
|
|
95
|
+
* and copied here, as each call used to build a fresh one.
|
|
96
|
+
*/
|
|
93
97
|
getHashedColumns() {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const columns = [];
|
|
97
|
-
for (const key in dictionary) {
|
|
98
|
-
if ((_a = dictionary[key]) === null || _a === void 0 ? void 0 : _a.hashed) {
|
|
99
|
-
columns.push(key);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return new Columns_1.default(columns);
|
|
98
|
+
const names = (0, TableColumn_1.getTableColumnNames)(this);
|
|
99
|
+
return new Columns_1.default([...names.hashed]);
|
|
103
100
|
}
|
|
104
101
|
getDisplayColumnPlaceholderAs(columnName) {
|
|
105
102
|
var _a;
|
|
@@ -114,18 +111,12 @@ class DatabaseBaseModel extends typeorm_1.BaseEntity {
|
|
|
114
111
|
return ((_a = (0, TableColumn_1.getTableColumn)(this, columnName)) === null || _a === void 0 ? void 0 : _a.description) || null;
|
|
115
112
|
}
|
|
116
113
|
getEncryptedColumns() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const columns = [];
|
|
120
|
-
for (const key in dictionary) {
|
|
121
|
-
if ((_a = dictionary[key]) === null || _a === void 0 ? void 0 : _a.encrypted) {
|
|
122
|
-
columns.push(key);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return new Columns_1.default(columns);
|
|
114
|
+
const names = (0, TableColumn_1.getTableColumnNames)(this);
|
|
115
|
+
return new Columns_1.default([...names.encrypted]);
|
|
126
116
|
}
|
|
127
117
|
getTableColumns() {
|
|
128
|
-
|
|
118
|
+
const names = (0, TableColumn_1.getTableColumnNames)(this);
|
|
119
|
+
return new Columns_1.default([...names.all]);
|
|
129
120
|
}
|
|
130
121
|
getFirstColorColumn() {
|
|
131
122
|
return (0, ColorField_1.getFirstColorFieldColumn)(this);
|
|
@@ -185,15 +176,8 @@ class DatabaseBaseModel extends typeorm_1.BaseEntity {
|
|
|
185
176
|
: null;
|
|
186
177
|
}
|
|
187
178
|
getUniqueColumns() {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const columns = [];
|
|
191
|
-
for (const key in dictionary) {
|
|
192
|
-
if ((_a = dictionary[key]) === null || _a === void 0 ? void 0 : _a.unique) {
|
|
193
|
-
columns.push(key);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return new Columns_1.default(columns);
|
|
179
|
+
const names = (0, TableColumn_1.getTableColumnNames)(this);
|
|
180
|
+
return new Columns_1.default([...names.unique]);
|
|
197
181
|
}
|
|
198
182
|
setSlugifyColumn(columnName) {
|
|
199
183
|
this.slugifyColumn = columnName;
|
|
@@ -219,15 +203,8 @@ class DatabaseBaseModel extends typeorm_1.BaseEntity {
|
|
|
219
203
|
return this.listOrder || null;
|
|
220
204
|
}
|
|
221
205
|
getRequiredColumns() {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
const columns = [];
|
|
225
|
-
for (const key in dictionary) {
|
|
226
|
-
if ((_a = dictionary[key]) === null || _a === void 0 ? void 0 : _a.required) {
|
|
227
|
-
columns.push(key);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return new Columns_1.default(columns);
|
|
206
|
+
const names = (0, TableColumn_1.getTableColumnNames)(this);
|
|
207
|
+
return new Columns_1.default([...names.required]);
|
|
231
208
|
}
|
|
232
209
|
getSlugifyColumn() {
|
|
233
210
|
return this.slugifyColumn;
|
|
@@ -8,5 +8,6 @@ export default class OnCallRuleBaseModel extends RuleBaseModel {
|
|
|
8
8
|
whenToPage?: OnCallRuleWhenToPage;
|
|
9
9
|
workingHours?: RestrictionTimes;
|
|
10
10
|
workingHoursTimezone?: Timezone;
|
|
11
|
+
aiHoldTimeInMinutes?: number;
|
|
11
12
|
getColumnAccessControlForAllColumns(): Dictionary<ColumnAccessControl>;
|
|
12
13
|
}
|
|
@@ -8,5 +8,6 @@ export default class OnCallRuleBaseModel extends RuleBaseModel {
|
|
|
8
8
|
whenToPage?: OnCallRuleWhenToPage;
|
|
9
9
|
workingHours?: RestrictionTimes;
|
|
10
10
|
workingHoursTimezone?: Timezone;
|
|
11
|
+
aiHoldTimeInMinutes?: number;
|
|
11
12
|
getColumnAccessControlForAllColumns(): Dictionary<ColumnAccessControl>;
|
|
12
13
|
}
|
|
@@ -29,8 +29,11 @@ const RuleBaseModel_1 = __importDefault(require("./RuleBaseModel"));
|
|
|
29
29
|
* (WorkingHours). A record that matches the rule outside its hours gets a
|
|
30
30
|
* run that waits, and pages when they begin (OnCallDutyPolicyRunWait).
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* An alert or incident rule can instead let OneUptime AI respond first, for
|
|
33
|
+
* at most its hold time (OnCallPolicyAiHold).
|
|
34
|
+
*
|
|
35
|
+
* The columns are the same on the four rules, so they are declared once,
|
|
36
|
+
* here. Like the criteria column, they take the concrete rule's table
|
|
34
37
|
* permissions: whoever may write the rule may say when it pages.
|
|
35
38
|
*/
|
|
36
39
|
class OnCallRuleBaseModel extends RuleBaseModel_1.default {
|
|
@@ -39,6 +42,12 @@ class OnCallRuleBaseModel extends RuleBaseModel_1.default {
|
|
|
39
42
|
this.whenToPage = undefined;
|
|
40
43
|
this.workingHours = undefined;
|
|
41
44
|
this.workingHoursTimezone = undefined;
|
|
45
|
+
/*
|
|
46
|
+
* How long OneUptime AI may hold a page, when When to Page is After
|
|
47
|
+
* OneUptime AI (OnCallPolicyAiHold). Empty is the default, 10 minutes;
|
|
48
|
+
* any value is read within 1 to 30 (getAiHoldTimeInMinutes).
|
|
49
|
+
*/
|
|
50
|
+
this.aiHoldTimeInMinutes = undefined;
|
|
42
51
|
}
|
|
43
52
|
getColumnAccessControlForAllColumns() {
|
|
44
53
|
const dictionary = Object.assign({}, super.getColumnAccessControlForAllColumns());
|
|
@@ -46,6 +55,7 @@ class OnCallRuleBaseModel extends RuleBaseModel_1.default {
|
|
|
46
55
|
"whenToPage",
|
|
47
56
|
"workingHours",
|
|
48
57
|
"workingHoursTimezone",
|
|
58
|
+
"aiHoldTimeInMinutes",
|
|
49
59
|
]) {
|
|
50
60
|
dictionary[column] = {
|
|
51
61
|
create: this.createRecordPermissions,
|
|
@@ -62,7 +72,7 @@ __decorate([
|
|
|
62
72
|
required: true,
|
|
63
73
|
type: TableColumnType_1.default.ShortText,
|
|
64
74
|
title: "When to Page",
|
|
65
|
-
description: "When the on-call policies of this rule page: Right Away, as soon as a record matches it
|
|
75
|
+
description: "When the on-call policies of this rule page: Right Away, as soon as a record matches it; Working Hours, only during the working hours of this rule - a record that matches it outside them is paged about when they begin; or After OneUptime AI, for alert and incident rules - when OneUptime AI may fix what the record is about, it responds first, and the policies page only if it has not resolved the record within the hold time.",
|
|
66
76
|
defaultValue: OnCallRuleWhenToPage_1.default.RightAway,
|
|
67
77
|
isDefaultValueColumn: true,
|
|
68
78
|
example: OnCallRuleWhenToPage_1.default.RightAway,
|
|
@@ -104,3 +114,17 @@ __decorate([
|
|
|
104
114
|
}),
|
|
105
115
|
__metadata("design:type", String)
|
|
106
116
|
], OnCallRuleBaseModel.prototype, "workingHoursTimezone", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, TableColumn_1.default)({
|
|
119
|
+
required: false,
|
|
120
|
+
type: TableColumnType_1.default.Number,
|
|
121
|
+
title: "OneUptime AI Hold Time In Minutes",
|
|
122
|
+
description: "When When to Page is After OneUptime AI: how many minutes OneUptime AI may hold the page while it investigates and fixes (1 to 30). Empty: 10. If OneUptime AI has not resolved the record by then, the policies page as usual.",
|
|
123
|
+
example: 10,
|
|
124
|
+
}),
|
|
125
|
+
(0, typeorm_1.Column)({
|
|
126
|
+
nullable: true,
|
|
127
|
+
type: ColumnType_1.default.Number,
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], OnCallRuleBaseModel.prototype, "aiHoldTimeInMinutes", void 0);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import DetectionRule from "./DetectionRule.mjs";
|
|
2
|
+
import Project from "./Project.mjs";
|
|
3
|
+
import User from "./User.mjs";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel.mjs";
|
|
5
|
+
import ObjectID from "../../Types/ObjectID.mjs";
|
|
6
|
+
import { SecurityEntityType } from "../../Types/SecurityCase/SecurityEntity.mjs";
|
|
7
|
+
import { DetectionRuleExceptionKind } from "../../Types/SecurityEvent/DetectionRuleException.mjs";
|
|
8
|
+
export default class DetectionRuleException extends BaseModel {
|
|
9
|
+
project?: Project;
|
|
10
|
+
projectId?: ObjectID;
|
|
11
|
+
detectionRule?: DetectionRule;
|
|
12
|
+
detectionRuleId?: ObjectID;
|
|
13
|
+
kind?: DetectionRuleExceptionKind;
|
|
14
|
+
entityType?: SecurityEntityType;
|
|
15
|
+
fieldName?: string;
|
|
16
|
+
value?: string;
|
|
17
|
+
startsAt?: Date;
|
|
18
|
+
endsAt?: Date;
|
|
19
|
+
reason?: string;
|
|
20
|
+
expiresAt?: Date;
|
|
21
|
+
createdByUser?: User;
|
|
22
|
+
createdByUserId?: ObjectID;
|
|
23
|
+
deletedByUser?: User;
|
|
24
|
+
deletedByUserId?: ObjectID;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import DetectionRule from "./DetectionRule";
|
|
2
|
+
import Project from "./Project";
|
|
3
|
+
import User from "./User";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
5
|
+
import ObjectID from "../../Types/ObjectID";
|
|
6
|
+
import { SecurityEntityType } from "../../Types/SecurityCase/SecurityEntity";
|
|
7
|
+
import { DetectionRuleExceptionKind } from "../../Types/SecurityEvent/DetectionRuleException";
|
|
8
|
+
export default class DetectionRuleException extends BaseModel {
|
|
9
|
+
project?: Project;
|
|
10
|
+
projectId?: ObjectID;
|
|
11
|
+
detectionRule?: DetectionRule;
|
|
12
|
+
detectionRuleId?: ObjectID;
|
|
13
|
+
kind?: DetectionRuleExceptionKind;
|
|
14
|
+
entityType?: SecurityEntityType;
|
|
15
|
+
fieldName?: string;
|
|
16
|
+
value?: string;
|
|
17
|
+
startsAt?: Date;
|
|
18
|
+
endsAt?: Date;
|
|
19
|
+
reason?: string;
|
|
20
|
+
expiresAt?: Date;
|
|
21
|
+
createdByUser?: User;
|
|
22
|
+
createdByUserId?: ObjectID;
|
|
23
|
+
deletedByUser?: User;
|
|
24
|
+
deletedByUserId?: ObjectID;
|
|
25
|
+
}
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const DetectionRule_1 = __importDefault(require("./DetectionRule"));
|
|
16
|
+
const Project_1 = __importDefault(require("./Project"));
|
|
17
|
+
const User_1 = __importDefault(require("./User"));
|
|
18
|
+
const DatabaseBaseModel_1 = __importDefault(require("./DatabaseBaseModel/DatabaseBaseModel"));
|
|
19
|
+
const Route_1 = __importDefault(require("../../Types/API/Route"));
|
|
20
|
+
const ColumnAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/ColumnAccessControl"));
|
|
21
|
+
const TableAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/TableAccessControl"));
|
|
22
|
+
const TableBillingAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/TableBillingAccessControl"));
|
|
23
|
+
const ColumnLength_1 = __importDefault(require("../../Types/Database/ColumnLength"));
|
|
24
|
+
const ColumnType_1 = __importDefault(require("../../Types/Database/ColumnType"));
|
|
25
|
+
const CrudApiEndpoint_1 = __importDefault(require("../../Types/Database/CrudApiEndpoint"));
|
|
26
|
+
const EnableAuditLog_1 = __importDefault(require("../../Types/Database/EnableAuditLog"));
|
|
27
|
+
const EnableDocumentation_1 = __importDefault(require("../../Types/Database/EnableDocumentation"));
|
|
28
|
+
const TableColumn_1 = __importDefault(require("../../Types/Database/TableColumn"));
|
|
29
|
+
const TableColumnType_1 = __importDefault(require("../../Types/Database/TableColumnType"));
|
|
30
|
+
const TableMetadata_1 = __importDefault(require("../../Types/Database/TableMetadata"));
|
|
31
|
+
const TenantColumn_1 = __importDefault(require("../../Types/Database/TenantColumn"));
|
|
32
|
+
const IconProp_1 = __importDefault(require("../../Types/Icon/IconProp"));
|
|
33
|
+
const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
|
|
34
|
+
const Permission_1 = __importDefault(require("../../Types/Permission"));
|
|
35
|
+
const SubscriptionPlan_1 = require("../../Types/Billing/SubscriptionPlan");
|
|
36
|
+
const SecurityEntity_1 = require("../../Types/SecurityCase/SecurityEntity");
|
|
37
|
+
const DetectionRuleException_1 = require("../../Types/SecurityEvent/DetectionRuleException");
|
|
38
|
+
const typeorm_1 = require("typeorm");
|
|
39
|
+
/*
|
|
40
|
+
* Something a detection rule skips: an entity, a value or a time window,
|
|
41
|
+
* with why it is safe to skip and, for an entity or a value, when the rule
|
|
42
|
+
* sees it again (Types/SecurityEvent/DetectionRuleException has the
|
|
43
|
+
* matching rules).
|
|
44
|
+
*
|
|
45
|
+
* An exception changes what a rule sees, so it is kept like the rule
|
|
46
|
+
* itself: whoever may edit detection rules adds, changes and removes
|
|
47
|
+
* exceptions, and every Security tier reads them - an exception is a blind
|
|
48
|
+
* spot, and the team must be able to see each one, who added it and why.
|
|
49
|
+
* Every change is audited.
|
|
50
|
+
*/
|
|
51
|
+
const readPermissions = [
|
|
52
|
+
Permission_1.default.ProjectOwner,
|
|
53
|
+
Permission_1.default.ProjectAdmin,
|
|
54
|
+
Permission_1.default.SecurityAdmin,
|
|
55
|
+
Permission_1.default.SecurityMember,
|
|
56
|
+
Permission_1.default.SecurityViewer,
|
|
57
|
+
Permission_1.default.ReadProjectDetectionRule,
|
|
58
|
+
];
|
|
59
|
+
const writePermissions = [
|
|
60
|
+
Permission_1.default.ProjectOwner,
|
|
61
|
+
Permission_1.default.ProjectAdmin,
|
|
62
|
+
Permission_1.default.SecurityAdmin,
|
|
63
|
+
Permission_1.default.SecurityMember,
|
|
64
|
+
Permission_1.default.EditProjectDetectionRule,
|
|
65
|
+
];
|
|
66
|
+
const editableColumnAccess = {
|
|
67
|
+
create: writePermissions,
|
|
68
|
+
read: readPermissions,
|
|
69
|
+
update: writePermissions,
|
|
70
|
+
};
|
|
71
|
+
let DetectionRuleException = class DetectionRuleException extends DatabaseBaseModel_1.default {
|
|
72
|
+
constructor() {
|
|
73
|
+
super(...arguments);
|
|
74
|
+
this.project = undefined;
|
|
75
|
+
this.projectId = undefined;
|
|
76
|
+
this.detectionRule = undefined;
|
|
77
|
+
this.detectionRuleId = undefined;
|
|
78
|
+
this.kind = undefined;
|
|
79
|
+
this.entityType = undefined;
|
|
80
|
+
this.fieldName = undefined;
|
|
81
|
+
this.value = undefined;
|
|
82
|
+
this.startsAt = undefined;
|
|
83
|
+
this.endsAt = undefined;
|
|
84
|
+
this.reason = undefined;
|
|
85
|
+
this.expiresAt = undefined;
|
|
86
|
+
this.createdByUser = undefined;
|
|
87
|
+
this.createdByUserId = undefined;
|
|
88
|
+
this.deletedByUser = undefined;
|
|
89
|
+
this.deletedByUserId = undefined;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, ColumnAccessControl_1.default)({
|
|
94
|
+
create: writePermissions,
|
|
95
|
+
read: readPermissions,
|
|
96
|
+
update: [],
|
|
97
|
+
}),
|
|
98
|
+
(0, TableColumn_1.default)({
|
|
99
|
+
manyToOneRelationColumn: "projectId",
|
|
100
|
+
type: TableColumnType_1.default.Entity,
|
|
101
|
+
modelType: Project_1.default,
|
|
102
|
+
title: "Project",
|
|
103
|
+
description: "Relation to the project this exception belongs to.",
|
|
104
|
+
}),
|
|
105
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
106
|
+
return Project_1.default;
|
|
107
|
+
}, {
|
|
108
|
+
eager: false,
|
|
109
|
+
nullable: true,
|
|
110
|
+
onDelete: "CASCADE",
|
|
111
|
+
orphanedRowAction: "nullify",
|
|
112
|
+
}),
|
|
113
|
+
(0, typeorm_1.JoinColumn)({ name: "projectId" }),
|
|
114
|
+
__metadata("design:type", Project_1.default)
|
|
115
|
+
], DetectionRuleException.prototype, "project", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, ColumnAccessControl_1.default)({
|
|
118
|
+
create: writePermissions,
|
|
119
|
+
read: readPermissions,
|
|
120
|
+
update: [],
|
|
121
|
+
}),
|
|
122
|
+
(0, typeorm_1.Index)(),
|
|
123
|
+
(0, TableColumn_1.default)({
|
|
124
|
+
type: TableColumnType_1.default.ObjectID,
|
|
125
|
+
required: true,
|
|
126
|
+
canReadOnRelationQuery: true,
|
|
127
|
+
title: "Project ID",
|
|
128
|
+
description: "ID of the project this exception belongs to.",
|
|
129
|
+
}),
|
|
130
|
+
(0, typeorm_1.Column)({
|
|
131
|
+
type: ColumnType_1.default.ObjectID,
|
|
132
|
+
nullable: false,
|
|
133
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
134
|
+
}),
|
|
135
|
+
__metadata("design:type", ObjectID_1.default)
|
|
136
|
+
], DetectionRuleException.prototype, "projectId", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
139
|
+
(0, TableColumn_1.default)({
|
|
140
|
+
manyToOneRelationColumn: "detectionRuleId",
|
|
141
|
+
type: TableColumnType_1.default.Entity,
|
|
142
|
+
modelType: DetectionRule_1.default,
|
|
143
|
+
title: "Detection Rule",
|
|
144
|
+
description: "The detection rule that skips what this exception names.",
|
|
145
|
+
}),
|
|
146
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
147
|
+
return DetectionRule_1.default;
|
|
148
|
+
}, {
|
|
149
|
+
eager: false,
|
|
150
|
+
nullable: true,
|
|
151
|
+
onDelete: "CASCADE",
|
|
152
|
+
orphanedRowAction: "nullify",
|
|
153
|
+
}),
|
|
154
|
+
(0, typeorm_1.JoinColumn)({ name: "detectionRuleId" }),
|
|
155
|
+
__metadata("design:type", DetectionRule_1.default)
|
|
156
|
+
], DetectionRuleException.prototype, "detectionRule", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
159
|
+
(0, typeorm_1.Index)(),
|
|
160
|
+
(0, TableColumn_1.default)({
|
|
161
|
+
type: TableColumnType_1.default.ObjectID,
|
|
162
|
+
required: true,
|
|
163
|
+
canReadOnRelationQuery: true,
|
|
164
|
+
title: "Detection Rule ID",
|
|
165
|
+
description: "ID of the detection rule that skips what this names.",
|
|
166
|
+
}),
|
|
167
|
+
(0, typeorm_1.Column)({
|
|
168
|
+
type: ColumnType_1.default.ObjectID,
|
|
169
|
+
nullable: false,
|
|
170
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
171
|
+
}),
|
|
172
|
+
__metadata("design:type", ObjectID_1.default)
|
|
173
|
+
], DetectionRuleException.prototype, "detectionRuleId", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
176
|
+
(0, TableColumn_1.default)({
|
|
177
|
+
required: true,
|
|
178
|
+
type: TableColumnType_1.default.ShortText,
|
|
179
|
+
canReadOnRelationQuery: true,
|
|
180
|
+
title: "Kind",
|
|
181
|
+
description: "What the rule skips: Entity (a user, host or IP address), Value (one event field's value) or Time Window (every event between two times).",
|
|
182
|
+
}),
|
|
183
|
+
(0, typeorm_1.Column)({
|
|
184
|
+
nullable: false,
|
|
185
|
+
type: ColumnType_1.default.ShortText,
|
|
186
|
+
length: ColumnLength_1.default.ShortText,
|
|
187
|
+
}),
|
|
188
|
+
__metadata("design:type", String)
|
|
189
|
+
], DetectionRuleException.prototype, "kind", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
192
|
+
(0, TableColumn_1.default)({
|
|
193
|
+
required: false,
|
|
194
|
+
type: TableColumnType_1.default.ShortText,
|
|
195
|
+
canReadOnRelationQuery: true,
|
|
196
|
+
title: "Entity Type",
|
|
197
|
+
description: "For an Entity: User, Host or IP Address. The rule skips every event that names it, as who acted, as who was acted on, or among its observables.",
|
|
198
|
+
}),
|
|
199
|
+
(0, typeorm_1.Column)({
|
|
200
|
+
nullable: true,
|
|
201
|
+
type: ColumnType_1.default.ShortText,
|
|
202
|
+
length: ColumnLength_1.default.ShortText,
|
|
203
|
+
}),
|
|
204
|
+
__metadata("design:type", String)
|
|
205
|
+
], DetectionRuleException.prototype, "entityType", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
208
|
+
(0, TableColumn_1.default)({
|
|
209
|
+
required: false,
|
|
210
|
+
type: TableColumnType_1.default.ShortText,
|
|
211
|
+
canReadOnRelationQuery: true,
|
|
212
|
+
title: "Field",
|
|
213
|
+
description: "For a Value: the event field to match, named as in a Sigma rule - principalUser, processName, an attribute key such as http.user_agent.",
|
|
214
|
+
}),
|
|
215
|
+
(0, typeorm_1.Column)({
|
|
216
|
+
nullable: true,
|
|
217
|
+
type: ColumnType_1.default.ShortText,
|
|
218
|
+
length: ColumnLength_1.default.ShortText,
|
|
219
|
+
}),
|
|
220
|
+
__metadata("design:type", String)
|
|
221
|
+
], DetectionRuleException.prototype, "fieldName", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
224
|
+
(0, TableColumn_1.default)({
|
|
225
|
+
required: false,
|
|
226
|
+
type: TableColumnType_1.default.LongText,
|
|
227
|
+
canReadOnRelationQuery: true,
|
|
228
|
+
title: "Value",
|
|
229
|
+
description: "For an Entity or a Value: what the rule skips, matched whatever the case. * stands for any run of characters (svc-* skips every service account), and an IP address may be a range such as 10.20.0.0/16.",
|
|
230
|
+
}),
|
|
231
|
+
(0, typeorm_1.Column)({
|
|
232
|
+
nullable: true,
|
|
233
|
+
type: ColumnType_1.default.LongText,
|
|
234
|
+
length: ColumnLength_1.default.LongText,
|
|
235
|
+
}),
|
|
236
|
+
__metadata("design:type", String)
|
|
237
|
+
], DetectionRuleException.prototype, "value", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
240
|
+
(0, TableColumn_1.default)({
|
|
241
|
+
required: false,
|
|
242
|
+
type: TableColumnType_1.default.Date,
|
|
243
|
+
canReadOnRelationQuery: true,
|
|
244
|
+
title: "Starts At",
|
|
245
|
+
description: "For a Time Window: the first moment the rule skips.",
|
|
246
|
+
}),
|
|
247
|
+
(0, typeorm_1.Column)({
|
|
248
|
+
nullable: true,
|
|
249
|
+
type: ColumnType_1.default.Date,
|
|
250
|
+
}),
|
|
251
|
+
__metadata("design:type", Date)
|
|
252
|
+
], DetectionRuleException.prototype, "startsAt", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
255
|
+
(0, TableColumn_1.default)({
|
|
256
|
+
required: false,
|
|
257
|
+
type: TableColumnType_1.default.Date,
|
|
258
|
+
canReadOnRelationQuery: true,
|
|
259
|
+
title: "Ends At",
|
|
260
|
+
description: "For a Time Window: when the rule sees events again. A window is at most 30 days.",
|
|
261
|
+
}),
|
|
262
|
+
(0, typeorm_1.Column)({
|
|
263
|
+
nullable: true,
|
|
264
|
+
type: ColumnType_1.default.Date,
|
|
265
|
+
}),
|
|
266
|
+
__metadata("design:type", Date)
|
|
267
|
+
], DetectionRuleException.prototype, "endsAt", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
270
|
+
(0, TableColumn_1.default)({
|
|
271
|
+
required: true,
|
|
272
|
+
type: TableColumnType_1.default.LongText,
|
|
273
|
+
canReadOnRelationQuery: true,
|
|
274
|
+
title: "Reason",
|
|
275
|
+
description: "Why it is safe for the rule to skip this, for whoever reads the list later.",
|
|
276
|
+
}),
|
|
277
|
+
(0, typeorm_1.Column)({
|
|
278
|
+
nullable: false,
|
|
279
|
+
type: ColumnType_1.default.LongText,
|
|
280
|
+
length: ColumnLength_1.default.LongText,
|
|
281
|
+
}),
|
|
282
|
+
__metadata("design:type", String)
|
|
283
|
+
], DetectionRuleException.prototype, "reason", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
286
|
+
(0, TableColumn_1.default)({
|
|
287
|
+
required: false,
|
|
288
|
+
type: TableColumnType_1.default.Date,
|
|
289
|
+
canReadOnRelationQuery: true,
|
|
290
|
+
title: "Expires At",
|
|
291
|
+
description: "For an Entity or a Value: when the rule sees it again. Empty: until someone deletes the exception.",
|
|
292
|
+
}),
|
|
293
|
+
(0, typeorm_1.Column)({
|
|
294
|
+
nullable: true,
|
|
295
|
+
type: ColumnType_1.default.Date,
|
|
296
|
+
}),
|
|
297
|
+
__metadata("design:type", Date)
|
|
298
|
+
], DetectionRuleException.prototype, "expiresAt", void 0);
|
|
299
|
+
__decorate([
|
|
300
|
+
(0, ColumnAccessControl_1.default)({
|
|
301
|
+
create: writePermissions,
|
|
302
|
+
read: readPermissions,
|
|
303
|
+
update: [],
|
|
304
|
+
}),
|
|
305
|
+
(0, TableColumn_1.default)({
|
|
306
|
+
manyToOneRelationColumn: "createdByUserId",
|
|
307
|
+
type: TableColumnType_1.default.Entity,
|
|
308
|
+
modelType: User_1.default,
|
|
309
|
+
title: "Created By User",
|
|
310
|
+
description: "The person who added the exception.",
|
|
311
|
+
}),
|
|
312
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
313
|
+
return User_1.default;
|
|
314
|
+
}, {
|
|
315
|
+
eager: false,
|
|
316
|
+
nullable: true,
|
|
317
|
+
onDelete: "SET NULL",
|
|
318
|
+
orphanedRowAction: "nullify",
|
|
319
|
+
}),
|
|
320
|
+
(0, typeorm_1.JoinColumn)({ name: "createdByUserId" }),
|
|
321
|
+
__metadata("design:type", User_1.default)
|
|
322
|
+
], DetectionRuleException.prototype, "createdByUser", void 0);
|
|
323
|
+
__decorate([
|
|
324
|
+
(0, ColumnAccessControl_1.default)({
|
|
325
|
+
create: writePermissions,
|
|
326
|
+
read: readPermissions,
|
|
327
|
+
update: [],
|
|
328
|
+
}),
|
|
329
|
+
(0, TableColumn_1.default)({
|
|
330
|
+
type: TableColumnType_1.default.ObjectID,
|
|
331
|
+
title: "Created By User ID",
|
|
332
|
+
description: "ID of the person who added the exception.",
|
|
333
|
+
}),
|
|
334
|
+
(0, typeorm_1.Column)({
|
|
335
|
+
type: ColumnType_1.default.ObjectID,
|
|
336
|
+
nullable: true,
|
|
337
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
338
|
+
}),
|
|
339
|
+
__metadata("design:type", ObjectID_1.default)
|
|
340
|
+
], DetectionRuleException.prototype, "createdByUserId", void 0);
|
|
341
|
+
__decorate([
|
|
342
|
+
(0, ColumnAccessControl_1.default)({
|
|
343
|
+
create: [],
|
|
344
|
+
read: readPermissions,
|
|
345
|
+
update: [],
|
|
346
|
+
}),
|
|
347
|
+
(0, TableColumn_1.default)({
|
|
348
|
+
manyToOneRelationColumn: "deletedByUserId",
|
|
349
|
+
type: TableColumnType_1.default.Entity,
|
|
350
|
+
modelType: User_1.default,
|
|
351
|
+
title: "Deleted By User",
|
|
352
|
+
description: "The person who removed the exception.",
|
|
353
|
+
}),
|
|
354
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
355
|
+
return User_1.default;
|
|
356
|
+
}, {
|
|
357
|
+
eager: false,
|
|
358
|
+
nullable: true,
|
|
359
|
+
onDelete: "SET NULL",
|
|
360
|
+
orphanedRowAction: "nullify",
|
|
361
|
+
}),
|
|
362
|
+
(0, typeorm_1.JoinColumn)({ name: "deletedByUserId" }),
|
|
363
|
+
__metadata("design:type", User_1.default)
|
|
364
|
+
], DetectionRuleException.prototype, "deletedByUser", void 0);
|
|
365
|
+
__decorate([
|
|
366
|
+
(0, ColumnAccessControl_1.default)({
|
|
367
|
+
create: [],
|
|
368
|
+
read: readPermissions,
|
|
369
|
+
update: [],
|
|
370
|
+
}),
|
|
371
|
+
(0, TableColumn_1.default)({
|
|
372
|
+
type: TableColumnType_1.default.ObjectID,
|
|
373
|
+
title: "Deleted By User ID",
|
|
374
|
+
description: "ID of the person who removed the exception.",
|
|
375
|
+
}),
|
|
376
|
+
(0, typeorm_1.Column)({
|
|
377
|
+
type: ColumnType_1.default.ObjectID,
|
|
378
|
+
nullable: true,
|
|
379
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
380
|
+
}),
|
|
381
|
+
__metadata("design:type", ObjectID_1.default)
|
|
382
|
+
], DetectionRuleException.prototype, "deletedByUserId", void 0);
|
|
383
|
+
DetectionRuleException = __decorate([
|
|
384
|
+
(0, EnableDocumentation_1.default)(),
|
|
385
|
+
(0, EnableAuditLog_1.default)(),
|
|
386
|
+
(0, TableBillingAccessControl_1.default)({
|
|
387
|
+
create: SubscriptionPlan_1.PlanType.Free,
|
|
388
|
+
read: SubscriptionPlan_1.PlanType.Free,
|
|
389
|
+
update: SubscriptionPlan_1.PlanType.Free,
|
|
390
|
+
delete: SubscriptionPlan_1.PlanType.Free,
|
|
391
|
+
}),
|
|
392
|
+
(0, TenantColumn_1.default)("projectId"),
|
|
393
|
+
(0, TableAccessControl_1.default)({
|
|
394
|
+
create: writePermissions,
|
|
395
|
+
read: readPermissions,
|
|
396
|
+
delete: writePermissions,
|
|
397
|
+
update: writePermissions,
|
|
398
|
+
}),
|
|
399
|
+
(0, CrudApiEndpoint_1.default)(new Route_1.default("/detection-rule-exception")),
|
|
400
|
+
(0, typeorm_1.Entity)({
|
|
401
|
+
name: "DetectionRuleException",
|
|
402
|
+
}),
|
|
403
|
+
(0, TableMetadata_1.default)({
|
|
404
|
+
tableName: "DetectionRuleException",
|
|
405
|
+
singularName: "Rule Exception",
|
|
406
|
+
pluralName: "Rule Exceptions",
|
|
407
|
+
icon: IconProp_1.default.EyeSlash,
|
|
408
|
+
tableDescription: "What a detection rule skips: an entity, a value or a time window, with who added it, why, and when it expires.",
|
|
409
|
+
}),
|
|
410
|
+
(0, typeorm_1.Index)(["projectId", "detectionRuleId"])
|
|
411
|
+
], DetectionRuleException);
|
|
412
|
+
exports.default = DetectionRuleException;
|
|
@@ -10,6 +10,7 @@ import ObjectID from "../../Types/ObjectID.mjs";
|
|
|
10
10
|
import Phone from "../../Types/Phone.mjs";
|
|
11
11
|
import Port from "../../Types/Port.mjs";
|
|
12
12
|
import { TwilioConfigUse } from "../../Types/CallAndSMS/TwilioConfigUse.mjs";
|
|
13
|
+
import { CallAndSmsProvider } from "../../Types/CallAndSMS/CallAndSmsProvider.mjs";
|
|
13
14
|
export declare enum EmailServerType {
|
|
14
15
|
Sendgrid = "Sendgrid",
|
|
15
16
|
CustomSMTP = "Custom SMTP"
|
|
@@ -19,6 +20,7 @@ export default class GlobalConfig extends GlobalConfigModel {
|
|
|
19
20
|
disableSignup?: boolean;
|
|
20
21
|
requireSsoForLogin?: boolean;
|
|
21
22
|
disableUserProjectCreation?: boolean;
|
|
23
|
+
disablePushNotifications?: boolean;
|
|
22
24
|
isSMTPSecure?: boolean;
|
|
23
25
|
smtpUsername?: string;
|
|
24
26
|
smtpPassword?: string;
|
|
@@ -39,6 +41,9 @@ export default class GlobalConfig extends GlobalConfigModel {
|
|
|
39
41
|
twilioSecondaryPhoneNumbers?: string;
|
|
40
42
|
twilioSmsPhoneNumbers?: string;
|
|
41
43
|
twilioUsedFor?: TwilioConfigUse;
|
|
44
|
+
callAndSmsProvider?: CallAndSmsProvider;
|
|
45
|
+
callAndSmsGatewayUrl?: string;
|
|
46
|
+
callAndSmsGatewaySecret?: string;
|
|
42
47
|
metaWhatsAppAccessToken?: string;
|
|
43
48
|
metaWhatsAppPhoneNumberId?: string;
|
|
44
49
|
metaWhatsAppBusinessAccountId?: string;
|