@oneuptime/common 14.0.107 → 14.0.108
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/DataBiConnection.d.mts +4 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +4 -0
- package/Models/DatabaseModels/DataBiConnection.js +59 -2
- package/Models/DatabaseModels/Index.js +2 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.mts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.ts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.js +353 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.mjs +2 -0
- package/Models/DatabaseModels/WhatsAppLog.d.mts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.d.ts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.js +62 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +11 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +11 -0
- package/Models/DatabaseModels/WorkspaceUserGroup.js +1 -1
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +212 -0
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +212 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.mts +3 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.ts +3 -0
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AIChatTypes.js +2 -0
- package/Types/AI/InvestigationNotStartedReason.d.mts +7 -0
- package/Types/AI/InvestigationNotStartedReason.d.ts +7 -0
- package/Types/CodeInSentence.d.mts +8 -0
- package/Types/CodeInSentence.d.ts +8 -0
- package/Types/CodeInSentence.js +875 -0
- package/Types/CodeInSentence.mjs +4 -0
- package/Types/Dashboard/DashboardComponentType.d.mts +2 -0
- package/Types/Dashboard/DashboardComponentType.d.ts +2 -0
- package/Types/Dashboard/DashboardComponentType.js +7 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.mts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.ts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.js +3 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.mjs +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.mjs +1 -0
- package/Types/Dashboard/PublicDashboardServedSettings.js +15 -7
- package/Types/DataObservability/DataBiRefreshAlert.d.mts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.d.ts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.js +206 -0
- package/Types/DataObservability/DataBiRefreshAlert.mjs +12 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +12 -0
- package/Types/DataObservability/DataTableLineage.d.mts +22 -1
- package/Types/DataObservability/DataTableLineage.d.ts +22 -1
- package/Types/DataObservability/DataTableLineage.js +13 -5
- package/Types/DataObservability/DataTableLineage.mjs +2 -0
- package/Types/HashedString.js +9 -2
- package/Types/Monitor/CriteriaFilterValues.d.mts +16 -0
- package/Types/Monitor/CriteriaFilterValues.d.ts +16 -0
- package/Types/Monitor/CriteriaFilterValues.js +324 -0
- package/Types/Monitor/CriteriaFilterValues.mjs +2 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.mts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.ts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.js +108 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.mjs +3 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.mts +1 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.ts +1 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +22 -2
- package/Types/Monitor/MonitorStep.js +28 -11
- package/Types/Monitor/MonitorStepMetricMonitor.js +6 -1
- package/Types/Monitor/MonitorStepRollingTime.d.mts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.d.ts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.js +117 -0
- package/Types/Monitor/MonitorStepRollingTime.mjs +2 -0
- package/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +11 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.mts +1 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.ts +1 -0
- package/Types/Monitor/TelemetryAlertRule.js +7 -2
- package/Types/NotificationRule/NotificationRepeat.d.mts +10 -0
- package/Types/NotificationRule/NotificationRepeat.d.ts +10 -0
- package/Types/NotificationRule/NotificationRepeat.js +51 -0
- package/Types/NotificationRule/NotificationRepeat.mjs +2 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +276 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +12 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.mts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.ts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.js +44 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.mjs +5 -0
- package/Types/Probe/ProbeMonitorResponse.d.mts +1 -0
- package/Types/Probe/ProbeMonitorResponse.d.ts +1 -0
- package/Types/ReadingDirection.d.mts +2 -0
- package/Types/ReadingDirection.d.ts +2 -0
- package/Types/ReadingDirection.js +221 -25
- package/Types/ReadingDirection.mjs +2 -0
- package/Types/RollingTime/RollingTimeUtil.d.mts +7 -0
- package/Types/RollingTime/RollingTimeUtil.d.ts +7 -0
- package/Types/RollingTime/RollingTimeUtil.js +240 -71
- package/Types/Rum/ProductAnalyticsSavedViews.d.mts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.d.ts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.js +219 -0
- package/Types/Rum/ProductAnalyticsSavedViews.mjs +14 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +8 -7
- package/Types/Telemetry/ServiceType.d.mts +1 -0
- package/Types/Telemetry/ServiceType.d.ts +1 -0
- package/Types/Telemetry/ServiceType.js +6 -0
- package/Utils/Crypto.js +10 -3
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.js +67 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.mjs +2 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.js +68 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.mjs +2 -0
- package/Utils/Dashboard/DashboardWidgetIds.js +6 -1
- package/Utils/Metrics/MetricQueryCloudAggregation.js +2 -4
- package/Utils/Monitor/MonitorRootCauseWording.js +28 -24
- package/Utils/Monitor/MonitorStepMetricQueries.js +2 -1
- package/Utils/Monitor/MonitorStepsValuesUtil.d.mts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.d.ts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.js +80 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.mjs +2 -0
- package/Utils/Slo/SloProjection.d.mts +18 -0
- package/Utils/Slo/SloProjection.d.ts +18 -0
- package/Utils/Slo/SloProjection.js +53 -12
- package/Utils/Slo/SloProjection.mjs +2 -0
- package/Utils/StatusPage/ResourceExplorer.d.mts +0 -10
- package/Utils/StatusPage/ResourceExplorer.d.ts +0 -10
- package/Utils/StatusPage/ResourceExplorer.js +0 -28
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ export default interface IncomingEmailMonitorRequest {
|
|
|
17
17
|
emailHeaders?: Dictionary<string> | undefined;
|
|
18
18
|
emailReceivedAt: Date;
|
|
19
19
|
checkedAt: Date;
|
|
20
|
+
dataReceivedAt?: Date | undefined;
|
|
20
21
|
attachments?: Array<EmailAttachment> | undefined;
|
|
21
22
|
onlyCheckForIncomingEmailReceivedAt?: boolean | undefined;
|
|
22
23
|
evaluationSummary?: MonitorEvaluationSummary | undefined;
|
|
@@ -45,6 +45,7 @@ const ObjectID_1 = __importDefault(require("../ObjectID"));
|
|
|
45
45
|
const Translator_1 = require("../Translator");
|
|
46
46
|
const Typeof_1 = __importDefault(require("../Typeof"));
|
|
47
47
|
const CriteriaFilter_1 = require("./CriteriaFilter");
|
|
48
|
+
const CriteriaFilterValues_1 = __importDefault(require("./CriteriaFilterValues"));
|
|
48
49
|
const MonitorType_1 = __importStar(require("./MonitorType"));
|
|
49
50
|
const NtpMonitorUtil_1 = require("./NtpMonitor/NtpMonitorUtil");
|
|
50
51
|
/*
|
|
@@ -1972,6 +1973,19 @@ class MonitorCriteriaInstance extends DatabaseProperty_1.default {
|
|
|
1972
1973
|
if (value.data.filters.length === 0) {
|
|
1973
1974
|
return `Filter is required for criteria "${value.data.name}"`;
|
|
1974
1975
|
}
|
|
1976
|
+
/*
|
|
1977
|
+
* A value no check reads - a condition "GreaterThn", an aggregation
|
|
1978
|
+
* "Mean value" - makes a filter that can never match, or reads its
|
|
1979
|
+
* window as nothing (CriteriaFilterValues).
|
|
1980
|
+
*/
|
|
1981
|
+
const unreadable = CriteriaFilterValues_1.default.getUnreadableErrors({
|
|
1982
|
+
criteriaName: value.data.name,
|
|
1983
|
+
filterCondition: value.data.filterCondition,
|
|
1984
|
+
filters: value.data.filters,
|
|
1985
|
+
});
|
|
1986
|
+
if (unreadable.length > 0) {
|
|
1987
|
+
return unreadable[0];
|
|
1988
|
+
}
|
|
1975
1989
|
/*
|
|
1976
1990
|
* Each "when filters match, ..." action is validated only while its own
|
|
1977
1991
|
* switch is on.
|
|
@@ -2212,11 +2226,17 @@ class MonitorCriteriaInstance extends DatabaseProperty_1.default {
|
|
|
2212
2226
|
json["monitorStatusId"]["value"] !== null) {
|
|
2213
2227
|
monitorStatusId = new ObjectID_1.default(json["monitorStatusId"]["value"]);
|
|
2214
2228
|
}
|
|
2215
|
-
|
|
2229
|
+
/*
|
|
2230
|
+
* A value written another way - "any", "GreaterThan", ">" - is read as
|
|
2231
|
+
* the one it means; one that means none is kept as written, for a
|
|
2232
|
+
* write to refuse (CriteriaFilterValues).
|
|
2233
|
+
*/
|
|
2234
|
+
const filterCondition = (CriteriaFilterValues_1.default.readFilterCondition(json["filterCondition"]) ||
|
|
2235
|
+
json["filterCondition"]);
|
|
2216
2236
|
const filters = [];
|
|
2217
2237
|
const incidents = [];
|
|
2218
2238
|
for (const filter of json["filters"]) {
|
|
2219
|
-
filters.push(Object.assign({}, filter));
|
|
2239
|
+
filters.push(CriteriaFilterValues_1.default.readFilter(Object.assign({}, filter)));
|
|
2220
2240
|
}
|
|
2221
2241
|
for (const incident of json["incidents"]) {
|
|
2222
2242
|
incidents.push(Object.assign({}, incident));
|
|
@@ -74,6 +74,7 @@ exports.SYNTHETIC_MONITOR_BROWSER_REQUIRED_MESSAGE = "Pick at least one browser
|
|
|
74
74
|
exports.SYNTHETIC_MONITOR_SCREEN_SIZE_REQUIRED_MESSAGE = "Pick at least one screen size to run the script at.";
|
|
75
75
|
const MonitorStepTraceMonitor_1 = require("./MonitorStepTraceMonitor");
|
|
76
76
|
const MonitorStepMetricMonitor_1 = require("./MonitorStepMetricMonitor");
|
|
77
|
+
const MonitorStepRollingTime_1 = __importDefault(require("./MonitorStepRollingTime"));
|
|
77
78
|
const MonitorStepExceptionMonitor_1 = require("./MonitorStepExceptionMonitor");
|
|
78
79
|
const MonitorStepProfileMonitor_1 = require("./MonitorStepProfileMonitor");
|
|
79
80
|
const MonitorStepNetworkDeviceMonitor_1 = require("./MonitorStepNetworkDeviceMonitor");
|
|
@@ -867,6 +868,17 @@ class MonitorStep extends DatabaseProperty_1.default {
|
|
|
867
868
|
return "IoT fleet is required";
|
|
868
869
|
}
|
|
869
870
|
}
|
|
871
|
+
/*
|
|
872
|
+
* A rolling time that means none read a window of no length: every
|
|
873
|
+
* check found no data (MonitorStepRollingTime).
|
|
874
|
+
*/
|
|
875
|
+
const rollingTimeError = MonitorStepRollingTime_1.default.getUnreadableError({
|
|
876
|
+
monitorType: monitorType,
|
|
877
|
+
stepData: value.data,
|
|
878
|
+
});
|
|
879
|
+
if (rollingTimeError) {
|
|
880
|
+
return rollingTimeError;
|
|
881
|
+
}
|
|
870
882
|
/*
|
|
871
883
|
* An infrastructure monitor reads nothing but its metric queries. One
|
|
872
884
|
* saved without a query - its alert template and metric both left
|
|
@@ -1143,38 +1155,43 @@ class MonitorStep extends DatabaseProperty_1.default {
|
|
|
1143
1155
|
externalStatusPageMonitor: json["externalStatusPageMonitor"]
|
|
1144
1156
|
? json["externalStatusPageMonitor"]
|
|
1145
1157
|
: undefined,
|
|
1158
|
+
/*
|
|
1159
|
+
* Each infrastructure type's settings with a rolling time written
|
|
1160
|
+
* another way ("15 minutes") read as the one it means, like
|
|
1161
|
+
* metricMonitor's (MonitorStepRollingTime).
|
|
1162
|
+
*/
|
|
1146
1163
|
kubernetesMonitor: json["kubernetesMonitor"]
|
|
1147
|
-
? json["kubernetesMonitor"]
|
|
1164
|
+
? MonitorStepRollingTime_1.default.readSettings(json["kubernetesMonitor"])
|
|
1148
1165
|
: undefined,
|
|
1149
1166
|
dockerMonitor: json["dockerMonitor"]
|
|
1150
|
-
? json["dockerMonitor"]
|
|
1167
|
+
? MonitorStepRollingTime_1.default.readSettings(json["dockerMonitor"])
|
|
1151
1168
|
: undefined,
|
|
1152
1169
|
hostMonitor: json["hostMonitor"]
|
|
1153
|
-
? json["hostMonitor"]
|
|
1170
|
+
? MonitorStepRollingTime_1.default.readSettings(json["hostMonitor"])
|
|
1154
1171
|
: undefined,
|
|
1155
1172
|
podmanMonitor: json["podmanMonitor"]
|
|
1156
|
-
? json["podmanMonitor"]
|
|
1173
|
+
? MonitorStepRollingTime_1.default.readSettings(json["podmanMonitor"])
|
|
1157
1174
|
: undefined,
|
|
1158
1175
|
proxmoxMonitor: json["proxmoxMonitor"]
|
|
1159
|
-
? json["proxmoxMonitor"]
|
|
1176
|
+
? MonitorStepRollingTime_1.default.readSettings(json["proxmoxMonitor"])
|
|
1160
1177
|
: undefined,
|
|
1161
1178
|
openstackMonitor: json["openstackMonitor"]
|
|
1162
|
-
? json["openstackMonitor"]
|
|
1179
|
+
? MonitorStepRollingTime_1.default.readSettings(json["openstackMonitor"])
|
|
1163
1180
|
: undefined,
|
|
1164
1181
|
vmwareMonitor: json["vmwareMonitor"]
|
|
1165
|
-
? json["vmwareMonitor"]
|
|
1182
|
+
? MonitorStepRollingTime_1.default.readSettings(json["vmwareMonitor"])
|
|
1166
1183
|
: undefined,
|
|
1167
1184
|
dockerSwarmMonitor: json["dockerSwarmMonitor"]
|
|
1168
|
-
? json["dockerSwarmMonitor"]
|
|
1185
|
+
? MonitorStepRollingTime_1.default.readSettings(json["dockerSwarmMonitor"])
|
|
1169
1186
|
: undefined,
|
|
1170
1187
|
cephMonitor: json["cephMonitor"]
|
|
1171
|
-
? json["cephMonitor"]
|
|
1188
|
+
? MonitorStepRollingTime_1.default.readSettings(json["cephMonitor"])
|
|
1172
1189
|
: undefined,
|
|
1173
1190
|
storageArrayMonitor: json["storageArrayMonitor"]
|
|
1174
|
-
? json["storageArrayMonitor"]
|
|
1191
|
+
? MonitorStepRollingTime_1.default.readSettings(json["storageArrayMonitor"])
|
|
1175
1192
|
: undefined,
|
|
1176
1193
|
iotMonitor: json["iotMonitor"]
|
|
1177
|
-
? json["iotMonitor"]
|
|
1194
|
+
? MonitorStepRollingTime_1.default.readSettings(json["iotMonitor"])
|
|
1178
1195
|
: undefined,
|
|
1179
1196
|
/*
|
|
1180
1197
|
* Normalized on the way in: each probe once, and nothing that is not
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.MonitorStepMetricMonitorUtil = void 0;
|
|
7
7
|
const ObjectID_1 = __importDefault(require("../ObjectID"));
|
|
8
8
|
const RollingTime_1 = __importDefault(require("../RollingTime/RollingTime"));
|
|
9
|
+
const MonitorStepRollingTime_1 = __importDefault(require("./MonitorStepRollingTime"));
|
|
9
10
|
class MonitorStepMetricMonitorUtil {
|
|
10
11
|
// Whether the step reads its window as one value per query (above).
|
|
11
12
|
static aggregatesWholeWindow(monitorStepMetricMonitor) {
|
|
@@ -47,7 +48,11 @@ class MonitorStepMetricMonitorUtil {
|
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
static fromJSON(json) {
|
|
50
|
-
|
|
51
|
+
/*
|
|
52
|
+
* A rolling time written another way ("15 minutes") is read as the one
|
|
53
|
+
* it means (MonitorStepRollingTime).
|
|
54
|
+
*/
|
|
55
|
+
const monitorStepMetricMonitor = MonitorStepRollingTime_1.default.readSettings(json);
|
|
51
56
|
/*
|
|
52
57
|
* Normalize on the way in so no consumer ever receives a half-built
|
|
53
58
|
* config. Persisted JSON is not schema-checked, so this is the single
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON.mjs";
|
|
2
|
+
import MonitorType from "./MonitorType.mjs";
|
|
3
|
+
export default class MonitorStepRollingTime {
|
|
4
|
+
static getMonitorTypes(): Array<MonitorType>;
|
|
5
|
+
static getStepKeys(): Array<string>;
|
|
6
|
+
static getStepKey(monitorType: MonitorType | undefined | null): string | null;
|
|
7
|
+
static readSettings(settings: JSONObject): JSONObject;
|
|
8
|
+
static getUnreadableError(data: {
|
|
9
|
+
monitorType: MonitorType | undefined | null;
|
|
10
|
+
stepData: unknown;
|
|
11
|
+
}): string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON";
|
|
2
|
+
import MonitorType from "./MonitorType";
|
|
3
|
+
export default class MonitorStepRollingTime {
|
|
4
|
+
static getMonitorTypes(): Array<MonitorType>;
|
|
5
|
+
static getStepKeys(): Array<string>;
|
|
6
|
+
static getStepKey(monitorType: MonitorType | undefined | null): string | null;
|
|
7
|
+
static readSettings(settings: JSONObject): JSONObject;
|
|
8
|
+
static getUnreadableError(data: {
|
|
9
|
+
monitorType: MonitorType | undefined | null;
|
|
10
|
+
stepData: unknown;
|
|
11
|
+
}): string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const RollingTimeUtil_1 = __importDefault(require("../RollingTime/RollingTimeUtil"));
|
|
7
|
+
const MonitorType_1 = __importDefault(require("./MonitorType"));
|
|
8
|
+
/*
|
|
9
|
+
* THE ROLLING TIME OF A MONITOR STEP.
|
|
10
|
+
*
|
|
11
|
+
* Every metric-backed monitor type keeps how far back each check looks as
|
|
12
|
+
* `rollingTime` in its step settings, and a step's settings are stored as
|
|
13
|
+
* JSON that nothing checked. The API, Terraform, a workflow or an AI
|
|
14
|
+
* through the MCP server could store a rolling time OneUptime does not
|
|
15
|
+
* write - a Metrics monitor stored "15 minutes" - and no reader knew it:
|
|
16
|
+
* every check judged a window of no length, found no data, and a rule
|
|
17
|
+
* that triggers on no data opened an alert on every run.
|
|
18
|
+
*
|
|
19
|
+
* So a rolling time written another way is read as the one it means
|
|
20
|
+
* whenever a step is read (readSettings, from MonitorStep.fromJSON), and
|
|
21
|
+
* a write whose rolling time means none is refused (getUnreadableError,
|
|
22
|
+
* from MonitorStep.getValidationError and the server's
|
|
23
|
+
* MonitorStepsValuesUtil). CriteriaFilterValues does the same for the
|
|
24
|
+
* values of a criteria's filters.
|
|
25
|
+
*/
|
|
26
|
+
/*
|
|
27
|
+
* Where each monitor type that reads a rolling time keeps its settings -
|
|
28
|
+
* the keys MonitorStepMetricQueries reads the same steps by.
|
|
29
|
+
*/
|
|
30
|
+
const ROLLING_TIME_STEP_KEYS = {
|
|
31
|
+
[MonitorType_1.default.Metrics]: "metricMonitor",
|
|
32
|
+
[MonitorType_1.default.Kubernetes]: "kubernetesMonitor",
|
|
33
|
+
[MonitorType_1.default.Docker]: "dockerMonitor",
|
|
34
|
+
[MonitorType_1.default.Host]: "hostMonitor",
|
|
35
|
+
[MonitorType_1.default.Podman]: "podmanMonitor",
|
|
36
|
+
[MonitorType_1.default.DockerSwarm]: "dockerSwarmMonitor",
|
|
37
|
+
[MonitorType_1.default.Proxmox]: "proxmoxMonitor",
|
|
38
|
+
[MonitorType_1.default.OpenStack]: "openstackMonitor",
|
|
39
|
+
[MonitorType_1.default.VMware]: "vmwareMonitor",
|
|
40
|
+
[MonitorType_1.default.Ceph]: "cephMonitor",
|
|
41
|
+
[MonitorType_1.default.StorageArray]: "storageArrayMonitor",
|
|
42
|
+
[MonitorType_1.default.IoTDevice]: "iotMonitor",
|
|
43
|
+
};
|
|
44
|
+
// The longest part of a written value an error quotes back.
|
|
45
|
+
const MAX_QUOTED_LENGTH = 64;
|
|
46
|
+
const asObject = (value) => {
|
|
47
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
48
|
+
? value
|
|
49
|
+
: undefined;
|
|
50
|
+
};
|
|
51
|
+
// A written value, as an error quotes it back.
|
|
52
|
+
const describeWrittenValue = (value) => {
|
|
53
|
+
if (typeof value === "string") {
|
|
54
|
+
return JSON.stringify(value.length > MAX_QUOTED_LENGTH
|
|
55
|
+
? `${value.slice(0, MAX_QUOTED_LENGTH)}…`
|
|
56
|
+
: value);
|
|
57
|
+
}
|
|
58
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
59
|
+
return `${value}`;
|
|
60
|
+
}
|
|
61
|
+
return Array.isArray(value) ? "a list" : `a value of type ${typeof value}`;
|
|
62
|
+
};
|
|
63
|
+
class MonitorStepRollingTime {
|
|
64
|
+
// The monitor types whose steps keep a rolling time.
|
|
65
|
+
static getMonitorTypes() {
|
|
66
|
+
return Object.keys(ROLLING_TIME_STEP_KEYS);
|
|
67
|
+
}
|
|
68
|
+
// Every step settings key that keeps a rolling time.
|
|
69
|
+
static getStepKeys() {
|
|
70
|
+
return Object.values(ROLLING_TIME_STEP_KEYS);
|
|
71
|
+
}
|
|
72
|
+
// Where a monitor type keeps its rolling time; null for one that has none.
|
|
73
|
+
static getStepKey(monitorType) {
|
|
74
|
+
return (monitorType && ROLLING_TIME_STEP_KEYS[monitorType]) || null;
|
|
75
|
+
}
|
|
76
|
+
/*
|
|
77
|
+
* A step's settings as stored, with a rolling time written another way
|
|
78
|
+
* ("15 minutes", "PT15M") read as the one it means ("Past 15 Minutes").
|
|
79
|
+
* A rolling time OneUptime writes, none at all, and one that means none
|
|
80
|
+
* are left as they are: a missing one reads as the default, as it always
|
|
81
|
+
* has, and one that means none is for a write to refuse.
|
|
82
|
+
*/
|
|
83
|
+
static readSettings(settings) {
|
|
84
|
+
const written = settings === null || settings === void 0 ? void 0 : settings["rollingTime"];
|
|
85
|
+
if (written === undefined ||
|
|
86
|
+
written === null ||
|
|
87
|
+
RollingTimeUtil_1.default.isRollingTime(written)) {
|
|
88
|
+
return settings;
|
|
89
|
+
}
|
|
90
|
+
const rollingTime = RollingTimeUtil_1.default.fromValue(written);
|
|
91
|
+
return rollingTime ? Object.assign(Object.assign({}, settings), { rollingTime }) : settings;
|
|
92
|
+
}
|
|
93
|
+
/*
|
|
94
|
+
* Why a step's rolling time cannot be read - it means no rolling time -
|
|
95
|
+
* or null when it can, or the step keeps none. Only the settings of the
|
|
96
|
+
* step's own monitor type are read: they are the ones its checks use.
|
|
97
|
+
* The words name the field, since the server's readers are API callers.
|
|
98
|
+
*/
|
|
99
|
+
static getUnreadableError(data) {
|
|
100
|
+
var _a;
|
|
101
|
+
const stepKey = MonitorStepRollingTime.getStepKey(data.monitorType);
|
|
102
|
+
if (!stepKey) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
const settings = asObject((_a = asObject(data.stepData)) === null || _a === void 0 ? void 0 : _a[stepKey]);
|
|
106
|
+
const written = settings === null || settings === void 0 ? void 0 : settings["rollingTime"];
|
|
107
|
+
// None at all reads as the default, as it always has.
|
|
108
|
+
if (written === undefined || written === null || written === "") {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
if (RollingTimeUtil_1.default.fromValue(written)) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
return `${stepKey}.rollingTime ${describeWrittenValue(written)} is not a rolling time. Use one of ${RollingTimeUtil_1.default.getValuesText()} - or a length exactly as long as one of them, such as "15 minutes", "1h" or "PT15M".`;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.default = MonitorStepRollingTime;
|
|
@@ -304,6 +304,12 @@ const FriendlyLabelNames = {
|
|
|
304
304
|
"oneuptime.data.pipeline.name": "Pipeline",
|
|
305
305
|
"oneuptime.data.pipeline.namespace": "Pipeline Namespace",
|
|
306
306
|
"oneuptime.data.pipeline.id": "Pipeline ID",
|
|
307
|
+
// Each Power BI dataset whose refresh failed (DataBiRefreshCheck) is its BI tool's.
|
|
308
|
+
"oneuptime.data.bi.dataset.name": "Dataset",
|
|
309
|
+
"oneuptime.data.bi.workspace.name": "Workspace",
|
|
310
|
+
"oneuptime.data.bi.connection.name": "BI Tool",
|
|
311
|
+
"oneuptime.data.bi.dataset.id": "Dataset ID",
|
|
312
|
+
"oneuptime.data.bi.connection.id": "BI Tool ID",
|
|
307
313
|
// --- Services / RUM / telemetry ---
|
|
308
314
|
"service.name": "Service",
|
|
309
315
|
"oneuptime.service.name": "Service",
|
|
@@ -479,9 +485,14 @@ const LabelPriority = {
|
|
|
479
485
|
"oneuptime.data.store.name": 40,
|
|
480
486
|
"oneuptime.data.pipeline.name": 25,
|
|
481
487
|
"oneuptime.data.pipeline.namespace": 35,
|
|
488
|
+
"oneuptime.data.bi.dataset.name": 25,
|
|
489
|
+
"oneuptime.data.bi.workspace.name": 35,
|
|
490
|
+
"oneuptime.data.bi.connection.name": 40,
|
|
482
491
|
"oneuptime.data.table.id": 95,
|
|
483
492
|
"oneuptime.data.store.id": 95,
|
|
484
493
|
"oneuptime.data.pipeline.id": 95,
|
|
494
|
+
"oneuptime.data.bi.dataset.id": 95,
|
|
495
|
+
"oneuptime.data.bi.connection.id": 95,
|
|
485
496
|
"k8s.namespace.name": 50,
|
|
486
497
|
"service.namespace": 50,
|
|
487
498
|
"k8s.node.name": 60,
|
|
@@ -20,6 +20,7 @@ export default interface ServerMonitorResponse {
|
|
|
20
20
|
basicInfrastructureMetrics?: BasicInfrastructureMetrics | undefined;
|
|
21
21
|
requestReceivedAt: Date;
|
|
22
22
|
onlyCheckRequestReceivedAt: boolean;
|
|
23
|
+
dataReceivedAt?: Date | undefined;
|
|
23
24
|
processes?: ServerProcess[] | undefined;
|
|
24
25
|
failureCause?: string | undefined;
|
|
25
26
|
timeNow?: Date | undefined;
|
|
@@ -20,6 +20,7 @@ export default interface ServerMonitorResponse {
|
|
|
20
20
|
basicInfrastructureMetrics?: BasicInfrastructureMetrics | undefined;
|
|
21
21
|
requestReceivedAt: Date;
|
|
22
22
|
onlyCheckRequestReceivedAt: boolean;
|
|
23
|
+
dataReceivedAt?: Date | undefined;
|
|
23
24
|
processes?: ServerProcess[] | undefined;
|
|
24
25
|
failureCause?: string | undefined;
|
|
25
26
|
timeNow?: Date | undefined;
|
|
@@ -7,7 +7,7 @@ exports.TelemetryAlertRuleShapeProblem = exports.TelemetryAlertRuleRecovery = ex
|
|
|
7
7
|
const FilterCondition_1 = __importDefault(require("../Filter/FilterCondition"));
|
|
8
8
|
const MetricQueryCloudAggregation_1 = __importDefault(require("../../Utils/Metrics/MetricQueryCloudAggregation"));
|
|
9
9
|
const ObjectID_1 = __importDefault(require("../ObjectID"));
|
|
10
|
-
const
|
|
10
|
+
const RollingTimeUtil_1 = __importDefault(require("../RollingTime/RollingTimeUtil"));
|
|
11
11
|
const CriteriaFilter_1 = require("./CriteriaFilter");
|
|
12
12
|
const MonitorCriteria_1 = __importDefault(require("./MonitorCriteria"));
|
|
13
13
|
const MonitorCriteriaInstance_1 = __importDefault(require("./MonitorCriteriaInstance"));
|
|
@@ -249,9 +249,14 @@ class TelemetryAlertRuleUtil {
|
|
|
249
249
|
return undefined;
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
+
/*
|
|
253
|
+
* The window the step's checks read: one written another way ("15
|
|
254
|
+
* minutes") is the one it means, and one that means none - or none at
|
|
255
|
+
* all - the default, as the worker reads it.
|
|
256
|
+
*/
|
|
252
257
|
static getRollingTime(monitorStep) {
|
|
253
258
|
var _a, _b;
|
|
254
|
-
return ((
|
|
259
|
+
return RollingTimeUtil_1.default.fromValueOrDefault((_b = (_a = monitorStep.data) === null || _a === void 0 ? void 0 : _a.metricMonitor) === null || _b === void 0 ? void 0 : _b.rollingTime);
|
|
255
260
|
}
|
|
256
261
|
/*
|
|
257
262
|
* The aliases a metric rule can compare: every query's and formula's
|
|
@@ -21,3 +21,13 @@ export declare function getDueRuleExecution(data: {
|
|
|
21
21
|
repeatEveryMinutes: unknown;
|
|
22
22
|
minutesSinceStart: number;
|
|
23
23
|
}): number | null;
|
|
24
|
+
export declare function getRuleExecutionDueAfterMinutes(data: {
|
|
25
|
+
notifyAfterMinutes: number;
|
|
26
|
+
repeatEveryMinutes: unknown;
|
|
27
|
+
executionNumber: number;
|
|
28
|
+
}): number;
|
|
29
|
+
export declare function getFirstOwedRuleExecution(data: {
|
|
30
|
+
executedClaimKeys: ReadonlyArray<string>;
|
|
31
|
+
ruleId: string;
|
|
32
|
+
executionNumber: number;
|
|
33
|
+
}): number;
|
|
@@ -21,3 +21,13 @@ export declare function getDueRuleExecution(data: {
|
|
|
21
21
|
repeatEveryMinutes: unknown;
|
|
22
22
|
minutesSinceStart: number;
|
|
23
23
|
}): number | null;
|
|
24
|
+
export declare function getRuleExecutionDueAfterMinutes(data: {
|
|
25
|
+
notifyAfterMinutes: number;
|
|
26
|
+
repeatEveryMinutes: unknown;
|
|
27
|
+
executionNumber: number;
|
|
28
|
+
}): number;
|
|
29
|
+
export declare function getFirstOwedRuleExecution(data: {
|
|
30
|
+
executedClaimKeys: ReadonlyArray<string>;
|
|
31
|
+
ruleId: string;
|
|
32
|
+
executionNumber: number;
|
|
33
|
+
}): number;
|
|
@@ -25,6 +25,8 @@ exports.getDueRepeatNumber = getDueRepeatNumber;
|
|
|
25
25
|
exports.getRepeatClaimKey = getRepeatClaimKey;
|
|
26
26
|
exports.isRuleFullyExecuted = isRuleFullyExecuted;
|
|
27
27
|
exports.getDueRuleExecution = getDueRuleExecution;
|
|
28
|
+
exports.getRuleExecutionDueAfterMinutes = getRuleExecutionDueAfterMinutes;
|
|
29
|
+
exports.getFirstOwedRuleExecution = getFirstOwedRuleExecution;
|
|
28
30
|
// Off: the rule sends once, as every rule did before.
|
|
29
31
|
exports.NO_NOTIFICATION_REPEAT = 0;
|
|
30
32
|
// The intervals the On-Call Rules page offers, in minutes.
|
|
@@ -109,3 +111,52 @@ function getDueRuleExecution(data) {
|
|
|
109
111
|
? null
|
|
110
112
|
: repeatNumber;
|
|
111
113
|
}
|
|
114
|
+
/*
|
|
115
|
+
* WHEN A DELIVERY OF A RULE WAS DUE, for how late it went out
|
|
116
|
+
* (notification.send.lag, OnCallSendLag).
|
|
117
|
+
*
|
|
118
|
+
* How many minutes after its log started a rule's delivery comes due: its
|
|
119
|
+
* first push (0) after notifyAfterMinutes, repeat n after notifyAfterMinutes
|
|
120
|
+
* + n * repeatEveryMinutes - the first whole minute at which
|
|
121
|
+
* getDueRuleExecution, counting whole minutes as the worker does, says it
|
|
122
|
+
* is due.
|
|
123
|
+
*/
|
|
124
|
+
function getRuleExecutionDueAfterMinutes(data) {
|
|
125
|
+
const notifyAfterMinutes = Number.isFinite(data.notifyAfterMinutes)
|
|
126
|
+
? data.notifyAfterMinutes
|
|
127
|
+
: 0;
|
|
128
|
+
const repeats = toRepeatNumber(data.executionNumber);
|
|
129
|
+
return Math.max(0, Math.ceil(notifyAfterMinutes +
|
|
130
|
+
repeats * getRepeatEveryMinutes(data.repeatEveryMinutes)));
|
|
131
|
+
}
|
|
132
|
+
/*
|
|
133
|
+
* An execution number as the repeat it is: 0 for the first push - and for
|
|
134
|
+
* anything that is not a number above 0 - whole repeats, never past the
|
|
135
|
+
* last (MAX_NOTIFICATION_REPEATS).
|
|
136
|
+
*/
|
|
137
|
+
function toRepeatNumber(executionNumber) {
|
|
138
|
+
if (!Number.isFinite(executionNumber) || executionNumber <= 0) {
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
return Math.min(exports.MAX_NOTIFICATION_REPEATS, Math.floor(executionNumber));
|
|
142
|
+
}
|
|
143
|
+
/*
|
|
144
|
+
* The earliest delivery a rule's send now stands in for. A worker that fell
|
|
145
|
+
* behind sends the latest repeat due and skips the ones it missed
|
|
146
|
+
* (getDueRuleExecution), so repeat n sent now was owed since the first
|
|
147
|
+
* repeat after the last one sent - the person went without a push from
|
|
148
|
+
* then. Its first push, and a repeat right after the last one sent, stand
|
|
149
|
+
* for themselves.
|
|
150
|
+
*/
|
|
151
|
+
function getFirstOwedRuleExecution(data) {
|
|
152
|
+
const executionNumber = toRepeatNumber(data.executionNumber);
|
|
153
|
+
if (executionNumber === 0) {
|
|
154
|
+
return 0;
|
|
155
|
+
}
|
|
156
|
+
for (let repeat = executionNumber - 1; repeat >= 1; repeat--) {
|
|
157
|
+
if (data.executedClaimKeys.includes(getRepeatClaimKey(data.ruleId, repeat))) {
|
|
158
|
+
return repeat + 1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return 1;
|
|
162
|
+
}
|
|
@@ -4,7 +4,9 @@ export const NO_NOTIFICATION_REPEAT = commonJsModule.NO_NOTIFICATION_REPEAT;
|
|
|
4
4
|
export const REPEAT_EVERY_MINUTES_OPTIONS = commonJsModule.REPEAT_EVERY_MINUTES_OPTIONS;
|
|
5
5
|
export const getDueRepeatNumber = commonJsModule.getDueRepeatNumber;
|
|
6
6
|
export const getDueRuleExecution = commonJsModule.getDueRuleExecution;
|
|
7
|
+
export const getFirstOwedRuleExecution = commonJsModule.getFirstOwedRuleExecution;
|
|
7
8
|
export const getRepeatClaimKey = commonJsModule.getRepeatClaimKey;
|
|
8
9
|
export const getRepeatEveryMinutes = commonJsModule.getRepeatEveryMinutes;
|
|
10
|
+
export const getRuleExecutionDueAfterMinutes = commonJsModule.getRuleExecutionDueAfterMinutes;
|
|
9
11
|
export const isRepeatEveryMinutes = commonJsModule.isRepeatEveryMinutes;
|
|
10
12
|
export const isRuleFullyExecuted = commonJsModule.isRuleFullyExecuted;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import ObjectID from "../ObjectID.mjs";
|
|
2
|
+
import { OnCallPageAgainRun } from "./OnCallAcknowledgementTimeout.mjs";
|
|
3
|
+
import { OnCallObserverPageRun } from "./OnCallObserverPage.mjs";
|
|
4
|
+
import { OnCallPersonPageRun } from "./OnCallPersonPage.mjs";
|
|
5
|
+
export declare enum OnCallAcknowledgePageState {
|
|
6
|
+
Open = "Open",
|
|
7
|
+
AcknowledgedByYou = "AcknowledgedByYou",
|
|
8
|
+
AcknowledgedBySomeoneElse = "AcknowledgedBySomeoneElse",
|
|
9
|
+
Resolved = "Resolved"
|
|
10
|
+
}
|
|
11
|
+
export interface OnCallAcknowledgePageRun extends OnCallPageAgainRun, OnCallPersonPageRun, OnCallObserverPageRun {
|
|
12
|
+
acknowledgedAt?: Date | string | null | undefined;
|
|
13
|
+
acknowledgedByUserId?: ObjectID | string | null | undefined;
|
|
14
|
+
acknowledgedByUser?: {
|
|
15
|
+
name?: unknown;
|
|
16
|
+
email?: unknown;
|
|
17
|
+
} | null | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface OnCallAcknowledgePageChange {
|
|
20
|
+
byUserId?: ObjectID | string | null | undefined;
|
|
21
|
+
byName?: string | undefined;
|
|
22
|
+
at?: Date | string | null | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface OnCallAcknowledgePageRecord {
|
|
25
|
+
isAcknowledged: boolean;
|
|
26
|
+
isResolved: boolean;
|
|
27
|
+
acknowledgement?: OnCallAcknowledgePageChange | undefined;
|
|
28
|
+
resolution?: OnCallAcknowledgePageChange | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface OnCallAcknowledgePageFacts {
|
|
31
|
+
personUserId?: ObjectID | string | null | undefined;
|
|
32
|
+
isMessageAcknowledged: boolean;
|
|
33
|
+
messageAcknowledgedAt?: Date | string | null | undefined;
|
|
34
|
+
run: OnCallAcknowledgePageRun | null;
|
|
35
|
+
isRunUnknown?: boolean | undefined;
|
|
36
|
+
record: OnCallAcknowledgePageRecord | null;
|
|
37
|
+
}
|
|
38
|
+
export interface OnCallAcknowledgePageAnswer {
|
|
39
|
+
state: OnCallAcknowledgePageState;
|
|
40
|
+
byName?: string | undefined;
|
|
41
|
+
at?: Date | undefined;
|
|
42
|
+
isByYou?: true | undefined;
|
|
43
|
+
}
|
|
44
|
+
export declare function isOnCallPageEndedOnlyByAnAnswer(run: OnCallAcknowledgePageRun | null | undefined): boolean;
|
|
45
|
+
export declare function getOnCallAcknowledgePageAnswer(facts: OnCallAcknowledgePageFacts): OnCallAcknowledgePageAnswer;
|
|
46
|
+
export declare function isOnCallAcknowledgePageOpen(answer: OnCallAcknowledgePageAnswer): boolean;
|
|
47
|
+
export declare function getOnCallAcknowledgePagePersonName(user: {
|
|
48
|
+
name?: unknown;
|
|
49
|
+
email?: unknown;
|
|
50
|
+
} | null | undefined): string;
|
|
51
|
+
export declare function getOnCallAcknowledgePageAnsweredHeading(data: {
|
|
52
|
+
state: OnCallAcknowledgePageState;
|
|
53
|
+
isObserverPage: boolean;
|
|
54
|
+
}): string;
|
|
55
|
+
export declare const ON_CALL_ACKNOWLEDGE_PAGE_ALREADY_ACKNOWLEDGED_TITLE: string;
|
|
56
|
+
export declare const ON_CALL_ACKNOWLEDGE_PAGE_ALREADY_RESOLVED_TITLE: string;
|
|
57
|
+
export declare const ON_CALL_ACKNOWLEDGE_PAGE_ALREADY_SEEN_TITLE: string;
|
|
58
|
+
export declare function getOnCallAcknowledgePageMoment(data: {
|
|
59
|
+
at: Date;
|
|
60
|
+
timezone?: string | undefined;
|
|
61
|
+
now?: Date | undefined;
|
|
62
|
+
}): string;
|
|
63
|
+
export declare function getOnCallAcknowledgePageAnsweredSentence(data: {
|
|
64
|
+
answer: OnCallAcknowledgePageAnswer;
|
|
65
|
+
isObserverPage: boolean;
|
|
66
|
+
recordLabel: string;
|
|
67
|
+
recordLabelInSentence: string;
|
|
68
|
+
timezone?: string | undefined;
|
|
69
|
+
now?: Date | undefined;
|
|
70
|
+
}): string;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import ObjectID from "../ObjectID";
|
|
2
|
+
import { OnCallPageAgainRun } from "./OnCallAcknowledgementTimeout";
|
|
3
|
+
import { OnCallObserverPageRun } from "./OnCallObserverPage";
|
|
4
|
+
import { OnCallPersonPageRun } from "./OnCallPersonPage";
|
|
5
|
+
export declare enum OnCallAcknowledgePageState {
|
|
6
|
+
Open = "Open",
|
|
7
|
+
AcknowledgedByYou = "AcknowledgedByYou",
|
|
8
|
+
AcknowledgedBySomeoneElse = "AcknowledgedBySomeoneElse",
|
|
9
|
+
Resolved = "Resolved"
|
|
10
|
+
}
|
|
11
|
+
export interface OnCallAcknowledgePageRun extends OnCallPageAgainRun, OnCallPersonPageRun, OnCallObserverPageRun {
|
|
12
|
+
acknowledgedAt?: Date | string | null | undefined;
|
|
13
|
+
acknowledgedByUserId?: ObjectID | string | null | undefined;
|
|
14
|
+
acknowledgedByUser?: {
|
|
15
|
+
name?: unknown;
|
|
16
|
+
email?: unknown;
|
|
17
|
+
} | null | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface OnCallAcknowledgePageChange {
|
|
20
|
+
byUserId?: ObjectID | string | null | undefined;
|
|
21
|
+
byName?: string | undefined;
|
|
22
|
+
at?: Date | string | null | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface OnCallAcknowledgePageRecord {
|
|
25
|
+
isAcknowledged: boolean;
|
|
26
|
+
isResolved: boolean;
|
|
27
|
+
acknowledgement?: OnCallAcknowledgePageChange | undefined;
|
|
28
|
+
resolution?: OnCallAcknowledgePageChange | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface OnCallAcknowledgePageFacts {
|
|
31
|
+
personUserId?: ObjectID | string | null | undefined;
|
|
32
|
+
isMessageAcknowledged: boolean;
|
|
33
|
+
messageAcknowledgedAt?: Date | string | null | undefined;
|
|
34
|
+
run: OnCallAcknowledgePageRun | null;
|
|
35
|
+
isRunUnknown?: boolean | undefined;
|
|
36
|
+
record: OnCallAcknowledgePageRecord | null;
|
|
37
|
+
}
|
|
38
|
+
export interface OnCallAcknowledgePageAnswer {
|
|
39
|
+
state: OnCallAcknowledgePageState;
|
|
40
|
+
byName?: string | undefined;
|
|
41
|
+
at?: Date | undefined;
|
|
42
|
+
isByYou?: true | undefined;
|
|
43
|
+
}
|
|
44
|
+
export declare function isOnCallPageEndedOnlyByAnAnswer(run: OnCallAcknowledgePageRun | null | undefined): boolean;
|
|
45
|
+
export declare function getOnCallAcknowledgePageAnswer(facts: OnCallAcknowledgePageFacts): OnCallAcknowledgePageAnswer;
|
|
46
|
+
export declare function isOnCallAcknowledgePageOpen(answer: OnCallAcknowledgePageAnswer): boolean;
|
|
47
|
+
export declare function getOnCallAcknowledgePagePersonName(user: {
|
|
48
|
+
name?: unknown;
|
|
49
|
+
email?: unknown;
|
|
50
|
+
} | null | undefined): string;
|
|
51
|
+
export declare function getOnCallAcknowledgePageAnsweredHeading(data: {
|
|
52
|
+
state: OnCallAcknowledgePageState;
|
|
53
|
+
isObserverPage: boolean;
|
|
54
|
+
}): string;
|
|
55
|
+
export declare const ON_CALL_ACKNOWLEDGE_PAGE_ALREADY_ACKNOWLEDGED_TITLE: string;
|
|
56
|
+
export declare const ON_CALL_ACKNOWLEDGE_PAGE_ALREADY_RESOLVED_TITLE: string;
|
|
57
|
+
export declare const ON_CALL_ACKNOWLEDGE_PAGE_ALREADY_SEEN_TITLE: string;
|
|
58
|
+
export declare function getOnCallAcknowledgePageMoment(data: {
|
|
59
|
+
at: Date;
|
|
60
|
+
timezone?: string | undefined;
|
|
61
|
+
now?: Date | undefined;
|
|
62
|
+
}): string;
|
|
63
|
+
export declare function getOnCallAcknowledgePageAnsweredSentence(data: {
|
|
64
|
+
answer: OnCallAcknowledgePageAnswer;
|
|
65
|
+
isObserverPage: boolean;
|
|
66
|
+
recordLabel: string;
|
|
67
|
+
recordLabelInSentence: string;
|
|
68
|
+
timezone?: string | undefined;
|
|
69
|
+
now?: Date | undefined;
|
|
70
|
+
}): string;
|