@oneuptime/common 14.0.106 → 14.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/AuditLog.js +1 -1
- package/Models/AnalyticsModels/Index.js +3 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.mts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.ts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.js +300 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.mjs +3 -0
- package/Models/DatabaseModels/CallLog.d.mts +4 -0
- package/Models/DatabaseModels/CallLog.d.ts +4 -0
- package/Models/DatabaseModels/CallLog.js +85 -0
- package/Models/DatabaseModels/DataBiConnection.d.mts +3 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +3 -0
- package/Models/DatabaseModels/DataBiConnection.js +47 -1
- package/Models/DatabaseModels/DataDashboard.d.mts +10 -0
- package/Models/DatabaseModels/DataDashboard.d.ts +10 -0
- package/Models/DatabaseModels/DataDashboard.js +129 -2
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +55 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.mts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.ts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.js +536 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.mjs +2 -0
- package/Models/DatabaseModels/NetworkSite.d.mts +1 -0
- package/Models/DatabaseModels/NetworkSite.d.ts +1 -0
- package/Models/DatabaseModels/NetworkSite.js +51 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +41 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.mts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.ts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +80 -1
- package/Models/DatabaseModels/RumApplication.d.mts +2 -0
- package/Models/DatabaseModels/RumApplication.d.ts +2 -0
- package/Models/DatabaseModels/RumApplication.js +108 -0
- package/Models/DatabaseModels/Team.js +10 -2
- package/Models/DatabaseModels/TeamComplianceSetting.js +8 -1
- package/Models/DatabaseModels/TeamCustomRole.js +9 -1
- package/Models/DatabaseModels/TeamMember.js +15 -1
- package/Models/DatabaseModels/TeamOwnerTeam.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.js +325 -0
- package/Models/DatabaseModels/TeamOwnerTeam.mjs +2 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.js +331 -0
- package/Models/DatabaseModels/TeamOwnerUser.mjs +2 -0
- package/Models/DatabaseModels/TeamPermission.js +12 -1
- package/Models/DatabaseModels/TelemetryUsageBilling.d.mts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.d.ts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.js +34 -0
- package/Types/AI/AIActionWords.d.mts +1 -0
- package/Types/AI/AIActionWords.d.ts +1 -0
- package/Types/AI/AIActionWords.js +15 -4
- package/Types/AI/AIChatRecordSeen.d.mts +3 -0
- package/Types/AI/AIChatRecordSeen.d.ts +3 -0
- package/Types/AI/AIChatRecordSeen.js +28 -3
- package/Types/AI/AIChatRecordSeen.mjs +1 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.mts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.ts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.js +7 -0
- package/Types/AuditLog/AuditLogRetention.d.mts +10 -0
- package/Types/AuditLog/AuditLogRetention.d.ts +10 -0
- package/Types/AuditLog/AuditLogRetention.js +91 -0
- package/Types/AuditLog/AuditLogRetention.mjs +8 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.mts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.ts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.js +224 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.mjs +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.mts +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.ts +3 -0
- package/Types/CodeRepository/CodeFileSeen.js +61 -3
- package/Types/DataObservability/DataDashboardActivity.d.mts +40 -0
- package/Types/DataObservability/DataDashboardActivity.d.ts +40 -0
- package/Types/DataObservability/DataDashboardActivity.js +119 -0
- package/Types/DataObservability/DataDashboardActivity.mjs +12 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +2 -0
- package/Types/DataObservability/DataTableLineage.d.mts +87 -0
- package/Types/DataObservability/DataTableLineage.d.ts +87 -0
- package/Types/DataObservability/DataTableLineage.js +111 -0
- package/Types/DataObservability/DataTableLineage.mjs +19 -0
- package/Types/DataSecurity/DataStoreKind.d.mts +1 -0
- package/Types/DataSecurity/DataStoreKind.d.ts +1 -0
- package/Types/DataSecurity/DataStoreKind.js +3 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +6 -0
- package/Types/DatabaseServer/DatabaseServerMetricCatalog.js +71 -82
- package/Types/Date.d.mts +4 -0
- package/Types/Date.d.ts +4 -0
- package/Types/Date.js +47 -2
- package/Types/Date.mjs +2 -0
- package/Types/DateLanguage.d.mts +9 -0
- package/Types/DateLanguage.d.ts +9 -0
- package/Types/DateLanguage.js +79 -1
- package/Types/DateLanguage.mjs +4 -0
- package/Types/MessageQueue/MessageQueueMetricCatalog.js +61 -61
- package/Types/Monitor/CriteriaFilterTerms.d.mts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.d.ts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.js +166 -0
- package/Types/Monitor/CriteriaFilterTerms.mjs +4 -0
- package/Types/Monitor/EvaluationSentence.d.mts +37 -0
- package/Types/Monitor/EvaluationSentence.d.ts +37 -0
- package/Types/Monitor/EvaluationSentence.js +298 -0
- package/Types/Monitor/EvaluationSentence.mjs +12 -0
- package/Types/Monitor/MonitorCriteria.d.mts +2 -0
- package/Types/Monitor/MonitorCriteria.d.ts +2 -0
- package/Types/Monitor/MonitorCriteria.js +8 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.mts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.ts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +243 -194
- package/Types/Monitor/MonitorEvaluationDetails.d.mts +2 -0
- package/Types/Monitor/MonitorEvaluationDetails.d.ts +2 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.mts +4 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.ts +4 -0
- package/Types/Monitor/MonitorStep.d.mts +2 -0
- package/Types/Monitor/MonitorStep.d.ts +2 -0
- package/Types/Monitor/MonitorSteps.d.mts +2 -0
- package/Types/Monitor/MonitorSteps.d.ts +2 -0
- package/Types/Monitor/MonitorType.d.mts +1 -0
- package/Types/Monitor/MonitorType.d.ts +1 -0
- package/Types/Monitor/MonitorType.js +12 -0
- package/Types/Monitor/TelemetryObservation.d.mts +15 -0
- package/Types/Monitor/TelemetryObservation.d.ts +15 -0
- package/Types/Monitor/TelemetryObservation.js +28 -0
- package/Types/Monitor/TelemetryObservation.mjs +2 -0
- package/Types/NetworkDevice/DeviceNaming.d.mts +87 -0
- package/Types/NetworkDevice/DeviceNaming.d.ts +87 -0
- package/Types/NetworkDevice/DeviceNaming.js +279 -0
- package/Types/NetworkDevice/DeviceNaming.mjs +24 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.mts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.ts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.js +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.mts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.ts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.js +351 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.mjs +15 -0
- package/Types/Permission.d.mts +5 -0
- package/Types/Permission.d.ts +5 -0
- package/Types/Permission.js +61 -5
- package/Types/Rules/RuleCriteriaFieldRegistry.js +12 -0
- package/Types/Rules/RuleCriteriaSubject.js +1 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.mts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.ts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.js +166 -0
- package/Types/Rum/ProductAnalyticsEventReads.mjs +27 -0
- package/Types/Rum/ProductAnalyticsEvents.d.mts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.d.ts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.js +477 -0
- package/Types/Rum/ProductAnalyticsEvents.mjs +40 -0
- package/Types/Rum/SessionReplay.d.mts +4 -0
- package/Types/Rum/SessionReplay.d.ts +4 -0
- package/Types/Rum/SessionReplayHealth.js +1 -1
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.mts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.ts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.js +51 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.mjs +4 -0
- package/Types/Team/BuiltInTeam.d.mts +1 -0
- package/Types/Team/BuiltInTeam.d.ts +1 -0
- package/Types/Team/BuiltInTeam.js +14 -1
- package/Types/Team/BuiltInTeam.mjs +1 -0
- package/Types/Telemetry/TelemetryUsage.d.mts +7 -2
- package/Types/Telemetry/TelemetryUsage.d.ts +7 -2
- package/Types/Telemetry/TelemetryUsage.js +24 -5
- package/Types/Telemetry/TelemetryUsage.mjs +3 -0
- package/Types/UserNotification/UserNotificationStatus.d.mts +2 -1
- package/Types/UserNotification/UserNotificationStatus.d.ts +2 -1
- package/Types/UserNotification/UserNotificationStatus.js +8 -0
- package/Types/Workspace/NotificationRules/EventType.d.mts +2 -1
- package/Types/Workspace/NotificationRules/EventType.d.ts +2 -1
- package/Types/Workspace/NotificationRules/EventType.js +8 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleInvites.js +5 -1
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.mts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.ts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.js +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.mjs +1 -0
- package/Utils/AI/InvestigationReport.js +93 -21
- package/Utils/AI/InvestigationReportLanguages.d.mts +25 -0
- package/Utils/AI/InvestigationReportLanguages.d.ts +25 -0
- package/Utils/AI/InvestigationReportLanguages.js +603 -0
- package/Utils/AI/InvestigationReportLanguages.mjs +11 -0
- package/Utils/Dashboard/TableThresholds.js +5 -2
- package/Utils/Monitor/MonitorLogSummaryUtil.d.mts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.d.ts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.js +170 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +242 -0
- package/Utils/Monitor/MonitorRootCauseWording.mjs +2 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.mts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.ts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -2
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.mts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.ts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.js +303 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.mjs +8 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.mts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.ts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.js +649 -0
- package/Utils/NetworkDevice/Naming/NamePattern.mjs +22 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.js +467 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.mjs +14 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.mts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.ts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.js +327 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.mjs +7 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.mts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.ts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.js +8 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.mts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.ts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.js +1 -0
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.mts +7 -6
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.ts +7 -6
- package/Utils/SessionReplay/SessionReplayHealth.js +703 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.mts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.ts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.js +39 -0
- package/Utils/Slo/SloErrorBudgetPolicy.mjs +1 -0
- package/Utils/Slo/SloFeedMarkdown.d.mts +19 -4
- package/Utils/Slo/SloFeedMarkdown.d.ts +19 -4
- package/Utils/Slo/SloFeedMarkdown.js +64 -17
- package/Utils/Slo/SloFeedMarkdown.mjs +4 -0
- package/Utils/StatusPage/ResourceExplorer.js +9 -8
- package/Utils/TotpSetupKey.d.mts +3 -0
- package/Utils/TotpSetupKey.d.ts +3 -0
- package/Utils/TotpSetupKey.js +72 -0
- package/Utils/TotpSetupKey.mjs +4 -0
- package/Utils/Workspace/WorkspaceChannelName.js +5 -1
- package/package.json +1 -1
- package/Utils/Rum/SessionReplayHealth.js +0 -558
- /package/Utils/{Rum → SessionReplay}/SessionReplayHealth.mjs +0 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* NAMING RULES FOR NETWORK DEVICES (OneUptime issue #6619).
|
|
4
|
+
*
|
|
5
|
+
* Discovery names a device by what it finds: its SNMP name, its NetBIOS
|
|
6
|
+
* name, its DNS name, or its address (Utils/NetworkDevice/DeviceNameRule).
|
|
7
|
+
* An estate that names its devices by a convention of its own - "UN1216
|
|
8
|
+
* MNUPLR01" is the menu player of unit 1216 - got a list of "Samsung",
|
|
9
|
+
* "dmb-5" and bare addresses, and renamed every device by hand.
|
|
10
|
+
*
|
|
11
|
+
* A naming rule says what the devices it matches are called: which devices
|
|
12
|
+
* (conditions on their address, MAC, vendor, discovered name and site) and a
|
|
13
|
+
* name pattern ("UN{site.code}MNUPLR{nn}"). Rules are kept in order, and the
|
|
14
|
+
* first rule that matches a device and can fill in its pattern names it. An
|
|
15
|
+
* import names each device it creates that way, the name discovery found is
|
|
16
|
+
* kept as the device's Discovered Name, and the same rules can be applied to
|
|
17
|
+
* the devices already in the project, after a preview of every rename.
|
|
18
|
+
*
|
|
19
|
+
* These are the shapes the server, the workers and the Dashboard share.
|
|
20
|
+
* React-free and database-free, so every rule is tested on its own.
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.NAMING_APPLY_RULES_CHANGED_REASON = exports.NAMING_APPLY_NAME_CHANGED_REASON = exports.NAMING_APPLY_DEVICE_GONE_REASON = exports.MAX_RENAMES_PER_NAMING_APPLY = exports.MAX_DEVICES_PER_NAMING_PLAN = exports.ALL_DEVICE_NAMING_OUTCOMES = exports.DeviceNamingOutcome = exports.MAX_NAME_PATTERN_LENGTH = exports.MAX_NAMING_LOOKUP_VALUE_LENGTH = exports.MAX_NAMING_LOOKUP_KEY_LENGTH = exports.MAX_NAMING_LOOKUP_ENTRIES = exports.ALL_NAMING_LOOKUP_KEYS = exports.NamingLookupKey = void 0;
|
|
24
|
+
exports.isNamingLookupKey = isNamingLookupKey;
|
|
25
|
+
exports.isDeviceNamingOutcome = isDeviceNamingOutcome;
|
|
26
|
+
exports.isDeviceNamedByPerson = isDeviceNamedByPerson;
|
|
27
|
+
exports.isDeviceStillNamedByRule = isDeviceStillNamedByRule;
|
|
28
|
+
exports.readDeviceNamingResult = readDeviceNamingResult;
|
|
29
|
+
exports.readDeviceNamingPreview = readDeviceNamingPreview;
|
|
30
|
+
exports.readDeviceNamingPlan = readDeviceNamingPlan;
|
|
31
|
+
exports.readDeviceNamingApplyResult = readDeviceNamingApplyResult;
|
|
32
|
+
exports.getRenamesForPlanItems = getRenamesForPlanItems;
|
|
33
|
+
exports.getInitialPlanSelection = getInitialPlanSelection;
|
|
34
|
+
/*
|
|
35
|
+
* What a rule's lookup table is keyed by: the value of the device a table
|
|
36
|
+
* row is looked up with. The customer's table (issue #6619) maps the last
|
|
37
|
+
* number of each device's address in a unit's subnet to its role - .51 is
|
|
38
|
+
* the menu player, .151 the left screen - so the last part of the address
|
|
39
|
+
* comes first.
|
|
40
|
+
*/
|
|
41
|
+
var NamingLookupKey;
|
|
42
|
+
(function (NamingLookupKey) {
|
|
43
|
+
NamingLookupKey["LastIpOctet"] = "lastIpOctet";
|
|
44
|
+
NamingLookupKey["IpAddress"] = "ipAddress";
|
|
45
|
+
NamingLookupKey["MacAddress"] = "macAddress";
|
|
46
|
+
NamingLookupKey["DiscoveredName"] = "discoveredName";
|
|
47
|
+
})(NamingLookupKey || (exports.NamingLookupKey = NamingLookupKey = {}));
|
|
48
|
+
exports.ALL_NAMING_LOOKUP_KEYS = [
|
|
49
|
+
NamingLookupKey.LastIpOctet,
|
|
50
|
+
NamingLookupKey.IpAddress,
|
|
51
|
+
NamingLookupKey.MacAddress,
|
|
52
|
+
NamingLookupKey.DiscoveredName,
|
|
53
|
+
];
|
|
54
|
+
function isNamingLookupKey(value) {
|
|
55
|
+
return (typeof value === "string" &&
|
|
56
|
+
exports.ALL_NAMING_LOOKUP_KEYS.includes(value));
|
|
57
|
+
}
|
|
58
|
+
/*
|
|
59
|
+
* The longest a lookup table may be. A table maps the positions of one kind
|
|
60
|
+
* of site, or the MACs of an asset list: hundreds of rows at most. A rule is
|
|
61
|
+
* read on every import, so the ceiling keeps one rule from being megabytes.
|
|
62
|
+
*/
|
|
63
|
+
exports.MAX_NAMING_LOOKUP_ENTRIES = 5000;
|
|
64
|
+
// The longest a lookup row's key and value may be.
|
|
65
|
+
exports.MAX_NAMING_LOOKUP_KEY_LENGTH = 100;
|
|
66
|
+
exports.MAX_NAMING_LOOKUP_VALUE_LENGTH = 80;
|
|
67
|
+
// The longest a name pattern may be (it is stored as LongText).
|
|
68
|
+
exports.MAX_NAME_PATTERN_LENGTH = 255;
|
|
69
|
+
/*
|
|
70
|
+
* What the naming rules made of one device.
|
|
71
|
+
*
|
|
72
|
+
* - Named: a rule gives it a name - for a device being imported, the name
|
|
73
|
+
* it is created under; for one already in the project, a new name.
|
|
74
|
+
* - FollowsRules: a device already in the project is already called what
|
|
75
|
+
* the rules call it (with a counter, any free number of the pattern).
|
|
76
|
+
* - NoMatchingRule: no enabled rule matches it, so it keeps the name it has
|
|
77
|
+
* (or, being imported, the name discovery found).
|
|
78
|
+
* - MissingValue: a rule matches it, but the device lacks a value the
|
|
79
|
+
* rule's pattern needs - no site code, no MAC, no row in the lookup
|
|
80
|
+
* table - and no rule after it could name it either.
|
|
81
|
+
* - NameTaken: a rule names it, but another device already has that name
|
|
82
|
+
* and the pattern has no counter to make it unique.
|
|
83
|
+
* - NameTooLong: the name the rule gives it is longer than a device name
|
|
84
|
+
* may be.
|
|
85
|
+
*/
|
|
86
|
+
var DeviceNamingOutcome;
|
|
87
|
+
(function (DeviceNamingOutcome) {
|
|
88
|
+
DeviceNamingOutcome["Named"] = "Named";
|
|
89
|
+
DeviceNamingOutcome["FollowsRules"] = "FollowsRules";
|
|
90
|
+
DeviceNamingOutcome["NoMatchingRule"] = "NoMatchingRule";
|
|
91
|
+
DeviceNamingOutcome["MissingValue"] = "MissingValue";
|
|
92
|
+
DeviceNamingOutcome["NameTaken"] = "NameTaken";
|
|
93
|
+
DeviceNamingOutcome["NameTooLong"] = "NameTooLong";
|
|
94
|
+
})(DeviceNamingOutcome || (exports.DeviceNamingOutcome = DeviceNamingOutcome = {}));
|
|
95
|
+
exports.ALL_DEVICE_NAMING_OUTCOMES = [
|
|
96
|
+
DeviceNamingOutcome.Named,
|
|
97
|
+
DeviceNamingOutcome.FollowsRules,
|
|
98
|
+
DeviceNamingOutcome.NoMatchingRule,
|
|
99
|
+
DeviceNamingOutcome.MissingValue,
|
|
100
|
+
DeviceNamingOutcome.NameTaken,
|
|
101
|
+
DeviceNamingOutcome.NameTooLong,
|
|
102
|
+
];
|
|
103
|
+
function isDeviceNamingOutcome(value) {
|
|
104
|
+
return (typeof value === "string" &&
|
|
105
|
+
exports.ALL_DEVICE_NAMING_OUTCOMES.includes(value));
|
|
106
|
+
}
|
|
107
|
+
// How many devices one plan checks. A project with more is planned per selection.
|
|
108
|
+
exports.MAX_DEVICES_PER_NAMING_PLAN = 20000;
|
|
109
|
+
// How many renames one apply carries.
|
|
110
|
+
exports.MAX_RENAMES_PER_NAMING_APPLY = 5000;
|
|
111
|
+
// The reasons an apply leaves a device alone, worded once for the tests.
|
|
112
|
+
exports.NAMING_APPLY_DEVICE_GONE_REASON = "The device was deleted, or is no longer in this project.";
|
|
113
|
+
exports.NAMING_APPLY_NAME_CHANGED_REASON = "The device was renamed since the preview, so it was left alone.";
|
|
114
|
+
exports.NAMING_APPLY_RULES_CHANGED_REASON = "The naming rules give this device another name now. Preview again to see it.";
|
|
115
|
+
/*
|
|
116
|
+
* The device's name, its discovered name and its rule-given name: which of
|
|
117
|
+
* them is the one it has. True when the name was typed by a person - it is
|
|
118
|
+
* neither what discovery recorded nor what a naming rule gave it, nor its
|
|
119
|
+
* own address (what a device added without a name is called, and what an
|
|
120
|
+
* import before discovery recorded names named a device by). A device with
|
|
121
|
+
* no record at all was otherwise added by hand, so its name is a person's.
|
|
122
|
+
*/
|
|
123
|
+
function isDeviceNamedByPerson(device) {
|
|
124
|
+
const name = typeof device.name === "string" ? device.name.trim() : "";
|
|
125
|
+
if (!name) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
if (typeof device.hostname === "string" &&
|
|
129
|
+
name.toLowerCase() === device.hostname.trim().toLowerCase()) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
const discoveredName = typeof device.discoveredName === "string"
|
|
133
|
+
? device.discoveredName.trim()
|
|
134
|
+
: "";
|
|
135
|
+
const ruleAssignedName = typeof device.ruleAssignedName === "string"
|
|
136
|
+
? device.ruleAssignedName.trim()
|
|
137
|
+
: "";
|
|
138
|
+
return name !== discoveredName && name !== ruleAssignedName;
|
|
139
|
+
}
|
|
140
|
+
/*
|
|
141
|
+
* True when the device is still called exactly what a naming rule called it
|
|
142
|
+
* - so the rules, not a person, decide its name, and discovery leaves it
|
|
143
|
+
* alone (DiscoveredNameUpgrade, RunImportedDeviceNaming).
|
|
144
|
+
*/
|
|
145
|
+
function isDeviceStillNamedByRule(device) {
|
|
146
|
+
if (typeof device.name !== "string" ||
|
|
147
|
+
typeof device.ruleAssignedName !== "string") {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
const name = device.name.trim();
|
|
151
|
+
return Boolean(name) && name === device.ruleAssignedName.trim();
|
|
152
|
+
}
|
|
153
|
+
/*
|
|
154
|
+
* READING THE SERVER'S ANSWERS. The Dashboard reads every answer through
|
|
155
|
+
* these, so an answer from a newer server - an outcome this build does not
|
|
156
|
+
* know, a field missing - is read as what it can be, never drawn as
|
|
157
|
+
* something it is not: an item with an unknown outcome is dropped.
|
|
158
|
+
*/
|
|
159
|
+
function readRecord(value) {
|
|
160
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
161
|
+
? value
|
|
162
|
+
: {};
|
|
163
|
+
}
|
|
164
|
+
function readOptionalString(value) {
|
|
165
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
166
|
+
}
|
|
167
|
+
function readCount(value) {
|
|
168
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0
|
|
169
|
+
? Math.floor(value)
|
|
170
|
+
: 0;
|
|
171
|
+
}
|
|
172
|
+
function readDeviceNamingResult(value) {
|
|
173
|
+
const record = readRecord(value);
|
|
174
|
+
if (!isDeviceNamingOutcome(record["outcome"])) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
const result = { outcome: record["outcome"] };
|
|
178
|
+
for (const key of [
|
|
179
|
+
"name",
|
|
180
|
+
"ruleId",
|
|
181
|
+
"ruleName",
|
|
182
|
+
"missing",
|
|
183
|
+
"takenName",
|
|
184
|
+
]) {
|
|
185
|
+
const text = readOptionalString(record[key]);
|
|
186
|
+
if (text) {
|
|
187
|
+
result[key] = text;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return result;
|
|
191
|
+
}
|
|
192
|
+
function readDeviceNamingPreview(value) {
|
|
193
|
+
const record = readRecord(value);
|
|
194
|
+
const items = [];
|
|
195
|
+
if (Array.isArray(record["items"])) {
|
|
196
|
+
for (const item of record["items"]) {
|
|
197
|
+
const result = readDeviceNamingResult(item);
|
|
198
|
+
const itemRecord = readRecord(item);
|
|
199
|
+
const key = readOptionalString(itemRecord["key"]);
|
|
200
|
+
if (!result || !key) {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
items.push(Object.assign(Object.assign({}, result), { key: key, discoveredName: readOptionalString(itemRecord["discoveredName"]) || "" }));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return { hasRules: record["hasRules"] === true, items: items };
|
|
207
|
+
}
|
|
208
|
+
function readDeviceNamingPlan(value) {
|
|
209
|
+
const record = readRecord(value);
|
|
210
|
+
const items = [];
|
|
211
|
+
if (Array.isArray(record["items"])) {
|
|
212
|
+
for (const item of record["items"]) {
|
|
213
|
+
const result = readDeviceNamingResult(item);
|
|
214
|
+
const itemRecord = readRecord(item);
|
|
215
|
+
const deviceId = readOptionalString(itemRecord["deviceId"]);
|
|
216
|
+
if (!result || !deviceId) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
items.push(Object.assign(Object.assign({}, result), { deviceId: deviceId, currentName: readOptionalString(itemRecord["currentName"]) || "", isNamedByPerson: itemRecord["isNamedByPerson"] === true }));
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
hasRules: record["hasRules"] === true,
|
|
224
|
+
devicesChecked: readCount(record["devicesChecked"]),
|
|
225
|
+
items: items,
|
|
226
|
+
followingCount: readCount(record["followingCount"]),
|
|
227
|
+
isTruncated: record["isTruncated"] === true,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function readDeviceNamingApplyResult(value) {
|
|
231
|
+
const record = readRecord(value);
|
|
232
|
+
const skipped = [];
|
|
233
|
+
if (Array.isArray(record["skipped"])) {
|
|
234
|
+
for (const item of record["skipped"]) {
|
|
235
|
+
const itemRecord = readRecord(item);
|
|
236
|
+
const deviceId = readOptionalString(itemRecord["deviceId"]);
|
|
237
|
+
if (deviceId) {
|
|
238
|
+
skipped.push({
|
|
239
|
+
deviceId: deviceId,
|
|
240
|
+
reason: readOptionalString(itemRecord["reason"]) || "",
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return { renamed: readCount(record["renamed"]), skipped: skipped };
|
|
246
|
+
}
|
|
247
|
+
/*
|
|
248
|
+
* The renames a plan's ticked devices ask for: the Named ones, each with
|
|
249
|
+
* the name it has and the name the rules give it.
|
|
250
|
+
*/
|
|
251
|
+
function getRenamesForPlanItems(items, selectedDeviceIds) {
|
|
252
|
+
const renames = [];
|
|
253
|
+
for (const item of items) {
|
|
254
|
+
if (item.outcome !== DeviceNamingOutcome.Named ||
|
|
255
|
+
!item.name ||
|
|
256
|
+
!selectedDeviceIds.has(item.deviceId)) {
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
renames.push({
|
|
260
|
+
deviceId: item.deviceId,
|
|
261
|
+
fromName: item.currentName,
|
|
262
|
+
toName: item.name,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
return renames;
|
|
266
|
+
}
|
|
267
|
+
/*
|
|
268
|
+
* The devices ticked when a plan opens: every one the rules rename, except
|
|
269
|
+
* the ones a person named - renaming what someone chose is their call.
|
|
270
|
+
*/
|
|
271
|
+
function getInitialPlanSelection(items) {
|
|
272
|
+
const selected = new Set();
|
|
273
|
+
for (const item of items) {
|
|
274
|
+
if (item.outcome === DeviceNamingOutcome.Named && !item.isNamedByPerson) {
|
|
275
|
+
selected.add(item.deviceId);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return selected;
|
|
279
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import commonJsModule from "./DeviceNaming.js";
|
|
2
|
+
export const ALL_DEVICE_NAMING_OUTCOMES = commonJsModule.ALL_DEVICE_NAMING_OUTCOMES;
|
|
3
|
+
export const ALL_NAMING_LOOKUP_KEYS = commonJsModule.ALL_NAMING_LOOKUP_KEYS;
|
|
4
|
+
export const DeviceNamingOutcome = commonJsModule.DeviceNamingOutcome;
|
|
5
|
+
export const MAX_DEVICES_PER_NAMING_PLAN = commonJsModule.MAX_DEVICES_PER_NAMING_PLAN;
|
|
6
|
+
export const MAX_NAME_PATTERN_LENGTH = commonJsModule.MAX_NAME_PATTERN_LENGTH;
|
|
7
|
+
export const MAX_NAMING_LOOKUP_ENTRIES = commonJsModule.MAX_NAMING_LOOKUP_ENTRIES;
|
|
8
|
+
export const MAX_NAMING_LOOKUP_KEY_LENGTH = commonJsModule.MAX_NAMING_LOOKUP_KEY_LENGTH;
|
|
9
|
+
export const MAX_NAMING_LOOKUP_VALUE_LENGTH = commonJsModule.MAX_NAMING_LOOKUP_VALUE_LENGTH;
|
|
10
|
+
export const MAX_RENAMES_PER_NAMING_APPLY = commonJsModule.MAX_RENAMES_PER_NAMING_APPLY;
|
|
11
|
+
export const NAMING_APPLY_DEVICE_GONE_REASON = commonJsModule.NAMING_APPLY_DEVICE_GONE_REASON;
|
|
12
|
+
export const NAMING_APPLY_NAME_CHANGED_REASON = commonJsModule.NAMING_APPLY_NAME_CHANGED_REASON;
|
|
13
|
+
export const NAMING_APPLY_RULES_CHANGED_REASON = commonJsModule.NAMING_APPLY_RULES_CHANGED_REASON;
|
|
14
|
+
export const NamingLookupKey = commonJsModule.NamingLookupKey;
|
|
15
|
+
export const getInitialPlanSelection = commonJsModule.getInitialPlanSelection;
|
|
16
|
+
export const getRenamesForPlanItems = commonJsModule.getRenamesForPlanItems;
|
|
17
|
+
export const isDeviceNamedByPerson = commonJsModule.isDeviceNamedByPerson;
|
|
18
|
+
export const isDeviceNamingOutcome = commonJsModule.isDeviceNamingOutcome;
|
|
19
|
+
export const isDeviceStillNamedByRule = commonJsModule.isDeviceStillNamedByRule;
|
|
20
|
+
export const isNamingLookupKey = commonJsModule.isNamingLookupKey;
|
|
21
|
+
export const readDeviceNamingApplyResult = commonJsModule.readDeviceNamingApplyResult;
|
|
22
|
+
export const readDeviceNamingPlan = commonJsModule.readDeviceNamingPlan;
|
|
23
|
+
export const readDeviceNamingPreview = commonJsModule.readDeviceNamingPreview;
|
|
24
|
+
export const readDeviceNamingResult = commonJsModule.readDeviceNamingResult;
|
|
@@ -99,6 +99,7 @@ export interface DiscoveredDeviceImportFacts {
|
|
|
99
99
|
macAddress: string;
|
|
100
100
|
siteId?: string | undefined;
|
|
101
101
|
probeId?: string | undefined;
|
|
102
|
+
vendor?: string | undefined;
|
|
102
103
|
}
|
|
103
104
|
export declare function readDiscoveredDeviceImportFacts(value: unknown): DiscoveredDeviceImportFacts | null;
|
|
104
105
|
export declare function getEndpointNodeKey(endpointId: string): string;
|
|
@@ -99,6 +99,7 @@ export interface DiscoveredDeviceImportFacts {
|
|
|
99
99
|
macAddress: string;
|
|
100
100
|
siteId?: string | undefined;
|
|
101
101
|
probeId?: string | undefined;
|
|
102
|
+
vendor?: string | undefined;
|
|
102
103
|
}
|
|
103
104
|
export declare function readDiscoveredDeviceImportFacts(value: unknown): DiscoveredDeviceImportFacts | null;
|
|
104
105
|
export declare function getEndpointNodeKey(endpointId: string): string;
|
|
@@ -380,12 +380,16 @@ function readDiscoveredDeviceImportFacts(value) {
|
|
|
380
380
|
};
|
|
381
381
|
const siteId = optionalText(facts["siteId"]);
|
|
382
382
|
const probeId = optionalText(facts["probeId"]);
|
|
383
|
+
const vendor = optionalText(facts["vendor"]);
|
|
383
384
|
if (siteId && ObjectID_1.default.isValidUUID(siteId)) {
|
|
384
385
|
read.siteId = siteId;
|
|
385
386
|
}
|
|
386
387
|
if (probeId && ObjectID_1.default.isValidUUID(probeId)) {
|
|
387
388
|
read.probeId = probeId;
|
|
388
389
|
}
|
|
390
|
+
if (vendor) {
|
|
391
|
+
read.vendor = vendor;
|
|
392
|
+
}
|
|
389
393
|
return read;
|
|
390
394
|
}
|
|
391
395
|
// The topology map's key for an endpoint node (NetworkTopologySuppression.nodeKey).
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import UserNotificationStatus from "../UserNotification/UserNotificationStatus.mjs";
|
|
2
|
+
export declare enum OnCallPageChannel {
|
|
3
|
+
Call = "Call",
|
|
4
|
+
SMS = "SMS",
|
|
5
|
+
WhatsApp = "WhatsApp",
|
|
6
|
+
Telegram = "Telegram",
|
|
7
|
+
Push = "Push",
|
|
8
|
+
Email = "Email",
|
|
9
|
+
Slack = "Slack",
|
|
10
|
+
MicrosoftTeams = "Microsoft Teams",
|
|
11
|
+
Mattermost = "Mattermost",
|
|
12
|
+
Webhook = "Webhook",
|
|
13
|
+
CustomChannel = "Custom Channel"
|
|
14
|
+
}
|
|
15
|
+
export interface OnCallPageNotificationMethods {
|
|
16
|
+
userCallId?: unknown;
|
|
17
|
+
userSmsId?: unknown;
|
|
18
|
+
userWhatsAppId?: unknown;
|
|
19
|
+
userTelegramId?: unknown;
|
|
20
|
+
userPushId?: unknown;
|
|
21
|
+
userEmailId?: unknown;
|
|
22
|
+
userSlackId?: unknown;
|
|
23
|
+
userMicrosoftTeamsId?: unknown;
|
|
24
|
+
userMattermostId?: unknown;
|
|
25
|
+
userWebhookId?: unknown;
|
|
26
|
+
customNotificationChannelId?: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface OnCallPageNotification extends OnCallPageNotificationMethods {
|
|
29
|
+
id?: {
|
|
30
|
+
toString(): string;
|
|
31
|
+
} | null | undefined;
|
|
32
|
+
status?: UserNotificationStatus | string | null | undefined;
|
|
33
|
+
isAcknowledged?: boolean | null | undefined;
|
|
34
|
+
acknowledgedAt?: Date | string | null | undefined;
|
|
35
|
+
createdAt?: Date | string | null | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface OnCallPageChannelInfo {
|
|
38
|
+
channel: OnCallPageChannel;
|
|
39
|
+
field: keyof OnCallPageNotificationMethods;
|
|
40
|
+
name: string;
|
|
41
|
+
shortName: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const ON_CALL_PAGE_CHANNELS: ReadonlyArray<OnCallPageChannelInfo>;
|
|
44
|
+
export declare const ON_CALL_PAGE_SENT_STATUS_MESSAGE: string;
|
|
45
|
+
export declare function isOnCallPageNotificationOut(status: UserNotificationStatus | string | null | undefined): boolean;
|
|
46
|
+
export declare const ON_CALL_PAGE_RINGING_CHANNELS: ReadonlyArray<OnCallPageChannel>;
|
|
47
|
+
export declare function getOnCallPageChannelsOf(notification: OnCallPageNotificationMethods | null | undefined): Array<OnCallPageChannel>;
|
|
48
|
+
export declare function getOnCallPageChannelName(channel: OnCallPageChannel): string;
|
|
49
|
+
export declare function getOnCallPageChannelShortName(channel: OnCallPageChannel): string;
|
|
50
|
+
export declare function sortOnCallPageChannels(channels: Array<OnCallPageChannel>): Array<OnCallPageChannel>;
|
|
51
|
+
export declare function readOnCallPageChannels(value: unknown): Array<OnCallPageChannel> | null;
|
|
52
|
+
export declare function getOnCallPageChannelsOut(notifications: Array<OnCallPageNotification>): Array<OnCallPageChannel>;
|
|
53
|
+
export declare function getOnCallPageAnsweredChannels(notifications: Array<OnCallPageNotification>, answer: "acknowledged" | "escalated"): Array<OnCallPageChannel>;
|
|
54
|
+
export declare enum OnCallPageNotificationEvent {
|
|
55
|
+
SentLater = "SentLater",
|
|
56
|
+
Failed = "Failed",
|
|
57
|
+
NotAnswered = "NotAnswered"
|
|
58
|
+
}
|
|
59
|
+
export interface OnCallPageNotificationNews {
|
|
60
|
+
event: OnCallPageNotificationEvent;
|
|
61
|
+
channels: Array<OnCallPageChannel>;
|
|
62
|
+
isPagedBefore: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare function getOnCallPageNotificationNews(data: {
|
|
65
|
+
event: OnCallPageNotificationEvent;
|
|
66
|
+
notification: OnCallPageNotification;
|
|
67
|
+
notifications: Array<OnCallPageNotification>;
|
|
68
|
+
}): OnCallPageNotificationNews | null;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import UserNotificationStatus from "../UserNotification/UserNotificationStatus";
|
|
2
|
+
export declare enum OnCallPageChannel {
|
|
3
|
+
Call = "Call",
|
|
4
|
+
SMS = "SMS",
|
|
5
|
+
WhatsApp = "WhatsApp",
|
|
6
|
+
Telegram = "Telegram",
|
|
7
|
+
Push = "Push",
|
|
8
|
+
Email = "Email",
|
|
9
|
+
Slack = "Slack",
|
|
10
|
+
MicrosoftTeams = "Microsoft Teams",
|
|
11
|
+
Mattermost = "Mattermost",
|
|
12
|
+
Webhook = "Webhook",
|
|
13
|
+
CustomChannel = "Custom Channel"
|
|
14
|
+
}
|
|
15
|
+
export interface OnCallPageNotificationMethods {
|
|
16
|
+
userCallId?: unknown;
|
|
17
|
+
userSmsId?: unknown;
|
|
18
|
+
userWhatsAppId?: unknown;
|
|
19
|
+
userTelegramId?: unknown;
|
|
20
|
+
userPushId?: unknown;
|
|
21
|
+
userEmailId?: unknown;
|
|
22
|
+
userSlackId?: unknown;
|
|
23
|
+
userMicrosoftTeamsId?: unknown;
|
|
24
|
+
userMattermostId?: unknown;
|
|
25
|
+
userWebhookId?: unknown;
|
|
26
|
+
customNotificationChannelId?: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface OnCallPageNotification extends OnCallPageNotificationMethods {
|
|
29
|
+
id?: {
|
|
30
|
+
toString(): string;
|
|
31
|
+
} | null | undefined;
|
|
32
|
+
status?: UserNotificationStatus | string | null | undefined;
|
|
33
|
+
isAcknowledged?: boolean | null | undefined;
|
|
34
|
+
acknowledgedAt?: Date | string | null | undefined;
|
|
35
|
+
createdAt?: Date | string | null | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface OnCallPageChannelInfo {
|
|
38
|
+
channel: OnCallPageChannel;
|
|
39
|
+
field: keyof OnCallPageNotificationMethods;
|
|
40
|
+
name: string;
|
|
41
|
+
shortName: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const ON_CALL_PAGE_CHANNELS: ReadonlyArray<OnCallPageChannelInfo>;
|
|
44
|
+
export declare const ON_CALL_PAGE_SENT_STATUS_MESSAGE: string;
|
|
45
|
+
export declare function isOnCallPageNotificationOut(status: UserNotificationStatus | string | null | undefined): boolean;
|
|
46
|
+
export declare const ON_CALL_PAGE_RINGING_CHANNELS: ReadonlyArray<OnCallPageChannel>;
|
|
47
|
+
export declare function getOnCallPageChannelsOf(notification: OnCallPageNotificationMethods | null | undefined): Array<OnCallPageChannel>;
|
|
48
|
+
export declare function getOnCallPageChannelName(channel: OnCallPageChannel): string;
|
|
49
|
+
export declare function getOnCallPageChannelShortName(channel: OnCallPageChannel): string;
|
|
50
|
+
export declare function sortOnCallPageChannels(channels: Array<OnCallPageChannel>): Array<OnCallPageChannel>;
|
|
51
|
+
export declare function readOnCallPageChannels(value: unknown): Array<OnCallPageChannel> | null;
|
|
52
|
+
export declare function getOnCallPageChannelsOut(notifications: Array<OnCallPageNotification>): Array<OnCallPageChannel>;
|
|
53
|
+
export declare function getOnCallPageAnsweredChannels(notifications: Array<OnCallPageNotification>, answer: "acknowledged" | "escalated"): Array<OnCallPageChannel>;
|
|
54
|
+
export declare enum OnCallPageNotificationEvent {
|
|
55
|
+
SentLater = "SentLater",
|
|
56
|
+
Failed = "Failed",
|
|
57
|
+
NotAnswered = "NotAnswered"
|
|
58
|
+
}
|
|
59
|
+
export interface OnCallPageNotificationNews {
|
|
60
|
+
event: OnCallPageNotificationEvent;
|
|
61
|
+
channels: Array<OnCallPageChannel>;
|
|
62
|
+
isPagedBefore: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare function getOnCallPageNotificationNews(data: {
|
|
65
|
+
event: OnCallPageNotificationEvent;
|
|
66
|
+
notification: OnCallPageNotification;
|
|
67
|
+
notifications: Array<OnCallPageNotification>;
|
|
68
|
+
}): OnCallPageNotificationNews | null;
|