@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
|
@@ -0,0 +1,357 @@
|
|
|
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 Project_1 = __importDefault(require("./Project"));
|
|
16
|
+
const User_1 = __importDefault(require("./User"));
|
|
17
|
+
const DatabaseBaseModel_1 = __importDefault(require("./DatabaseBaseModel/DatabaseBaseModel"));
|
|
18
|
+
const Route_1 = __importDefault(require("../../Types/API/Route"));
|
|
19
|
+
const ColumnAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/ColumnAccessControl"));
|
|
20
|
+
const TableAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/TableAccessControl"));
|
|
21
|
+
const TableBillingAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/TableBillingAccessControl"));
|
|
22
|
+
const ColumnLength_1 = __importDefault(require("../../Types/Database/ColumnLength"));
|
|
23
|
+
const ColumnType_1 = __importDefault(require("../../Types/Database/ColumnType"));
|
|
24
|
+
const CrudApiEndpoint_1 = __importDefault(require("../../Types/Database/CrudApiEndpoint"));
|
|
25
|
+
const EnableDocumentation_1 = __importDefault(require("../../Types/Database/EnableDocumentation"));
|
|
26
|
+
const TableColumn_1 = __importDefault(require("../../Types/Database/TableColumn"));
|
|
27
|
+
const TableColumnType_1 = __importDefault(require("../../Types/Database/TableColumnType"));
|
|
28
|
+
const TableMetadata_1 = __importDefault(require("../../Types/Database/TableMetadata"));
|
|
29
|
+
const TenantColumn_1 = __importDefault(require("../../Types/Database/TenantColumn"));
|
|
30
|
+
const IconProp_1 = __importDefault(require("../../Types/Icon/IconProp"));
|
|
31
|
+
const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
|
|
32
|
+
const Permission_1 = __importDefault(require("../../Types/Permission"));
|
|
33
|
+
const SubscriptionPlan_1 = require("../../Types/Billing/SubscriptionPlan");
|
|
34
|
+
const SecurityTelemetrySource_1 = require("../../Types/SecurityEvent/SecurityTelemetrySource");
|
|
35
|
+
const typeorm_1 = require("typeorm");
|
|
36
|
+
/*
|
|
37
|
+
* Turning it on decides which telemetry becomes security data, so it sits
|
|
38
|
+
* with the tiers that connect security sources; every Security tier can
|
|
39
|
+
* read how it is doing.
|
|
40
|
+
*/
|
|
41
|
+
const adminPermissions = [
|
|
42
|
+
Permission_1.default.ProjectOwner,
|
|
43
|
+
Permission_1.default.ProjectAdmin,
|
|
44
|
+
Permission_1.default.SecurityAdmin,
|
|
45
|
+
];
|
|
46
|
+
const readPermissions = [
|
|
47
|
+
Permission_1.default.ProjectOwner,
|
|
48
|
+
Permission_1.default.ProjectAdmin,
|
|
49
|
+
Permission_1.default.SecurityAdmin,
|
|
50
|
+
Permission_1.default.SecurityMember,
|
|
51
|
+
Permission_1.default.SecurityViewer,
|
|
52
|
+
];
|
|
53
|
+
/*
|
|
54
|
+
* "Your OneUptime data" as security sources: one row per project per kind
|
|
55
|
+
* of telemetry beyond logs (Types/SecurityEvent/SecurityTelemetrySource) -
|
|
56
|
+
* traces, network flows, the audit log, session replays. While one is on, a
|
|
57
|
+
* Workers job reads what arrived of that kind for what an attack leaves in
|
|
58
|
+
* it (Server/Utils/SecurityEvent/TelemetryScan) and stores each finding as
|
|
59
|
+
* a security event, so the detection rules run on data the project
|
|
60
|
+
* already has. "Your logs" keeps its own record (SecurityLogSource).
|
|
61
|
+
*
|
|
62
|
+
* The scan reads what arrived since `cursor`, a window at a time; the
|
|
63
|
+
* counts of the last scan are kept so the Connections page can say what it
|
|
64
|
+
* found.
|
|
65
|
+
*/
|
|
66
|
+
let SecurityTelemetrySource = class SecurityTelemetrySource extends DatabaseBaseModel_1.default {
|
|
67
|
+
constructor() {
|
|
68
|
+
super(...arguments);
|
|
69
|
+
this.project = undefined;
|
|
70
|
+
this.projectId = undefined;
|
|
71
|
+
this.kind = undefined;
|
|
72
|
+
this.isEnabled = undefined;
|
|
73
|
+
this.cursor = undefined;
|
|
74
|
+
this.lastScannedAt = undefined;
|
|
75
|
+
this.lastEventFoundAt = undefined;
|
|
76
|
+
this.lastScanResult = undefined;
|
|
77
|
+
this.lastError = undefined;
|
|
78
|
+
this.createdByUser = undefined;
|
|
79
|
+
this.createdByUserId = undefined;
|
|
80
|
+
this.deletedByUser = undefined;
|
|
81
|
+
this.deletedByUserId = undefined;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, ColumnAccessControl_1.default)({
|
|
86
|
+
create: adminPermissions,
|
|
87
|
+
read: readPermissions,
|
|
88
|
+
update: [],
|
|
89
|
+
}),
|
|
90
|
+
(0, TableColumn_1.default)({
|
|
91
|
+
manyToOneRelationColumn: "projectId",
|
|
92
|
+
type: TableColumnType_1.default.Entity,
|
|
93
|
+
modelType: Project_1.default,
|
|
94
|
+
title: "Project",
|
|
95
|
+
description: "Relation to the project whose telemetry is read.",
|
|
96
|
+
}),
|
|
97
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
98
|
+
return Project_1.default;
|
|
99
|
+
}, {
|
|
100
|
+
eager: false,
|
|
101
|
+
nullable: true,
|
|
102
|
+
onDelete: "CASCADE",
|
|
103
|
+
orphanedRowAction: "nullify",
|
|
104
|
+
}),
|
|
105
|
+
(0, typeorm_1.JoinColumn)({ name: "projectId" }),
|
|
106
|
+
__metadata("design:type", Project_1.default)
|
|
107
|
+
], SecurityTelemetrySource.prototype, "project", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, ColumnAccessControl_1.default)({
|
|
110
|
+
create: adminPermissions,
|
|
111
|
+
read: readPermissions,
|
|
112
|
+
update: [],
|
|
113
|
+
}),
|
|
114
|
+
(0, typeorm_1.Index)(),
|
|
115
|
+
(0, TableColumn_1.default)({
|
|
116
|
+
type: TableColumnType_1.default.ObjectID,
|
|
117
|
+
required: true,
|
|
118
|
+
canReadOnRelationQuery: true,
|
|
119
|
+
title: "Project ID",
|
|
120
|
+
description: "ID of the project whose telemetry is read.",
|
|
121
|
+
}),
|
|
122
|
+
(0, typeorm_1.Column)({
|
|
123
|
+
type: ColumnType_1.default.ObjectID,
|
|
124
|
+
nullable: false,
|
|
125
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
126
|
+
}),
|
|
127
|
+
__metadata("design:type", ObjectID_1.default)
|
|
128
|
+
], SecurityTelemetrySource.prototype, "projectId", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, ColumnAccessControl_1.default)({
|
|
131
|
+
create: adminPermissions,
|
|
132
|
+
read: readPermissions,
|
|
133
|
+
update: [],
|
|
134
|
+
}),
|
|
135
|
+
(0, typeorm_1.Index)(),
|
|
136
|
+
(0, TableColumn_1.default)({
|
|
137
|
+
required: true,
|
|
138
|
+
type: TableColumnType_1.default.ShortText,
|
|
139
|
+
canReadOnRelationQuery: true,
|
|
140
|
+
title: "Kind",
|
|
141
|
+
description: "Which telemetry this source reads: 'traces', 'network-flows', 'audit-log' or 'rum-sessions'. Fixed once created.",
|
|
142
|
+
}),
|
|
143
|
+
(0, typeorm_1.Column)({
|
|
144
|
+
nullable: false,
|
|
145
|
+
type: ColumnType_1.default.ShortText,
|
|
146
|
+
length: ColumnLength_1.default.ShortText,
|
|
147
|
+
}),
|
|
148
|
+
__metadata("design:type", String)
|
|
149
|
+
], SecurityTelemetrySource.prototype, "kind", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, ColumnAccessControl_1.default)({
|
|
152
|
+
create: adminPermissions,
|
|
153
|
+
read: readPermissions,
|
|
154
|
+
update: adminPermissions,
|
|
155
|
+
}),
|
|
156
|
+
(0, typeorm_1.Index)(),
|
|
157
|
+
(0, TableColumn_1.default)({
|
|
158
|
+
required: true,
|
|
159
|
+
type: TableColumnType_1.default.Boolean,
|
|
160
|
+
canReadOnRelationQuery: true,
|
|
161
|
+
title: "Enabled",
|
|
162
|
+
description: "Whether OneUptime looks for security events in this kind of the project's telemetry.",
|
|
163
|
+
defaultValue: true,
|
|
164
|
+
isDefaultValueColumn: true,
|
|
165
|
+
}),
|
|
166
|
+
(0, typeorm_1.Column)({
|
|
167
|
+
nullable: false,
|
|
168
|
+
type: ColumnType_1.default.Boolean,
|
|
169
|
+
default: true,
|
|
170
|
+
}),
|
|
171
|
+
__metadata("design:type", Boolean)
|
|
172
|
+
], SecurityTelemetrySource.prototype, "isEnabled", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, ColumnAccessControl_1.default)({
|
|
175
|
+
create: [],
|
|
176
|
+
read: readPermissions,
|
|
177
|
+
update: [],
|
|
178
|
+
}),
|
|
179
|
+
(0, TableColumn_1.default)({
|
|
180
|
+
title: "Cursor",
|
|
181
|
+
required: false,
|
|
182
|
+
type: TableColumnType_1.default.LongText,
|
|
183
|
+
description: "The time up to which this telemetry has been read, as an ISO string: the end of the last window the scan finished.",
|
|
184
|
+
}),
|
|
185
|
+
(0, typeorm_1.Column)({
|
|
186
|
+
type: ColumnType_1.default.LongText,
|
|
187
|
+
nullable: true,
|
|
188
|
+
length: ColumnLength_1.default.LongText,
|
|
189
|
+
}),
|
|
190
|
+
__metadata("design:type", String)
|
|
191
|
+
], SecurityTelemetrySource.prototype, "cursor", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, ColumnAccessControl_1.default)({ create: [], read: readPermissions, update: [] }),
|
|
194
|
+
(0, TableColumn_1.default)({
|
|
195
|
+
type: TableColumnType_1.default.Date,
|
|
196
|
+
required: false,
|
|
197
|
+
title: "Last Scanned At",
|
|
198
|
+
description: "When this telemetry was last read.",
|
|
199
|
+
canReadOnRelationQuery: true,
|
|
200
|
+
}),
|
|
201
|
+
(0, typeorm_1.Column)({ type: ColumnType_1.default.Date, nullable: true }),
|
|
202
|
+
__metadata("design:type", Date)
|
|
203
|
+
], SecurityTelemetrySource.prototype, "lastScannedAt", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, ColumnAccessControl_1.default)({ create: [], read: readPermissions, update: [] }),
|
|
206
|
+
(0, TableColumn_1.default)({
|
|
207
|
+
type: TableColumnType_1.default.Date,
|
|
208
|
+
required: false,
|
|
209
|
+
title: "Last Event Found At",
|
|
210
|
+
description: "When a security event was last found in this telemetry.",
|
|
211
|
+
canReadOnRelationQuery: true,
|
|
212
|
+
}),
|
|
213
|
+
(0, typeorm_1.Column)({ type: ColumnType_1.default.Date, nullable: true }),
|
|
214
|
+
__metadata("design:type", Date)
|
|
215
|
+
], SecurityTelemetrySource.prototype, "lastEventFoundAt", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, ColumnAccessControl_1.default)({ create: [], read: readPermissions, update: [] }),
|
|
218
|
+
(0, TableColumn_1.default)({
|
|
219
|
+
type: TableColumnType_1.default.JSON,
|
|
220
|
+
required: false,
|
|
221
|
+
title: "Last Scan Result",
|
|
222
|
+
description: "What the last scan read and found: the records read, the security events found, and how many of each signal.",
|
|
223
|
+
}),
|
|
224
|
+
(0, typeorm_1.Column)({ type: ColumnType_1.default.JSON, nullable: true }),
|
|
225
|
+
__metadata("design:type", Object)
|
|
226
|
+
], SecurityTelemetrySource.prototype, "lastScanResult", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
(0, ColumnAccessControl_1.default)({
|
|
229
|
+
create: [],
|
|
230
|
+
read: readPermissions,
|
|
231
|
+
update: [],
|
|
232
|
+
}),
|
|
233
|
+
(0, TableColumn_1.default)({
|
|
234
|
+
title: "Last Error",
|
|
235
|
+
required: false,
|
|
236
|
+
type: TableColumnType_1.default.VeryLongText,
|
|
237
|
+
canReadOnRelationQuery: true,
|
|
238
|
+
description: "Why the last scan failed, if it did. Cleared by the next scan that succeeds.",
|
|
239
|
+
}),
|
|
240
|
+
(0, typeorm_1.Column)({
|
|
241
|
+
type: ColumnType_1.default.VeryLongText,
|
|
242
|
+
nullable: true,
|
|
243
|
+
}),
|
|
244
|
+
__metadata("design:type", String)
|
|
245
|
+
], SecurityTelemetrySource.prototype, "lastError", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, ColumnAccessControl_1.default)({
|
|
248
|
+
create: [],
|
|
249
|
+
read: readPermissions,
|
|
250
|
+
update: [],
|
|
251
|
+
}),
|
|
252
|
+
(0, TableColumn_1.default)({
|
|
253
|
+
manyToOneRelationColumn: "createdByUserId",
|
|
254
|
+
type: TableColumnType_1.default.Entity,
|
|
255
|
+
modelType: User_1.default,
|
|
256
|
+
title: "Created By User",
|
|
257
|
+
description: "Relation to the user who turned this source on.",
|
|
258
|
+
}),
|
|
259
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
260
|
+
return User_1.default;
|
|
261
|
+
}, {
|
|
262
|
+
eager: false,
|
|
263
|
+
nullable: true,
|
|
264
|
+
onDelete: "SET NULL",
|
|
265
|
+
orphanedRowAction: "nullify",
|
|
266
|
+
}),
|
|
267
|
+
(0, typeorm_1.JoinColumn)({ name: "createdByUserId" }),
|
|
268
|
+
__metadata("design:type", User_1.default)
|
|
269
|
+
], SecurityTelemetrySource.prototype, "createdByUser", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
(0, ColumnAccessControl_1.default)({
|
|
272
|
+
create: [],
|
|
273
|
+
read: readPermissions,
|
|
274
|
+
update: [],
|
|
275
|
+
}),
|
|
276
|
+
(0, TableColumn_1.default)({
|
|
277
|
+
type: TableColumnType_1.default.ObjectID,
|
|
278
|
+
title: "Created By User ID",
|
|
279
|
+
description: "ID of the user who turned this source on.",
|
|
280
|
+
}),
|
|
281
|
+
(0, typeorm_1.Column)({
|
|
282
|
+
type: ColumnType_1.default.ObjectID,
|
|
283
|
+
nullable: true,
|
|
284
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
285
|
+
}),
|
|
286
|
+
__metadata("design:type", ObjectID_1.default)
|
|
287
|
+
], SecurityTelemetrySource.prototype, "createdByUserId", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, ColumnAccessControl_1.default)({
|
|
290
|
+
create: [],
|
|
291
|
+
read: readPermissions,
|
|
292
|
+
update: [],
|
|
293
|
+
}),
|
|
294
|
+
(0, TableColumn_1.default)({
|
|
295
|
+
manyToOneRelationColumn: "deletedByUserId",
|
|
296
|
+
type: TableColumnType_1.default.Entity,
|
|
297
|
+
modelType: User_1.default,
|
|
298
|
+
title: "Deleted By User",
|
|
299
|
+
description: "Relation to the user who deleted this source.",
|
|
300
|
+
}),
|
|
301
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
302
|
+
return User_1.default;
|
|
303
|
+
}, {
|
|
304
|
+
eager: false,
|
|
305
|
+
nullable: true,
|
|
306
|
+
onDelete: "SET NULL",
|
|
307
|
+
orphanedRowAction: "nullify",
|
|
308
|
+
}),
|
|
309
|
+
(0, typeorm_1.JoinColumn)({ name: "deletedByUserId" }),
|
|
310
|
+
__metadata("design:type", User_1.default)
|
|
311
|
+
], SecurityTelemetrySource.prototype, "deletedByUser", void 0);
|
|
312
|
+
__decorate([
|
|
313
|
+
(0, ColumnAccessControl_1.default)({
|
|
314
|
+
create: [],
|
|
315
|
+
read: readPermissions,
|
|
316
|
+
update: [],
|
|
317
|
+
}),
|
|
318
|
+
(0, TableColumn_1.default)({
|
|
319
|
+
type: TableColumnType_1.default.ObjectID,
|
|
320
|
+
title: "Deleted By User ID",
|
|
321
|
+
description: "ID of the user who deleted this source.",
|
|
322
|
+
}),
|
|
323
|
+
(0, typeorm_1.Column)({
|
|
324
|
+
type: ColumnType_1.default.ObjectID,
|
|
325
|
+
nullable: true,
|
|
326
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
327
|
+
}),
|
|
328
|
+
__metadata("design:type", ObjectID_1.default)
|
|
329
|
+
], SecurityTelemetrySource.prototype, "deletedByUserId", void 0);
|
|
330
|
+
SecurityTelemetrySource = __decorate([
|
|
331
|
+
(0, EnableDocumentation_1.default)(),
|
|
332
|
+
(0, TableBillingAccessControl_1.default)({
|
|
333
|
+
create: SubscriptionPlan_1.PlanType.Free,
|
|
334
|
+
read: SubscriptionPlan_1.PlanType.Free,
|
|
335
|
+
update: SubscriptionPlan_1.PlanType.Free,
|
|
336
|
+
delete: SubscriptionPlan_1.PlanType.Free,
|
|
337
|
+
}),
|
|
338
|
+
(0, TenantColumn_1.default)("projectId"),
|
|
339
|
+
(0, CrudApiEndpoint_1.default)(new Route_1.default("/security-telemetry-source")),
|
|
340
|
+
(0, typeorm_1.Entity)({
|
|
341
|
+
name: "SecurityTelemetrySource",
|
|
342
|
+
}),
|
|
343
|
+
(0, TableMetadata_1.default)({
|
|
344
|
+
tableName: "SecurityTelemetrySource",
|
|
345
|
+
singularName: "Security Telemetry Source",
|
|
346
|
+
pluralName: "Security Telemetry Sources",
|
|
347
|
+
icon: IconProp_1.default.Signal,
|
|
348
|
+
tableDescription: "Whether OneUptime looks for security events in one kind of telemetry the project already sends it - traces, network flows, the audit log or session replays - and what the last look found.",
|
|
349
|
+
}),
|
|
350
|
+
(0, TableAccessControl_1.default)({
|
|
351
|
+
create: adminPermissions,
|
|
352
|
+
read: readPermissions,
|
|
353
|
+
delete: adminPermissions,
|
|
354
|
+
update: adminPermissions,
|
|
355
|
+
})
|
|
356
|
+
], SecurityTelemetrySource);
|
|
357
|
+
exports.default = SecurityTelemetrySource;
|
|
@@ -428,7 +428,7 @@ __decorate([
|
|
|
428
428
|
required: false,
|
|
429
429
|
type: TableColumnType_1.default.ShortText,
|
|
430
430
|
title: "Notification Channel",
|
|
431
|
-
description: "Deprecated: use notificationChannels. The first of the rule's notification channels, or empty when it accepts any channel. Sending this field without notificationChannels sets the rule to that one channel (Call, SMS, Push, Email, WhatsApp, Telegram, Slack, MicrosoftTeams or
|
|
431
|
+
description: "Deprecated: use notificationChannels. The first of the rule's notification channels, or empty when it accepts any channel. Sending this field without notificationChannels sets the rule to that one channel (Call, SMS, Push, Email, WhatsApp, Telegram, Slack, MicrosoftTeams, Webhook or CustomChannel).",
|
|
432
432
|
}),
|
|
433
433
|
(0, typeorm_1.Column)({
|
|
434
434
|
nullable: true,
|
|
@@ -461,7 +461,7 @@ __decorate([
|
|
|
461
461
|
required: false,
|
|
462
462
|
type: TableColumnType_1.default.JSON,
|
|
463
463
|
title: "Notification Channels",
|
|
464
|
-
description: "On-call rules only: the channels members must be notified on, as a list - each member needs a rule on every one of them (Call, SMS, Push, Email, WhatsApp, Telegram, Slack, MicrosoftTeams or
|
|
464
|
+
description: "On-call rules only: the channels members must be notified on, as a list - each member needs a rule on every one of them (Call, SMS, Push, Email, WhatsApp, Telegram, Slack, MicrosoftTeams, Webhook or CustomChannel, which any custom channel that is on meets). Leave empty to accept any channel.",
|
|
465
465
|
}),
|
|
466
466
|
(0, typeorm_1.Column)({
|
|
467
467
|
type: ColumnType_1.default.JSON,
|
|
@@ -358,9 +358,7 @@ __decorate([
|
|
|
358
358
|
update: [
|
|
359
359
|
Permission_1.default.ProjectOwner,
|
|
360
360
|
Permission_1.default.ProjectAdmin,
|
|
361
|
-
Permission_1.default.InviteProjectTeamMembers,
|
|
362
361
|
Permission_1.default.EditProjectTeamPermissions,
|
|
363
|
-
Permission_1.default.EditProjectTeam,
|
|
364
362
|
],
|
|
365
363
|
}),
|
|
366
364
|
(0, TableColumn_1.default)({
|
|
@@ -398,7 +396,6 @@ __decorate([
|
|
|
398
396
|
Permission_1.default.ProjectOwner,
|
|
399
397
|
Permission_1.default.ProjectAdmin,
|
|
400
398
|
Permission_1.default.EditProjectTeamPermissions,
|
|
401
|
-
Permission_1.default.EditProjectTeam,
|
|
402
399
|
],
|
|
403
400
|
}),
|
|
404
401
|
(0, TableColumn_1.default)({
|
|
@@ -446,7 +443,6 @@ __decorate([
|
|
|
446
443
|
Permission_1.default.ProjectOwner,
|
|
447
444
|
Permission_1.default.ProjectAdmin,
|
|
448
445
|
Permission_1.default.EditProjectTeamPermissions,
|
|
449
|
-
Permission_1.default.EditProjectTeam,
|
|
450
446
|
],
|
|
451
447
|
}),
|
|
452
448
|
(0, TableColumn_1.default)({
|
|
@@ -482,7 +478,6 @@ __decorate([
|
|
|
482
478
|
Permission_1.default.ProjectOwner,
|
|
483
479
|
Permission_1.default.ProjectAdmin,
|
|
484
480
|
Permission_1.default.EditProjectTeamPermissions,
|
|
485
|
-
Permission_1.default.EditProjectTeam,
|
|
486
481
|
],
|
|
487
482
|
}),
|
|
488
483
|
(0, TableColumn_1.default)({
|
|
@@ -720,12 +715,15 @@ TeamPermission = __decorate([
|
|
|
720
715
|
Permission_1.default.DeleteProjectTeam,
|
|
721
716
|
Permission_1.default.EditProjectTeamPermissions,
|
|
722
717
|
],
|
|
718
|
+
/*
|
|
719
|
+
* Changing a row is granting or taking away what it grants, as creating
|
|
720
|
+
* and deleting one are: the same permissions. Editing a team's name or
|
|
721
|
+
* inviting people to it changes none of its permissions.
|
|
722
|
+
*/
|
|
723
723
|
update: [
|
|
724
724
|
Permission_1.default.ProjectOwner,
|
|
725
725
|
Permission_1.default.ProjectAdmin,
|
|
726
|
-
Permission_1.default.InviteProjectTeamMembers,
|
|
727
726
|
Permission_1.default.EditProjectTeamPermissions,
|
|
728
|
-
Permission_1.default.EditProjectTeam,
|
|
729
727
|
],
|
|
730
728
|
}),
|
|
731
729
|
(0, TenantColumn_1.default)("projectId"),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import IncidentSeverity from "./IncidentSeverity.mjs";
|
|
2
2
|
import AlertSeverity from "./AlertSeverity.mjs";
|
|
3
|
+
import CustomNotificationChannel from "./CustomNotificationChannel.mjs";
|
|
3
4
|
import Project from "./Project.mjs";
|
|
4
5
|
import User from "./User.mjs";
|
|
5
6
|
import UserCall from "./UserCall.mjs";
|
|
@@ -41,6 +42,8 @@ declare class UserNotificationRule extends BaseModel {
|
|
|
41
42
|
userMicrosoftTeamsId?: ObjectID;
|
|
42
43
|
userWebhook?: UserWebhook;
|
|
43
44
|
userWebhookId?: ObjectID;
|
|
45
|
+
customNotificationChannel?: CustomNotificationChannel;
|
|
46
|
+
customNotificationChannelId?: ObjectID;
|
|
44
47
|
userEmail?: UserEmail;
|
|
45
48
|
userEmailId?: ObjectID;
|
|
46
49
|
notifyAfterMinutes?: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import IncidentSeverity from "./IncidentSeverity";
|
|
2
2
|
import AlertSeverity from "./AlertSeverity";
|
|
3
|
+
import CustomNotificationChannel from "./CustomNotificationChannel";
|
|
3
4
|
import Project from "./Project";
|
|
4
5
|
import User from "./User";
|
|
5
6
|
import UserCall from "./UserCall";
|
|
@@ -41,6 +42,8 @@ declare class UserNotificationRule extends BaseModel {
|
|
|
41
42
|
userMicrosoftTeamsId?: ObjectID;
|
|
42
43
|
userWebhook?: UserWebhook;
|
|
43
44
|
userWebhookId?: ObjectID;
|
|
45
|
+
customNotificationChannel?: CustomNotificationChannel;
|
|
46
|
+
customNotificationChannelId?: ObjectID;
|
|
44
47
|
userEmail?: UserEmail;
|
|
45
48
|
userEmailId?: ObjectID;
|
|
46
49
|
notifyAfterMinutes?: number;
|
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const IncidentSeverity_1 = __importDefault(require("./IncidentSeverity"));
|
|
16
16
|
const AlertSeverity_1 = __importDefault(require("./AlertSeverity"));
|
|
17
|
+
const CustomNotificationChannel_1 = __importDefault(require("./CustomNotificationChannel"));
|
|
17
18
|
const Project_1 = __importDefault(require("./Project"));
|
|
18
19
|
const User_1 = __importDefault(require("./User"));
|
|
19
20
|
const UserCall_1 = __importDefault(require("./UserCall"));
|
|
@@ -388,6 +389,26 @@ let UserNotificationRule = class UserNotificationRule extends DatabaseBaseModel_
|
|
|
388
389
|
this.userWebhook = undefined;
|
|
389
390
|
// Re-pointable by an administrator. Read the essay above `userCall` first.
|
|
390
391
|
this.userWebhookId = undefined;
|
|
392
|
+
/*
|
|
393
|
+
* A CUSTOM CHANNEL IS EVERYBODY'S, SO THE OWNERSHIP RULE ABOVE DOES NOT FIT IT.
|
|
394
|
+
*
|
|
395
|
+
* The nine methods above each belong to one person, and the danger the essay
|
|
396
|
+
* above `userCall` describes is a rule owned by one person pointing at a
|
|
397
|
+
* method owned by another. A custom channel (CustomNotificationChannel)
|
|
398
|
+
* belongs to nobody: it is the installation's, every member's rules may name
|
|
399
|
+
* it, and its pages go to the service the installation's own admin set up,
|
|
400
|
+
* whoever's rule sent them. So the write-time guard asks something different
|
|
401
|
+
* of it - that the channel exists and is on - and
|
|
402
|
+
* UserNotificationRuleAdminService says so in its descriptor.
|
|
403
|
+
*
|
|
404
|
+
* The relation is readable where a rule is, because the one column of a
|
|
405
|
+
* channel a relation may read is its name (canReadOnRelationQuery): it is
|
|
406
|
+
* what a rules table shows. The URL and the secret refuse a relation read and
|
|
407
|
+
* a relation filter outright, whoever asks.
|
|
408
|
+
*/
|
|
409
|
+
this.customNotificationChannel = undefined;
|
|
410
|
+
// Re-pointable by an administrator, as the method ids above are.
|
|
411
|
+
this.customNotificationChannelId = undefined;
|
|
391
412
|
/*
|
|
392
413
|
* READ IS OWNER-ONLY ON THE RELATION, EVEN THOUGH THIS TABLE IS ADMIN-READABLE.
|
|
393
414
|
*
|
|
@@ -1073,6 +1094,52 @@ __decorate([
|
|
|
1073
1094
|
}),
|
|
1074
1095
|
__metadata("design:type", ObjectID_1.default)
|
|
1075
1096
|
], UserNotificationRule.prototype, "userWebhookId", void 0);
|
|
1097
|
+
__decorate([
|
|
1098
|
+
(0, ColumnAccessControl_1.default)({
|
|
1099
|
+
create: [Permission_1.default.CurrentUser, ...ADMIN_WRITE_PERMISSIONS],
|
|
1100
|
+
read: [Permission_1.default.CurrentUser, ...ADMIN_READ_PERMISSIONS],
|
|
1101
|
+
update: [],
|
|
1102
|
+
}),
|
|
1103
|
+
(0, TableColumn_1.default)({
|
|
1104
|
+
manyToOneRelationColumn: "customNotificationChannelId",
|
|
1105
|
+
type: TableColumnType_1.default.Entity,
|
|
1106
|
+
modelType: CustomNotificationChannel_1.default,
|
|
1107
|
+
title: "Custom Channel",
|
|
1108
|
+
description: "Relation to the Custom Channel this rule pages through, if it pages through one",
|
|
1109
|
+
}),
|
|
1110
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
1111
|
+
return CustomNotificationChannel_1.default;
|
|
1112
|
+
}, {
|
|
1113
|
+
eager: false,
|
|
1114
|
+
nullable: true,
|
|
1115
|
+
onDelete: "CASCADE",
|
|
1116
|
+
orphanedRowAction: "nullify",
|
|
1117
|
+
}),
|
|
1118
|
+
(0, typeorm_1.JoinColumn)({ name: "customNotificationChannelId" }),
|
|
1119
|
+
__metadata("design:type", CustomNotificationChannel_1.default)
|
|
1120
|
+
], UserNotificationRule.prototype, "customNotificationChannel", void 0);
|
|
1121
|
+
__decorate([
|
|
1122
|
+
(0, ColumnAccessControl_1.default)({
|
|
1123
|
+
create: [Permission_1.default.CurrentUser, ...ADMIN_WRITE_PERMISSIONS],
|
|
1124
|
+
read: [Permission_1.default.CurrentUser, ...ADMIN_READ_PERMISSIONS],
|
|
1125
|
+
update: [...ADMIN_WRITE_PERMISSIONS],
|
|
1126
|
+
}),
|
|
1127
|
+
(0, typeorm_1.Index)(),
|
|
1128
|
+
(0, TableColumn_1.default)({
|
|
1129
|
+
type: TableColumnType_1.default.ObjectID,
|
|
1130
|
+
required: false,
|
|
1131
|
+
canReadOnRelationQuery: true,
|
|
1132
|
+
title: "Custom Channel ID",
|
|
1133
|
+
description: "ID of the Custom Channel this rule pages through",
|
|
1134
|
+
example: "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
|
|
1135
|
+
}),
|
|
1136
|
+
(0, typeorm_1.Column)({
|
|
1137
|
+
type: ColumnType_1.default.ObjectID,
|
|
1138
|
+
nullable: true,
|
|
1139
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
1140
|
+
}),
|
|
1141
|
+
__metadata("design:type", ObjectID_1.default)
|
|
1142
|
+
], UserNotificationRule.prototype, "customNotificationChannelId", void 0);
|
|
1076
1143
|
__decorate([
|
|
1077
1144
|
(0, ColumnAccessControl_1.default)({
|
|
1078
1145
|
create: [Permission_1.default.CurrentUser, ...ADMIN_WRITE_PERMISSIONS],
|
|
@@ -23,6 +23,7 @@ declare class UserNotificationSetting extends BaseModel {
|
|
|
23
23
|
alertByCall?: boolean;
|
|
24
24
|
alertByPush?: boolean;
|
|
25
25
|
alertByWebhook?: boolean;
|
|
26
|
+
alertByCustomChannel?: boolean;
|
|
26
27
|
minimumSecurityCasePriority?: SecurityCasePriority;
|
|
27
28
|
minimumSecurityCasePriorityId?: ObjectID;
|
|
28
29
|
}
|
|
@@ -23,6 +23,7 @@ declare class UserNotificationSetting extends BaseModel {
|
|
|
23
23
|
alertByCall?: boolean;
|
|
24
24
|
alertByPush?: boolean;
|
|
25
25
|
alertByWebhook?: boolean;
|
|
26
|
+
alertByCustomChannel?: boolean;
|
|
26
27
|
minimumSecurityCasePriority?: SecurityCasePriority;
|
|
27
28
|
minimumSecurityCasePriorityId?: ObjectID;
|
|
28
29
|
}
|
|
@@ -54,6 +54,14 @@ let UserNotificationSetting = class UserNotificationSetting extends DatabaseBase
|
|
|
54
54
|
this.alertByCall = undefined;
|
|
55
55
|
this.alertByPush = undefined;
|
|
56
56
|
this.alertByWebhook = undefined;
|
|
57
|
+
/*
|
|
58
|
+
* Through the installation's custom channels (CustomNotificationChannel):
|
|
59
|
+
* every one that is on gets the notification, naming this person, as it
|
|
60
|
+
* gets their on-call pages. Off until they turn it on, as SMS and calls
|
|
61
|
+
* are: a channel is often the company's own app, and a person may not want
|
|
62
|
+
* every owner notification on their phone.
|
|
63
|
+
*/
|
|
64
|
+
this.alertByCustomChannel = undefined;
|
|
57
65
|
/*
|
|
58
66
|
* For the New Security Case setting
|
|
59
67
|
* (SEND_SECURITY_CASE_OPENED_NOTIFICATION) alone: the lowest of the
|
|
@@ -428,6 +436,24 @@ __decorate([
|
|
|
428
436
|
}),
|
|
429
437
|
__metadata("design:type", Boolean)
|
|
430
438
|
], UserNotificationSetting.prototype, "alertByWebhook", void 0);
|
|
439
|
+
__decorate([
|
|
440
|
+
(0, ColumnAccessControl_1.default)({
|
|
441
|
+
create: [Permission_1.default.CurrentUser],
|
|
442
|
+
read: [Permission_1.default.CurrentUser],
|
|
443
|
+
update: [Permission_1.default.CurrentUser],
|
|
444
|
+
}),
|
|
445
|
+
(0, TableColumn_1.default)({
|
|
446
|
+
isDefaultValueColumn: true,
|
|
447
|
+
type: TableColumnType_1.default.Boolean,
|
|
448
|
+
defaultValue: false,
|
|
449
|
+
example: false,
|
|
450
|
+
}),
|
|
451
|
+
(0, typeorm_1.Column)({
|
|
452
|
+
type: ColumnType_1.default.Boolean,
|
|
453
|
+
default: false,
|
|
454
|
+
}),
|
|
455
|
+
__metadata("design:type", Boolean)
|
|
456
|
+
], UserNotificationSetting.prototype, "alertByCustomChannel", void 0);
|
|
431
457
|
__decorate([
|
|
432
458
|
(0, ColumnAccessControl_1.default)({
|
|
433
459
|
create: [Permission_1.default.CurrentUser],
|
|
@@ -19,6 +19,7 @@ import UserTelegram from "./UserTelegram.mjs";
|
|
|
19
19
|
import UserSlack from "./UserSlack.mjs";
|
|
20
20
|
import UserMicrosoftTeams from "./UserMicrosoftTeams.mjs";
|
|
21
21
|
import UserWebhook from "./UserWebhook.mjs";
|
|
22
|
+
import CustomNotificationChannel from "./CustomNotificationChannel.mjs";
|
|
22
23
|
import UserWhatsApp from "./UserWhatsApp.mjs";
|
|
23
24
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel.mjs";
|
|
24
25
|
import ObjectID from "../../Types/ObjectID.mjs";
|
|
@@ -73,6 +74,8 @@ export default class UserOnCallLogTimeline extends BaseModel {
|
|
|
73
74
|
userMicrosoftTeamsId?: ObjectID;
|
|
74
75
|
userWebhook?: UserWebhook;
|
|
75
76
|
userWebhookId?: ObjectID;
|
|
77
|
+
customNotificationChannel?: CustomNotificationChannel;
|
|
78
|
+
customNotificationChannelId?: ObjectID;
|
|
76
79
|
userEmail?: UserEmail;
|
|
77
80
|
userEmailId?: ObjectID;
|
|
78
81
|
userPush?: UserPush;
|
|
@@ -19,6 +19,7 @@ import UserTelegram from "./UserTelegram";
|
|
|
19
19
|
import UserSlack from "./UserSlack";
|
|
20
20
|
import UserMicrosoftTeams from "./UserMicrosoftTeams";
|
|
21
21
|
import UserWebhook from "./UserWebhook";
|
|
22
|
+
import CustomNotificationChannel from "./CustomNotificationChannel";
|
|
22
23
|
import UserWhatsApp from "./UserWhatsApp";
|
|
23
24
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
24
25
|
import ObjectID from "../../Types/ObjectID";
|
|
@@ -73,6 +74,8 @@ export default class UserOnCallLogTimeline extends BaseModel {
|
|
|
73
74
|
userMicrosoftTeamsId?: ObjectID;
|
|
74
75
|
userWebhook?: UserWebhook;
|
|
75
76
|
userWebhookId?: ObjectID;
|
|
77
|
+
customNotificationChannel?: CustomNotificationChannel;
|
|
78
|
+
customNotificationChannelId?: ObjectID;
|
|
76
79
|
userEmail?: UserEmail;
|
|
77
80
|
userEmailId?: ObjectID;
|
|
78
81
|
userPush?: UserPush;
|