@oneuptime/common 14.0.92 → 14.0.94
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/DatabaseModels/Alert.d.mts +2 -0
- package/Models/DatabaseModels/Alert.d.ts +2 -0
- package/Models/DatabaseModels/Alert.js +62 -1
- package/Models/DatabaseModels/AlertEpisodeMember.d.mts +1 -0
- package/Models/DatabaseModels/AlertEpisodeMember.d.ts +1 -0
- package/Models/DatabaseModels/AlertEpisodeMember.js +50 -0
- package/Models/DatabaseModels/CloudAccount.d.mts +29 -0
- package/Models/DatabaseModels/CloudAccount.d.ts +29 -0
- package/Models/DatabaseModels/CloudAccount.js +546 -0
- package/Models/DatabaseModels/CloudAccount.mjs +2 -0
- package/Models/DatabaseModels/CloudResource.d.mts +8 -0
- package/Models/DatabaseModels/CloudResource.d.ts +8 -0
- package/Models/DatabaseModels/CloudResource.js +169 -0
- package/Models/DatabaseModels/CloudResourceLabelRule.d.mts +1 -0
- package/Models/DatabaseModels/CloudResourceLabelRule.d.ts +1 -0
- package/Models/DatabaseModels/CloudResourceLabelRule.js +40 -0
- package/Models/DatabaseModels/CloudResourceOwnerRule.d.mts +1 -0
- package/Models/DatabaseModels/CloudResourceOwnerRule.d.ts +1 -0
- package/Models/DatabaseModels/CloudResourceOwnerRule.js +40 -0
- package/Models/DatabaseModels/Incident.d.mts +2 -0
- package/Models/DatabaseModels/Incident.d.ts +2 -0
- package/Models/DatabaseModels/Incident.js +54 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.d.mts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.d.ts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.js +50 -0
- package/Models/DatabaseModels/IncomingCallPolicy.js +1 -1
- package/Models/DatabaseModels/Index.js +2 -0
- package/Models/DatabaseModels/LlmProvider.js +1 -1
- package/Models/DatabaseModels/Monitor.d.mts +2 -0
- package/Models/DatabaseModels/Monitor.d.ts +2 -0
- package/Models/DatabaseModels/Monitor.js +54 -0
- package/Models/DatabaseModels/MonitorTemplate.js +10 -4
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +13 -13
- package/Models/DatabaseModels/OnCallDutyPolicy.js +1 -1
- package/Models/DatabaseModels/OpenSourceDeployment.d.mts +1 -0
- package/Models/DatabaseModels/OpenSourceDeployment.d.ts +1 -0
- package/Models/DatabaseModels/OpenSourceDeployment.js +25 -6
- package/Models/DatabaseModels/ScheduledMaintenance.d.mts +1 -0
- package/Models/DatabaseModels/ScheduledMaintenance.d.ts +1 -0
- package/Models/DatabaseModels/ScheduledMaintenance.js +50 -0
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +1 -1
- package/Models/DatabaseModels/StatusPage.d.mts +2 -0
- package/Models/DatabaseModels/StatusPage.d.ts +2 -0
- package/Models/DatabaseModels/StatusPage.js +100 -0
- package/Types/AI/AiAffectedResources.d.mts +40 -0
- package/Types/AI/AiAffectedResources.d.ts +40 -0
- package/Types/AI/AiAffectedResources.js +292 -0
- package/Types/AI/AiAffectedResources.mjs +10 -0
- package/Types/Cloud/CloudAccountSummary.d.mts +25 -0
- package/Types/Cloud/CloudAccountSummary.d.ts +25 -0
- package/Types/Cloud/CloudAccountSummary.js +114 -0
- package/Types/Cloud/CloudAccountSummary.mjs +5 -0
- package/Types/Cloud/CloudEndpointMatch.d.mts +26 -0
- package/Types/Cloud/CloudEndpointMatch.d.ts +26 -0
- package/Types/Cloud/CloudEndpointMatch.js +134 -0
- package/Types/Cloud/CloudEndpointMatch.mjs +5 -0
- package/Types/Cloud/CloudInventory.d.mts +34 -0
- package/Types/Cloud/CloudInventory.d.ts +34 -0
- package/Types/Cloud/CloudInventory.js +362 -0
- package/Types/Cloud/CloudInventory.mjs +22 -0
- package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
- package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
- package/Types/Cloud/CloudResourceCatalog.js +29 -1
- package/Types/Cloud/CloudResourceCatalog.mjs +2 -0
- package/Types/Cloud/CloudResourceIndex.d.mts +44 -0
- package/Types/Cloud/CloudResourceIndex.d.ts +44 -0
- package/Types/Cloud/CloudResourceIndex.js +191 -0
- package/Types/Cloud/CloudResourceIndex.mjs +4 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.mts +3 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.ts +3 -0
- package/Types/CloudConnection/CloudConnectionCatalog.js +70 -12
- package/Types/CloudConnection/CloudConnectionCatalog.mjs +2 -0
- package/Types/CloudConnection/CloudConnectionPaste.js +7 -1
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +43 -3
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +43 -3
- package/Types/CloudConnection/CloudConnectionSetupCommands.js +280 -30
- package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +14 -0
- package/Types/CloudConnection/CloudConnectionTest.d.mts +1 -0
- package/Types/CloudConnection/CloudConnectionTest.d.ts +1 -0
- package/Types/CloudConnection/CloudConnectionTest.js +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.mts +19 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.ts +19 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +27 -1
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.mjs +3 -0
- package/Types/Database/BlankColumnValue.d.mts +6 -0
- package/Types/Database/BlankColumnValue.d.ts +6 -0
- package/Types/Database/BlankColumnValue.js +77 -0
- package/Types/Database/BlankColumnValue.mjs +4 -0
- package/Types/Date.d.mts +1 -0
- package/Types/Date.d.ts +1 -0
- package/Types/Date.js +32 -6
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +67 -12
- package/Types/DateLanguage.mjs +2 -0
- package/Types/Domain.d.mts +2 -0
- package/Types/Domain.d.ts +2 -0
- package/Types/Domain.js +27 -0
- package/Types/Email/EmailTemplateType.d.mts +2 -0
- package/Types/Email/EmailTemplateType.d.ts +2 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/Email.d.mts +1 -0
- package/Types/Email.d.ts +1 -0
- package/Types/Email.js +16 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.d.mts +6 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.d.ts +6 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.js +41 -14
- package/Types/IncomingCall/IncomingCallPolicyRepeat.mjs +3 -0
- package/Types/Monitor/CriteriaFilter.d.mts +1 -0
- package/Types/Monitor/CriteriaFilter.d.ts +1 -0
- package/Types/Monitor/CriteriaFilter.js +9 -0
- package/Types/Monitor/DatabaseMetricCatalog.js +2 -2
- package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.mts +4 -0
- package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.ts +4 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.d.mts +20 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.d.ts +20 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.js +232 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.mjs +8 -0
- package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.mts +3 -0
- package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.ts +3 -0
- package/Types/Monitor/MonitorStepExternalStatusPageMonitor.js +35 -0
- package/Types/Monitor/MonitorTemplateSyncField.js +6 -1
- package/Types/Monitor/MonitorType.js +12 -2
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +27 -2
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.mts +1 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.ts +1 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +31 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +3 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +3 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +3 -2
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.mts +1 -0
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.ts +1 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.d.mts +15 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.d.ts +15 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.js +2 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.mjs +1 -0
- package/Types/Monitor/UptimeHistoryLabels.d.mts +5 -0
- package/Types/Monitor/UptimeHistoryLabels.d.ts +5 -0
- package/Types/Monitor/UptimeHistoryLabels.js +5 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +2 -0
- package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +10 -3
- package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.js +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.mts +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.ts +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.js +51 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.mjs +4 -0
- package/Types/ReadingDirection.d.mts +10 -0
- package/Types/ReadingDirection.d.ts +10 -0
- package/Types/ReadingDirection.js +171 -0
- package/Types/ReadingDirection.mjs +10 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.mts +8 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.ts +8 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.js +55 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.mjs +5 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.js +2 -0
- package/Types/Runbook/HttpStepVariables.d.mts +8 -0
- package/Types/Runbook/HttpStepVariables.d.ts +8 -0
- package/Types/Runbook/HttpStepVariables.js +109 -0
- package/Types/Runbook/HttpStepVariables.mjs +5 -0
- package/Types/Runbook/RunbookStep.d.mts +1 -0
- package/Types/Runbook/RunbookStep.d.ts +1 -0
- package/Types/Runbook/RunnerFeatures.d.mts +1 -0
- package/Types/Runbook/RunnerFeatures.d.ts +1 -0
- package/Types/Runbook/RunnerFeatures.js +15 -3
- package/Types/Runbook/RunnerFeatures.mjs +1 -0
- package/Types/Runbook/SshHostKey.d.mts +22 -0
- package/Types/Runbook/SshHostKey.d.ts +22 -0
- package/Types/Runbook/SshHostKey.js +201 -0
- package/Types/Runbook/SshHostKey.mjs +10 -0
- package/Types/Runner/CodeRepositoryRunner.js +2 -3
- package/Types/Runner/GlobalAIAgentsGone.d.mts +1 -0
- package/Types/Runner/GlobalAIAgentsGone.d.ts +1 -0
- package/Types/Runner/GlobalAIAgentsGone.js +19 -0
- package/Types/Runner/GlobalAIAgentsGone.mjs +2 -0
- package/Types/Runner/GlobalRunnerWork.d.mts +1 -0
- package/Types/Runner/GlobalRunnerWork.d.ts +1 -0
- package/Types/Runner/GlobalRunnerWork.js +21 -1
- package/Types/Runner/GlobalRunnerWork.mjs +1 -0
- package/Types/SSO/SignInMethods.d.mts +31 -0
- package/Types/SSO/SignInMethods.d.ts +31 -0
- package/Types/SSO/SignInMethods.js +160 -0
- package/Types/SSO/SignInMethods.mjs +8 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.mts +24 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.ts +24 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.js +159 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.mjs +8 -0
- package/Types/StatusPage/StatusPageLanguage.d.mts +6 -0
- package/Types/StatusPage/StatusPageLanguage.d.ts +6 -0
- package/Types/StatusPage/StatusPageLanguage.js +17 -1
- package/Types/StatusPage/StatusPageLanguage.mjs +1 -0
- package/Types/Workflow/Templates.js +2 -5
- package/Types/Workflow/WorkflowPlan.d.mts +7 -0
- package/Types/Workflow/WorkflowPlan.d.ts +7 -0
- package/Types/Workflow/WorkflowPlan.js +39 -0
- package/Types/Workflow/WorkflowPlan.mjs +3 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.mts +11 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.ts +11 -0
- package/Utils/ColorContrast.d.mts +3 -0
- package/Utils/ColorContrast.d.ts +3 -0
- package/Utils/ColorContrast.js +41 -3
- package/Utils/ColorContrast.mjs +2 -0
- package/Utils/Dashboard/TableThresholds.d.mts +44 -0
- package/Utils/Dashboard/TableThresholds.d.ts +44 -0
- package/Utils/Dashboard/TableThresholds.js +288 -0
- package/Utils/Dashboard/TableThresholds.mjs +17 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +6 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +6 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +70 -1
- package/Utils/Dashboard/ValueWidgetSeries.mjs +2 -0
- package/Utils/DeveloperDocs/ResourceProfiles.js +16 -0
- package/Utils/DeveloperDocs/TerraformSchema.d.mts +1 -0
- package/Utils/DeveloperDocs/TerraformSchema.d.ts +1 -0
- package/Utils/DeveloperDocs/TerraformSchema.js +17 -0
- package/Utils/DeveloperDocs/TerraformSchema.mjs +1 -0
- package/Utils/Incident/WhoOpenedItRootCause.d.mts +2 -0
- package/Utils/Incident/WhoOpenedItRootCause.d.ts +2 -0
- package/Utils/Incident/WhoOpenedItRootCause.js +50 -0
- package/Utils/Incident/WhoOpenedItRootCause.mjs +3 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.d.mts +17 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.d.ts +17 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.js +274 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.mjs +6 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.mts +35 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.ts +35 -0
- package/Utils/Monitor/ExternalStatusPageReading.js +380 -0
- package/Utils/Monitor/ExternalStatusPageReading.mjs +6 -0
- package/Utils/Monitor/ExternalStatusPageScope.d.mts +43 -0
- package/Utils/Monitor/ExternalStatusPageScope.d.ts +43 -0
- package/Utils/Monitor/ExternalStatusPageScope.js +213 -0
- package/Utils/Monitor/ExternalStatusPageScope.mjs +4 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.d.mts +18 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.d.ts +18 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.js +129 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.mjs +4 -0
- package/Utils/Rules/RuleRunSummary.d.mts +1 -0
- package/Utils/Rules/RuleRunSummary.d.ts +1 -0
- package/Utils/Rules/RuleRunSummary.js +19 -1
- package/Utils/Rules/RuleRunSummary.mjs +1 -0
- package/Utils/Runbook/SshHostKeyFingerprint.d.mts +8 -0
- package/Utils/Runbook/SshHostKeyFingerprint.d.ts +8 -0
- package/Utils/Runbook/SshHostKeyFingerprint.js +83 -0
- package/Utils/Runbook/SshHostKeyFingerprint.mjs +5 -0
- package/Utils/ScheduledMaintenanceStart.d.mts +6 -0
- package/Utils/ScheduledMaintenanceStart.d.ts +6 -0
- package/Utils/ScheduledMaintenanceStart.js +15 -0
- package/Utils/Sms/Gsm7Text.js +9 -1
- package/Utils/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +19 -2
- package/Utils/Sms/OnCallPageSms.mjs +1 -0
- package/Utils/Sms/SubscriberSms.d.mts +2 -0
- package/Utils/Sms/SubscriberSms.d.ts +2 -0
- package/Utils/Sms/SubscriberSms.js +35 -0
- package/Utils/Sms/SubscriberSms.mjs +3 -0
- package/Utils/StatusPage/HistoryChartBarColors.d.mts +2 -0
- package/Utils/StatusPage/HistoryChartBarColors.d.ts +2 -0
- package/Utils/StatusPage/HistoryChartBarColors.js +12 -1
- package/Utils/StatusPage/HistoryChartBarColors.mjs +2 -0
- package/Utils/Telemetry/ChangeEventFields.d.mts +19 -1
- package/Utils/Telemetry/ChangeEventFields.d.ts +19 -1
- package/Utils/Telemetry/ChangeEventFields.js +52 -1
- package/Utils/Uptime/DayUptimeGraphUtil.d.mts +6 -0
- package/Utils/Uptime/DayUptimeGraphUtil.d.ts +6 -0
- package/Utils/Uptime/DayUptimeGraphUtil.js +37 -6
- package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +60 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +60 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.js +295 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.mjs +3 -0
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ exports.getTerraformTypeName = getTerraformTypeName;
|
|
|
12
12
|
exports.isServerManagedColumn = isServerManagedColumn;
|
|
13
13
|
exports.getTerraformAttributes = getTerraformAttributes;
|
|
14
14
|
exports.getTerraformAttribute = getTerraformAttribute;
|
|
15
|
+
exports.getColumnsRequiredOnCreate = getColumnsRequiredOnCreate;
|
|
15
16
|
exports.canLookUpByName = canLookUpByName;
|
|
16
17
|
exports.getNameColumn = getNameColumn;
|
|
17
18
|
const CapitalRuns_1 = require("../CapitalRuns");
|
|
@@ -507,6 +508,22 @@ function getTerraformAttribute(modelType, columnName) {
|
|
|
507
508
|
return descriptor.columnName === columnName;
|
|
508
509
|
});
|
|
509
510
|
}
|
|
511
|
+
/*
|
|
512
|
+
* The columns a create over the API must send: the ones the create schema
|
|
513
|
+
* requires, by the rules above - so not a column with a default, a slug, the
|
|
514
|
+
* project id (the API key's), one that takes any value, a relation object or
|
|
515
|
+
* one a create cannot write. None when the model cannot be created over the
|
|
516
|
+
* API. The API reference badges these, and only these, Required.
|
|
517
|
+
*/
|
|
518
|
+
function getColumnsRequiredOnCreate(modelType) {
|
|
519
|
+
return getTerraformAttributes(modelType)
|
|
520
|
+
.filter((descriptor) => {
|
|
521
|
+
return descriptor.isRequired;
|
|
522
|
+
})
|
|
523
|
+
.map((descriptor) => {
|
|
524
|
+
return descriptor.columnName;
|
|
525
|
+
});
|
|
526
|
+
}
|
|
510
527
|
/*
|
|
511
528
|
* Whether the model's data source can look a record up by `name`: the
|
|
512
529
|
* provider's lookup sends `{"query": {"name": ...}}`, so it works only for
|
|
@@ -4,6 +4,7 @@ export const TERRAFORM_RESOURCE_META_ARGUMENTS = commonJsModule.TERRAFORM_RESOUR
|
|
|
4
4
|
export const TerraformSecretKind = commonJsModule.TerraformSecretKind;
|
|
5
5
|
export const TerraformValueKind = commonJsModule.TerraformValueKind;
|
|
6
6
|
export const canLookUpByName = commonJsModule.canLookUpByName;
|
|
7
|
+
export const getColumnsRequiredOnCreate = commonJsModule.getColumnsRequiredOnCreate;
|
|
7
8
|
export const getNameColumn = commonJsModule.getNameColumn;
|
|
8
9
|
export const getTerraformAttribute = commonJsModule.getTerraformAttribute;
|
|
9
10
|
export const getTerraformAttributes = commonJsModule.getTerraformAttributes;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* A ROOT CAUSE THAT ONLY SAYS WHO OPENED THE RECORD.
|
|
4
|
+
*
|
|
5
|
+
* OneUptime used to fill an incident's or an alert's empty root cause with
|
|
6
|
+
* who opened it, when a person did:
|
|
7
|
+
*
|
|
8
|
+
* Incident created by [Maya Chen](<her page>) IncidentService
|
|
9
|
+
* Alert created by [Maya Chen](<her page>) AlertService
|
|
10
|
+
* Incident created by @maya on Slack. Slack's Declare Incident
|
|
11
|
+
* Incident created via Microsoft Teams Teams' Declare Incident
|
|
12
|
+
* Incident created via the OneUptime AI copilot. the copilot's tool
|
|
13
|
+
*
|
|
14
|
+
* That says who, not why - and the record names who opened it already (its
|
|
15
|
+
* creator, the Declared / Created tile, the feed's first entry). Written as
|
|
16
|
+
* the root cause, it stood where the cause belongs: the What happened card,
|
|
17
|
+
* the feed's "Root Cause", the first state's timeline row, and the status
|
|
18
|
+
* timeline of every monitor the incident changed. New records are left with
|
|
19
|
+
* no root cause until somebody writes one; the ones written before read as
|
|
20
|
+
* none here (the Dashboard's What happened card), while the Root Cause page
|
|
21
|
+
* still shows them as they are stored.
|
|
22
|
+
*
|
|
23
|
+
* Read in one pass over at most one line: every pattern is anchored at both
|
|
24
|
+
* ends, and each repeat stops at the character that ends it.
|
|
25
|
+
*/
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.isWhoOpenedItRootCause = isWhoOpenedItRootCause;
|
|
28
|
+
// "Incident created by [Name](<address>)", the name as mdText escaped it.
|
|
29
|
+
const CREATED_BY_PERSON_LINK = /^(?:Incident|Alert) created by \[(?:\\.|[^\\\]\n])*\]\([^()\s]*\)$/;
|
|
30
|
+
// "Incident created by @name on Slack." - a Slack name is at most 80 long.
|
|
31
|
+
const CREATED_ON_SLACK = /^Incident created by @[^\n]{1,200} on Slack\.$/;
|
|
32
|
+
// The ones written word for word: by the Teams form and the copilot.
|
|
33
|
+
const CREATED_VIA = [
|
|
34
|
+
"Incident created via Microsoft Teams",
|
|
35
|
+
"Incident created via the OneUptime AI copilot.",
|
|
36
|
+
];
|
|
37
|
+
/*
|
|
38
|
+
* Whether a root cause is one of the lines OneUptime wrote to say who
|
|
39
|
+
* opened the record, and nothing else.
|
|
40
|
+
*/
|
|
41
|
+
function isWhoOpenedItRootCause(rootCause) {
|
|
42
|
+
const text = (rootCause || "").trim();
|
|
43
|
+
if (!text || text.length > 1000) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return (CREATED_VIA.includes(text) ||
|
|
47
|
+
CREATED_BY_PERSON_LINK.test(text) ||
|
|
48
|
+
CREATED_ON_SLACK.test(text));
|
|
49
|
+
}
|
|
50
|
+
exports.default = isWhoOpenedItRootCause;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD: string;
|
|
2
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES: number;
|
|
3
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH: number;
|
|
4
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH: number;
|
|
5
|
+
export default class ExternalStatusPageComponentNames {
|
|
6
|
+
static comparable(text: string): string;
|
|
7
|
+
static isPattern(name: string): boolean;
|
|
8
|
+
static normalize(value: unknown): Array<string>;
|
|
9
|
+
static matchesComponent(name: string, componentName: string): boolean;
|
|
10
|
+
static picker(names: Array<string>): (componentName: string) => boolean;
|
|
11
|
+
static unmatched(names: Array<string>, componentNames: Array<string>): Array<string>;
|
|
12
|
+
static isFoundIn(name: string, text: string): boolean;
|
|
13
|
+
static fromLegacyName(componentName: unknown): Array<string>;
|
|
14
|
+
static toLegacyName(names: Array<string>): string | undefined;
|
|
15
|
+
private static isOnlyWildcards;
|
|
16
|
+
private static wildcardMatches;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD: string;
|
|
2
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES: number;
|
|
3
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH: number;
|
|
4
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH: number;
|
|
5
|
+
export default class ExternalStatusPageComponentNames {
|
|
6
|
+
static comparable(text: string): string;
|
|
7
|
+
static isPattern(name: string): boolean;
|
|
8
|
+
static normalize(value: unknown): Array<string>;
|
|
9
|
+
static matchesComponent(name: string, componentName: string): boolean;
|
|
10
|
+
static picker(names: Array<string>): (componentName: string) => boolean;
|
|
11
|
+
static unmatched(names: Array<string>, componentNames: Array<string>): Array<string>;
|
|
12
|
+
static isFoundIn(name: string, text: string): boolean;
|
|
13
|
+
static fromLegacyName(componentName: unknown): Array<string>;
|
|
14
|
+
static toLegacyName(names: Array<string>): string | undefined;
|
|
15
|
+
private static isOnlyWildcards;
|
|
16
|
+
private static wildcardMatches;
|
|
17
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* THE COMPONENTS AN EXTERNAL STATUS PAGE MONITOR WATCHES, BY NAME.
|
|
4
|
+
*
|
|
5
|
+
* A monitor of a status page can watch the whole page, or only some of its
|
|
6
|
+
* components (issue #5156: GitHub's Git Operations and Pull Requests, not
|
|
7
|
+
* Copilot). It keeps them as names (MonitorStepExternalStatusPageMonitor's
|
|
8
|
+
* componentNames), and a name picks a page's components this way:
|
|
9
|
+
*
|
|
10
|
+
* - A name watches the component of exactly that name. Case and white
|
|
11
|
+
* space do not count: "git operations" is "Git Operations". A picked
|
|
12
|
+
* component never takes another along with it - "Workers" on
|
|
13
|
+
* Cloudflare's page is not "Workers KV", "Copilot" on GitHub's is not
|
|
14
|
+
* "Copilot AI Model Providers".
|
|
15
|
+
* - A "*" stands for any text: "*us-east-1*" watches every component
|
|
16
|
+
* with us-east-1 in its name, "Workers*" every one whose name starts
|
|
17
|
+
* with Workers.
|
|
18
|
+
* - An RSS or Atom feed's items have titles, not components: there a name
|
|
19
|
+
* picks every item whose title holds it somewhere ("Git Operations"
|
|
20
|
+
* picks "Incident with Git Operations").
|
|
21
|
+
*
|
|
22
|
+
* A monitor saved before it could watch several components had one
|
|
23
|
+
* Component Name Filter, which matched every component whose name
|
|
24
|
+
* contained it. It reads as that name between two stars (fromLegacyName),
|
|
25
|
+
* so it watches exactly what it watched before.
|
|
26
|
+
*
|
|
27
|
+
* Names come from the person (what they picked or typed) and from the page
|
|
28
|
+
* (what it lists, what its incidents name): both are read in loops, never
|
|
29
|
+
* by a pattern, in time in line with their length.
|
|
30
|
+
*/
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH = exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH = exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES = exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD = void 0;
|
|
33
|
+
exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD = "*";
|
|
34
|
+
// The most names a monitor keeps: more than any page's list needs.
|
|
35
|
+
exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES = 500;
|
|
36
|
+
// The longest name a monitor keeps.
|
|
37
|
+
exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH = 255;
|
|
38
|
+
/*
|
|
39
|
+
* How much of a name or a title a comparison reads. A page's names are
|
|
40
|
+
* short; one that sends a name of megabytes is read for this much of it.
|
|
41
|
+
*/
|
|
42
|
+
exports.EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH = 1000;
|
|
43
|
+
// Whether a UTF-16 code unit is white space as a name is read.
|
|
44
|
+
const isWhiteSpaceCode = (code) => {
|
|
45
|
+
return (code === 0x20 || // space
|
|
46
|
+
(code >= 0x09 && code <= 0x0d) || // tab, line breaks
|
|
47
|
+
code === 0xa0 || // no-break space
|
|
48
|
+
code === 0x1680 ||
|
|
49
|
+
(code >= 0x2000 && code <= 0x200a) ||
|
|
50
|
+
code === 0x2028 ||
|
|
51
|
+
code === 0x2029 ||
|
|
52
|
+
code === 0x202f ||
|
|
53
|
+
code === 0x205f ||
|
|
54
|
+
code === 0x3000 ||
|
|
55
|
+
code === 0xfeff);
|
|
56
|
+
};
|
|
57
|
+
class ExternalStatusPageComponentNames {
|
|
58
|
+
/*
|
|
59
|
+
* A name as two names are compared: lower case, without white space at
|
|
60
|
+
* either end, each run of it inside one space, and at most
|
|
61
|
+
* EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH long.
|
|
62
|
+
*/
|
|
63
|
+
static comparable(text) {
|
|
64
|
+
const limited = text.length > exports.EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH
|
|
65
|
+
? text.slice(0, exports.EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH)
|
|
66
|
+
: text;
|
|
67
|
+
let result = "";
|
|
68
|
+
let pendingSpace = false;
|
|
69
|
+
for (let index = 0; index < limited.length; index++) {
|
|
70
|
+
const code = limited.charCodeAt(index);
|
|
71
|
+
if (isWhiteSpaceCode(code)) {
|
|
72
|
+
pendingSpace = result.length > 0;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (pendingSpace) {
|
|
76
|
+
result += " ";
|
|
77
|
+
pendingSpace = false;
|
|
78
|
+
}
|
|
79
|
+
result += limited.charAt(index);
|
|
80
|
+
}
|
|
81
|
+
return result.toLowerCase();
|
|
82
|
+
}
|
|
83
|
+
// A name with a "*" in it: it stands for any text.
|
|
84
|
+
static isPattern(name) {
|
|
85
|
+
return name.includes(exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD);
|
|
86
|
+
}
|
|
87
|
+
/*
|
|
88
|
+
* The names a monitor keeps, from whatever was stored or typed: each
|
|
89
|
+
* trimmed and at most EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH
|
|
90
|
+
* long, none empty, each once (as names compare, the first spelling
|
|
91
|
+
* kept), at most EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES of them.
|
|
92
|
+
* Anything but a list of names is no names.
|
|
93
|
+
*/
|
|
94
|
+
static normalize(value) {
|
|
95
|
+
if (!Array.isArray(value)) {
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
const names = [];
|
|
99
|
+
const seen = new Set();
|
|
100
|
+
for (const item of value) {
|
|
101
|
+
if (typeof item !== "string") {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const name = item
|
|
105
|
+
.trim()
|
|
106
|
+
.slice(0, exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH)
|
|
107
|
+
.trim();
|
|
108
|
+
const key = ExternalStatusPageComponentNames.comparable(name);
|
|
109
|
+
if (ExternalStatusPageComponentNames.isOnlyWildcards(key)) {
|
|
110
|
+
/*
|
|
111
|
+
* Nothing, or stars alone, which pick every component: that is the
|
|
112
|
+
* whole page, which no names at all already say.
|
|
113
|
+
*/
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (seen.has(key)) {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
seen.add(key);
|
|
120
|
+
names.push(name);
|
|
121
|
+
if (names.length >= exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES) {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return names;
|
|
126
|
+
}
|
|
127
|
+
/*
|
|
128
|
+
* Whether a name the monitor keeps picks a component of this name: the
|
|
129
|
+
* same name, or one its stars match.
|
|
130
|
+
*/
|
|
131
|
+
static matchesComponent(name, componentName) {
|
|
132
|
+
const pattern = ExternalStatusPageComponentNames.comparable(name);
|
|
133
|
+
if (!pattern) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
return ExternalStatusPageComponentNames.wildcardMatches(pattern, ExternalStatusPageComponentNames.comparable(componentName));
|
|
137
|
+
}
|
|
138
|
+
/*
|
|
139
|
+
* Whether any of the names picks a component of this name: each name read
|
|
140
|
+
* once for every component a page lists, each component's name once.
|
|
141
|
+
*/
|
|
142
|
+
static picker(names) {
|
|
143
|
+
// Names without a star are looked up; only patterns are matched.
|
|
144
|
+
const exact = new Set();
|
|
145
|
+
const patterns = [];
|
|
146
|
+
for (const name of names) {
|
|
147
|
+
const pattern = ExternalStatusPageComponentNames.comparable(name);
|
|
148
|
+
if (!pattern) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (ExternalStatusPageComponentNames.isPattern(pattern)) {
|
|
152
|
+
patterns.push(pattern);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
exact.add(pattern);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return (componentName) => {
|
|
159
|
+
const text = ExternalStatusPageComponentNames.comparable(componentName);
|
|
160
|
+
return (exact.has(text) ||
|
|
161
|
+
patterns.some((pattern) => {
|
|
162
|
+
return ExternalStatusPageComponentNames.wildcardMatches(pattern, text);
|
|
163
|
+
}));
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/*
|
|
167
|
+
* The names that pick none of these components: a typo, or a component
|
|
168
|
+
* the page renamed or removed.
|
|
169
|
+
*/
|
|
170
|
+
static unmatched(names, componentNames) {
|
|
171
|
+
const texts = componentNames.map((componentName) => {
|
|
172
|
+
return ExternalStatusPageComponentNames.comparable(componentName);
|
|
173
|
+
});
|
|
174
|
+
const known = new Set(texts);
|
|
175
|
+
return names.filter((name) => {
|
|
176
|
+
const pattern = ExternalStatusPageComponentNames.comparable(name);
|
|
177
|
+
if (!pattern) {
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
if (!ExternalStatusPageComponentNames.isPattern(pattern)) {
|
|
181
|
+
return !known.has(pattern);
|
|
182
|
+
}
|
|
183
|
+
return !texts.some((text) => {
|
|
184
|
+
return ExternalStatusPageComponentNames.wildcardMatches(pattern, text);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/*
|
|
189
|
+
* Whether a name the monitor keeps is somewhere in a feed item's title,
|
|
190
|
+
* its stars matching any text.
|
|
191
|
+
*/
|
|
192
|
+
static isFoundIn(name, text) {
|
|
193
|
+
const pattern = ExternalStatusPageComponentNames.comparable(name);
|
|
194
|
+
if (!pattern) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
return ExternalStatusPageComponentNames.wildcardMatches(`${exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD}${pattern}${exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD}`, ExternalStatusPageComponentNames.comparable(text));
|
|
198
|
+
}
|
|
199
|
+
/*
|
|
200
|
+
* The names of a monitor saved with one Component Name Filter, which
|
|
201
|
+
* matched every component whose name contained it: that name between
|
|
202
|
+
* stars, which matches the same components.
|
|
203
|
+
*/
|
|
204
|
+
static fromLegacyName(componentName) {
|
|
205
|
+
if (typeof componentName !== "string" || !componentName.trim()) {
|
|
206
|
+
return [];
|
|
207
|
+
}
|
|
208
|
+
return ExternalStatusPageComponentNames.normalize([
|
|
209
|
+
`${exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD}${componentName.trim()}${exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD}`,
|
|
210
|
+
]);
|
|
211
|
+
}
|
|
212
|
+
/*
|
|
213
|
+
* The one filter a probe that has not been upgraded understands, for these
|
|
214
|
+
* names: it matches every component whose name contains it. One name
|
|
215
|
+
* gives its longest run of text between stars - never fewer components
|
|
216
|
+
* than the name picks, only as many or more. Two or more names have none:
|
|
217
|
+
* such a probe watches the whole page (or group) until it is upgraded,
|
|
218
|
+
* rather than one of the names alone.
|
|
219
|
+
*/
|
|
220
|
+
static toLegacyName(names) {
|
|
221
|
+
if (names.length !== 1) {
|
|
222
|
+
return undefined;
|
|
223
|
+
}
|
|
224
|
+
let longest = "";
|
|
225
|
+
for (const part of names[0].split(exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD)) {
|
|
226
|
+
const trimmed = part.trim();
|
|
227
|
+
if (trimmed.length > longest.length) {
|
|
228
|
+
longest = trimmed;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return longest || undefined;
|
|
232
|
+
}
|
|
233
|
+
// Whether a comparable name is empty, or stars and nothing else.
|
|
234
|
+
static isOnlyWildcards(name) {
|
|
235
|
+
for (let index = 0; index < name.length; index++) {
|
|
236
|
+
if (name.charAt(index) !== exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD) {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
/*
|
|
243
|
+
* Whether a pattern of text and stars matches the whole of a text, both
|
|
244
|
+
* already comparable. The first piece must start the text, the last end
|
|
245
|
+
* it, and each piece between is found after the one before: for patterns
|
|
246
|
+
* whose only wildcard is "*", taking each piece where it is first found
|
|
247
|
+
* is never wrong.
|
|
248
|
+
*/
|
|
249
|
+
static wildcardMatches(pattern, text) {
|
|
250
|
+
const pieces = pattern.split(exports.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD);
|
|
251
|
+
if (pieces.length === 1) {
|
|
252
|
+
return pattern === text;
|
|
253
|
+
}
|
|
254
|
+
const first = pieces[0];
|
|
255
|
+
const last = pieces[pieces.length - 1];
|
|
256
|
+
if (!text.startsWith(first)) {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
let position = first.length;
|
|
260
|
+
for (let index = 1; index < pieces.length - 1; index++) {
|
|
261
|
+
const piece = pieces[index];
|
|
262
|
+
if (!piece) {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
const found = text.indexOf(piece, position);
|
|
266
|
+
if (found === -1) {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
position = found + piece.length;
|
|
270
|
+
}
|
|
271
|
+
return text.length - last.length >= position && text.endsWith(last);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
exports.default = ExternalStatusPageComponentNames;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import commonJsModule from "./ExternalStatusPageComponentNames.js";
|
|
2
|
+
export default commonJsModule.default;
|
|
3
|
+
export const EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD = commonJsModule.EXTERNAL_STATUS_PAGE_COMPONENT_WILDCARD;
|
|
4
|
+
export const EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH = commonJsModule.EXTERNAL_STATUS_PAGE_MAX_COMPARED_LENGTH;
|
|
5
|
+
export const EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES = commonJsModule.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAMES;
|
|
6
|
+
export const EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH = commonJsModule.EXTERNAL_STATUS_PAGE_MAX_COMPONENT_NAME_LENGTH;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StatusPageSummary } from "../../Types/StatusPage/StatusPageSummary.mjs";
|
|
2
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPONENTS: number;
|
|
3
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_INCIDENTS: number;
|
|
4
|
+
export declare const EXTERNAL_STATUS_PAGE_UNNAMED_INCIDENT: string;
|
|
5
|
+
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN: string;
|
|
6
|
+
export interface ExternalStatusPageComponent {
|
|
7
|
+
name: string;
|
|
8
|
+
status: string;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
groupName?: string | undefined;
|
|
11
|
+
key?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface ExternalStatusPageIncident {
|
|
14
|
+
name: string;
|
|
15
|
+
affectedComponentNames: Array<string>;
|
|
16
|
+
affectedComponentKeys?: Array<string> | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface ExternalStatusPageContents {
|
|
19
|
+
components: Array<ExternalStatusPageComponent>;
|
|
20
|
+
incidents: Array<ExternalStatusPageIncident>;
|
|
21
|
+
}
|
|
22
|
+
export interface AtlassianStatuspageUrls {
|
|
23
|
+
status: string;
|
|
24
|
+
components: string;
|
|
25
|
+
unresolvedIncidents: string;
|
|
26
|
+
}
|
|
27
|
+
export default class ExternalStatusPageReading {
|
|
28
|
+
static getAtlassianUrls(statusPageUrl: string): AtlassianStatuspageUrls;
|
|
29
|
+
static getIncidentIoUrl(statusPageUrl: string): string | null;
|
|
30
|
+
static readAtlassianPageStatus(json: unknown): string | null;
|
|
31
|
+
static readAtlassianComponents(json: unknown): Array<ExternalStatusPageComponent> | null;
|
|
32
|
+
static readAtlassianIncidents(json: unknown): Array<ExternalStatusPageIncident>;
|
|
33
|
+
static readIncidentIo(json: unknown): ExternalStatusPageContents | null;
|
|
34
|
+
static readOneUptimeSummary(summary: StatusPageSummary): ExternalStatusPageContents;
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StatusPageSummary } from "../../Types/StatusPage/StatusPageSummary";
|
|
2
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_COMPONENTS: number;
|
|
3
|
+
export declare const EXTERNAL_STATUS_PAGE_MAX_INCIDENTS: number;
|
|
4
|
+
export declare const EXTERNAL_STATUS_PAGE_UNNAMED_INCIDENT: string;
|
|
5
|
+
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN: string;
|
|
6
|
+
export interface ExternalStatusPageComponent {
|
|
7
|
+
name: string;
|
|
8
|
+
status: string;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
groupName?: string | undefined;
|
|
11
|
+
key?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface ExternalStatusPageIncident {
|
|
14
|
+
name: string;
|
|
15
|
+
affectedComponentNames: Array<string>;
|
|
16
|
+
affectedComponentKeys?: Array<string> | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface ExternalStatusPageContents {
|
|
19
|
+
components: Array<ExternalStatusPageComponent>;
|
|
20
|
+
incidents: Array<ExternalStatusPageIncident>;
|
|
21
|
+
}
|
|
22
|
+
export interface AtlassianStatuspageUrls {
|
|
23
|
+
status: string;
|
|
24
|
+
components: string;
|
|
25
|
+
unresolvedIncidents: string;
|
|
26
|
+
}
|
|
27
|
+
export default class ExternalStatusPageReading {
|
|
28
|
+
static getAtlassianUrls(statusPageUrl: string): AtlassianStatuspageUrls;
|
|
29
|
+
static getIncidentIoUrl(statusPageUrl: string): string | null;
|
|
30
|
+
static readAtlassianPageStatus(json: unknown): string | null;
|
|
31
|
+
static readAtlassianComponents(json: unknown): Array<ExternalStatusPageComponent> | null;
|
|
32
|
+
static readAtlassianIncidents(json: unknown): Array<ExternalStatusPageIncident>;
|
|
33
|
+
static readIncidentIo(json: unknown): ExternalStatusPageContents | null;
|
|
34
|
+
static readOneUptimeSummary(summary: StatusPageSummary): ExternalStatusPageContents;
|
|
35
|
+
}
|