@oneuptime/common 14.0.110 → 14.1.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/AIRunRecording.d.mts +12 -0
- package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
- package/Models/DatabaseModels/AIRunRecording.js +181 -0
- package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
- package/Models/DatabaseModels/Alert.js +18 -2
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/EmailLog.js +2 -2
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +4 -4
- package/Models/DatabaseModels/GlobalConfig.js +46 -45
- package/Models/DatabaseModels/Incident.js +18 -2
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/Index.js +4 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +51 -17
- package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
- package/Models/DatabaseModels/MonitorProbe.js +22 -5
- package/Models/DatabaseModels/NetworkDevice.js +23 -7
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
- package/Models/DatabaseModels/NetworkInterface.js +5 -5
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +1 -0
- package/Models/DatabaseModels/Project.d.ts +1 -0
- package/Models/DatabaseModels/Project.js +46 -3
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
- package/Server/Services/DatabaseService.d.mts +4 -1
- package/Server/Services/DatabaseService.d.ts +4 -1
- package/Server/Types/Database/CountBy.d.mts +1 -0
- package/Server/Types/Database/CountBy.d.ts +1 -0
- package/Server/Types/Database/UpdateLimit.d.mts +6 -0
- package/Server/Types/Database/UpdateLimit.d.ts +6 -0
- package/Types/AI/AIActionWords.d.mts +25 -1
- package/Types/AI/AIActionWords.d.ts +25 -1
- package/Types/AI/AIActionWords.js +166 -3
- package/Types/AI/AIActionWords.mjs +6 -0
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AiOutcomes.d.mts +57 -0
- package/Types/AI/AiOutcomes.d.ts +57 -0
- package/Types/AI/AiOutcomes.js +67 -0
- package/Types/AI/AiOutcomes.mjs +10 -0
- package/Types/AI/AiRunRefusal.d.mts +45 -0
- package/Types/AI/AiRunRefusal.d.ts +45 -0
- package/Types/AI/AiRunRefusal.js +187 -0
- package/Types/AI/AiRunRefusal.mjs +12 -0
- package/Types/AI/InvestigationRecording.d.mts +46 -0
- package/Types/AI/InvestigationRecording.d.ts +46 -0
- package/Types/AI/InvestigationRecording.js +42 -0
- package/Types/AI/InvestigationRecording.mjs +7 -0
- package/Types/API/HTTPResponse.d.mts +3 -0
- package/Types/API/HTTPResponse.d.ts +3 -0
- package/Types/API/HTTPResponse.js +15 -0
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
- package/Types/BaseDatabase/ListResult.d.mts +1 -0
- package/Types/BaseDatabase/ListResult.d.ts +1 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
- package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
- package/Types/Date.d.mts +6 -1
- package/Types/Date.d.ts +6 -1
- package/Types/Date.js +39 -7
- package/Types/Date.mjs +1 -0
- package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
- package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
- package/Types/Email/ServerEmailEnvironment.js +793 -0
- package/Types/Email/ServerEmailEnvironment.mjs +14 -0
- package/Types/Exception/AiRunRefusalException.d.mts +6 -0
- package/Types/Exception/AiRunRefusalException.d.ts +6 -0
- package/Types/Exception/AiRunRefusalException.js +23 -0
- package/Types/Exception/AiRunRefusalException.mjs +2 -0
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
- package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
- package/Types/Monitor/UptimeHistoryLabels.js +2 -2
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
- package/Types/Permission.js +2 -2
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +10 -0
- package/Types/ReaderLanguage.d.mts +1 -0
- package/Types/ReaderLanguage.d.ts +1 -0
- package/Types/ReaderLanguage.js +13 -1
- package/Types/ReaderLanguage.mjs +1 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
- package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
- package/Types/ServerSending/ServerSendingStatus.js +49 -2
- package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
- package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
- package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
- package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
- package/Types/Telemetry/CompatibleIngest.js +123 -0
- package/Types/Telemetry/CompatibleIngest.mjs +21 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
- package/Types/TimezoneAlias.d.mts +1 -0
- package/Types/TimezoneAlias.d.ts +1 -0
- package/Types/TimezoneAlias.js +13 -0
- package/Types/Translator.js +374 -48
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +2 -2
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
- package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
- package/Utils/HostAddressUtil.d.mts +1 -0
- package/Utils/HostAddressUtil.d.ts +1 -0
- package/Utils/HostAddressUtil.js +30 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/Milliseconds.d.mts +7 -0
- package/Utils/Milliseconds.d.ts +7 -0
- package/Utils/Milliseconds.js +60 -0
- package/Utils/Milliseconds.mjs +4 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
- package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
- package/Utils/Monitor/MonitoringOff.d.mts +2 -0
- package/Utils/Monitor/MonitoringOff.d.ts +2 -0
- package/Utils/Monitor/MonitoringOff.js +21 -0
- package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
- package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
- package/Utils/Monitor/ProbeFailureReading.js +137 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
- package/Utils/Project/NextNumber.js +1 -1
- package/Utils/PromQL/PromQLAst.d.mts +159 -0
- package/Utils/PromQL/PromQLAst.d.ts +159 -0
- package/Utils/PromQL/PromQLAst.js +118 -0
- package/Utils/PromQL/PromQLAst.mjs +12 -0
- package/Utils/PromQL/PromQLDuration.d.mts +2 -0
- package/Utils/PromQL/PromQLDuration.d.ts +2 -0
- package/Utils/PromQL/PromQLDuration.js +78 -0
- package/Utils/PromQL/PromQLDuration.mjs +3 -0
- package/Utils/PromQL/PromQLEngine.d.mts +15 -0
- package/Utils/PromQL/PromQLEngine.d.ts +15 -0
- package/Utils/PromQL/PromQLEngine.js +965 -0
- package/Utils/PromQL/PromQLEngine.mjs +7 -0
- package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.js +10 -0
- package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
- package/Utils/PromQL/PromQLError.d.mts +11 -0
- package/Utils/PromQL/PromQLError.d.ts +11 -0
- package/Utils/PromQL/PromQLError.js +27 -0
- package/Utils/PromQL/PromQLError.mjs +3 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
- package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
- package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
- package/Utils/PromQL/PromQLFunctions.js +127 -0
- package/Utils/PromQL/PromQLFunctions.mjs +4 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +218 -0
- package/Utils/PromQL/PromQLLabels.mjs +9 -0
- package/Utils/PromQL/PromQLLexer.d.mts +39 -0
- package/Utils/PromQL/PromQLLexer.d.ts +39 -0
- package/Utils/PromQL/PromQLLexer.js +391 -0
- package/Utils/PromQL/PromQLLexer.mjs +3 -0
- package/Utils/PromQL/PromQLMath.d.mts +19 -0
- package/Utils/PromQL/PromQLMath.d.ts +19 -0
- package/Utils/PromQL/PromQLMath.js +200 -0
- package/Utils/PromQL/PromQLMath.mjs +9 -0
- package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
- package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
- package/Utils/PromQL/PromQLMetricNames.js +199 -0
- package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
- package/Utils/PromQL/PromQLParser.d.mts +4 -0
- package/Utils/PromQL/PromQLParser.d.ts +4 -0
- package/Utils/PromQL/PromQLParser.js +831 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +9 -0
- package/Utils/PromQL/PromQLRegex.d.ts +9 -0
- package/Utils/PromQL/PromQLRegex.js +74 -0
- package/Utils/PromQL/PromQLRegex.mjs +2 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +90 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/Rum/PathInSentence.d.mts +5 -0
- package/Utils/Rum/PathInSentence.d.ts +5 -0
- package/Utils/Rum/PathInSentence.js +46 -0
- package/Utils/Rum/PathInSentence.mjs +6 -0
- package/Utils/Rum/UrlScrubber.d.mts +4 -0
- package/Utils/Rum/UrlScrubber.d.ts +4 -0
- package/Utils/Rum/UrlScrubber.js +143 -3
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +180 -25
- package/Utils/Rum/UserFlow.mjs +1 -1
- package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.js +30 -0
- package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
- package/Utils/Schema/TypeSchemas.js +6 -0
- package/Utils/Slo/SloDuration.d.mts +5 -2
- package/Utils/Slo/SloDuration.d.ts +5 -2
- package/Utils/Slo/SloDuration.js +11 -6
- package/Utils/Slo/SloHealth.js +1 -1
- package/Utils/StateOrder.js +1 -4
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/package.json +1 -1
package/Types/Date.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ARABIC_DATE_TIME_SEPARATOR = exports.DATE_TIME_SEPARATOR = exports.Moment = void 0;
|
|
39
|
+
exports.ZERO_FRIENDLY_TIME_TEXT = exports.ARABIC_DATE_TIME_SEPARATOR = exports.DATE_TIME_SEPARATOR = exports.Moment = void 0;
|
|
40
40
|
const InBetween_1 = __importDefault(require("./BaseDatabase/InBetween"));
|
|
41
41
|
const DayOfWeek_1 = __importStar(require("./Day/DayOfWeek"));
|
|
42
42
|
const BadDataException_1 = __importDefault(require("./Exception/BadDataException"));
|
|
@@ -51,8 +51,11 @@ exports.Moment = moment_timezone_1.default;
|
|
|
51
51
|
/*
|
|
52
52
|
* The custom shapes (getDateAsCustomFormattedStringInTimezone) a date's words
|
|
53
53
|
* are written in the reader's language for, as Intl asks for them. A shape
|
|
54
|
-
* with no words in it
|
|
55
|
-
*
|
|
54
|
+
* with no words in it still takes the reader's digits: "HH:mm" here
|
|
55
|
+
* ("۲۲:۲۷" on a Persian page), and READER_DIGIT_CUSTOM_DATE_FORMATS, whose
|
|
56
|
+
* shapes keep moment's marks. A shape in neither list is moment's, in
|
|
57
|
+
* English and in Latin digits ("YYYY-MM-DD", which callers compare rather
|
|
58
|
+
* than show), so a shape a page shows belongs in one of them.
|
|
56
59
|
*
|
|
57
60
|
* English's "hh" keeps a 12-hour time's zero ("05:01 PM"), as moment writes
|
|
58
61
|
* it; no other language writes one there ("오후 5:01", "5:01 م"), so the
|
|
@@ -72,6 +75,19 @@ const LOCALIZED_CUSTOM_DATE_FORMATS = {
|
|
|
72
75
|
// A 24-hour time of day, in the reader's digits: "۲۲:۲۷" on a Persian page.
|
|
73
76
|
"HH:mm": { hour: "2-digit", minute: "2-digit", hourCycle: "h23" },
|
|
74
77
|
};
|
|
78
|
+
/*
|
|
79
|
+
* The custom shapes with no words in them that are written as moment writes
|
|
80
|
+
* them, in the reader's digits (inReaderDigits) - the digits "HH:mm" takes:
|
|
81
|
+
* Persian's own, and the Latin ones of every other language of the
|
|
82
|
+
* product, Arabic too. Only the digits change, so the shape is the same in
|
|
83
|
+
* every language; Intl would put a comma before the milliseconds in German
|
|
84
|
+
* ("11:55:59,120") and dots between the hours, minutes and seconds in
|
|
85
|
+
* Danish ("11.55.59,120").
|
|
86
|
+
*/
|
|
87
|
+
const READER_DIGIT_CUSTOM_DATE_FORMATS = [
|
|
88
|
+
// An exception breadcrumb's Clock time: "۱۱:۵۵:۵۹.۱۲۰" on a Persian page.
|
|
89
|
+
"HH:mm:ss.SSS",
|
|
90
|
+
];
|
|
75
91
|
// A whole number of nanoseconds, as fromUnixNano reads one exactly.
|
|
76
92
|
const UNIX_NANO_INTEGER_PATTERN = /^[+-]?\d+$/;
|
|
77
93
|
/*
|
|
@@ -128,6 +144,8 @@ const CLICKHOUSE_DATE_TIME_MEMO_SLOTS = 256;
|
|
|
128
144
|
// NaN never equals a second, so an empty slot is never read.
|
|
129
145
|
const clickhouseDateTimeMemoSeconds = new Float64Array(CLICKHOUSE_DATE_TIME_MEMO_SLOTS).fill(Number.NaN);
|
|
130
146
|
const clickhouseDateTimeMemoTexts = new Array(CLICKHOUSE_DATE_TIME_MEMO_SLOTS).fill("");
|
|
147
|
+
// What a duration of nothing reads in English, with writesZero.
|
|
148
|
+
exports.ZERO_FRIENDLY_TIME_TEXT = "0 secs";
|
|
131
149
|
class OneUptimeDate {
|
|
132
150
|
static padDatePart(value) {
|
|
133
151
|
return value.toString().padStart(2, "0");
|
|
@@ -818,7 +836,9 @@ class OneUptimeDate {
|
|
|
818
836
|
};
|
|
819
837
|
const options = LOCALIZED_CUSTOM_DATE_FORMATS[data.format];
|
|
820
838
|
if (!options) {
|
|
821
|
-
return
|
|
839
|
+
return READER_DIGIT_CUSTOM_DATE_FORMATS.includes(data.format)
|
|
840
|
+
? this.inReaderDigits(english)
|
|
841
|
+
: english();
|
|
822
842
|
}
|
|
823
843
|
return (0, DateLanguage_1.writeInDateDisplayLanguage)(english, (_language, locale) => {
|
|
824
844
|
const format = (0, DateLanguage_1.getDateTimeFormat)({
|
|
@@ -1526,10 +1546,22 @@ class OneUptimeDate {
|
|
|
1526
1546
|
/*
|
|
1527
1547
|
* "1 year 2 months 3 days 4 hours 5 mins 6 secs", each unit that is not
|
|
1528
1548
|
* zero, counted on the calendar from the epoch - and in the reader's
|
|
1529
|
-
* language when a frontend set one ("1 J. 2 Mon. 3 Tg.").
|
|
1549
|
+
* language when a frontend set one ("1 J. 2 Mon. 3 Tg."). `options` keeps
|
|
1550
|
+
* only the largest units, and writes a duration of nothing.
|
|
1530
1551
|
*/
|
|
1531
|
-
static secondsToFormattedFriendlyTimeString(seconds) {
|
|
1532
|
-
const
|
|
1552
|
+
static secondsToFormattedFriendlyTimeString(seconds, options) {
|
|
1553
|
+
const maxUnits = options === null || options === void 0 ? void 0 : options.maxUnits;
|
|
1554
|
+
const allParts = this.getFriendlyTimeParts(seconds);
|
|
1555
|
+
const parts = maxUnits !== undefined && maxUnits >= 1
|
|
1556
|
+
? allParts.slice(0, Math.floor(maxUnits))
|
|
1557
|
+
: allParts;
|
|
1558
|
+
if (parts.length === 0 && (options === null || options === void 0 ? void 0 : options.writesZero)) {
|
|
1559
|
+
return (0, DateLanguage_1.writeInDateDisplayLanguage)(() => {
|
|
1560
|
+
return exports.ZERO_FRIENDLY_TIME_TEXT;
|
|
1561
|
+
}, (_language, locale) => {
|
|
1562
|
+
return this.formatLocalizedDuration([{ count: 0, unit: "second" }], locale, "short", "narrow");
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1533
1565
|
return (0, DateLanguage_1.writeInDateDisplayLanguage)(() => {
|
|
1534
1566
|
return parts
|
|
1535
1567
|
.map((part) => {
|
package/Types/Date.mjs
CHANGED
|
@@ -3,3 +3,4 @@ export default commonJsModule.default;
|
|
|
3
3
|
export const ARABIC_DATE_TIME_SEPARATOR = commonJsModule.ARABIC_DATE_TIME_SEPARATOR;
|
|
4
4
|
export const DATE_TIME_SEPARATOR = commonJsModule.DATE_TIME_SEPARATOR;
|
|
5
5
|
export const Moment = commonJsModule.Moment;
|
|
6
|
+
export const ZERO_FRIENDLY_TIME_TEXT = commonJsModule.ZERO_FRIENDLY_TIME_TEXT;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import GlobalConfig, { EmailServerType } from "../../Models/DatabaseModels/GlobalConfig.mjs";
|
|
2
|
+
import AmazonSesAuthenticationType from "./AmazonSesAuthenticationType.mjs";
|
|
3
|
+
import MailgunRegion from "./MailgunRegion.mjs";
|
|
4
|
+
import MailTransportType from "./MailTransportType.mjs";
|
|
5
|
+
import OAuthProviderType from "./OAuthProviderType.mjs";
|
|
6
|
+
import SMTPAuthenticationType from "./SMTPAuthenticationType.mjs";
|
|
7
|
+
export declare enum ServerEmailEnvironmentVariable {
|
|
8
|
+
ServerType = "GLOBAL_EMAIL_SERVER_TYPE",
|
|
9
|
+
FromEmail = "GLOBAL_EMAIL_FROM_EMAIL",
|
|
10
|
+
FromName = "GLOBAL_EMAIL_FROM_NAME",
|
|
11
|
+
SmtpTransport = "GLOBAL_EMAIL_SMTP_TRANSPORT",
|
|
12
|
+
SmtpHost = "GLOBAL_EMAIL_SMTP_HOST",
|
|
13
|
+
SmtpPort = "GLOBAL_EMAIL_SMTP_PORT",
|
|
14
|
+
SmtpRequireTls = "GLOBAL_EMAIL_SMTP_REQUIRE_TLS",
|
|
15
|
+
SmtpAuthType = "GLOBAL_EMAIL_SMTP_AUTH_TYPE",
|
|
16
|
+
SmtpUsername = "GLOBAL_EMAIL_SMTP_USERNAME",
|
|
17
|
+
SmtpPassword = "GLOBAL_EMAIL_SMTP_PASSWORD",
|
|
18
|
+
SmtpOAuthProviderType = "GLOBAL_EMAIL_SMTP_OAUTH_PROVIDER_TYPE",
|
|
19
|
+
SmtpOAuthClientId = "GLOBAL_EMAIL_SMTP_OAUTH_CLIENT_ID",
|
|
20
|
+
SmtpOAuthClientSecret = "GLOBAL_EMAIL_SMTP_OAUTH_CLIENT_SECRET",
|
|
21
|
+
SmtpOAuthTokenUrl = "GLOBAL_EMAIL_SMTP_OAUTH_TOKEN_URL",
|
|
22
|
+
SmtpOAuthScope = "GLOBAL_EMAIL_SMTP_OAUTH_SCOPE",
|
|
23
|
+
SendgridApiKey = "GLOBAL_EMAIL_SENDGRID_API_KEY",
|
|
24
|
+
AmazonSesAuthenticationType = "GLOBAL_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE",
|
|
25
|
+
AmazonSesAccessKeyId = "GLOBAL_EMAIL_AMAZON_SES_ACCESS_KEY_ID",
|
|
26
|
+
AmazonSesSecretAccessKey = "GLOBAL_EMAIL_AMAZON_SES_SECRET_ACCESS_KEY",
|
|
27
|
+
AmazonSesRegion = "GLOBAL_EMAIL_AMAZON_SES_REGION",
|
|
28
|
+
MailgunApiKey = "GLOBAL_EMAIL_MAILGUN_API_KEY",
|
|
29
|
+
MailgunDomain = "GLOBAL_EMAIL_MAILGUN_DOMAIN",
|
|
30
|
+
MailgunRegion = "GLOBAL_EMAIL_MAILGUN_REGION",
|
|
31
|
+
PostmarkServerToken = "GLOBAL_EMAIL_POSTMARK_SERVER_TOKEN",
|
|
32
|
+
ResendApiKey = "GLOBAL_EMAIL_RESEND_API_KEY"
|
|
33
|
+
}
|
|
34
|
+
export declare const SERVER_EMAIL_ENVIRONMENT_VARIABLES: ReadonlyArray<ServerEmailEnvironmentVariable>;
|
|
35
|
+
export declare const SERVER_EMAIL_SECRET_VARIABLES: ReadonlyArray<ServerEmailEnvironmentVariable>;
|
|
36
|
+
export declare const SERVER_EMAIL_SERVER_TYPE_VALUES: Readonly<Record<EmailServerType, string>>;
|
|
37
|
+
export type ServerEmailSmtpTransport = MailTransportType.SMTP | MailTransportType.MicrosoftGraph;
|
|
38
|
+
export declare const SERVER_EMAIL_SMTP_TRANSPORT_VALUES: Readonly<Record<ServerEmailSmtpTransport, string>>;
|
|
39
|
+
export declare const SERVER_EMAIL_SMTP_AUTH_TYPE_VALUES: Readonly<Record<SMTPAuthenticationType, string>>;
|
|
40
|
+
export declare const SERVER_EMAIL_SMTP_OAUTH_PROVIDER_TYPE_VALUES: Readonly<Record<OAuthProviderType, string>>;
|
|
41
|
+
export declare const SERVER_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE_VALUES: Readonly<Record<AmazonSesAuthenticationType, string>>;
|
|
42
|
+
export declare const SERVER_EMAIL_MAILGUN_REGION_VALUES: Readonly<Record<MailgunRegion, string>>;
|
|
43
|
+
export declare const SERVER_EMAIL_ENVIRONMENT_ROUTE: string;
|
|
44
|
+
export declare const SERVER_EMAIL_SET_BY_ENVIRONMENT_MESSAGE: string;
|
|
45
|
+
export type ServerEmailColumn = "emailServerType" | "isSMTPSecure" | "smtpTransportType" | "smtpAuthType" | "smtpHost" | "smtpPort" | "smtpUsername" | "smtpPassword" | "smtpFromEmail" | "smtpFromName" | "smtpClientId" | "smtpClientSecret" | "smtpTokenUrl" | "smtpScope" | "smtpOAuthProviderType" | "sendgridApiKey" | "sendgridFromEmail" | "sendgridFromName" | "amazonSesAuthenticationType" | "amazonSesAccessKeyId" | "amazonSesSecretAccessKey" | "amazonSesRegion" | "amazonSesFromEmail" | "amazonSesFromName" | "mailgunApiKey" | "mailgunDomain" | "mailgunRegion" | "mailgunFromEmail" | "mailgunFromName" | "postmarkServerToken" | "postmarkFromEmail" | "postmarkFromName" | "resendApiKey" | "resendFromEmail" | "resendFromName";
|
|
46
|
+
export declare const SERVER_EMAIL_COLUMNS: ReadonlyArray<ServerEmailColumn>;
|
|
47
|
+
export type ServerEmailSettings = Partial<Pick<GlobalConfig, ServerEmailColumn>>;
|
|
48
|
+
export interface ServerEmailEnvironmentReading {
|
|
49
|
+
isSet: boolean;
|
|
50
|
+
serverType: EmailServerType | null;
|
|
51
|
+
settings: ServerEmailSettings | null;
|
|
52
|
+
problems: Array<string>;
|
|
53
|
+
ignored: Array<ServerEmailEnvironmentVariable>;
|
|
54
|
+
values: Readonly<Partial<Record<ServerEmailEnvironmentVariable, string>>>;
|
|
55
|
+
}
|
|
56
|
+
export interface ServerEmailEnvironmentField {
|
|
57
|
+
variable: ServerEmailEnvironmentVariable;
|
|
58
|
+
value: string | null;
|
|
59
|
+
isSecret: boolean;
|
|
60
|
+
isSet: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface ServerEmailEnvironmentAnswer {
|
|
63
|
+
isSetByEnvironment: boolean;
|
|
64
|
+
serverType: EmailServerType | null;
|
|
65
|
+
fields: Array<ServerEmailEnvironmentField>;
|
|
66
|
+
problems: Array<string>;
|
|
67
|
+
ignored: Array<ServerEmailEnvironmentVariable>;
|
|
68
|
+
}
|
|
69
|
+
export type ServerEmailEnvironmentValues = Readonly<Record<string, string | undefined>>;
|
|
70
|
+
export default class ServerEmailEnvironment {
|
|
71
|
+
static readChoice<T extends string>(value: string | undefined, values: Readonly<Record<T, string>>, defaultChoice: T | null, aliases?: Readonly<Record<string, T>>): T | null;
|
|
72
|
+
static readServerType(value: string | undefined): EmailServerType | null;
|
|
73
|
+
static isSecret(variable: ServerEmailEnvironmentVariable): boolean;
|
|
74
|
+
static isBareHost(value: string): boolean;
|
|
75
|
+
static isTokenUrl(value: string): boolean;
|
|
76
|
+
static read(environment: ServerEmailEnvironmentValues): ServerEmailEnvironmentReading;
|
|
77
|
+
private static variableOrderOf;
|
|
78
|
+
static isUsable(reading: ServerEmailEnvironmentReading): boolean;
|
|
79
|
+
static getReadVariables(reading: ServerEmailEnvironmentReading): Array<ServerEmailEnvironmentVariable>;
|
|
80
|
+
static toAnswer(reading: ServerEmailEnvironmentReading): ServerEmailEnvironmentAnswer;
|
|
81
|
+
static answerFromJSON(json: unknown): ServerEmailEnvironmentAnswer;
|
|
82
|
+
static getStartupNotice(reading: ServerEmailEnvironmentReading): string | null;
|
|
83
|
+
static getIgnoredMessage(reading: ServerEmailEnvironmentReading): string | null;
|
|
84
|
+
static getStartupWarning(reading: ServerEmailEnvironmentReading): string | null;
|
|
85
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import GlobalConfig, { EmailServerType } from "../../Models/DatabaseModels/GlobalConfig";
|
|
2
|
+
import AmazonSesAuthenticationType from "./AmazonSesAuthenticationType";
|
|
3
|
+
import MailgunRegion from "./MailgunRegion";
|
|
4
|
+
import MailTransportType from "./MailTransportType";
|
|
5
|
+
import OAuthProviderType from "./OAuthProviderType";
|
|
6
|
+
import SMTPAuthenticationType from "./SMTPAuthenticationType";
|
|
7
|
+
export declare enum ServerEmailEnvironmentVariable {
|
|
8
|
+
ServerType = "GLOBAL_EMAIL_SERVER_TYPE",
|
|
9
|
+
FromEmail = "GLOBAL_EMAIL_FROM_EMAIL",
|
|
10
|
+
FromName = "GLOBAL_EMAIL_FROM_NAME",
|
|
11
|
+
SmtpTransport = "GLOBAL_EMAIL_SMTP_TRANSPORT",
|
|
12
|
+
SmtpHost = "GLOBAL_EMAIL_SMTP_HOST",
|
|
13
|
+
SmtpPort = "GLOBAL_EMAIL_SMTP_PORT",
|
|
14
|
+
SmtpRequireTls = "GLOBAL_EMAIL_SMTP_REQUIRE_TLS",
|
|
15
|
+
SmtpAuthType = "GLOBAL_EMAIL_SMTP_AUTH_TYPE",
|
|
16
|
+
SmtpUsername = "GLOBAL_EMAIL_SMTP_USERNAME",
|
|
17
|
+
SmtpPassword = "GLOBAL_EMAIL_SMTP_PASSWORD",
|
|
18
|
+
SmtpOAuthProviderType = "GLOBAL_EMAIL_SMTP_OAUTH_PROVIDER_TYPE",
|
|
19
|
+
SmtpOAuthClientId = "GLOBAL_EMAIL_SMTP_OAUTH_CLIENT_ID",
|
|
20
|
+
SmtpOAuthClientSecret = "GLOBAL_EMAIL_SMTP_OAUTH_CLIENT_SECRET",
|
|
21
|
+
SmtpOAuthTokenUrl = "GLOBAL_EMAIL_SMTP_OAUTH_TOKEN_URL",
|
|
22
|
+
SmtpOAuthScope = "GLOBAL_EMAIL_SMTP_OAUTH_SCOPE",
|
|
23
|
+
SendgridApiKey = "GLOBAL_EMAIL_SENDGRID_API_KEY",
|
|
24
|
+
AmazonSesAuthenticationType = "GLOBAL_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE",
|
|
25
|
+
AmazonSesAccessKeyId = "GLOBAL_EMAIL_AMAZON_SES_ACCESS_KEY_ID",
|
|
26
|
+
AmazonSesSecretAccessKey = "GLOBAL_EMAIL_AMAZON_SES_SECRET_ACCESS_KEY",
|
|
27
|
+
AmazonSesRegion = "GLOBAL_EMAIL_AMAZON_SES_REGION",
|
|
28
|
+
MailgunApiKey = "GLOBAL_EMAIL_MAILGUN_API_KEY",
|
|
29
|
+
MailgunDomain = "GLOBAL_EMAIL_MAILGUN_DOMAIN",
|
|
30
|
+
MailgunRegion = "GLOBAL_EMAIL_MAILGUN_REGION",
|
|
31
|
+
PostmarkServerToken = "GLOBAL_EMAIL_POSTMARK_SERVER_TOKEN",
|
|
32
|
+
ResendApiKey = "GLOBAL_EMAIL_RESEND_API_KEY"
|
|
33
|
+
}
|
|
34
|
+
export declare const SERVER_EMAIL_ENVIRONMENT_VARIABLES: ReadonlyArray<ServerEmailEnvironmentVariable>;
|
|
35
|
+
export declare const SERVER_EMAIL_SECRET_VARIABLES: ReadonlyArray<ServerEmailEnvironmentVariable>;
|
|
36
|
+
export declare const SERVER_EMAIL_SERVER_TYPE_VALUES: Readonly<Record<EmailServerType, string>>;
|
|
37
|
+
export type ServerEmailSmtpTransport = MailTransportType.SMTP | MailTransportType.MicrosoftGraph;
|
|
38
|
+
export declare const SERVER_EMAIL_SMTP_TRANSPORT_VALUES: Readonly<Record<ServerEmailSmtpTransport, string>>;
|
|
39
|
+
export declare const SERVER_EMAIL_SMTP_AUTH_TYPE_VALUES: Readonly<Record<SMTPAuthenticationType, string>>;
|
|
40
|
+
export declare const SERVER_EMAIL_SMTP_OAUTH_PROVIDER_TYPE_VALUES: Readonly<Record<OAuthProviderType, string>>;
|
|
41
|
+
export declare const SERVER_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE_VALUES: Readonly<Record<AmazonSesAuthenticationType, string>>;
|
|
42
|
+
export declare const SERVER_EMAIL_MAILGUN_REGION_VALUES: Readonly<Record<MailgunRegion, string>>;
|
|
43
|
+
export declare const SERVER_EMAIL_ENVIRONMENT_ROUTE: string;
|
|
44
|
+
export declare const SERVER_EMAIL_SET_BY_ENVIRONMENT_MESSAGE: string;
|
|
45
|
+
export type ServerEmailColumn = "emailServerType" | "isSMTPSecure" | "smtpTransportType" | "smtpAuthType" | "smtpHost" | "smtpPort" | "smtpUsername" | "smtpPassword" | "smtpFromEmail" | "smtpFromName" | "smtpClientId" | "smtpClientSecret" | "smtpTokenUrl" | "smtpScope" | "smtpOAuthProviderType" | "sendgridApiKey" | "sendgridFromEmail" | "sendgridFromName" | "amazonSesAuthenticationType" | "amazonSesAccessKeyId" | "amazonSesSecretAccessKey" | "amazonSesRegion" | "amazonSesFromEmail" | "amazonSesFromName" | "mailgunApiKey" | "mailgunDomain" | "mailgunRegion" | "mailgunFromEmail" | "mailgunFromName" | "postmarkServerToken" | "postmarkFromEmail" | "postmarkFromName" | "resendApiKey" | "resendFromEmail" | "resendFromName";
|
|
46
|
+
export declare const SERVER_EMAIL_COLUMNS: ReadonlyArray<ServerEmailColumn>;
|
|
47
|
+
export type ServerEmailSettings = Partial<Pick<GlobalConfig, ServerEmailColumn>>;
|
|
48
|
+
export interface ServerEmailEnvironmentReading {
|
|
49
|
+
isSet: boolean;
|
|
50
|
+
serverType: EmailServerType | null;
|
|
51
|
+
settings: ServerEmailSettings | null;
|
|
52
|
+
problems: Array<string>;
|
|
53
|
+
ignored: Array<ServerEmailEnvironmentVariable>;
|
|
54
|
+
values: Readonly<Partial<Record<ServerEmailEnvironmentVariable, string>>>;
|
|
55
|
+
}
|
|
56
|
+
export interface ServerEmailEnvironmentField {
|
|
57
|
+
variable: ServerEmailEnvironmentVariable;
|
|
58
|
+
value: string | null;
|
|
59
|
+
isSecret: boolean;
|
|
60
|
+
isSet: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface ServerEmailEnvironmentAnswer {
|
|
63
|
+
isSetByEnvironment: boolean;
|
|
64
|
+
serverType: EmailServerType | null;
|
|
65
|
+
fields: Array<ServerEmailEnvironmentField>;
|
|
66
|
+
problems: Array<string>;
|
|
67
|
+
ignored: Array<ServerEmailEnvironmentVariable>;
|
|
68
|
+
}
|
|
69
|
+
export type ServerEmailEnvironmentValues = Readonly<Record<string, string | undefined>>;
|
|
70
|
+
export default class ServerEmailEnvironment {
|
|
71
|
+
static readChoice<T extends string>(value: string | undefined, values: Readonly<Record<T, string>>, defaultChoice: T | null, aliases?: Readonly<Record<string, T>>): T | null;
|
|
72
|
+
static readServerType(value: string | undefined): EmailServerType | null;
|
|
73
|
+
static isSecret(variable: ServerEmailEnvironmentVariable): boolean;
|
|
74
|
+
static isBareHost(value: string): boolean;
|
|
75
|
+
static isTokenUrl(value: string): boolean;
|
|
76
|
+
static read(environment: ServerEmailEnvironmentValues): ServerEmailEnvironmentReading;
|
|
77
|
+
private static variableOrderOf;
|
|
78
|
+
static isUsable(reading: ServerEmailEnvironmentReading): boolean;
|
|
79
|
+
static getReadVariables(reading: ServerEmailEnvironmentReading): Array<ServerEmailEnvironmentVariable>;
|
|
80
|
+
static toAnswer(reading: ServerEmailEnvironmentReading): ServerEmailEnvironmentAnswer;
|
|
81
|
+
static answerFromJSON(json: unknown): ServerEmailEnvironmentAnswer;
|
|
82
|
+
static getStartupNotice(reading: ServerEmailEnvironmentReading): string | null;
|
|
83
|
+
static getIgnoredMessage(reading: ServerEmailEnvironmentReading): string | null;
|
|
84
|
+
static getStartupWarning(reading: ServerEmailEnvironmentReading): string | null;
|
|
85
|
+
}
|