@oneuptime/common 14.1.0 → 14.2.0
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 +1 -0
- package/Models/DatabaseModels/Alert.d.ts +1 -0
- package/Models/DatabaseModels/Alert.js +34 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
- package/Models/DatabaseModels/Incident.d.mts +1 -0
- package/Models/DatabaseModels/Incident.d.ts +1 -0
- package/Models/DatabaseModels/Incident.js +35 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
- package/Models/DatabaseModels/Index.js +2 -0
- package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
- package/Types/AI/AIActionWords.d.mts +3 -1
- package/Types/AI/AIActionWords.d.ts +3 -1
- package/Types/AI/AIActionWords.js +70 -1
- package/Types/AI/AIActionWords.mjs +2 -0
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AIReadTableWords.d.mts +192 -0
- package/Types/AI/AIReadTableWords.d.ts +192 -0
- package/Types/AI/AIReadTableWords.js +368 -0
- package/Types/AI/AIReadTableWords.mjs +18 -0
- package/Types/AI/AiRunRefusal.d.mts +3 -0
- package/Types/AI/AiRunRefusal.d.ts +3 -0
- package/Types/AI/AiRunRefusal.js +22 -1
- package/Types/AI/ResourceAiAccessPermissions.js +7 -18
- package/Types/AuditLog/AuditLogActionLabel.js +19 -9
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.js +123 -16
- package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
- package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
- package/Types/Cloud/CloudResourceHealth.js +405 -13
- package/Types/Cloud/CloudResourceHealth.mjs +28 -0
- package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
- package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
- package/Types/DataObservability/DataCheckRefusals.js +77 -0
- package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
- package/Types/Date.d.mts +2 -0
- package/Types/Date.d.ts +2 -0
- package/Types/Date.js +22 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +8 -5
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/Exception/EgressGuardException.js +1 -1
- package/Types/Exception/ErrorMessageRule.d.mts +1 -0
- package/Types/Exception/ErrorMessageRule.d.ts +1 -0
- package/Types/Exception/ErrorMessageRule.js +67 -13
- package/Types/Exception/ErrorMessageRule.mjs +1 -0
- package/Types/Exception/ExceptionMessages.d.mts +2 -0
- package/Types/Exception/ExceptionMessages.d.ts +2 -0
- package/Types/Exception/ExceptionMessages.js +2 -0
- package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.js +74 -0
- package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
- package/Types/JSONFunctions.js +10 -3
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -0
- package/Types/MeaningKeys.d.mts +4 -0
- package/Types/MeaningKeys.d.ts +4 -0
- package/Types/MeaningKeys.js +74 -0
- package/Types/MeaningKeys.mjs +5 -0
- package/Types/Monitor/WhoIsTold.d.mts +3 -0
- package/Types/Monitor/WhoIsTold.d.ts +3 -0
- package/Types/Monitor/WhoIsTold.js +63 -13
- package/Types/NoBreakSpaces.d.mts +16 -0
- package/Types/NoBreakSpaces.d.ts +16 -0
- package/Types/NoBreakSpaces.js +419 -0
- package/Types/NoBreakSpaces.mjs +9 -0
- package/Types/NotificationRule/PagingLadder.d.mts +12 -0
- package/Types/NotificationRule/PagingLadder.d.ts +12 -0
- package/Types/NotificationRule/PagingLadder.js +159 -11
- package/Types/NotificationRule/PagingLadder.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
- package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- package/Types/OpenStack/OpenStackCapacity.js +12 -5
- package/Types/Permission.d.mts +4 -0
- package/Types/Permission.d.ts +4 -0
- package/Types/Permission.js +64 -8
- package/Types/Product/ProductUsage.js +2 -1
- package/Types/Product/ProjectProductsAnswer.js +2 -1
- package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.js +12 -0
- package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
- package/Types/Rum/ProductAnalyticsEvents.js +13 -1
- package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.js +12 -0
- package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
- package/Types/SetupHealth/SetupHealth.d.mts +1 -0
- package/Types/SetupHealth/SetupHealth.d.ts +1 -0
- package/Types/SetupHealth/SetupHealth.js +13 -5
- package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
- package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
- package/Types/StatusPage/DefaultStatusNames.js +74 -28
- package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
- package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
- package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +100 -19
- package/Types/Translator.mjs +1 -0
- package/Types/UserSession/SessionLength.d.mts +33 -0
- package/Types/UserSession/SessionLength.d.ts +33 -0
- package/Types/UserSession/SessionLength.js +134 -5
- package/Types/UserSession/SessionLength.mjs +5 -0
- package/Types/Workflow/WorkflowStatus.js +21 -10
- package/Utils/AI/InvestigationReport.js +2 -2
- package/Utils/API.d.mts +0 -11
- package/Utils/API.d.ts +0 -11
- package/Utils/API.js +0 -432
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
- package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
- package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
- package/Utils/DefaultRecordNames.d.mts +6 -0
- package/Utils/DefaultRecordNames.d.ts +6 -0
- package/Utils/DefaultRecordNames.js +122 -0
- package/Utils/DefaultRecordNames.mjs +6 -0
- package/Utils/Grok/Grok.js +7 -4
- package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
- package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
- package/Utils/LookupTable.d.mts +3 -0
- package/Utils/LookupTable.d.ts +3 -0
- package/Utils/LookupTable.js +61 -0
- package/Utils/LookupTable.mjs +3 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
- package/Utils/Markdown/OverLongText.js +296 -2
- package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
- package/Utils/Markdown/SlowMarkdown.js +354 -4
- package/Utils/Markdown/SlowMarkdown.mjs +1 -0
- package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
- package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
- package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
- package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
- package/Utils/Metrics/MetricSeriesScope.js +5 -1
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +3 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +3 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +100 -11
- package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.js +58 -0
- package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
- package/Utils/Monitor/ProbeFailureReading.d.mts +4 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +4 -0
- package/Utils/Monitor/ProbeFailureReading.js +30 -1
- package/Utils/Monitor/ProbeFailureReading.mjs +1 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
- package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
- package/Utils/PromQL/PromQLEngine.js +18 -9
- package/Utils/PromQL/PromQLFunctionEvaluators.js +114 -58
- package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.js +212 -0
- package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
- package/Utils/PromQL/PromQLLabels.js +4 -3
- package/Utils/PromQL/PromQLMetricNames.js +8 -2
- package/Utils/PromQL/PromQLParser.js +11 -6
- package/Utils/PromQL/PromQLRegex.d.mts +11 -0
- package/Utils/PromQL/PromQLRegex.d.ts +11 -0
- package/Utils/PromQL/PromQLRegex.js +990 -50
- package/Utils/PromQL/PromQLRegex.mjs +3 -0
- package/Utils/PromQL/PrometheusResponse.js +3 -1
- package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
- package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
- package/Utils/PromQL/RE2CharacterClass.js +532 -0
- package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
- package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
- package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
- package/Utils/RequestFailedDetailsUtil.js +452 -0
- package/Utils/RequestFailedDetailsUtil.mjs +2 -0
- package/Utils/Rum/UrlScrubber.d.mts +1 -1
- package/Utils/Rum/UrlScrubber.d.ts +1 -1
- package/Utils/Rum/UrlScrubber.js +10 -4
- package/Utils/Rum/UserFlow.js +22 -4
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
- package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
- package/Utils/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +3 -1
- package/Utils/StateListType.d.mts +11 -0
- package/Utils/StateListType.d.ts +11 -0
- package/Utils/StateListType.js +21 -0
- package/Utils/StateListType.mjs +2 -0
- package/Utils/StateOrder.d.mts +8 -11
- package/Utils/StateOrder.d.ts +8 -11
- package/Utils/StateOrder.js +49 -84
- package/Utils/StateOrder.mjs +2 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
- package/Utils/Syslog/SyslogMessageParser.js +16 -6
- package/Utils/Telemetry/HeartbeatAvailability.js +16 -21
- package/Utils/ValueFormatter.d.mts +1 -0
- package/Utils/ValueFormatter.d.ts +1 -0
- package/Utils/ValueFormatter.js +258 -18
- package/package.json +1 -1
|
@@ -35,8 +35,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const FeedMarkdown_1 = __importStar(require("../Markdown/FeedMarkdown"));
|
|
37
37
|
const EvaluationSentence_1 = require("../../Types/Monitor/EvaluationSentence");
|
|
38
|
+
const ReadingDirection_1 = require("../../Types/ReadingDirection");
|
|
38
39
|
const Translator_1 = require("../../Types/Translator");
|
|
39
40
|
const ProbeFailureReading_1 = require("./ProbeFailureReading");
|
|
41
|
+
const RequestFailureDescriptions_1 = require("./RequestFailureDescriptions");
|
|
40
42
|
/*
|
|
41
43
|
* THE ROOT CAUSE A MONITOR WROTE, IN THE READER'S LANGUAGE (issue #6542).
|
|
42
44
|
*
|
|
@@ -62,11 +64,27 @@ const ProbeFailureReading_1 = require("./ProbeFailureReading");
|
|
|
62
64
|
* written. A root cause somebody edited reads as they wrote it, but for a
|
|
63
65
|
* line that is still OneUptime's own.
|
|
64
66
|
*
|
|
65
|
-
*
|
|
66
|
-
* reader's language when the whole value is exactly them: the probe's
|
|
67
|
+
* Three of the check's values are OneUptime's own words too, and read in
|
|
68
|
+
* the reader's language when the whole value is exactly them: the probe's
|
|
67
69
|
* timeout sentence after **Cause** ("Request was tried 3 times and it
|
|
68
|
-
* timed out.", ProbeFailureReading),
|
|
69
|
-
* (DNS Resolution, TLS Handshake)
|
|
70
|
+
* timed out.", ProbeFailureReading), the phase after "- Failed Phase:"
|
|
71
|
+
* (DNS Resolution, TLS Handshake), and what the failed request means after
|
|
72
|
+
* "- Error Description:" ("DNS resolution failed. ...",
|
|
73
|
+
* RequestFailureDescriptions).
|
|
74
|
+
*
|
|
75
|
+
* On a page read from the right, a line OneUptime words is its words with
|
|
76
|
+
* a stored value after them - "**نام معیار**: Website is down", "- کد
|
|
77
|
+
* خطا: ETIMEDOUT" - and the value usually has more letters than the
|
|
78
|
+
* label. The viewer lays each block out the way most of its letters read
|
|
79
|
+
* (MarkdownReadingDirection), so the line was laid out from the left, its
|
|
80
|
+
* label's colon and its bullet on the wrong side, and the card turned
|
|
81
|
+
* from side to side line by line. Drawn on the page (setsValuesApart),
|
|
82
|
+
* each value kept as stored is set apart from the label in an isolate
|
|
83
|
+
* (FSI ... PDI) where it could move the words round it, as a sentence's
|
|
84
|
+
* values are (SentenceOptions.setsValuesApart): the line reads the way its
|
|
85
|
+
* label does, the value as written inside it, its full stop at its own
|
|
86
|
+
* end. A root cause somebody typed has no line of OneUptime's, and reads
|
|
87
|
+
* the way its own words do.
|
|
70
88
|
*
|
|
71
89
|
* Line by line, and only a whole line, or a label at a line's start, is
|
|
72
90
|
* ever replaced: nothing else in the text is read as one of OneUptime's.
|
|
@@ -140,6 +158,14 @@ const FILTER_CONDITIONS_MET = "Filter Conditions Met";
|
|
|
140
158
|
const CAUSE = "Cause";
|
|
141
159
|
// "- Failed Phase: <the phase a request broke in>".
|
|
142
160
|
const FAILED_PHASE = "Failed Phase";
|
|
161
|
+
// "- Error Description: <what the failed request means>".
|
|
162
|
+
const ERROR_DESCRIPTION = "Error Description";
|
|
163
|
+
/*
|
|
164
|
+
* A backslash before ASCII punctuation: how mdText escapes a value's
|
|
165
|
+
* Markdown (FeedMarkdown). Read back to the value's text, which is only
|
|
166
|
+
* trusted when mdText writes it back to the very line.
|
|
167
|
+
*/
|
|
168
|
+
const MARKDOWN_ESCAPE = /\\([!-/:-@[-`{-~])/g;
|
|
143
169
|
/*
|
|
144
170
|
* "**Label**" or "**Label**: rest" - a label of at most 80 characters with
|
|
145
171
|
* no asterisk or line break in it, so the match is linear in the line.
|
|
@@ -161,6 +187,19 @@ class MonitorRootCauseWording {
|
|
|
161
187
|
if (!data.rootCause || translator.language === "en") {
|
|
162
188
|
return data.rootCause;
|
|
163
189
|
}
|
|
190
|
+
const setsValuesApart = Boolean(data.setsValuesApart);
|
|
191
|
+
const readerDirection = (0, ReadingDirection_1.getReadingDirection)(translator.language);
|
|
192
|
+
/*
|
|
193
|
+
* A stored value after `label`, set apart (when asked) by the way the
|
|
194
|
+
* line reads: the reader's, once their language words the label;
|
|
195
|
+
* English's while it does not.
|
|
196
|
+
*/
|
|
197
|
+
const storedValue = (label, stored) => {
|
|
198
|
+
if (!setsValuesApart) {
|
|
199
|
+
return FeedMarkdown_1.default.asMarkdown(stored);
|
|
200
|
+
}
|
|
201
|
+
return FeedMarkdown_1.default.asMarkdown(MonitorRootCauseWording.setApart(stored, translator.hasTranslation(label) ? readerDirection : ReadingDirection_1.LEFT_TO_RIGHT));
|
|
202
|
+
};
|
|
164
203
|
const findings = MonitorRootCauseWording.getWordedFindings({
|
|
165
204
|
findings: data.findings || [],
|
|
166
205
|
translator: translator,
|
|
@@ -182,12 +221,13 @@ class MonitorRootCauseWording {
|
|
|
182
221
|
return data.rootCause
|
|
183
222
|
.split("\n")
|
|
184
223
|
.map((line) => {
|
|
224
|
+
var _a;
|
|
185
225
|
const boldLabel = BOLD_LABEL_LINE.exec(line);
|
|
186
226
|
if (boldLabel && BOLD_LABEL_SET.has(boldLabel[1])) {
|
|
187
227
|
const label = boldLabel[1];
|
|
188
228
|
const stored = boldLabel[3] || "";
|
|
189
229
|
// What follows the label: as stored, unless this language words it.
|
|
190
|
-
let rest =
|
|
230
|
+
let rest = storedValue(label, stored);
|
|
191
231
|
// "**Cause**: <the probe's timeout sentence>", worded with its count.
|
|
192
232
|
if (label === CAUSE && stored.startsWith(" ")) {
|
|
193
233
|
const worded = MonitorRootCauseWording.wordProbeTimeout(stored.slice(1), translator);
|
|
@@ -218,16 +258,27 @@ class MonitorRootCauseWording {
|
|
|
218
258
|
const label = fact[1];
|
|
219
259
|
const stored = fact[2] || "";
|
|
220
260
|
/*
|
|
221
|
-
* OneUptime's own yes or no,
|
|
222
|
-
* worded; any other value is as
|
|
261
|
+
* OneUptime's own yes or no, the phase a request broke in and what
|
|
262
|
+
* the failed request means are worded; any other value is as
|
|
263
|
+
* stored.
|
|
223
264
|
*/
|
|
224
|
-
let value =
|
|
265
|
+
let value = storedValue(label, stored);
|
|
225
266
|
if (YES_NO_FACTS.has(label) &&
|
|
226
267
|
(stored === "Yes" || stored === "No")) {
|
|
227
268
|
value = MonitorRootCauseWording.word(stored, translator);
|
|
228
269
|
}
|
|
229
270
|
else if (label === FAILED_PHASE) {
|
|
230
|
-
value =
|
|
271
|
+
value =
|
|
272
|
+
(_a = MonitorRootCauseWording.wordFailedPhase(stored, translator)) !== null && _a !== void 0 ? _a : value;
|
|
273
|
+
}
|
|
274
|
+
else if (label === ERROR_DESCRIPTION) {
|
|
275
|
+
value =
|
|
276
|
+
MonitorRootCauseWording.wordErrorDescription({
|
|
277
|
+
line: line,
|
|
278
|
+
stored: stored,
|
|
279
|
+
translator: translator,
|
|
280
|
+
setsValuesApart: setsValuesApart,
|
|
281
|
+
}) || value;
|
|
231
282
|
}
|
|
232
283
|
return (0, FeedMarkdown_1.mdText) `- ${MonitorRootCauseWording.word(label, translator)}: ${value}`.toString();
|
|
233
284
|
}
|
|
@@ -267,7 +318,7 @@ class MonitorRootCauseWording {
|
|
|
267
318
|
}
|
|
268
319
|
/*
|
|
269
320
|
* The phase a request broke in: a phase the probe names, in the reader's
|
|
270
|
-
* word; any other value as stored.
|
|
321
|
+
* word; null for any other value, which stays as stored.
|
|
271
322
|
*/
|
|
272
323
|
static wordFailedPhase(stored, translator) {
|
|
273
324
|
const phase = stored.trim();
|
|
@@ -275,7 +326,45 @@ class MonitorRootCauseWording {
|
|
|
275
326
|
translator: translator,
|
|
276
327
|
failedPhase: phase,
|
|
277
328
|
});
|
|
278
|
-
return phase && worded !== phase ? worded :
|
|
329
|
+
return phase && worded !== phase ? worded : null;
|
|
330
|
+
}
|
|
331
|
+
/*
|
|
332
|
+
* What the failed request means, as the engine placed it after "- Error
|
|
333
|
+
* Description:" (written with mdText): one of OneUptime's explanations
|
|
334
|
+
* (RequestFailureDescriptions) in the reader's language, the message
|
|
335
|
+
* that came with it kept as written - set apart from the reader's words
|
|
336
|
+
* when asked. Null for any other value, and when the reader's language
|
|
337
|
+
* does not word the explanation.
|
|
338
|
+
*
|
|
339
|
+
* The stored value is Markdown: it is read back to its text, which is
|
|
340
|
+
* only taken for the explanation when mdText writes it back to the very
|
|
341
|
+
* line the engine stored.
|
|
342
|
+
*/
|
|
343
|
+
static wordErrorDescription(data) {
|
|
344
|
+
const text = data.stored.replace(MARKDOWN_ESCAPE, "$1");
|
|
345
|
+
if (!(0, RequestFailureDescriptions_1.readRequestFailureDescription)(text) ||
|
|
346
|
+
(0, FeedMarkdown_1.mdText) `- ${ERROR_DESCRIPTION}: ${text}`.toString() !== data.line) {
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
const worded = (0, RequestFailureDescriptions_1.getRequestFailureDescriptionText)({
|
|
350
|
+
translator: data.translator,
|
|
351
|
+
description: text,
|
|
352
|
+
options: { setsValuesApart: data.setsValuesApart },
|
|
353
|
+
});
|
|
354
|
+
return worded === text.trim() ? null : worded;
|
|
355
|
+
}
|
|
356
|
+
/*
|
|
357
|
+
* A stored value set apart from the line it is in (setApartInSentence),
|
|
358
|
+
* the space round it left outside the isolate: a value of the line's own
|
|
359
|
+
* script, or with no letter or digit, is left as it is.
|
|
360
|
+
*/
|
|
361
|
+
static setApart(stored, lineDirection) {
|
|
362
|
+
const value = stored.trim();
|
|
363
|
+
if (!value) {
|
|
364
|
+
return stored;
|
|
365
|
+
}
|
|
366
|
+
const start = stored.length - stored.trimStart().length;
|
|
367
|
+
return `${stored.slice(0, start)}${(0, ReadingDirection_1.setApartInSentence)(value, lineDirection)}${stored.slice(start + value.length)}`;
|
|
279
368
|
}
|
|
280
369
|
// Each finding with a sentence its reader's language words.
|
|
281
370
|
static getWordedFindings(data) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Translator } from "../../Types/Translator.mjs";
|
|
2
|
+
export declare const getProbeAgreementRequiredCount: (data: {
|
|
3
|
+
minimumProbeAgreement: number | null | undefined;
|
|
4
|
+
activeProbeCount: number;
|
|
5
|
+
}) => number;
|
|
6
|
+
export declare const getProbeAgreementSentence: (data: {
|
|
7
|
+
minimumProbeAgreement: number | null | undefined;
|
|
8
|
+
activeProbeCount: number;
|
|
9
|
+
translator: Translator;
|
|
10
|
+
}) => string | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Translator } from "../../Types/Translator";
|
|
2
|
+
export declare const getProbeAgreementRequiredCount: (data: {
|
|
3
|
+
minimumProbeAgreement: number | null | undefined;
|
|
4
|
+
activeProbeCount: number;
|
|
5
|
+
}) => number;
|
|
6
|
+
export declare const getProbeAgreementSentence: (data: {
|
|
7
|
+
minimumProbeAgreement: number | null | undefined;
|
|
8
|
+
activeProbeCount: number;
|
|
9
|
+
translator: Translator;
|
|
10
|
+
}) => string | null;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProbeAgreementSentence = exports.getProbeAgreementRequiredCount = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* THE PROBE AGREEMENT RULE, ONE COPY FOR THE SERVER AND THE PAGES.
|
|
6
|
+
*
|
|
7
|
+
* A probe-based monitor changes status only when its probes agree
|
|
8
|
+
* (MonitorResourceUtil.checkProbeAgreement): each enabled, connected probe
|
|
9
|
+
* judges its latest answer against the criteria, the verdict most of them
|
|
10
|
+
* reached wins, and it counts only when at least the required number of
|
|
11
|
+
* them reached it. The required number is the monitor's
|
|
12
|
+
* minimumProbeAgreement - all of them when it is not set - and never more
|
|
13
|
+
* than the probes that take part, so 3 required with one of three probes
|
|
14
|
+
* disconnected is 2 of 2.
|
|
15
|
+
*
|
|
16
|
+
* The server decides with getProbeAgreementRequiredCount; the monitor's
|
|
17
|
+
* probes card and the website-down guided setup say what it decides with
|
|
18
|
+
* the same function, so a page never promises an incident the server
|
|
19
|
+
* would not open (#7410).
|
|
20
|
+
*/
|
|
21
|
+
const getProbeAgreementRequiredCount = (data) => {
|
|
22
|
+
/*
|
|
23
|
+
* A number read back as text ("3") is that number, as Math.min took it
|
|
24
|
+
* when the server wrote `minimumProbeAgreement ?? activeProbes.length`.
|
|
25
|
+
*/
|
|
26
|
+
const minimum = Number(data.minimumProbeAgreement);
|
|
27
|
+
const isSet = data.minimumProbeAgreement !== null &&
|
|
28
|
+
data.minimumProbeAgreement !== undefined &&
|
|
29
|
+
Number.isFinite(minimum);
|
|
30
|
+
return Math.min(isSet ? minimum : data.activeProbeCount, data.activeProbeCount);
|
|
31
|
+
};
|
|
32
|
+
exports.getProbeAgreementRequiredCount = getProbeAgreementRequiredCount;
|
|
33
|
+
/*
|
|
34
|
+
* The rule in a sentence: "A status change needs both connected probes to
|
|
35
|
+
* agree." Null when no agreement is needed - one probe, or a minimum of
|
|
36
|
+
* one. Its counts are written in the reader's digits ("۲ از ۳ پراب متصل").
|
|
37
|
+
*/
|
|
38
|
+
const getProbeAgreementSentence = (data) => {
|
|
39
|
+
const translator = data.translator;
|
|
40
|
+
const activeCount = data.activeProbeCount;
|
|
41
|
+
const requiredCount = (0, exports.getProbeAgreementRequiredCount)({
|
|
42
|
+
minimumProbeAgreement: data.minimumProbeAgreement,
|
|
43
|
+
activeProbeCount: activeCount,
|
|
44
|
+
});
|
|
45
|
+
if (activeCount < 2 || requiredCount < 2) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
if (requiredCount < activeCount) {
|
|
49
|
+
return translator.translateTemplate("A status change needs {{required}} of {{count}} connected probes to agree.", {
|
|
50
|
+
required: translator.formatNumber(requiredCount),
|
|
51
|
+
count: translator.formatNumber(activeCount),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return activeCount === 2
|
|
55
|
+
? translator.translateTemplate("A status change needs both connected probes to agree.")
|
|
56
|
+
: translator.translateTemplate("A status change needs all {{count}} connected probes to agree.", { count: translator.formatNumber(activeCount) });
|
|
57
|
+
};
|
|
58
|
+
exports.getProbeAgreementSentence = getProbeAgreementSentence;
|
|
@@ -7,6 +7,10 @@ export declare const getProbeFailureCauseText: (data: {
|
|
|
7
7
|
translator: Translator;
|
|
8
8
|
failureCause: string | null | undefined;
|
|
9
9
|
}) => string;
|
|
10
|
+
export declare const getProbeMessageText: (data: {
|
|
11
|
+
translator: Translator;
|
|
12
|
+
message: string | null | undefined;
|
|
13
|
+
}) => string;
|
|
10
14
|
export declare const REQUEST_FAILED_PHASE_WORDS: Readonly<Record<RequestFailedPhase, string>>;
|
|
11
15
|
export declare const getRequestFailedPhaseText: (data: {
|
|
12
16
|
translator: Translator;
|
|
@@ -7,6 +7,10 @@ export declare const getProbeFailureCauseText: (data: {
|
|
|
7
7
|
translator: Translator;
|
|
8
8
|
failureCause: string | null | undefined;
|
|
9
9
|
}) => string;
|
|
10
|
+
export declare const getProbeMessageText: (data: {
|
|
11
|
+
translator: Translator;
|
|
12
|
+
message: string | null | undefined;
|
|
13
|
+
}) => string;
|
|
10
14
|
export declare const REQUEST_FAILED_PHASE_WORDS: Readonly<Record<RequestFailedPhase, string>>;
|
|
11
15
|
export declare const getRequestFailedPhaseText: (data: {
|
|
12
16
|
translator: Translator;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRequestFailedPhaseText = exports.REQUEST_FAILED_PHASE_WORDS = exports.getProbeFailureCauseText = exports.readProbeTimeoutFailureCause = exports.writeProbeTimeoutFailureCause = exports.PROBE_TIMEOUT_FAILURE_CAUSE = void 0;
|
|
3
|
+
exports.getRequestFailedPhaseText = exports.REQUEST_FAILED_PHASE_WORDS = exports.getProbeMessageText = exports.getProbeFailureCauseText = exports.readProbeTimeoutFailureCause = exports.writeProbeTimeoutFailureCause = exports.PROBE_TIMEOUT_FAILURE_CAUSE = void 0;
|
|
4
4
|
const RequestFailedDetails_1 = require("../../Types/Probe/RequestFailedDetails");
|
|
5
5
|
const Translator_1 = require("../../Types/Translator");
|
|
6
|
+
const RequestFailureDescriptions_1 = require("./RequestFailureDescriptions");
|
|
6
7
|
/*
|
|
7
8
|
* WHY A PROBE'S CHECK FAILED, READ IN THE READER'S LANGUAGE.
|
|
8
9
|
*
|
|
@@ -98,6 +99,34 @@ const getProbeFailureCauseText = (data) => {
|
|
|
98
99
|
return data.translator.translatePlural(exports.PROBE_TIMEOUT_FAILURE_CAUSE, triedCount);
|
|
99
100
|
};
|
|
100
101
|
exports.getProbeFailureCauseText = getProbeFailureCauseText;
|
|
102
|
+
// A text drawn on the page and nothing else (SentenceOptions).
|
|
103
|
+
const ON_THE_PAGE = { setsValuesApart: true };
|
|
104
|
+
/*
|
|
105
|
+
* Any message of the probe's as a monitor summary draws it on the page:
|
|
106
|
+
* OneUptime's own sentences in the reader's language - the timeout
|
|
107
|
+
* sentence (getProbeFailureCauseText), and what a failed request means
|
|
108
|
+
* (Error Details, RequestFailureDescriptions), with the message that came
|
|
109
|
+
* with it kept as written and set apart from the reader's words - and any
|
|
110
|
+
* other message as written, trimmed.
|
|
111
|
+
*
|
|
112
|
+
* Only for a text drawn on the page and nothing else: the isolate's marks
|
|
113
|
+
* round a message kept as written are characters.
|
|
114
|
+
*/
|
|
115
|
+
const getProbeMessageText = (data) => {
|
|
116
|
+
const text = typeof data.message === "string" ? data.message.trim() : "";
|
|
117
|
+
if ((0, RequestFailureDescriptions_1.readRequestFailureDescription)(text)) {
|
|
118
|
+
return (0, RequestFailureDescriptions_1.getRequestFailureDescriptionText)({
|
|
119
|
+
translator: data.translator,
|
|
120
|
+
description: text,
|
|
121
|
+
options: ON_THE_PAGE,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
return (0, exports.getProbeFailureCauseText)({
|
|
125
|
+
translator: data.translator,
|
|
126
|
+
failureCause: text,
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
exports.getProbeMessageText = getProbeMessageText;
|
|
101
130
|
/*
|
|
102
131
|
* WHERE A REQUEST BROKE.
|
|
103
132
|
*
|
|
@@ -2,6 +2,7 @@ import commonJsModule from "./ProbeFailureReading.js";
|
|
|
2
2
|
export const PROBE_TIMEOUT_FAILURE_CAUSE = commonJsModule.PROBE_TIMEOUT_FAILURE_CAUSE;
|
|
3
3
|
export const REQUEST_FAILED_PHASE_WORDS = commonJsModule.REQUEST_FAILED_PHASE_WORDS;
|
|
4
4
|
export const getProbeFailureCauseText = commonJsModule.getProbeFailureCauseText;
|
|
5
|
+
export const getProbeMessageText = commonJsModule.getProbeMessageText;
|
|
5
6
|
export const getRequestFailedPhaseText = commonJsModule.getRequestFailedPhaseText;
|
|
6
7
|
export const readProbeTimeoutFailureCause = commonJsModule.readProbeTimeoutFailureCause;
|
|
7
8
|
export const writeProbeTimeoutFailureCause = commonJsModule.writeProbeTimeoutFailureCause;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SentenceOptions, Translator } from "../../Types/Translator.mjs";
|
|
2
|
+
export declare enum RequestFailureDescription {
|
|
3
|
+
InvalidTarget = "InvalidTarget",
|
|
4
|
+
TargetUnreachable = "TargetUnreachable",
|
|
5
|
+
ProbeCouldNotConnect = "ProbeCouldNotConnect",
|
|
6
|
+
ProbeCouldNotConnectOverIPv6 = "ProbeCouldNotConnectOverIPv6",
|
|
7
|
+
ProbeCannotSendIPv6 = "ProbeCannotSendIPv6",
|
|
8
|
+
NoIPv6Route = "NoIPv6Route",
|
|
9
|
+
NetworkUnreachable = "NetworkUnreachable",
|
|
10
|
+
DnsResolutionFailed = "DnsResolutionFailed",
|
|
11
|
+
ConnectionRefused = "ConnectionRefused",
|
|
12
|
+
ConnectionReset = "ConnectionReset",
|
|
13
|
+
ConnectionAborted = "ConnectionAborted",
|
|
14
|
+
RequestTimedOut = "RequestTimedOut",
|
|
15
|
+
CertificateRevoked = "CertificateRevoked",
|
|
16
|
+
CertificateExpired = "CertificateExpired",
|
|
17
|
+
SelfSignedCertificate = "SelfSignedCertificate",
|
|
18
|
+
CertificateUnknownAuthority = "CertificateUnknownAuthority",
|
|
19
|
+
TlsHandshakeFailed = "TlsHandshakeFailed",
|
|
20
|
+
NetworkError = "NetworkError",
|
|
21
|
+
HostUnreachable = "HostUnreachable",
|
|
22
|
+
HttpStatus = "HttpStatus",
|
|
23
|
+
HttpServerError = "HttpServerError",
|
|
24
|
+
HttpNotFound = "HttpNotFound",
|
|
25
|
+
HttpForbidden = "HttpForbidden",
|
|
26
|
+
HttpUnauthorized = "HttpUnauthorized",
|
|
27
|
+
HttpBadRequest = "HttpBadRequest",
|
|
28
|
+
HttpClientError = "HttpClientError",
|
|
29
|
+
NoResponse = "NoResponse",
|
|
30
|
+
RequestFailed = "RequestFailed",
|
|
31
|
+
PortProbeCouldNotConnect = "PortProbeCouldNotConnect",
|
|
32
|
+
PortProbeCouldNotConnectOverIPv6 = "PortProbeCouldNotConnectOverIPv6",
|
|
33
|
+
PortProbeCannotSendIPv6 = "PortProbeCannotSendIPv6",
|
|
34
|
+
PortNoIPv6Route = "PortNoIPv6Route",
|
|
35
|
+
PortDnsResolutionFailed = "PortDnsResolutionFailed",
|
|
36
|
+
PortConnectionTimedOut = "PortConnectionTimedOut",
|
|
37
|
+
PortTcpConnectionFailed = "PortTcpConnectionFailed",
|
|
38
|
+
PortNetworkError = "PortNetworkError",
|
|
39
|
+
NtpLookupTimedOut = "NtpLookupTimedOut",
|
|
40
|
+
NtpNoReply = "NtpNoReply",
|
|
41
|
+
NtpNameDidNotResolve = "NtpNameDidNotResolve",
|
|
42
|
+
NtpPortUnreachable = "NtpPortUnreachable",
|
|
43
|
+
NtpProbeCouldNotSend = "NtpProbeCouldNotSend",
|
|
44
|
+
NtpNetworkError = "NtpNetworkError"
|
|
45
|
+
}
|
|
46
|
+
export declare const REQUEST_FAILURE_DESCRIPTIONS: Readonly<Record<RequestFailureDescription, string>>;
|
|
47
|
+
export interface RequestFailureDescriptionValues {
|
|
48
|
+
status?: number | string | undefined;
|
|
49
|
+
message?: string | undefined;
|
|
50
|
+
}
|
|
51
|
+
export declare const writeRequestFailureDescription: (description: RequestFailureDescription, values?: RequestFailureDescriptionValues) => string;
|
|
52
|
+
export interface RequestFailureDescriptionReading {
|
|
53
|
+
description: RequestFailureDescription;
|
|
54
|
+
values: RequestFailureDescriptionValues;
|
|
55
|
+
}
|
|
56
|
+
export declare const readRequestFailureDescription: (text: string | null | undefined) => RequestFailureDescriptionReading | null;
|
|
57
|
+
export declare const getRequestFailureDescriptionText: (data: {
|
|
58
|
+
translator: Translator;
|
|
59
|
+
description: string | null | undefined;
|
|
60
|
+
options?: SentenceOptions | undefined;
|
|
61
|
+
}) => string;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SentenceOptions, Translator } from "../../Types/Translator";
|
|
2
|
+
export declare enum RequestFailureDescription {
|
|
3
|
+
InvalidTarget = "InvalidTarget",
|
|
4
|
+
TargetUnreachable = "TargetUnreachable",
|
|
5
|
+
ProbeCouldNotConnect = "ProbeCouldNotConnect",
|
|
6
|
+
ProbeCouldNotConnectOverIPv6 = "ProbeCouldNotConnectOverIPv6",
|
|
7
|
+
ProbeCannotSendIPv6 = "ProbeCannotSendIPv6",
|
|
8
|
+
NoIPv6Route = "NoIPv6Route",
|
|
9
|
+
NetworkUnreachable = "NetworkUnreachable",
|
|
10
|
+
DnsResolutionFailed = "DnsResolutionFailed",
|
|
11
|
+
ConnectionRefused = "ConnectionRefused",
|
|
12
|
+
ConnectionReset = "ConnectionReset",
|
|
13
|
+
ConnectionAborted = "ConnectionAborted",
|
|
14
|
+
RequestTimedOut = "RequestTimedOut",
|
|
15
|
+
CertificateRevoked = "CertificateRevoked",
|
|
16
|
+
CertificateExpired = "CertificateExpired",
|
|
17
|
+
SelfSignedCertificate = "SelfSignedCertificate",
|
|
18
|
+
CertificateUnknownAuthority = "CertificateUnknownAuthority",
|
|
19
|
+
TlsHandshakeFailed = "TlsHandshakeFailed",
|
|
20
|
+
NetworkError = "NetworkError",
|
|
21
|
+
HostUnreachable = "HostUnreachable",
|
|
22
|
+
HttpStatus = "HttpStatus",
|
|
23
|
+
HttpServerError = "HttpServerError",
|
|
24
|
+
HttpNotFound = "HttpNotFound",
|
|
25
|
+
HttpForbidden = "HttpForbidden",
|
|
26
|
+
HttpUnauthorized = "HttpUnauthorized",
|
|
27
|
+
HttpBadRequest = "HttpBadRequest",
|
|
28
|
+
HttpClientError = "HttpClientError",
|
|
29
|
+
NoResponse = "NoResponse",
|
|
30
|
+
RequestFailed = "RequestFailed",
|
|
31
|
+
PortProbeCouldNotConnect = "PortProbeCouldNotConnect",
|
|
32
|
+
PortProbeCouldNotConnectOverIPv6 = "PortProbeCouldNotConnectOverIPv6",
|
|
33
|
+
PortProbeCannotSendIPv6 = "PortProbeCannotSendIPv6",
|
|
34
|
+
PortNoIPv6Route = "PortNoIPv6Route",
|
|
35
|
+
PortDnsResolutionFailed = "PortDnsResolutionFailed",
|
|
36
|
+
PortConnectionTimedOut = "PortConnectionTimedOut",
|
|
37
|
+
PortTcpConnectionFailed = "PortTcpConnectionFailed",
|
|
38
|
+
PortNetworkError = "PortNetworkError",
|
|
39
|
+
NtpLookupTimedOut = "NtpLookupTimedOut",
|
|
40
|
+
NtpNoReply = "NtpNoReply",
|
|
41
|
+
NtpNameDidNotResolve = "NtpNameDidNotResolve",
|
|
42
|
+
NtpPortUnreachable = "NtpPortUnreachable",
|
|
43
|
+
NtpProbeCouldNotSend = "NtpProbeCouldNotSend",
|
|
44
|
+
NtpNetworkError = "NtpNetworkError"
|
|
45
|
+
}
|
|
46
|
+
export declare const REQUEST_FAILURE_DESCRIPTIONS: Readonly<Record<RequestFailureDescription, string>>;
|
|
47
|
+
export interface RequestFailureDescriptionValues {
|
|
48
|
+
status?: number | string | undefined;
|
|
49
|
+
message?: string | undefined;
|
|
50
|
+
}
|
|
51
|
+
export declare const writeRequestFailureDescription: (description: RequestFailureDescription, values?: RequestFailureDescriptionValues) => string;
|
|
52
|
+
export interface RequestFailureDescriptionReading {
|
|
53
|
+
description: RequestFailureDescription;
|
|
54
|
+
values: RequestFailureDescriptionValues;
|
|
55
|
+
}
|
|
56
|
+
export declare const readRequestFailureDescription: (text: string | null | undefined) => RequestFailureDescriptionReading | null;
|
|
57
|
+
export declare const getRequestFailureDescriptionText: (data: {
|
|
58
|
+
translator: Translator;
|
|
59
|
+
description: string | null | undefined;
|
|
60
|
+
options?: SentenceOptions | undefined;
|
|
61
|
+
}) => string;
|