@oneuptime/common 14.0.106 → 14.0.107
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/AuditLog.js +1 -1
- package/Models/AnalyticsModels/Index.js +3 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.mts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.ts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.js +300 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.mjs +3 -0
- package/Models/DatabaseModels/CallLog.d.mts +4 -0
- package/Models/DatabaseModels/CallLog.d.ts +4 -0
- package/Models/DatabaseModels/CallLog.js +85 -0
- package/Models/DatabaseModels/DataBiConnection.d.mts +3 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +3 -0
- package/Models/DatabaseModels/DataBiConnection.js +47 -1
- package/Models/DatabaseModels/DataDashboard.d.mts +10 -0
- package/Models/DatabaseModels/DataDashboard.d.ts +10 -0
- package/Models/DatabaseModels/DataDashboard.js +129 -2
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +55 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.mts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.ts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.js +536 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.mjs +2 -0
- package/Models/DatabaseModels/NetworkSite.d.mts +1 -0
- package/Models/DatabaseModels/NetworkSite.d.ts +1 -0
- package/Models/DatabaseModels/NetworkSite.js +51 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +41 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.mts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.ts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +80 -1
- package/Models/DatabaseModels/RumApplication.d.mts +2 -0
- package/Models/DatabaseModels/RumApplication.d.ts +2 -0
- package/Models/DatabaseModels/RumApplication.js +108 -0
- package/Models/DatabaseModels/Team.js +10 -2
- package/Models/DatabaseModels/TeamComplianceSetting.js +8 -1
- package/Models/DatabaseModels/TeamCustomRole.js +9 -1
- package/Models/DatabaseModels/TeamMember.js +15 -1
- package/Models/DatabaseModels/TeamOwnerTeam.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.js +325 -0
- package/Models/DatabaseModels/TeamOwnerTeam.mjs +2 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.js +331 -0
- package/Models/DatabaseModels/TeamOwnerUser.mjs +2 -0
- package/Models/DatabaseModels/TeamPermission.js +12 -1
- package/Models/DatabaseModels/TelemetryUsageBilling.d.mts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.d.ts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.js +34 -0
- package/Types/AI/AIActionWords.d.mts +1 -0
- package/Types/AI/AIActionWords.d.ts +1 -0
- package/Types/AI/AIActionWords.js +15 -4
- package/Types/AI/AIChatRecordSeen.d.mts +3 -0
- package/Types/AI/AIChatRecordSeen.d.ts +3 -0
- package/Types/AI/AIChatRecordSeen.js +28 -3
- package/Types/AI/AIChatRecordSeen.mjs +1 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.mts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.ts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.js +7 -0
- package/Types/AuditLog/AuditLogRetention.d.mts +10 -0
- package/Types/AuditLog/AuditLogRetention.d.ts +10 -0
- package/Types/AuditLog/AuditLogRetention.js +91 -0
- package/Types/AuditLog/AuditLogRetention.mjs +8 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.mts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.ts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.js +224 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.mjs +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.mts +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.ts +3 -0
- package/Types/CodeRepository/CodeFileSeen.js +61 -3
- package/Types/DataObservability/DataDashboardActivity.d.mts +40 -0
- package/Types/DataObservability/DataDashboardActivity.d.ts +40 -0
- package/Types/DataObservability/DataDashboardActivity.js +119 -0
- package/Types/DataObservability/DataDashboardActivity.mjs +12 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +2 -0
- package/Types/DataObservability/DataTableLineage.d.mts +87 -0
- package/Types/DataObservability/DataTableLineage.d.ts +87 -0
- package/Types/DataObservability/DataTableLineage.js +111 -0
- package/Types/DataObservability/DataTableLineage.mjs +19 -0
- package/Types/DataSecurity/DataStoreKind.d.mts +1 -0
- package/Types/DataSecurity/DataStoreKind.d.ts +1 -0
- package/Types/DataSecurity/DataStoreKind.js +3 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +6 -0
- package/Types/DatabaseServer/DatabaseServerMetricCatalog.js +71 -82
- package/Types/Date.d.mts +4 -0
- package/Types/Date.d.ts +4 -0
- package/Types/Date.js +47 -2
- package/Types/Date.mjs +2 -0
- package/Types/DateLanguage.d.mts +9 -0
- package/Types/DateLanguage.d.ts +9 -0
- package/Types/DateLanguage.js +79 -1
- package/Types/DateLanguage.mjs +4 -0
- package/Types/MessageQueue/MessageQueueMetricCatalog.js +61 -61
- package/Types/Monitor/CriteriaFilterTerms.d.mts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.d.ts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.js +166 -0
- package/Types/Monitor/CriteriaFilterTerms.mjs +4 -0
- package/Types/Monitor/EvaluationSentence.d.mts +37 -0
- package/Types/Monitor/EvaluationSentence.d.ts +37 -0
- package/Types/Monitor/EvaluationSentence.js +298 -0
- package/Types/Monitor/EvaluationSentence.mjs +12 -0
- package/Types/Monitor/MonitorCriteria.d.mts +2 -0
- package/Types/Monitor/MonitorCriteria.d.ts +2 -0
- package/Types/Monitor/MonitorCriteria.js +8 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.mts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.ts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +243 -194
- package/Types/Monitor/MonitorEvaluationDetails.d.mts +2 -0
- package/Types/Monitor/MonitorEvaluationDetails.d.ts +2 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.mts +4 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.ts +4 -0
- package/Types/Monitor/MonitorStep.d.mts +2 -0
- package/Types/Monitor/MonitorStep.d.ts +2 -0
- package/Types/Monitor/MonitorSteps.d.mts +2 -0
- package/Types/Monitor/MonitorSteps.d.ts +2 -0
- package/Types/Monitor/MonitorType.d.mts +1 -0
- package/Types/Monitor/MonitorType.d.ts +1 -0
- package/Types/Monitor/MonitorType.js +12 -0
- package/Types/Monitor/TelemetryObservation.d.mts +15 -0
- package/Types/Monitor/TelemetryObservation.d.ts +15 -0
- package/Types/Monitor/TelemetryObservation.js +28 -0
- package/Types/Monitor/TelemetryObservation.mjs +2 -0
- package/Types/NetworkDevice/DeviceNaming.d.mts +87 -0
- package/Types/NetworkDevice/DeviceNaming.d.ts +87 -0
- package/Types/NetworkDevice/DeviceNaming.js +279 -0
- package/Types/NetworkDevice/DeviceNaming.mjs +24 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.mts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.ts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.js +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.mts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.ts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.js +351 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.mjs +15 -0
- package/Types/Permission.d.mts +5 -0
- package/Types/Permission.d.ts +5 -0
- package/Types/Permission.js +61 -5
- package/Types/Rules/RuleCriteriaFieldRegistry.js +12 -0
- package/Types/Rules/RuleCriteriaSubject.js +1 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.mts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.ts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.js +166 -0
- package/Types/Rum/ProductAnalyticsEventReads.mjs +27 -0
- package/Types/Rum/ProductAnalyticsEvents.d.mts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.d.ts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.js +477 -0
- package/Types/Rum/ProductAnalyticsEvents.mjs +40 -0
- package/Types/Rum/SessionReplay.d.mts +4 -0
- package/Types/Rum/SessionReplay.d.ts +4 -0
- package/Types/Rum/SessionReplayHealth.js +1 -1
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.mts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.ts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.js +51 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.mjs +4 -0
- package/Types/Team/BuiltInTeam.d.mts +1 -0
- package/Types/Team/BuiltInTeam.d.ts +1 -0
- package/Types/Team/BuiltInTeam.js +14 -1
- package/Types/Team/BuiltInTeam.mjs +1 -0
- package/Types/Telemetry/TelemetryUsage.d.mts +7 -2
- package/Types/Telemetry/TelemetryUsage.d.ts +7 -2
- package/Types/Telemetry/TelemetryUsage.js +24 -5
- package/Types/Telemetry/TelemetryUsage.mjs +3 -0
- package/Types/UserNotification/UserNotificationStatus.d.mts +2 -1
- package/Types/UserNotification/UserNotificationStatus.d.ts +2 -1
- package/Types/UserNotification/UserNotificationStatus.js +8 -0
- package/Types/Workspace/NotificationRules/EventType.d.mts +2 -1
- package/Types/Workspace/NotificationRules/EventType.d.ts +2 -1
- package/Types/Workspace/NotificationRules/EventType.js +8 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleInvites.js +5 -1
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.mts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.ts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.js +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.mjs +1 -0
- package/Utils/AI/InvestigationReport.js +93 -21
- package/Utils/AI/InvestigationReportLanguages.d.mts +25 -0
- package/Utils/AI/InvestigationReportLanguages.d.ts +25 -0
- package/Utils/AI/InvestigationReportLanguages.js +603 -0
- package/Utils/AI/InvestigationReportLanguages.mjs +11 -0
- package/Utils/Dashboard/TableThresholds.js +5 -2
- package/Utils/Monitor/MonitorLogSummaryUtil.d.mts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.d.ts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.js +170 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +242 -0
- package/Utils/Monitor/MonitorRootCauseWording.mjs +2 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.mts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.ts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -2
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.mts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.ts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.js +303 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.mjs +8 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.mts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.ts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.js +649 -0
- package/Utils/NetworkDevice/Naming/NamePattern.mjs +22 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.js +467 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.mjs +14 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.mts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.ts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.js +327 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.mjs +7 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.mts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.ts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.js +8 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.mts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.ts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.js +1 -0
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.mts +7 -6
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.ts +7 -6
- package/Utils/SessionReplay/SessionReplayHealth.js +703 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.mts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.ts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.js +39 -0
- package/Utils/Slo/SloErrorBudgetPolicy.mjs +1 -0
- package/Utils/Slo/SloFeedMarkdown.d.mts +19 -4
- package/Utils/Slo/SloFeedMarkdown.d.ts +19 -4
- package/Utils/Slo/SloFeedMarkdown.js +64 -17
- package/Utils/Slo/SloFeedMarkdown.mjs +4 -0
- package/Utils/StatusPage/ResourceExplorer.js +9 -8
- package/Utils/TotpSetupKey.d.mts +3 -0
- package/Utils/TotpSetupKey.d.ts +3 -0
- package/Utils/TotpSetupKey.js +72 -0
- package/Utils/TotpSetupKey.mjs +4 -0
- package/Utils/Workspace/WorkspaceChannelName.js +5 -1
- package/package.json +1 -1
- package/Utils/Rum/SessionReplayHealth.js +0 -558
- /package/Utils/{Rum → SessionReplay}/SessionReplayHealth.mjs +0 -0
|
@@ -4,6 +4,11 @@ export declare const TELEMETRY_USAGE_PROJECT_ROUTE: string;
|
|
|
4
4
|
export declare const TELEMETRY_USAGE_ADMIN_PROJECTS_ROUTE: string;
|
|
5
5
|
export declare const TELEMETRY_USAGE_PRODUCT_TYPES: ReadonlyArray<ProductType>;
|
|
6
6
|
export declare const isTelemetryUsageProductType: (value: unknown) => value is ProductType;
|
|
7
|
+
export type TelemetryUsageExceptionsSignal = "Exceptions";
|
|
8
|
+
export declare const TELEMETRY_USAGE_EXCEPTIONS_SIGNAL: TelemetryUsageExceptionsSignal;
|
|
9
|
+
export type TelemetryUsageSignal = ProductType | TelemetryUsageExceptionsSignal;
|
|
10
|
+
export declare const TELEMETRY_USAGE_SIGNALS: ReadonlyArray<TelemetryUsageSignal>;
|
|
11
|
+
export declare const isTelemetryUsageSignal: (value: unknown) => value is TelemetryUsageSignal;
|
|
7
12
|
export declare const TELEMETRY_USAGE_DEFAULT_RETENTION_IN_DAYS: number;
|
|
8
13
|
export declare const TELEMETRY_USAGE_MIN_RETENTION_IN_DAYS: number;
|
|
9
14
|
export declare const TELEMETRY_USAGE_MAX_RETENTION_IN_DAYS: number;
|
|
@@ -31,7 +36,7 @@ export interface TelemetryUsageAmount {
|
|
|
31
36
|
dataIngestedInGB: number;
|
|
32
37
|
totalCostInUSD?: number | undefined;
|
|
33
38
|
}
|
|
34
|
-
export type TelemetryUsageByProduct = Partial<Record<
|
|
39
|
+
export type TelemetryUsageByProduct = Partial<Record<TelemetryUsageSignal, TelemetryUsageAmount>>;
|
|
35
40
|
export interface TelemetryUsageDaySummary {
|
|
36
41
|
day: string;
|
|
37
42
|
byProduct: TelemetryUsageByProduct;
|
|
@@ -62,7 +67,7 @@ export interface TelemetryProjectUsageSummary {
|
|
|
62
67
|
byProduct: TelemetryUsageByProduct;
|
|
63
68
|
total: TelemetryUsageAmount;
|
|
64
69
|
}
|
|
65
|
-
export type TelemetryProjectUsageSortBy = "total" | "name" |
|
|
70
|
+
export type TelemetryProjectUsageSortBy = "total" | "name" | TelemetryUsageSignal;
|
|
66
71
|
export interface TelemetryProjectUsagePage {
|
|
67
72
|
startDay: string;
|
|
68
73
|
endDay: string;
|
|
@@ -4,6 +4,11 @@ export declare const TELEMETRY_USAGE_PROJECT_ROUTE: string;
|
|
|
4
4
|
export declare const TELEMETRY_USAGE_ADMIN_PROJECTS_ROUTE: string;
|
|
5
5
|
export declare const TELEMETRY_USAGE_PRODUCT_TYPES: ReadonlyArray<ProductType>;
|
|
6
6
|
export declare const isTelemetryUsageProductType: (value: unknown) => value is ProductType;
|
|
7
|
+
export type TelemetryUsageExceptionsSignal = "Exceptions";
|
|
8
|
+
export declare const TELEMETRY_USAGE_EXCEPTIONS_SIGNAL: TelemetryUsageExceptionsSignal;
|
|
9
|
+
export type TelemetryUsageSignal = ProductType | TelemetryUsageExceptionsSignal;
|
|
10
|
+
export declare const TELEMETRY_USAGE_SIGNALS: ReadonlyArray<TelemetryUsageSignal>;
|
|
11
|
+
export declare const isTelemetryUsageSignal: (value: unknown) => value is TelemetryUsageSignal;
|
|
7
12
|
export declare const TELEMETRY_USAGE_DEFAULT_RETENTION_IN_DAYS: number;
|
|
8
13
|
export declare const TELEMETRY_USAGE_MIN_RETENTION_IN_DAYS: number;
|
|
9
14
|
export declare const TELEMETRY_USAGE_MAX_RETENTION_IN_DAYS: number;
|
|
@@ -31,7 +36,7 @@ export interface TelemetryUsageAmount {
|
|
|
31
36
|
dataIngestedInGB: number;
|
|
32
37
|
totalCostInUSD?: number | undefined;
|
|
33
38
|
}
|
|
34
|
-
export type TelemetryUsageByProduct = Partial<Record<
|
|
39
|
+
export type TelemetryUsageByProduct = Partial<Record<TelemetryUsageSignal, TelemetryUsageAmount>>;
|
|
35
40
|
export interface TelemetryUsageDaySummary {
|
|
36
41
|
day: string;
|
|
37
42
|
byProduct: TelemetryUsageByProduct;
|
|
@@ -62,7 +67,7 @@ export interface TelemetryProjectUsageSummary {
|
|
|
62
67
|
byProduct: TelemetryUsageByProduct;
|
|
63
68
|
total: TelemetryUsageAmount;
|
|
64
69
|
}
|
|
65
|
-
export type TelemetryProjectUsageSortBy = "total" | "name" |
|
|
70
|
+
export type TelemetryProjectUsageSortBy = "total" | "name" | TelemetryUsageSignal;
|
|
66
71
|
export interface TelemetryProjectUsagePage {
|
|
67
72
|
startDay: string;
|
|
68
73
|
endDay: string;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getEmptyTelemetryUsageAmount = exports.addTelemetryUsageAmounts = exports.isTelemetryProjectUsageSortBy = exports.getTelemetryUsageDays = exports.getTelemetryUsageWindow = exports.getTelemetryUsageRangeOfLastDays = exports.parseTelemetryUsageDay = exports.toTelemetryUsageDay = exports.TELEMETRY_USAGE_DEFAULT_PROJECTS_PAGE_SIZE = exports.TELEMETRY_USAGE_MAX_PROJECTS_PAGE_SIZE = exports.TELEMETRY_USAGE_MAX_RANGE_IN_DAYS = exports.TELEMETRY_USAGE_DEFAULT_RANGE_IN_DAYS = exports.TELEMETRY_USAGE_RANGE_OPTIONS_IN_DAYS = exports.getTelemetryUsageRetentionInDays = exports.TELEMETRY_USAGE_MAX_RETENTION_IN_DAYS = exports.TELEMETRY_USAGE_MIN_RETENTION_IN_DAYS = exports.TELEMETRY_USAGE_DEFAULT_RETENTION_IN_DAYS = exports.isTelemetryUsageProductType = exports.TELEMETRY_USAGE_PRODUCT_TYPES = exports.TELEMETRY_USAGE_ADMIN_PROJECTS_ROUTE = exports.TELEMETRY_USAGE_PROJECT_ROUTE = void 0;
|
|
6
|
+
exports.getEmptyTelemetryUsageAmount = exports.addTelemetryUsageAmounts = exports.isTelemetryProjectUsageSortBy = exports.getTelemetryUsageDays = exports.getTelemetryUsageWindow = exports.getTelemetryUsageRangeOfLastDays = exports.parseTelemetryUsageDay = exports.toTelemetryUsageDay = exports.TELEMETRY_USAGE_DEFAULT_PROJECTS_PAGE_SIZE = exports.TELEMETRY_USAGE_MAX_PROJECTS_PAGE_SIZE = exports.TELEMETRY_USAGE_MAX_RANGE_IN_DAYS = exports.TELEMETRY_USAGE_DEFAULT_RANGE_IN_DAYS = exports.TELEMETRY_USAGE_RANGE_OPTIONS_IN_DAYS = exports.getTelemetryUsageRetentionInDays = exports.TELEMETRY_USAGE_MAX_RETENTION_IN_DAYS = exports.TELEMETRY_USAGE_MIN_RETENTION_IN_DAYS = exports.TELEMETRY_USAGE_DEFAULT_RETENTION_IN_DAYS = exports.isTelemetryUsageSignal = exports.TELEMETRY_USAGE_SIGNALS = exports.TELEMETRY_USAGE_EXCEPTIONS_SIGNAL = exports.isTelemetryUsageProductType = exports.TELEMETRY_USAGE_PRODUCT_TYPES = exports.TELEMETRY_USAGE_ADMIN_PROJECTS_ROUTE = exports.TELEMETRY_USAGE_PROJECT_ROUTE = void 0;
|
|
7
7
|
const ProductType_1 = __importDefault(require("../MeteredPlan/ProductType"));
|
|
8
8
|
/*
|
|
9
9
|
* Telemetry usage: how many GB of each signal each resource of a project sent
|
|
@@ -25,9 +25,10 @@ const ProductType_1 = __importDefault(require("../MeteredPlan/ProductType"));
|
|
|
25
25
|
exports.TELEMETRY_USAGE_PROJECT_ROUTE = "/telemetry-usage/project";
|
|
26
26
|
exports.TELEMETRY_USAGE_ADMIN_PROJECTS_ROUTE = "/telemetry-usage/admin/projects";
|
|
27
27
|
/*
|
|
28
|
-
* The
|
|
29
|
-
*
|
|
30
|
-
* and Profiles their samples, as billing
|
|
28
|
+
* The products usage is counted for: each is one product of the usage rows,
|
|
29
|
+
* staged and - where billing is on - billed on its own. Traces count the
|
|
30
|
+
* exceptions recorded with them, and Profiles their samples, as billing
|
|
31
|
+
* counts them.
|
|
31
32
|
*/
|
|
32
33
|
exports.TELEMETRY_USAGE_PRODUCT_TYPES = [
|
|
33
34
|
ProductType_1.default.Logs,
|
|
@@ -41,6 +42,24 @@ const isTelemetryUsageProductType = (value) => {
|
|
|
41
42
|
return exports.TELEMETRY_USAGE_PRODUCT_TYPES.includes(value);
|
|
42
43
|
};
|
|
43
44
|
exports.isTelemetryUsageProductType = isTelemetryUsageProductType;
|
|
45
|
+
exports.TELEMETRY_USAGE_EXCEPTIONS_SIGNAL = "Exceptions";
|
|
46
|
+
/*
|
|
47
|
+
* The signals the usage pages and the API show, in the order they are shown:
|
|
48
|
+
* every product, and the exceptions after the traces they are billed with.
|
|
49
|
+
*/
|
|
50
|
+
exports.TELEMETRY_USAGE_SIGNALS = [
|
|
51
|
+
ProductType_1.default.Logs,
|
|
52
|
+
ProductType_1.default.Metrics,
|
|
53
|
+
ProductType_1.default.Traces,
|
|
54
|
+
exports.TELEMETRY_USAGE_EXCEPTIONS_SIGNAL,
|
|
55
|
+
ProductType_1.default.Profiles,
|
|
56
|
+
ProductType_1.default.SessionReplay,
|
|
57
|
+
ProductType_1.default.SecurityEvents,
|
|
58
|
+
];
|
|
59
|
+
const isTelemetryUsageSignal = (value) => {
|
|
60
|
+
return exports.TELEMETRY_USAGE_SIGNALS.includes(value);
|
|
61
|
+
};
|
|
62
|
+
exports.isTelemetryUsageSignal = isTelemetryUsageSignal;
|
|
44
63
|
/*
|
|
45
64
|
* How long usage rows are kept: an instance-wide setting (Admin Dashboard >
|
|
46
65
|
* Settings > Data Retention, GlobalConfig.telemetryUsageRetentionInDays),
|
|
@@ -152,7 +171,7 @@ const getTelemetryUsageDays = (window) => {
|
|
|
152
171
|
};
|
|
153
172
|
exports.getTelemetryUsageDays = getTelemetryUsageDays;
|
|
154
173
|
const isTelemetryProjectUsageSortBy = (value) => {
|
|
155
|
-
return
|
|
174
|
+
return value === "total" || value === "name" || (0, exports.isTelemetryUsageSignal)(value);
|
|
156
175
|
};
|
|
157
176
|
exports.isTelemetryProjectUsageSortBy = isTelemetryProjectUsageSortBy;
|
|
158
177
|
// The sum of two amounts; a cost only when both carry one.
|
|
@@ -3,6 +3,7 @@ export const TELEMETRY_USAGE_ADMIN_PROJECTS_ROUTE = commonJsModule.TELEMETRY_USA
|
|
|
3
3
|
export const TELEMETRY_USAGE_DEFAULT_PROJECTS_PAGE_SIZE = commonJsModule.TELEMETRY_USAGE_DEFAULT_PROJECTS_PAGE_SIZE;
|
|
4
4
|
export const TELEMETRY_USAGE_DEFAULT_RANGE_IN_DAYS = commonJsModule.TELEMETRY_USAGE_DEFAULT_RANGE_IN_DAYS;
|
|
5
5
|
export const TELEMETRY_USAGE_DEFAULT_RETENTION_IN_DAYS = commonJsModule.TELEMETRY_USAGE_DEFAULT_RETENTION_IN_DAYS;
|
|
6
|
+
export const TELEMETRY_USAGE_EXCEPTIONS_SIGNAL = commonJsModule.TELEMETRY_USAGE_EXCEPTIONS_SIGNAL;
|
|
6
7
|
export const TELEMETRY_USAGE_MAX_PROJECTS_PAGE_SIZE = commonJsModule.TELEMETRY_USAGE_MAX_PROJECTS_PAGE_SIZE;
|
|
7
8
|
export const TELEMETRY_USAGE_MAX_RANGE_IN_DAYS = commonJsModule.TELEMETRY_USAGE_MAX_RANGE_IN_DAYS;
|
|
8
9
|
export const TELEMETRY_USAGE_MAX_RETENTION_IN_DAYS = commonJsModule.TELEMETRY_USAGE_MAX_RETENTION_IN_DAYS;
|
|
@@ -10,6 +11,7 @@ export const TELEMETRY_USAGE_MIN_RETENTION_IN_DAYS = commonJsModule.TELEMETRY_US
|
|
|
10
11
|
export const TELEMETRY_USAGE_PRODUCT_TYPES = commonJsModule.TELEMETRY_USAGE_PRODUCT_TYPES;
|
|
11
12
|
export const TELEMETRY_USAGE_PROJECT_ROUTE = commonJsModule.TELEMETRY_USAGE_PROJECT_ROUTE;
|
|
12
13
|
export const TELEMETRY_USAGE_RANGE_OPTIONS_IN_DAYS = commonJsModule.TELEMETRY_USAGE_RANGE_OPTIONS_IN_DAYS;
|
|
14
|
+
export const TELEMETRY_USAGE_SIGNALS = commonJsModule.TELEMETRY_USAGE_SIGNALS;
|
|
13
15
|
export const addTelemetryUsageAmounts = commonJsModule.addTelemetryUsageAmounts;
|
|
14
16
|
export const getEmptyTelemetryUsageAmount = commonJsModule.getEmptyTelemetryUsageAmount;
|
|
15
17
|
export const getTelemetryUsageDays = commonJsModule.getTelemetryUsageDays;
|
|
@@ -18,5 +20,6 @@ export const getTelemetryUsageRetentionInDays = commonJsModule.getTelemetryUsage
|
|
|
18
20
|
export const getTelemetryUsageWindow = commonJsModule.getTelemetryUsageWindow;
|
|
19
21
|
export const isTelemetryProjectUsageSortBy = commonJsModule.isTelemetryProjectUsageSortBy;
|
|
20
22
|
export const isTelemetryUsageProductType = commonJsModule.isTelemetryUsageProductType;
|
|
23
|
+
export const isTelemetryUsageSignal = commonJsModule.isTelemetryUsageSignal;
|
|
21
24
|
export const parseTelemetryUsageDay = commonJsModule.parseTelemetryUsageDay;
|
|
22
25
|
export const toTelemetryUsageDay = commonJsModule.toTelemetryUsageDay;
|
|
@@ -9,5 +9,13 @@ var UserNotificationStatus;
|
|
|
9
9
|
UserNotificationStatus["Skipped"] = "Skipped";
|
|
10
10
|
// The notification the person passed their page on from (OnCallPagePassOn).
|
|
11
11
|
UserNotificationStatus["PassedOn"] = "Passed On";
|
|
12
|
+
/*
|
|
13
|
+
* A phone call that went out and rang, and that the person did not pick
|
|
14
|
+
* up - it rang out, or the line was busy - as Twilio tells when the call
|
|
15
|
+
* ends (the notification server's call status callback). It reached their
|
|
16
|
+
* phone, so it counts as out (OnCallPageChannel); the record's feed says
|
|
17
|
+
* they did not answer it.
|
|
18
|
+
*/
|
|
19
|
+
UserNotificationStatus["NotAnswered"] = "Not Answered";
|
|
12
20
|
})(UserNotificationStatus || (UserNotificationStatus = {}));
|
|
13
21
|
exports.default = UserNotificationStatus;
|
|
@@ -7,6 +7,7 @@ declare enum NotificationRuleEventType {
|
|
|
7
7
|
ScheduledMaintenance = "Scheduled Maintenance",
|
|
8
8
|
OnCallDutyPolicy = "On-Call Duty Policy",
|
|
9
9
|
SecurityCase = "Security Case",
|
|
10
|
-
SecurityHunt = "Security Hunt"
|
|
10
|
+
SecurityHunt = "Security Hunt",
|
|
11
|
+
ServiceLevelObjective = "Service Level Objective"
|
|
11
12
|
}
|
|
12
13
|
export default NotificationRuleEventType;
|
|
@@ -7,6 +7,7 @@ declare enum NotificationRuleEventType {
|
|
|
7
7
|
ScheduledMaintenance = "Scheduled Maintenance",
|
|
8
8
|
OnCallDutyPolicy = "On-Call Duty Policy",
|
|
9
9
|
SecurityCase = "Security Case",
|
|
10
|
-
SecurityHunt = "Security Hunt"
|
|
10
|
+
SecurityHunt = "Security Hunt",
|
|
11
|
+
ServiceLevelObjective = "Service Level Objective"
|
|
11
12
|
}
|
|
12
13
|
export default NotificationRuleEventType;
|
|
@@ -22,5 +22,13 @@ var NotificationRuleEventType;
|
|
|
22
22
|
* (SecurityHuntNotifications). A hunt gets no channel of its own.
|
|
23
23
|
*/
|
|
24
24
|
NotificationRuleEventType["SecurityHunt"] = "Security Hunt";
|
|
25
|
+
/*
|
|
26
|
+
* An SLO's error budget policy: posted to the channels and chats its rules
|
|
27
|
+
* name each time the evaluation moves the SLO into a tier, to a less
|
|
28
|
+
* severe one or out of every tier, or freezes its deployments or allows
|
|
29
|
+
* them again (SloWorkspaceNotifications). An SLO gets no channel of its
|
|
30
|
+
* own.
|
|
31
|
+
*/
|
|
32
|
+
NotificationRuleEventType["ServiceLevelObjective"] = "Service Level Objective";
|
|
25
33
|
})(NotificationRuleEventType || (NotificationRuleEventType = {}));
|
|
26
34
|
exports.default = NotificationRuleEventType;
|
|
@@ -6,6 +6,7 @@ import Label from "../../../Models/DatabaseModels/Label.mjs";
|
|
|
6
6
|
import Monitor from "../../../Models/DatabaseModels/Monitor.mjs";
|
|
7
7
|
import MonitorStatus from "../../../Models/DatabaseModels/MonitorStatus.mjs";
|
|
8
8
|
import ScheduledMaintenanceState from "../../../Models/DatabaseModels/ScheduledMaintenanceState.mjs";
|
|
9
|
+
import ServiceLevelObjective from "../../../Models/DatabaseModels/ServiceLevelObjective.mjs";
|
|
9
10
|
import { DropdownOption } from "../../../UI/Components/Dropdown/Dropdown.mjs";
|
|
10
11
|
import SecurityCasePriority from "../../../Models/DatabaseModels/SecurityCasePriority.mjs";
|
|
11
12
|
import SecurityCaseStatus from "../../../Models/DatabaseModels/SecurityCaseStatus.mjs";
|
|
@@ -51,7 +52,11 @@ export declare enum NotificationRuleConditionCheckOn {
|
|
|
51
52
|
SecurityCaseStatus = "Security Case Status",
|
|
52
53
|
SecurityCaseSource = "Security Case Source",
|
|
53
54
|
SecurityCaseLabels = "Security Case Labels",
|
|
54
|
-
SecurityHuntName = "Security Hunt Name"
|
|
55
|
+
SecurityHuntName = "Security Hunt Name",
|
|
56
|
+
SloName = "SLO Name",
|
|
57
|
+
Slos = "SLOs",
|
|
58
|
+
SloLabels = "SLO Labels",
|
|
59
|
+
SloErrorBudgetPolicyChange = "Error Budget Policy Change"
|
|
55
60
|
}
|
|
56
61
|
export declare enum ConditionType {
|
|
57
62
|
EqualTo = "Equal To",
|
|
@@ -111,6 +116,7 @@ export declare class NotificationRuleConditionUtil {
|
|
|
111
116
|
monitors: Array<Monitor>;
|
|
112
117
|
securityCasePriorities?: Array<SecurityCasePriority> | undefined;
|
|
113
118
|
securityCaseStatuses?: Array<SecurityCaseStatus> | undefined;
|
|
119
|
+
serviceLevelObjectives?: Array<ServiceLevelObjective> | undefined;
|
|
114
120
|
checkOn: NotificationRuleConditionCheckOn;
|
|
115
121
|
}): Array<DropdownOption>;
|
|
116
122
|
static getCheckOnByEventType(eventType: NotificationRuleEventType): Array<NotificationRuleConditionCheckOn>;
|
|
@@ -6,6 +6,7 @@ import Label from "../../../Models/DatabaseModels/Label";
|
|
|
6
6
|
import Monitor from "../../../Models/DatabaseModels/Monitor";
|
|
7
7
|
import MonitorStatus from "../../../Models/DatabaseModels/MonitorStatus";
|
|
8
8
|
import ScheduledMaintenanceState from "../../../Models/DatabaseModels/ScheduledMaintenanceState";
|
|
9
|
+
import ServiceLevelObjective from "../../../Models/DatabaseModels/ServiceLevelObjective";
|
|
9
10
|
import { DropdownOption } from "../../../UI/Components/Dropdown/Dropdown";
|
|
10
11
|
import SecurityCasePriority from "../../../Models/DatabaseModels/SecurityCasePriority";
|
|
11
12
|
import SecurityCaseStatus from "../../../Models/DatabaseModels/SecurityCaseStatus";
|
|
@@ -51,7 +52,11 @@ export declare enum NotificationRuleConditionCheckOn {
|
|
|
51
52
|
SecurityCaseStatus = "Security Case Status",
|
|
52
53
|
SecurityCaseSource = "Security Case Source",
|
|
53
54
|
SecurityCaseLabels = "Security Case Labels",
|
|
54
|
-
SecurityHuntName = "Security Hunt Name"
|
|
55
|
+
SecurityHuntName = "Security Hunt Name",
|
|
56
|
+
SloName = "SLO Name",
|
|
57
|
+
Slos = "SLOs",
|
|
58
|
+
SloLabels = "SLO Labels",
|
|
59
|
+
SloErrorBudgetPolicyChange = "Error Budget Policy Change"
|
|
55
60
|
}
|
|
56
61
|
export declare enum ConditionType {
|
|
57
62
|
EqualTo = "Equal To",
|
|
@@ -111,6 +116,7 @@ export declare class NotificationRuleConditionUtil {
|
|
|
111
116
|
monitors: Array<Monitor>;
|
|
112
117
|
securityCasePriorities?: Array<SecurityCasePriority> | undefined;
|
|
113
118
|
securityCaseStatuses?: Array<SecurityCaseStatus> | undefined;
|
|
119
|
+
serviceLevelObjectives?: Array<ServiceLevelObjective> | undefined;
|
|
114
120
|
checkOn: NotificationRuleConditionCheckOn;
|
|
115
121
|
}): Array<DropdownOption>;
|
|
116
122
|
static getCheckOnByEventType(eventType: NotificationRuleEventType): Array<NotificationRuleConditionCheckOn>;
|
|
@@ -69,9 +69,13 @@ class NotificationRuleInvites {
|
|
|
69
69
|
case EventType_1.default.Monitor:
|
|
70
70
|
case EventType_1.default.OnCallDutyPolicy:
|
|
71
71
|
return [NotificationRuleInvitee.Owners];
|
|
72
|
-
|
|
72
|
+
/*
|
|
73
|
+
* A security case, a hunt and an SLO's error budget policy get no
|
|
74
|
+
* channel of their own to add anybody to.
|
|
75
|
+
*/
|
|
73
76
|
case EventType_1.default.SecurityCase:
|
|
74
77
|
case EventType_1.default.SecurityHunt:
|
|
78
|
+
case EventType_1.default.ServiceLevelObjective:
|
|
75
79
|
return [];
|
|
76
80
|
default:
|
|
77
81
|
return [];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./ServiceLevelObjectiveNotificationRule.js";
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
* those parts out separately, and the server wants the evidence labels and
|
|
11
11
|
* the incident/alert numbers the note mentions.
|
|
12
12
|
*
|
|
13
|
+
* The model writes the note in the language the team's AI context asks for,
|
|
14
|
+
* headings included (issue #6542): a heading or an Impact label in any
|
|
15
|
+
* language the Dashboard reads is read as the English one
|
|
16
|
+
* (InvestigationReportLanguages), with the full-width colon and brackets
|
|
17
|
+
* Chinese and Japanese write. What the server writes - the heading, the
|
|
18
|
+
* stop note, the Evidence checked list, the footer - stays English.
|
|
19
|
+
*
|
|
13
20
|
* Everything here is text-only and free of React and server code (it reads
|
|
14
21
|
* only the stop note's openings, from Types) so it loads the same in
|
|
15
22
|
* the dashboard bundle, the API server and Common jest. None of it turns
|
|
@@ -29,6 +36,7 @@ exports.parseImpactLines = parseImpactLines;
|
|
|
29
36
|
exports.tokenizeEventReferences = tokenizeEventReferences;
|
|
30
37
|
exports.extractEventReferences = extractEventReferences;
|
|
31
38
|
const AIAgentRunLimits_1 = require("../../Types/AI/AIAgentRunLimits");
|
|
39
|
+
const InvestigationReportLanguages_1 = require("./InvestigationReportLanguages");
|
|
32
40
|
exports.AI_ROOT_CAUSE_HEADING_TEXT = "AI — Automated Root Cause Analysis";
|
|
33
41
|
/*
|
|
34
42
|
* The heading of a security case's triage report (SecurityCaseTriageRunner,
|
|
@@ -153,6 +161,21 @@ const KNOWN_LABELS = new Map([
|
|
|
153
161
|
["recommendations", InvestigationReportSectionKind.NextSteps],
|
|
154
162
|
["evidence checked", "EvidenceChecked"],
|
|
155
163
|
]);
|
|
164
|
+
/*
|
|
165
|
+
* The section a heading of another language names: "摘要" is the Summary,
|
|
166
|
+
* "Belege" the Evidence (InvestigationReportLanguages). An Impact label's
|
|
167
|
+
* word is no heading.
|
|
168
|
+
*/
|
|
169
|
+
const TRANSLATED_HEADING_KINDS = new Map([
|
|
170
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.Summary, InvestigationReportSectionKind.Summary],
|
|
171
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.Impact, InvestigationReportSectionKind.Impact],
|
|
172
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.RootCause, InvestigationReportSectionKind.RootCause],
|
|
173
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.Evidence, InvestigationReportSectionKind.Evidence],
|
|
174
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.RuledOut, InvestigationReportSectionKind.RuledOut],
|
|
175
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.NextSteps, InvestigationReportSectionKind.NextSteps],
|
|
176
|
+
]);
|
|
177
|
+
// The colons a label ends with: ASCII, and the full-width one CJK text writes.
|
|
178
|
+
const LABEL_COLONS = [":", "\uFF1A"];
|
|
156
179
|
// What a brand heading says after "AI — ", lower case.
|
|
157
180
|
const BRAND_HEADING_MARKERS = [
|
|
158
181
|
"automated root cause analysis",
|
|
@@ -178,16 +201,21 @@ const INDENTED_CODE_REGEX = /^(?: {4}|\t)/;
|
|
|
178
201
|
// The white space after the hashes is taken whole, as the fence's run is above.
|
|
179
202
|
const ATX_HEADING_REGEX = /^ {0,3}#{1,6}(?:[ \t]+(?![ \t])(.*))?$/;
|
|
180
203
|
const THEMATIC_BREAK_REGEX = /^ {0,3}(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/;
|
|
181
|
-
|
|
204
|
+
/*
|
|
205
|
+
* "(medium confidence)" after a bold label, in ASCII brackets or the
|
|
206
|
+
* full-width ones Chinese and Japanese write: "(中等置信度)".
|
|
207
|
+
*/
|
|
208
|
+
const LEADING_PARENTHETICAL_REGEX = /^[ \t]*([((][^()()]{1,80}[))])/;
|
|
182
209
|
/*
|
|
183
210
|
* Longest text worth looking up as a label: the longest known label plus a
|
|
184
211
|
* decorative prefix, a colon and a "(medium confidence)" style qualifier.
|
|
185
212
|
*/
|
|
186
213
|
const MAX_KNOWN_LABEL_INPUT_LENGTH = 160;
|
|
187
214
|
const LEADING_NUMBERING_REGEX = /^\d{1,2}[.)][ \t]+/;
|
|
188
|
-
|
|
215
|
+
// A sentence's end, in the scripts that end one otherwise too: "。", "؟", "।".
|
|
216
|
+
const ENDS_WITH_SENTENCE_PUNCTUATION_REGEX = /[.!?。!?؟।]$/;
|
|
189
217
|
// A label needs some text beyond emphasis markers and punctuation ("**_**").
|
|
190
|
-
const HAS_LABEL_TEXT_REGEX = /[^\s*_
|
|
218
|
+
const HAS_LABEL_TEXT_REGEX = /[^\s*_~`#::.—–-]/;
|
|
191
219
|
const CITATION_MARKER_TEST_REGEX = /\[C\d{1,3}\]/;
|
|
192
220
|
/*
|
|
193
221
|
* "**Label** rest" / "__Label__ rest". The optional second group lets
|
|
@@ -199,9 +227,14 @@ const CITATION_MARKER_TEST_REGEX = /\[C\d{1,3}\]/;
|
|
|
199
227
|
* label ending at every place, each try reading on to that separator.
|
|
200
228
|
*/
|
|
201
229
|
const STRONG_LEAD_REGEX = /^(?=.*$)(\*\*|__)(\*|_)?(.+?)\2?\1(.*)$/;
|
|
202
|
-
const SEPARATOR_PREFIX_REGEX = /^(?:[
|
|
203
|
-
|
|
204
|
-
|
|
230
|
+
const SEPARATOR_PREFIX_REGEX = /^(?:[::—–]|-{1,2})[ \t]*/;
|
|
231
|
+
/*
|
|
232
|
+
* The text before the first colon of a plain "Summary: body" line: a
|
|
233
|
+
* letter, then letters, spaces and ";,()" - in any script, with the marks
|
|
234
|
+
* Hindi writes its vowels with, the joiners Persian writes inside a word
|
|
235
|
+
* and the full-width brackets ("摘要:", "سرویسها:", "सारांश:").
|
|
236
|
+
*/
|
|
237
|
+
const PLAIN_LABEL_REGEX = /^\p{L}[\p{L}\p{M}\p{Cf} \t;,()()]{0,60}$/u;
|
|
205
238
|
// Bold-only lines longer than this read as emphasised prose, not a label.
|
|
206
239
|
const MAX_BOLD_LABEL_LENGTH = 80;
|
|
207
240
|
// Bold and plain labels rank below every ATX heading level (1-6).
|
|
@@ -428,21 +461,41 @@ function stripLeadingDecoration(label) {
|
|
|
428
461
|
* quadratically over a long run of spaces, and this text is model-authored:
|
|
429
462
|
* one 20 KB line froze the parser for a minute when they were regexes.
|
|
430
463
|
*/
|
|
464
|
+
// Either colon: ":", or the full-width ":" Chinese and Japanese write.
|
|
431
465
|
function endsWithColon(value) {
|
|
432
|
-
|
|
466
|
+
const trimmed = value.trimEnd();
|
|
467
|
+
return LABEL_COLONS.some((colon) => {
|
|
468
|
+
return trimmed.endsWith(colon);
|
|
469
|
+
});
|
|
433
470
|
}
|
|
434
471
|
function stripTrailingColon(value) {
|
|
435
472
|
const trimmed = value.trimEnd();
|
|
436
|
-
return trimmed
|
|
473
|
+
return endsWithColon(trimmed) ? trimmed.slice(0, -1).trimEnd() : trimmed;
|
|
474
|
+
}
|
|
475
|
+
// The first colon of either kind, or -1.
|
|
476
|
+
function indexOfFirstColon(value) {
|
|
477
|
+
let first = -1;
|
|
478
|
+
for (const colon of LABEL_COLONS) {
|
|
479
|
+
const index = value.indexOf(colon);
|
|
480
|
+
if (index !== -1 && (first === -1 || index < first)) {
|
|
481
|
+
first = index;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return first;
|
|
437
485
|
}
|
|
438
|
-
|
|
486
|
+
/*
|
|
487
|
+
* "Most likely root cause (medium confidence)" -> "Most likely root cause",
|
|
488
|
+
* and "最可能的根本原因(中等置信度)" -> "最可能的根本原因": ASCII or
|
|
489
|
+
* full-width brackets, either way round.
|
|
490
|
+
*/
|
|
439
491
|
function stripTrailingParenthetical(value) {
|
|
440
492
|
const trimmed = value.trimEnd();
|
|
441
|
-
if (!trimmed.endsWith(")")) {
|
|
493
|
+
if (!trimmed.endsWith(")") && !trimmed.endsWith(")")) {
|
|
442
494
|
return trimmed;
|
|
443
495
|
}
|
|
444
|
-
const open = trimmed.lastIndexOf("(");
|
|
445
|
-
|
|
496
|
+
const open = Math.max(trimmed.lastIndexOf("("), trimmed.lastIndexOf("("));
|
|
497
|
+
const inside = open === -1 ? "" : trimmed.slice(open + 1, -1);
|
|
498
|
+
if (open === -1 || inside.includes(")") || inside.includes(")")) {
|
|
446
499
|
return trimmed;
|
|
447
500
|
}
|
|
448
501
|
return trimmed.slice(0, open).trimEnd();
|
|
@@ -521,11 +574,18 @@ function lookupLabel(label) {
|
|
|
521
574
|
if (label.length > MAX_KNOWN_LABEL_INPUT_LENGTH) {
|
|
522
575
|
return null;
|
|
523
576
|
}
|
|
524
|
-
const
|
|
577
|
+
const bare = stripTrailingColon(stripTrailingParenthetical(stripLeadingDecoration(label)));
|
|
578
|
+
const key = bare
|
|
525
579
|
.replace(WHITESPACE_RUN_REGEX, " ")
|
|
526
580
|
.trim()
|
|
527
581
|
.toLowerCase();
|
|
528
|
-
|
|
582
|
+
const englishKind = KNOWN_LABELS.get(key);
|
|
583
|
+
if (englishKind) {
|
|
584
|
+
return englishKind;
|
|
585
|
+
}
|
|
586
|
+
// A heading in another language: "摘要", "Zusammenfassung", "الملخص".
|
|
587
|
+
const term = (0, InvestigationReportLanguages_1.readTranslatedReportTerm)(bare);
|
|
588
|
+
return term ? TRANSLATED_HEADING_KINDS.get(term) || null : null;
|
|
529
589
|
}
|
|
530
590
|
function looksLikeBoldLabel(title) {
|
|
531
591
|
return (HAS_LABEL_TEXT_REGEX.test(title) &&
|
|
@@ -559,7 +619,8 @@ function matchStrongLead(content) {
|
|
|
559
619
|
const restTrimmed = rest.trim();
|
|
560
620
|
let inlineBody = "";
|
|
561
621
|
let isBare = false;
|
|
562
|
-
|
|
622
|
+
// "**Summary**" and "**Summary**:" (or "**摘要**:").
|
|
623
|
+
if (restTrimmed === "" || LABEL_COLONS.includes(restTrimmed)) {
|
|
563
624
|
isBare = qualifier === "";
|
|
564
625
|
}
|
|
565
626
|
else {
|
|
@@ -575,7 +636,10 @@ function matchStrongLead(content) {
|
|
|
575
636
|
return null;
|
|
576
637
|
}
|
|
577
638
|
}
|
|
578
|
-
|
|
639
|
+
// A full-width bracket keeps to its word, as Chinese and Japanese write it.
|
|
640
|
+
const title = tidyTitle(qualifier
|
|
641
|
+
? `${label}${qualifier.startsWith("(") ? "" : " "}${qualifier}`
|
|
642
|
+
: label);
|
|
579
643
|
const kind = lookupLabel(label);
|
|
580
644
|
isBare = isBare && looksLikeBoldLabel(title);
|
|
581
645
|
if (kind === null && !isBare) {
|
|
@@ -583,9 +647,9 @@ function matchStrongLead(content) {
|
|
|
583
647
|
}
|
|
584
648
|
return { kind, title, inlineBody, isBare };
|
|
585
649
|
}
|
|
586
|
-
// "Summary: body" — only for known labels.
|
|
650
|
+
// "Summary: body" (or "摘要:body") — only for known labels.
|
|
587
651
|
function matchPlainLabel(content) {
|
|
588
|
-
const colon = content
|
|
652
|
+
const colon = indexOfFirstColon(content);
|
|
589
653
|
if (colon <= 0) {
|
|
590
654
|
return null;
|
|
591
655
|
}
|
|
@@ -1481,8 +1545,6 @@ const BULLET_START_REGEX = /^ {0,3}(?:[-*+]|\d{1,3}[.)])[ \t]+/;
|
|
|
1481
1545
|
* pattern reads it in time linear in the bullet.
|
|
1482
1546
|
*/
|
|
1483
1547
|
const BOLD_LABEL_REGEX = /^\*\*([^*\n]{1,200}?)\*\*[ \t]*/;
|
|
1484
|
-
// The colons a label ends with: ASCII, and the full-width one CJK text writes.
|
|
1485
|
-
const LABEL_COLONS = [":", "\uFF1A"];
|
|
1486
1548
|
// Text without the colon (and the spaces around it) it ends with.
|
|
1487
1549
|
function withoutTrailingColon(text) {
|
|
1488
1550
|
const trimmed = text.trim();
|
|
@@ -1611,6 +1673,15 @@ const IMPACT_ASPECT_WORDS = [
|
|
|
1611
1673
|
],
|
|
1612
1674
|
},
|
|
1613
1675
|
];
|
|
1676
|
+
/*
|
|
1677
|
+
* The aspect a label of another language names: "用户" and "Benutzer" are
|
|
1678
|
+
* the users (InvestigationReportLanguages).
|
|
1679
|
+
*/
|
|
1680
|
+
const TRANSLATED_IMPACT_ASPECTS = new Map([
|
|
1681
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.Users, InvestigationImpactAspect.Users],
|
|
1682
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.Services, InvestigationImpactAspect.Services],
|
|
1683
|
+
[InvestigationReportLanguages_1.InvestigationReportTerm.Slos, InvestigationImpactAspect.Slos],
|
|
1684
|
+
]);
|
|
1614
1685
|
// The aspect a line's label names, read as the report's labels are.
|
|
1615
1686
|
function getImpactAspect(labelMarkdown) {
|
|
1616
1687
|
const normalised = labelMarkdown
|
|
@@ -1622,7 +1693,8 @@ function getImpactAspect(labelMarkdown) {
|
|
|
1622
1693
|
return entry.aspect;
|
|
1623
1694
|
}
|
|
1624
1695
|
}
|
|
1625
|
-
|
|
1696
|
+
const term = (0, InvestigationReportLanguages_1.readTranslatedReportTerm)(labelMarkdown);
|
|
1697
|
+
return term ? TRANSLATED_IMPACT_ASPECTS.get(term) || null : null;
|
|
1626
1698
|
}
|
|
1627
1699
|
/*
|
|
1628
1700
|
* The lines a report's Impact section lists, one per bullet, in order;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum InvestigationReportTerm {
|
|
2
|
+
Summary = "Summary",
|
|
3
|
+
Impact = "Impact",
|
|
4
|
+
RootCause = "RootCause",
|
|
5
|
+
Evidence = "Evidence",
|
|
6
|
+
RuledOut = "RuledOut",
|
|
7
|
+
NextSteps = "NextSteps",
|
|
8
|
+
Users = "Users",
|
|
9
|
+
Services = "Services",
|
|
10
|
+
Slos = "Slos"
|
|
11
|
+
}
|
|
12
|
+
export declare const INVESTIGATION_REPORT_HEADING_TERMS: ReadonlyArray<InvestigationReportTerm>;
|
|
13
|
+
export declare const INVESTIGATION_REPORT_IMPACT_LABEL_TERMS: ReadonlyArray<InvestigationReportTerm>;
|
|
14
|
+
export interface InvestigationReportLanguage {
|
|
15
|
+
code: string;
|
|
16
|
+
words: Readonly<Record<InvestigationReportTerm, string>>;
|
|
17
|
+
otherWords: Readonly<Partial<Record<InvestigationReportTerm, ReadonlyArray<string>>>>;
|
|
18
|
+
}
|
|
19
|
+
export declare const ENGLISH_REPORT_LANGUAGE_CODE: string;
|
|
20
|
+
export declare const INVESTIGATION_REPORT_LANGUAGES: ReadonlyArray<InvestigationReportLanguage>;
|
|
21
|
+
export declare function getInvestigationReportWordKey(text: string): string;
|
|
22
|
+
export declare function readTranslatedReportTerm(text: string): InvestigationReportTerm | null;
|
|
23
|
+
export declare function getTranslatedReportWords(term: InvestigationReportTerm): Array<string>;
|
|
24
|
+
export declare function getInvestigationReportLanguage(code: string): InvestigationReportLanguage | undefined;
|
|
25
|
+
export declare const ENGLISH_REPORT_WORDS: Readonly<Record<InvestigationReportTerm, string>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum InvestigationReportTerm {
|
|
2
|
+
Summary = "Summary",
|
|
3
|
+
Impact = "Impact",
|
|
4
|
+
RootCause = "RootCause",
|
|
5
|
+
Evidence = "Evidence",
|
|
6
|
+
RuledOut = "RuledOut",
|
|
7
|
+
NextSteps = "NextSteps",
|
|
8
|
+
Users = "Users",
|
|
9
|
+
Services = "Services",
|
|
10
|
+
Slos = "Slos"
|
|
11
|
+
}
|
|
12
|
+
export declare const INVESTIGATION_REPORT_HEADING_TERMS: ReadonlyArray<InvestigationReportTerm>;
|
|
13
|
+
export declare const INVESTIGATION_REPORT_IMPACT_LABEL_TERMS: ReadonlyArray<InvestigationReportTerm>;
|
|
14
|
+
export interface InvestigationReportLanguage {
|
|
15
|
+
code: string;
|
|
16
|
+
words: Readonly<Record<InvestigationReportTerm, string>>;
|
|
17
|
+
otherWords: Readonly<Partial<Record<InvestigationReportTerm, ReadonlyArray<string>>>>;
|
|
18
|
+
}
|
|
19
|
+
export declare const ENGLISH_REPORT_LANGUAGE_CODE: string;
|
|
20
|
+
export declare const INVESTIGATION_REPORT_LANGUAGES: ReadonlyArray<InvestigationReportLanguage>;
|
|
21
|
+
export declare function getInvestigationReportWordKey(text: string): string;
|
|
22
|
+
export declare function readTranslatedReportTerm(text: string): InvestigationReportTerm | null;
|
|
23
|
+
export declare function getTranslatedReportWords(term: InvestigationReportTerm): Array<string>;
|
|
24
|
+
export declare function getInvestigationReportLanguage(code: string): InvestigationReportLanguage | undefined;
|
|
25
|
+
export declare const ENGLISH_REPORT_WORDS: Readonly<Record<InvestigationReportTerm, string>>;
|