@oneuptime/common 14.0.91 → 14.0.93
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.js +8 -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/AutoRemediationRule.js +1 -1
- package/Models/DatabaseModels/CodeRepository.d.mts +1 -0
- package/Models/DatabaseModels/CodeRepository.d.ts +1 -0
- package/Models/DatabaseModels/CodeRepository.js +69 -6
- 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/LlmProvider.js +1 -1
- package/Models/DatabaseModels/MonitorTemplate.js +10 -4
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +13 -13
- package/Models/DatabaseModels/OnCallDutyPolicy.js +1 -1
- 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/CodeTask.d.mts +1 -0
- package/Types/AI/CodeTask.d.ts +1 -0
- package/Types/AI/TelemetryAiActivity.d.mts +1 -0
- package/Types/AI/TelemetryAiActivity.d.ts +1 -0
- package/Types/AI/TelemetryAiActivity.js +4 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.mts +15 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.ts +15 -0
- package/Types/CodeRepository/CodeRepositorySetting.js +49 -0
- package/Types/CodeRepository/CodeRepositorySetting.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 +10 -0
- package/Types/Date.d.ts +10 -0
- package/Types/Date.js +385 -98
- package/Types/DateLanguage.d.mts +67 -0
- package/Types/DateLanguage.d.ts +67 -0
- package/Types/DateLanguage.js +478 -0
- package/Types/DateLanguage.mjs +21 -0
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +1 -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/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/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/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/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/Runner/CodeRepositoryRunner.d.mts +7 -0
- package/Types/Runner/CodeRepositoryRunner.d.ts +7 -0
- package/Types/Runner/CodeRepositoryRunner.js +60 -14
- package/Types/Runner/CodeRepositoryRunner.mjs +1 -0
- package/Types/SecurityEvent/OcsfProcessActivity.d.mts +25 -0
- package/Types/SecurityEvent/OcsfProcessActivity.d.ts +25 -0
- package/Types/SecurityEvent/OcsfProcessActivity.js +131 -0
- package/Types/SecurityEvent/OcsfProcessActivity.mjs +8 -0
- package/Types/Workflow/Templates.js +2 -5
- package/UI/Utils/TranslateTemplate.d.mts +73 -0
- package/UI/Utils/TranslateTemplate.d.ts +73 -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/CronTab.d.mts +41 -3
- package/Utils/CronTab.d.ts +41 -3
- package/Utils/CronTab.js +112 -38
- 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/MonitorOverviewTargetUtil.d.mts +2 -0
- package/Utils/Monitor/MonitorOverviewTargetUtil.d.ts +2 -0
- package/Utils/Monitor/MonitorOverviewTargetUtil.js +13 -2
- 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/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.d.mts +5 -0
- package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.d.ts +5 -0
- package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.js +219 -58
- package/Utils/SecurityEvent/OcsfNormalizer.js +22 -13
- package/Utils/Slo/SloDuration.d.mts +1 -0
- package/Utils/Slo/SloDuration.d.ts +1 -0
- package/Utils/Slo/SloDuration.js +57 -8
- package/Utils/Slo/SloDuration.mjs +1 -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/Suggestions/CodeFixSuggestion.d.mts +15 -0
- package/Utils/Suggestions/CodeFixSuggestion.d.ts +15 -0
- package/Utils/Suggestions/CodeFixSuggestion.js +62 -1
- package/Utils/Suggestions/CodeFixSuggestion.mjs +4 -0
- package/Utils/Suggestions/ProfileFixSuggestion.js +4 -0
- package/Utils/Suggestions/SuggestionBlocker.d.mts +8 -0
- package/Utils/Suggestions/SuggestionBlocker.d.ts +8 -0
- package/Utils/Suggestions/SuggestionBlocker.js +51 -0
- package/Utils/Suggestions/SuggestionBlocker.mjs +4 -0
- package/Utils/Suggestions/SuggestionOffer.d.mts +2 -1
- package/Utils/Suggestions/SuggestionOffer.d.ts +2 -1
- package/Utils/Suggestions/SuggestionOffer.js +5 -0
- package/Utils/Suggestions/TelemetryAiFixSuggestion.d.mts +2 -7
- package/Utils/Suggestions/TelemetryAiFixSuggestion.d.ts +2 -7
- package/Utils/Suggestions/TelemetryAiFixSuggestion.js +8 -36
- package/Utils/Suggestions/TelemetryImprovementSuggestion.d.mts +1 -0
- package/Utils/Suggestions/TelemetryImprovementSuggestion.d.ts +1 -0
- package/Utils/Suggestions/TelemetryImprovementSuggestion.js +1 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.mts +6 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +6 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.js +46 -5
- package/package.json +8 -1
- package/Utils/Monitor/MonitorCheckScheduleUtil.d.mts +0 -61
- package/Utils/Monitor/MonitorCheckScheduleUtil.d.ts +0 -61
- package/Utils/Monitor/MonitorCheckScheduleUtil.js +0 -476
- package/Utils/Monitor/MonitorCheckScheduleUtil.mjs +0 -3
- package/Utils/Monitor/MonitorOverviewFamily.d.mts +0 -39
- package/Utils/Monitor/MonitorOverviewFamily.d.ts +0 -39
- package/Utils/Monitor/MonitorOverviewFamily.js +0 -206
- package/Utils/Monitor/MonitorOverviewFamily.mjs +0 -4
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +0 -189
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +0 -189
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +0 -1480
- package/Utils/Monitor/MonitorOverviewPresentationUtil.mjs +0 -5
- package/Utils/Monitor/MonitorOverviewProbeUtil.d.mts +0 -112
- package/Utils/Monitor/MonitorOverviewProbeUtil.d.ts +0 -112
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +0 -640
- package/Utils/Monitor/MonitorOverviewProbeUtil.mjs +0 -3
- package/Utils/Monitor/MonitorStatusHistoryUtil.d.mts +0 -27
- package/Utils/Monitor/MonitorStatusHistoryUtil.d.ts +0 -27
- package/Utils/Monitor/MonitorStatusHistoryUtil.js +0 -132
- package/Utils/Monitor/MonitorStatusHistoryUtil.mjs +0 -2
- package/Utils/Monitor/MonitorUptimeSummaryUtil.d.mts +0 -42
- package/Utils/Monitor/MonitorUptimeSummaryUtil.d.ts +0 -42
- package/Utils/Monitor/MonitorUptimeSummaryUtil.js +0 -468
- package/Utils/Monitor/MonitorUptimeSummaryUtil.mjs +0 -2
|
@@ -44,6 +44,7 @@ exports.parseTracePerformanceFixSuggestion = parseTracePerformanceFixSuggestion;
|
|
|
44
44
|
exports.tracePerformanceFixSuggestionToJSON = tracePerformanceFixSuggestionToJSON;
|
|
45
45
|
const CodeFixTaskContext_1 = require("../../Types/AI/CodeFixTaskContext");
|
|
46
46
|
const CodeFixSuggestion_1 = require("./CodeFixSuggestion");
|
|
47
|
+
const SuggestionBlocker_1 = require("./SuggestionBlocker");
|
|
47
48
|
const SuggestionOffer_1 = __importStar(require("./SuggestionOffer"));
|
|
48
49
|
/*
|
|
49
50
|
* IS THIS TRACE WORTH "FIX PERFORMANCE WITH AI"?
|
|
@@ -122,17 +123,30 @@ function getTracePerformanceFixOffer(input) {
|
|
|
122
123
|
isAiEnabled: input.isAiEnabled,
|
|
123
124
|
applies: worthFixing.length > 0,
|
|
124
125
|
hasActiveFix: input.hasActiveFix,
|
|
126
|
+
hasFinishedFix: Boolean(input.finishedFix),
|
|
125
127
|
hasConnectedRepository: input.hasConnectedRepository,
|
|
128
|
+
isBlocked: Boolean(input.blocker),
|
|
126
129
|
// The finding is on screen: worth a quiet "connect a repository" link.
|
|
127
130
|
isBackedByEvidence: true,
|
|
128
131
|
});
|
|
129
132
|
if (offer === SuggestionOffer_1.default.None) {
|
|
130
|
-
return {
|
|
133
|
+
return {
|
|
134
|
+
offer,
|
|
135
|
+
finding: null,
|
|
136
|
+
findingCount: 0,
|
|
137
|
+
fixOutcome: null,
|
|
138
|
+
blocker: null,
|
|
139
|
+
};
|
|
131
140
|
}
|
|
132
141
|
return {
|
|
133
142
|
offer,
|
|
134
143
|
finding: worthFixing[0] || null,
|
|
135
144
|
findingCount: worthFixing.length,
|
|
145
|
+
fixOutcome: offer === SuggestionOffer_1.default.Done ? input.finishedFix || null : null,
|
|
146
|
+
// A repository to connect comes first: Code's gate needs one to ask.
|
|
147
|
+
blocker: offer === SuggestionOffer_1.default.SetUp && input.hasConnectedRepository
|
|
148
|
+
? input.blocker || null
|
|
149
|
+
: null,
|
|
136
150
|
};
|
|
137
151
|
}
|
|
138
152
|
/*
|
|
@@ -169,6 +183,8 @@ exports.NO_TRACE_PERFORMANCE_FIX_SUGGESTION = {
|
|
|
169
183
|
offer: SuggestionOffer_1.default.None,
|
|
170
184
|
finding: null,
|
|
171
185
|
findingCount: 0,
|
|
186
|
+
fixOutcome: null,
|
|
187
|
+
blocker: null,
|
|
172
188
|
aiRunId: null,
|
|
173
189
|
};
|
|
174
190
|
function isFiniteNumber(value) {
|
|
@@ -254,8 +270,11 @@ function parsePerformanceFinding(value) {
|
|
|
254
270
|
/*
|
|
255
271
|
* Reads the suggestion route's answer. Whatever does not hold together - an
|
|
256
272
|
* offer that names no finding, a finding the rule would not offer, an
|
|
257
|
-
* in-progress offer with no run
|
|
258
|
-
*
|
|
273
|
+
* in-progress or done offer with no run, a done offer that does not say how
|
|
274
|
+
* it came out, a set-up step whose blocker this build cannot draw - reads as
|
|
275
|
+
* no suggestion, so the page never draws an action the answer does not
|
|
276
|
+
* fully back. A set-up step with no blocker at all is a repository to
|
|
277
|
+
* connect, as it was before blockers were sent.
|
|
259
278
|
*/
|
|
260
279
|
function parseTracePerformanceFixSuggestion(value) {
|
|
261
280
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -273,16 +292,34 @@ function parseTracePerformanceFixSuggestion(value) {
|
|
|
273
292
|
const aiRunId = typeof record["aiRunId"] === "string" && record["aiRunId"].length > 0
|
|
274
293
|
? record["aiRunId"]
|
|
275
294
|
: null;
|
|
276
|
-
|
|
295
|
+
const linksRun = offer === SuggestionOffer_1.default.InProgress || offer === SuggestionOffer_1.default.Done;
|
|
296
|
+
if (linksRun && !aiRunId) {
|
|
277
297
|
return exports.NO_TRACE_PERFORMANCE_FIX_SUGGESTION;
|
|
278
298
|
}
|
|
299
|
+
const fixOutcome = offer === SuggestionOffer_1.default.Done
|
|
300
|
+
? (0, CodeFixSuggestion_1.parseFinishedFixOutcome)(record["fixOutcome"])
|
|
301
|
+
: null;
|
|
302
|
+
if (offer === SuggestionOffer_1.default.Done && !fixOutcome) {
|
|
303
|
+
return exports.NO_TRACE_PERFORMANCE_FIX_SUGGESTION;
|
|
304
|
+
}
|
|
305
|
+
let blocker = null;
|
|
306
|
+
if (offer === SuggestionOffer_1.default.SetUp &&
|
|
307
|
+
record["blocker"] !== undefined &&
|
|
308
|
+
record["blocker"] !== null) {
|
|
309
|
+
blocker = (0, SuggestionBlocker_1.parseSuggestionBlocker)(record["blocker"]);
|
|
310
|
+
if (!blocker) {
|
|
311
|
+
return exports.NO_TRACE_PERFORMANCE_FIX_SUGGESTION;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
279
314
|
return {
|
|
280
315
|
offer,
|
|
281
316
|
finding,
|
|
282
317
|
findingCount: isFiniteNumber(record["findingCount"])
|
|
283
318
|
? Math.max(1, Math.floor(record["findingCount"]))
|
|
284
319
|
: 1,
|
|
285
|
-
|
|
320
|
+
fixOutcome,
|
|
321
|
+
blocker,
|
|
322
|
+
aiRunId: linksRun ? aiRunId : null,
|
|
286
323
|
};
|
|
287
324
|
}
|
|
288
325
|
// The route's answer as JSON (the server's side of the parser above).
|
|
@@ -293,6 +330,10 @@ function tracePerformanceFixSuggestionToJSON(suggestion) {
|
|
|
293
330
|
? JSON.parse(JSON.stringify(suggestion.finding))
|
|
294
331
|
: null,
|
|
295
332
|
findingCount: suggestion.findingCount,
|
|
333
|
+
fixOutcome: suggestion.fixOutcome,
|
|
334
|
+
blocker: suggestion.blocker
|
|
335
|
+
? (0, SuggestionBlocker_1.suggestionBlockerToJSON)(suggestion.blocker)
|
|
336
|
+
: null,
|
|
296
337
|
aiRunId: suggestion.aiRunId,
|
|
297
338
|
};
|
|
298
339
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneuptime/common",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.93",
|
|
4
4
|
"description": "OneUptime's shared types, utilities and data models, for Node.js and TypeScript.",
|
|
5
5
|
"homepage": "https://oneuptime.com",
|
|
6
6
|
"repository": {
|
|
@@ -72,8 +72,15 @@
|
|
|
72
72
|
"./Types/Workspace/NotificationRules/NotificationRuleCondition": null,
|
|
73
73
|
"./Types/Workspace/NotificationRules/NotificationRuleUtil": null,
|
|
74
74
|
"./Utils/Analytics": null,
|
|
75
|
+
"./Utils/CronScheduleText": null,
|
|
75
76
|
"./Utils/Dashboard/Components/DashboardClockComponent": null,
|
|
76
77
|
"./Utils/Dashboard/Components/Index": null,
|
|
78
|
+
"./Utils/Monitor/MonitorCheckScheduleUtil": null,
|
|
79
|
+
"./Utils/Monitor/MonitorOverviewFamily": null,
|
|
80
|
+
"./Utils/Monitor/MonitorOverviewPresentationUtil": null,
|
|
81
|
+
"./Utils/Monitor/MonitorOverviewProbeUtil": null,
|
|
82
|
+
"./Utils/Monitor/MonitorStatusHistoryUtil": null,
|
|
83
|
+
"./Utils/Monitor/MonitorUptimeSummaryUtil": null,
|
|
77
84
|
"./Utils/Schema/AnalyticsModelSchema": null,
|
|
78
85
|
"./Utils/Schema/BaseSchema": null,
|
|
79
86
|
"./Utils/Schema/ModelSchema": null,
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import Monitor from "../../Models/DatabaseModels/Monitor.mjs";
|
|
2
|
-
export declare enum MonitorCheckFreshness {
|
|
3
|
-
Fresh = "Fresh",
|
|
4
|
-
Stale = "Stale",
|
|
5
|
-
AwaitingFirstResult = "AwaitingFirstResult",
|
|
6
|
-
NotScheduled = "NotScheduled",
|
|
7
|
-
Unknown = "Unknown"
|
|
8
|
-
}
|
|
9
|
-
export interface MonitorCheckFreshnessResult {
|
|
10
|
-
freshness: MonitorCheckFreshness;
|
|
11
|
-
overdueSeconds: number | null;
|
|
12
|
-
resultAgeSeconds: number | null;
|
|
13
|
-
}
|
|
14
|
-
export interface MonitorScheduledRun {
|
|
15
|
-
runAt: Date;
|
|
16
|
-
spacingSeconds: number;
|
|
17
|
-
}
|
|
18
|
-
export interface MonitorResultLateness {
|
|
19
|
-
lateSeconds: number;
|
|
20
|
-
graceSeconds: number;
|
|
21
|
-
}
|
|
22
|
-
export default class MonitorCheckScheduleUtil {
|
|
23
|
-
static readonly DEFAULT_CADENCE_SECONDS: number;
|
|
24
|
-
static getCadenceSeconds(data: {
|
|
25
|
-
monitoringInterval: string | null | undefined;
|
|
26
|
-
from: Date;
|
|
27
|
-
}): number | null;
|
|
28
|
-
static resolveCadenceSeconds(data: {
|
|
29
|
-
monitoringInterval: string | null | undefined;
|
|
30
|
-
from: Date;
|
|
31
|
-
}): number;
|
|
32
|
-
static getNextRunAfter(data: {
|
|
33
|
-
monitoringInterval: string | null | undefined;
|
|
34
|
-
after: Date;
|
|
35
|
-
}): MonitorScheduledRun | null;
|
|
36
|
-
private static getNextTwoRuns;
|
|
37
|
-
private static isScheduleWithoutRuns;
|
|
38
|
-
static getResultLateness(data: {
|
|
39
|
-
lastResultAt: Date;
|
|
40
|
-
monitoringInterval?: string | null | undefined;
|
|
41
|
-
cadenceSeconds: number;
|
|
42
|
-
now: Date;
|
|
43
|
-
}): MonitorResultLateness;
|
|
44
|
-
static describeInterval(monitoringInterval: string | null | undefined): string;
|
|
45
|
-
static getGraceSeconds(cadenceSeconds: number): number;
|
|
46
|
-
static getCheckFreshness(data: {
|
|
47
|
-
isScheduled: boolean;
|
|
48
|
-
isKnown: boolean;
|
|
49
|
-
lastResultAt: Date | undefined;
|
|
50
|
-
nextCheckAt: Date | undefined;
|
|
51
|
-
cadenceSeconds: number;
|
|
52
|
-
createdAt: Date | undefined;
|
|
53
|
-
now: Date;
|
|
54
|
-
monitoringInterval?: string | null | undefined;
|
|
55
|
-
}): MonitorCheckFreshnessResult;
|
|
56
|
-
static getLatestSignalAt(data: {
|
|
57
|
-
monitor: Monitor;
|
|
58
|
-
probeLastResultAt: Date | undefined;
|
|
59
|
-
}): Date | undefined;
|
|
60
|
-
static parseDate(value: unknown): Date | undefined;
|
|
61
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import Monitor from "../../Models/DatabaseModels/Monitor";
|
|
2
|
-
export declare enum MonitorCheckFreshness {
|
|
3
|
-
Fresh = "Fresh",
|
|
4
|
-
Stale = "Stale",
|
|
5
|
-
AwaitingFirstResult = "AwaitingFirstResult",
|
|
6
|
-
NotScheduled = "NotScheduled",
|
|
7
|
-
Unknown = "Unknown"
|
|
8
|
-
}
|
|
9
|
-
export interface MonitorCheckFreshnessResult {
|
|
10
|
-
freshness: MonitorCheckFreshness;
|
|
11
|
-
overdueSeconds: number | null;
|
|
12
|
-
resultAgeSeconds: number | null;
|
|
13
|
-
}
|
|
14
|
-
export interface MonitorScheduledRun {
|
|
15
|
-
runAt: Date;
|
|
16
|
-
spacingSeconds: number;
|
|
17
|
-
}
|
|
18
|
-
export interface MonitorResultLateness {
|
|
19
|
-
lateSeconds: number;
|
|
20
|
-
graceSeconds: number;
|
|
21
|
-
}
|
|
22
|
-
export default class MonitorCheckScheduleUtil {
|
|
23
|
-
static readonly DEFAULT_CADENCE_SECONDS: number;
|
|
24
|
-
static getCadenceSeconds(data: {
|
|
25
|
-
monitoringInterval: string | null | undefined;
|
|
26
|
-
from: Date;
|
|
27
|
-
}): number | null;
|
|
28
|
-
static resolveCadenceSeconds(data: {
|
|
29
|
-
monitoringInterval: string | null | undefined;
|
|
30
|
-
from: Date;
|
|
31
|
-
}): number;
|
|
32
|
-
static getNextRunAfter(data: {
|
|
33
|
-
monitoringInterval: string | null | undefined;
|
|
34
|
-
after: Date;
|
|
35
|
-
}): MonitorScheduledRun | null;
|
|
36
|
-
private static getNextTwoRuns;
|
|
37
|
-
private static isScheduleWithoutRuns;
|
|
38
|
-
static getResultLateness(data: {
|
|
39
|
-
lastResultAt: Date;
|
|
40
|
-
monitoringInterval?: string | null | undefined;
|
|
41
|
-
cadenceSeconds: number;
|
|
42
|
-
now: Date;
|
|
43
|
-
}): MonitorResultLateness;
|
|
44
|
-
static describeInterval(monitoringInterval: string | null | undefined): string;
|
|
45
|
-
static getGraceSeconds(cadenceSeconds: number): number;
|
|
46
|
-
static getCheckFreshness(data: {
|
|
47
|
-
isScheduled: boolean;
|
|
48
|
-
isKnown: boolean;
|
|
49
|
-
lastResultAt: Date | undefined;
|
|
50
|
-
nextCheckAt: Date | undefined;
|
|
51
|
-
cadenceSeconds: number;
|
|
52
|
-
createdAt: Date | undefined;
|
|
53
|
-
now: Date;
|
|
54
|
-
monitoringInterval?: string | null | undefined;
|
|
55
|
-
}): MonitorCheckFreshnessResult;
|
|
56
|
-
static getLatestSignalAt(data: {
|
|
57
|
-
monitor: Monitor;
|
|
58
|
-
probeLastResultAt: Date | undefined;
|
|
59
|
-
}): Date | undefined;
|
|
60
|
-
static parseDate(value: unknown): Date | undefined;
|
|
61
|
-
}
|